diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allclean new file mode 100755 index 0000000000..752a743cfa --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +(cd fluid && foamCleanTutorials) +(cd solid && foamCleanTutorials) +rm -rf logs +rm -f log.* + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allrun b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allrun new file mode 100755 index 0000000000..b72506b7f5 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/Allrun @@ -0,0 +1,23 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +(cd fluid && ./Allrun.pre) +(cd solid && runApplication blockMesh) + +# Run serial +mpirun -app ./mpirun.schema + +# Run parallel +(cd fluid && runApplication decomposePar) +(cd solid && runApplication decomposePar) +#mpirun -app ./mpirun.schema_parallel +# The problem is keeping the log files separate so use the openmpi +# mpirun option to keep the separate outputs in the logs/ directory +mpirun \ + --output-filename logs \ + -np 3 compressibleInterFoam -case fluid -world fluid -parallel : \ + -np 2 solidFoam -case solid -world solid -parallel \ + >& log.compressibleInterFoam_solidFoam + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/README.txt b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/README.txt new file mode 100644 index 0000000000..f04e6faafb --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/README.txt @@ -0,0 +1,76 @@ +Simple testcase to show multi-world explicit coupling. It uses 'solidFoam' +(the solid functionality from chtMultiRegionFoam) and 'compressibleInterFoam' +to demonstrate cooling a solid block with water. WIP. + + +World solid +----------- +This is running in a single directory 'solid'. Its local patch 'top' +communicates with the 'fluid' world, patch 'bottom'. It runs solidFoam +to simulate a heated solid block. Note that the physical settings probably +do not make much sense. + + +World fluid +----------- +This is running in the 'fluid' directory. The local patch 'bottom' +communicates with the 'top' patch of the solid world. + +Changes to the original tutorial ('depthCharge2D'): +- changed to a fixed timestep. +- added the 'syncObjects' functionObject. This transfers the data from +one world to the other, once every timestep. +- changed the system/blockMeshDict to define the coupling on the patch: + bottom + { + type mappedWall; + + // What to sample: + sampleMode nearestPatchFace; + + // Simulation world to sample + sampleWorld solid; + + // Region to sample + sampleRegion region0; + + // If sampleMode is nearestPatchFace : patch to find faces of + samplePatch top; + + // Use database to get data from (one-way or loose coupling in + // combination with functionObject) + sampleDatabase true; + + faces + ( + (1 5 4 0) + ); + } + + +A similar blockMeshDict boundary definition was used on the solid side: + top + { + type mappedWall; + + // What to sample: + sampleMode nearestPatchFace; + + // Simulation world to sample + sampleWorld fluid; + + // Region to sample + sampleRegion region0; + + // If sampleMode is nearestPatchFace : patch to find faces of + samplePatch bottom; + + // Use database to get data from (one-way or loose coupling in + // combination with functionObject) + sampleDatabase true; + } + + +Note that if the 'sampleDatabase' is not mentioned the coupling will be done +from boundary condition to boundary condition. This is a closer coupling but +does mean that both solvers have to run the same number of correctors. diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/T b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/T new file mode 100644 index 0000000000..f1885a7ff3 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/T @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + bottom + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + value $internalField; + Tnbr T; + kappaMethod fluidThermo; + } + + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/U b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/U new file mode 100644 index 0000000000..fa7868b611 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/U @@ -0,0 +1,33 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + wall + { + type noSlip; + } + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/alpha.water b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/alpha.water new file mode 100644 index 0000000000..160e8d5322 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/alpha.water @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + wall + { + type zeroGradient; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p new file mode 100644 index 0000000000..f2b4e93de0 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p @@ -0,0 +1,35 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + wall + { + type calculated; + value uniform 1e5; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p_rgh b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p_rgh new file mode 100644 index 0000000000..271d9ba5a1 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/0.orig/p_rgh @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + wall + { + type fixedFluxPressure; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allclean b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allclean new file mode 100755 index 0000000000..fb1f384730 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allrun.pre b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allrun.pre new file mode 100755 index 0000000000..dc32010f00 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/Allrun.pre @@ -0,0 +1,10 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +runApplication blockMesh +restore0Dir +runApplication setFields + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/g b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/g new file mode 100644 index 0000000000..957ac3d144 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties new file mode 100644 index 0000000000..edb4d2cdc3 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties @@ -0,0 +1,28 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases (water air); + +pMin 10000; + +sigma +{ + type constant; + sigma 0.07; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.air b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.air new file mode 100644 index 0000000000..41e6068101 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.air @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.water b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.water new file mode 100644 index 0000000000..e22536c6c6 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/thermophysicalProperties.water @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +/* +thermoType +{ + type heRhoThermo; + mixture pureMixture; + properties liquid; + energy sensibleInternalEnergy; +} + +mixture +{ + H2O; +} +*/ + + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectFluid; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 18.0; + } + equationOfState + { + R 3000; + rho0 1027; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/turbulenceProperties b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/turbulenceProperties new file mode 100644 index 0000000000..a4b5568efa --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/blockMeshDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/blockMeshDict new file mode 100644 index 0000000000..d9c4bfc63e --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/blockMeshDict @@ -0,0 +1,85 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (0 0 -0.1) + (1 0 -0.1) + (1 2 -0.1) + (0 2 -0.1) + (0 0 0.1) + (1 0 0.1) + (1 2 0.1) + (0 2 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (10 16 1) simpleGrading (1 5 1) +); + +boundary +( + walls + { + type wall; + faces + ( + (3 7 6 2) + (0 4 7 3) + (2 6 5 1) + ); + } + bottom + { + type mappedWall; + + // What to sample: + sampleMode nearestPatchFace; + + // Simulation world to sample + sampleWorld solid; + + // Region to sample + sampleRegion region0; + + // If sampleMode is nearestPatchFace : patch to find faces of + samplePatch top; + + // Use database to get data from (one-way or loose coupling in + // combination with functionObject) + sampleDatabase true; + + + faces + ( + (1 5 4 0) + ); + } + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/controlDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/controlDict new file mode 100644 index 0000000000..c3229f9825 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/controlDict @@ -0,0 +1,73 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application compressibleInterFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 0.005; + +writeControl timeStep; +writeInterval 10; + +purgeWrite 0; + +writeFormat ascii; //binary; + +writePrecision 16; + +writeCompression off; + +timeFormat general; + +timePrecision 10; + +runTimeModifiable yes; + +//adjustTimeStep yes; +maxCo 0.5; +maxAlphaCo 0.5; +//maxDeltaT 1; + +libs (utilityFunctionObjects); + +DebugSwitches +{ + //fvPatchField 1; + //fvPatchScalarField 1; + //mappedPatchBase 1; + //syncObjects 1; + //regIOobject 2; +} + +functions +{ + syncObjects + { + type syncObjects; + libs (utilityFunctionObjects); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/decomposeParDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/decomposeParDict new file mode 100644 index 0000000000..913e653599 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/decomposeParDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 3; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSchemes new file mode 100644 index 0000000000..de6624d462 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSchemes @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss linear; + + div(rhoPhi,U) Gauss upwind; + div(rhoPhi,T) Gauss upwind; + div(rhoPhi,K) Gauss upwind; + div(phi,p) Gauss upwind; + div(phi,k) Gauss upwind; + + div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSolution new file mode 100644 index 0000000000..38c25ee496 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/fvSolution @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.water.*" + { + nAlphaCorr 1; + nAlphaSubCycles 2; + cAlpha 1; + + MULESCorr no; + nLimiterIter 5; + + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + } + + ".*(rho|rhoFinal)" + { + solver diagonal; + } + + "pcorr.*" + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-05; + relTol 0; + smoother DICGaussSeidel; + } + tolerance 1e-05; + relTol 0; + maxIter 100; + } + + p_rgh + { + solver GAMG; + tolerance 1e-07; + relTol 0.01; + smoother DIC; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-07; + relTol 0; + nVcycles 2; + smoother DICGaussSeidel; + nPreSweeps 2; + } + tolerance 1e-07; + relTol 0; + maxIter 20; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-06; + relTol 0; + nSweeps 1; + } + + "(T|k|B|nuTilda).*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-08; + relTol 0; + } +} + +PIMPLE +{ + momentumPredictor no; + transonic no; + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/setFieldsDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/setFieldsDict new file mode 100644 index 0000000000..ada0b4c752 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/fluid/system/setFieldsDict @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alpha.water 0 + volScalarFieldValue p_rgh 1e5 + volScalarFieldValue p 1e5 + volScalarFieldValue T 300 +); + +regions +( + //sphereToCell + //{ + // origin (0.5 0.5 0); + // radius 0.1; + // + // fieldValues + // ( + // volScalarFieldValue alpha.water 0 + // volScalarFieldValue p_rgh 1e6 + // volScalarFieldValue p 1e6 + // volScalarFieldValue T 578 + // ); + //} + boxToCell + { + box (-10 -10 -1) (0.5 1 1); + fieldValues + ( + volScalarFieldValue alpha.water 1 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema new file mode 100644 index 0000000000..01464b34d7 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema @@ -0,0 +1,2 @@ +-np 1 run_fluid.sh +-np 1 run_solid.sh diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema_parallel b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema_parallel new file mode 100644 index 0000000000..07603ca4ac --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/mpirun.schema_parallel @@ -0,0 +1,2 @@ +-np 3 run_fluid_parallel.sh +-np 2 run_solid_parallel.sh diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid.sh b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid.sh new file mode 100755 index 0000000000..a103a33284 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. $WM_PROJECT_DIR/etc/bashrc +(cd fluid && FOAM_ABORT=true compressibleInterFoam -world fluid >& log.compressibleInterFoam) diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid_parallel.sh b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid_parallel.sh new file mode 100755 index 0000000000..0d3b19bc4d --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_fluid_parallel.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. $WM_PROJECT_DIR/etc/bashrc +(cd fluid && FOAM_ABORT=true compressibleInterFoam -world fluid -parallel) diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid.sh b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid.sh new file mode 100755 index 0000000000..4c6b60b592 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. $WM_PROJECT_DIR/etc/bashrc +(cd solid && FOAM_ABORT=true solidFoam -world solid >& log.solidFoam) diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid_parallel.sh b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid_parallel.sh new file mode 100755 index 0000000000..ccc32dc8f3 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/run_solid_parallel.sh @@ -0,0 +1,3 @@ +#!/bin/bash +. $WM_PROJECT_DIR/etc/bashrc +(cd solid && FOAM_ABORT=true solidFoam -world solid -parallel) diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/T b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/T new file mode 100644 index 0000000000..5d2b1c6a02 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/T @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 400; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + top + { + type compressible::turbulentTemperatureCoupledBaffleMixed; + value $internalField; + Tnbr T; + kappaMethod solidThermo; + } + + bottom + { + type uniformFixedValue; + uniformValue 400; + } + + walls + { + type zeroGradient; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/p b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/p new file mode 100644 index 0000000000..32d547ab86 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/0/p @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + #includeEtc "caseDicts/setConstraintTypes" + + ".*" + { + type calculated; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/radiationProperties b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/radiationProperties new file mode 100644 index 0000000000..acf3e6a24a --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/radiationProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object radiationProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +radiation off; + +radiationModel none; + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/thermophysicalProperties b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/thermophysicalProperties new file mode 100644 index 0000000000..ec1e5f5ca2 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/constant/thermophysicalProperties @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object thermophysicalProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + molWeight 50; + } + + transport + { + kappa 80; + } + + thermodynamics + { + Hf 0; + Cp 450; + } + + equationOfState + { + rho 8000; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/blockMeshDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/blockMeshDict new file mode 100644 index 0000000000..75ee4b51ff --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/blockMeshDict @@ -0,0 +1,92 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1; + +vertices +( + (0 -0.2 -0.1) + (1 -0.2 -0.1) + (1 0 -0.1) + (0 0 -0.1) + (0 -0.2 0.1) + (1 -0.2 0.1) + (1 0 0.1) + (0 0 0.1) +); + + +blocks +( + hex (0 1 2 3 4 5 6 7) (10 10 1) simpleGrading (1 10 1) +); + +boundary +( + walls + { + type wall; + faces + ( + (0 4 7 3) + (2 6 5 1) + ); + } + bottom + { + type wall; + faces + ( + (1 5 4 0) + ); + } + top + { + type mappedWall; + + // What to sample: + sampleMode nearestPatchFace; + + // Simulation world to sample + sampleWorld fluid; + + // Region to sample + sampleRegion region0; + + // If sampleMode is nearestPatchFace : patch to find faces of + samplePatch bottom; + + // Use database to get data from (one-way or loose coupling in + // combination with functionObject) + sampleDatabase true; + + faces + ( + (3 7 6 2) + ); + } + frontAndBack + { + type empty; + faces + ( + (0 3 2 1) + (4 5 6 7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/controlDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/controlDict new file mode 100644 index 0000000000..c0e38b136f --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/controlDict @@ -0,0 +1,67 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application solidFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 0.005; + +writeControl timeStep; +writeInterval 10; + +purgeWrite 0; + +writeFormat ascii; //binary; + +writePrecision 16; + +writeCompression off; + +timeFormat general; + +timePrecision 10; + +runTimeModifiable yes; + +libs (utilityFunctionObjects); + +DebugSwitches +{ + //fvPatchField 1; + //fvPatchScalarField 1; + //mappedPatchBase 1; + //syncObjects 1; + //regIOobject 2; +} + +functions +{ + syncObjects + { + type syncObjects; + libs (utilityFunctionObjects); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/decomposeParDict b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/decomposeParDict new file mode 100644 index 0000000000..d7245e1a33 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/decomposeParDict @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method scotch; + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSchemes new file mode 100644 index 0000000000..02dd1705d4 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSchemes @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(T) Gauss linear; +} + +divSchemes +{ + default none; +} + +laplacianSchemes +{ + default none; + laplacian(alpha,h) Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSolution b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSolution new file mode 100644 index 0000000000..813e92c688 --- /dev/null +++ b/tutorials/multiphase/compressibleInterFoam/laminar/waterCooler/solid/system/fvSolution @@ -0,0 +1,34 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: v1906 | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "h.*" + { + solver PCG; + preconditioner DIC; + tolerance 1e-06; + relTol 0; + } +} + +PIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +// ************************************************************************* //