openfoam/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre
Mark Olesen b0136d835e ENH: lumped point motion using local linear basic functions (#1341)
- the earlier implementation of externally controlled lumped point
  motion (see merge request !120 and OpenFOAM-v1706 release notes) was
  conceived for the motion of simple structures such as buildings or
  simple beams. The motion controller was simply defined in terms of
  an orientation axis and divisions along that axis.

  To include complex structures, multiple motion controllers are
  defined in terms of support points and connectivity.

  The points can have additional node Ids associated with them, which
  makes it easier to map to/from FEA models.

  OLD system/lumpedPointMovement specification
  --------------------------------------------

      //- Reference axis for the locations
      axis            (0 0 1);

      //- Locations of the lumped points
      locations       (0 0.05 .. 0.5);

  NEW system/lumpedPointMovement specification
  --------------------------------------------

      // Locations of the lumped points
      points
      (
          (0  0  0.00)
          (0  0  0.05)
          ...
          (0  0  0.50)
      );

      //- Connectivity for motion controllers
      controllers
      {
          vertical
          {
              pointLabels (0 1 2 3 4 5 6 7 8 9 10);
          }
      }

  And the controller(s) must be associated with the given
  pointDisplacement patch. Eg,

     somePatch
     {
         type            lumpedPointDisplacement;
         value           uniform (0 0 0);
         controllers     ( vertical );   // <-- NEW
     }

TUT: adjust building motion tutorial

- use new controllor definitions
- replace building response file with executable
- add updateControl in dynamicMeshDict for slowly moving structure
2020-06-17 15:16:27 +02:00

51 lines
1.1 KiB
Bash
Executable File

#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# Get geometry and other resources
./Allrun.init
# runApplication surfaceFeatureExtract
runApplication blockMesh
rm -f constant/polyMesh/*Level
unset parallel
parallel=true
# Dummy 0 directory
mkdir -p 0
if [ "${parallel:-false}" = false ]
then
# Serial
runApplication snappyHexMesh -overwrite
rm -f constant/polyMesh/refinementHistory*
restore0Dir
runApplication renumberMesh -overwrite
else
# Parallel
runApplication decomposePar -force
runParallel snappyHexMesh -overwrite
\ls -d processor* | xargs -I {} \rm -f ./{}/constant/polyMesh/refinementHistory
restore0Dir -processor
runParallel renumberMesh -overwrite
# In case serial calculations are needed later
restore0Dir # Overwrite dummy 0 directory
# runApplication reconstructParMesh -constant
fi
#------------------------------------------------------------------------------