- 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
48 lines
1.4 KiB
Bash
Executable File
48 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
cd "${0%/*}" || exit # Run from this directory
|
|
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
|
#------------------------------------------------------------------------------
|
|
|
|
# 1) Run steady-state to establish a good initial field
|
|
# 2) Copy state-state results -> transient case,
|
|
# but need to copy the pointDisplacement from the 0/ directory
|
|
# since it will not have been used for the steady-state case
|
|
# 3) Relocate this initial solution to coincide with the first deltaT
|
|
# to avoid overwriting the 0/ directory at all.
|
|
|
|
# Do steady-state case
|
|
(cd steady && foamRunTutorials)
|
|
|
|
if notTest "$@"
|
|
then
|
|
if canCompile
|
|
then
|
|
(cd code && wmake)
|
|
else
|
|
exit 0
|
|
fi
|
|
|
|
. files/RunFunctions
|
|
|
|
caseName="transient"
|
|
|
|
latestTime=$(foamListTimes -case steady -noZero -latestTime -processor)
|
|
|
|
# Clone steady-state case to transient
|
|
cloneParallelCase steady "$caseName" 0 "$latestTime"
|
|
|
|
copyParallelPointDisplacement "$caseName" "$latestTime"
|
|
|
|
# Adjust application (from simpleFoam -> pimpleFoam)
|
|
foamDictionary "$caseName"/system/controlDict \
|
|
-entry application -set pimpleFoam
|
|
|
|
# Copy/link support files
|
|
linkFiles files "$caseName"
|
|
|
|
# Run
|
|
"$caseName/Allrun.$caseName" $*
|
|
fi
|
|
|
|
#------------------------------------------------------------------------------
|