ENH: oscillatingLinearMotion: add optional phase- and vertical-shift entries

ENH: oscillatingLinearMotion: change types of input entries to Function1

TUT: sloshingCylinder: exemplify new entries of oscillatingLinearMotion
This commit is contained in:
Kutalmis Bercin
2022-06-28 17:08:31 +01:00
parent d058600b21
commit 62ac69688f
8 changed files with 221 additions and 27 deletions

View File

@ -7,5 +7,6 @@ cleanCase0
rm -rf constant/triSurface
rm -rf constant/extendedFeatureEdgeMesh
rm -rf oldProcessors
#------------------------------------------------------------------------------

View File

@ -3,19 +3,7 @@ cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
mkdir -p constant/triSurface
cp -f \
"$FOAM_TUTORIALS"/resources/geometry/sloshingCylinder.obj.gz \
constant/triSurface/
restore0Dir
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication setFields
./Allrun.pre
runApplication $(getApplication)

View File

@ -0,0 +1,29 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
latestTime=$(foamListTimes -latestTime)
mv -f "$latestTime" "$latestTime".bak
mkdir oldProcessors
mv -f processor* oldProcessors
runParallel -s "decompose" redistributePar -decompose -latestTime
runParallel -s "restart" $(getApplication)
runParallel -s "reconstruct" redistributePar -reconstruct -latestTime
#------------------------------------------------------------------------------

View File

@ -0,0 +1,20 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
mkdir -p constant/triSurface
cp -f \
"$FOAM_TUTORIALS"/resources/geometry/sloshingCylinder.obj.gz \
constant/triSurface/
restore0Dir
runApplication blockMesh
runApplication snappyHexMesh -overwrite
runApplication setFields
#------------------------------------------------------------------------------

View File

@ -27,6 +27,9 @@ oscillation
{
amplitude (0.1 0 0);
omega 18.8945578;
phaseShift 0.01;
verticalShift (0.05 0 0);
}
}

View File

@ -0,0 +1,27 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2206 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method hierarchical;
coeffs
{
n ( 2 2 1 );
}
// ************************************************************************* //