TUT: replace remaining templated thermoType

TUT: some simplification for multiWorld test

STYLE: remove some editor junk
This commit is contained in:
Mark Olesen
2021-07-14 15:47:00 +02:00
parent 09aa3d8b43
commit aca366d293
43 changed files with 524 additions and 415 deletions

View File

@ -4,19 +4,11 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
# Run serial
for subcase in left right
do
(
cd "$subcase" || exit
runApplication blockMesh && restore0Dir
)
done
./Allrun.pre
mpirun -app ./mpirun_left_right.schema
# Run with database
mv -f log.run_left log.run_left_direct
mv -f log.run_right log.run_right_direct
mv -f log.run_left* log.run_right*
for subcase in left right
do
@ -31,13 +23,7 @@ done
mpirun -app ./mpirun_left_right.schema
## Run parallel
## for subcase in left right
## do
## (
## cd "$subcase" || exit
## runApplication blockMesh && runApplication decomposePar
## )
## done
## ./Allrun.pre-parallel
## mpirun -app ./mpirun.schema
#------------------------------------------------------------------------------

View File

@ -0,0 +1,15 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# Create meshes and initial fields
for subcase in left right
do
(
cd "$subcase" || exit
runApplication blockMesh && restore0Dir
)
done
#------------------------------------------------------------------------------

View File

@ -0,0 +1,15 @@
#!/bin/sh
cd "${0%/*}" || exit # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
# Create meshes and initial fields
for subcase in left right
do
(
cd "$subcase" || exit
runApplication blockMesh && restore0Dir && runApplication decomposePar
)
done
#------------------------------------------------------------------------------

View File

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs (utilityFunctionObjects);
application laplacianFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
syncObjects
{
type syncObjects;
libs (utilityFunctionObjects);
// Where is data located relative to runTime. Given as a filename
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
// Local data is under <root>/send/processorXXX. After execution
// data will be under the corresponding <root>/receive/processorYYY
// objectRegistry
//root "level0/level1/level2";
}
}
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(T) Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
laplacian(DT,T) Gauss linear corrected;
laplacian(DTV,T) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,34 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //

View File

@ -1,65 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
libs (utilityFunctionObjects);
application laplacianFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
syncObjects
{
type syncObjects;
libs (utilityFunctionObjects);
// Where is data located relative to runTime. Given as a filename
// with every '/' indicating a sub-objectRegistry w.r.t. runTime.
// Local data is under <root>/send/processorXXX. After execution
// data will be under the corresponding <root>/receive/processorYYY
// objectRegistry
//root "level0/level1/level2";
}
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/controlDict

View File

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

View File

@ -0,0 +1 @@
../../common/system/decomposeParDict

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(T) Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default none;
laplacian(DT,T) Gauss linear corrected;
laplacian(DTV,T) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSchemes

View File

@ -1,34 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2106 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
T
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //

View File

@ -0,0 +1 @@
../../common/system/fvSolution

View File

@ -1,2 +1,2 @@
-np 1 ./run_left.sh
-np 1 ./run_right.sh
-np 1 ./run_world.sh left
-np 1 ./run_world.sh right

View File

@ -1 +1 @@
../../left/system/controlDict
../../common/system/controlDict

View File

@ -1 +1 @@
../../left/system/decomposeParDict
../../common/system/decomposeParDict

View File

@ -1 +1 @@
../../left/system/fvSchemes
../../common/system/fvSchemes

View File

@ -1 +1 @@
../../left/system/fvSolution
../../common/system/fvSolution

View File

@ -1,3 +0,0 @@
#!/bin/bash
laplacianFoam -case left -world LEFT 2>&1 | tee log.run_left
read dummy

View File

@ -1,3 +0,0 @@
#!/bin/bash
laplacianFoam -case right -world RIGHT 2>&1 | tee log.run_right
read dummy

View File

@ -0,0 +1,23 @@
#!/bin/sh
world="${1:?specify world/case}"
application="${2:-laplacianFoam}"
# case "$application" in
# (-test)
# application="Test-multiWorld1"
# ;;
# esac
if [ -z "$application" ] || ! command -v "$application" > /dev/null
then
echo "No application: $application"
exit 2
fi
worldCase="$(echo "$world" | tr '[:upper:]' '[:lower:]')"
worldName="$(echo "$world" | tr '[:lower:]' '[:upper:]')"
"$application" -case "$worldCase" -world "$worldName" 2>&1 | tee log.run_"$worldCase"
read dummy
# ----------------------------------------------------------------------------

View File

@ -79,8 +79,6 @@ SCOPECoeffs
thermophysicalProperties
{
thermoType hhuMixtureThermo<inhomogeneousMixture<sutherlandTransport<specieThermo<janafThermo<perfectGas>>>>>;
stoichiometricAirFuelMassRatio 17.1667;
fuel

View File

@ -14,7 +14,16 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType hePsiThermo<pureMixture<const<hConst<perfectGas<specie>>,sensibleEnthalpy>>>;
thermoType
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleEnthalpy;
}
// Note: these are the properties for a "normalised" inviscid gas
// for which the speed of sound is 1 m/s at a temperature of 1K