mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: externalCoupled: changed to non-OutputFilter functionObject.
- moved control to functionObject (from bc) - this allows multi-region support - see heatTransfer/chtMultiRegionFoam/externalCoupledMultiRegionHeater tut - generalisation of streamed reading/writing of specialised bcs
This commit is contained in:
@ -1,56 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 293;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
hot
|
||||
{
|
||||
type externalCoupledTemperature;
|
||||
commsDir "${FOAM_CASE}/comms";
|
||||
fileName "data";
|
||||
initByExternal yes;
|
||||
log true;
|
||||
value uniform 307.75; // 34.6 degC
|
||||
}
|
||||
|
||||
cold
|
||||
{
|
||||
type externalCoupledTemperature;
|
||||
commsDir "${FOAM_CASE}/comms";
|
||||
fileName "data";
|
||||
initByExternal yes;
|
||||
log true;
|
||||
value uniform 288.15; // 15 degC
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,51 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
topAndBottom
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
hot
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
cold
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
Prt 0.85;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 3.75e-04;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 3.75e-04;
|
||||
}
|
||||
topAndBottom
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 3.75e-04;
|
||||
}
|
||||
hot
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 3.75e-04;
|
||||
}
|
||||
cold
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 3.75e-04;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,47 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object omega;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0.12;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform 0.12;
|
||||
}
|
||||
topAndBottom
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform 0.12;
|
||||
}
|
||||
hot
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform 0.12;
|
||||
}
|
||||
cold
|
||||
{
|
||||
type omegaWallFunction;
|
||||
value uniform 0.12;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
|
||||
rm -rf comms
|
||||
|
||||
killall externalSolver > /dev/null 2>&1
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication $(getApplication) &
|
||||
|
||||
./externalSolver
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
runParallel $(getApplication) 4 &
|
||||
|
||||
./externalSolver
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication createExternalCoupledPatchGeometry T
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -1,5 +0,0 @@
|
||||
Example of an explicit coupling between OpenFOAM and an external application
|
||||
using the externalCoupled boundary conditions.
|
||||
|
||||
The case is based on the buoyantCavity tutorial case, whereby on each iteration
|
||||
the 'hot' and 'cold' patch temperatures are incremented by 1K.
|
||||
@ -0,0 +1,30 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,41 +10,21 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
internalField uniform (0.01 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
hot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
cold
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type calculated;
|
||||
value uniform (0.01 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -21,30 +20,11 @@ internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
hot
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
cold
|
||||
{
|
||||
type calculated;
|
||||
value $internalField;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -21,30 +20,11 @@ internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
frontAndBack
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
hot
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
cold
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
rm -rf comms
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion constant/polyMesh/sets
|
||||
rm -rf 0/bottomWater
|
||||
rm -rf 0/topAir
|
||||
rm -rf 0/heater
|
||||
rm -rf 0/leftSolid
|
||||
rm -rf 0/rightSolid
|
||||
rm -f 0/cellToRegion
|
||||
rm -rf constant/bottomWater/polyMesh
|
||||
rm -rf constant/topAir/polyMesh
|
||||
rm -rf constant/heater/polyMesh
|
||||
rm -rf constant/leftSolid/polyMesh
|
||||
rm -rf constant/rightSolid/polyMesh
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
./Allrun.pre
|
||||
|
||||
#-- Run on single processor
|
||||
#runApplication `getApplication` &
|
||||
# Simulated external solver
|
||||
#runApplication ./externalSolver
|
||||
|
||||
# Decompose
|
||||
runApplication decomposePar -allRegions
|
||||
|
||||
# Run OpenFOAM
|
||||
runParallel `getApplication` 4 &
|
||||
|
||||
# Simulated external solver
|
||||
runApplication ./externalSolver
|
||||
|
||||
# Reconstruct
|
||||
runApplication reconstructPar -allRegions
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
runApplication splitMeshRegions -cellZones -overwrite
|
||||
|
||||
# remove fluid fields from solid regions (important for post-processing)
|
||||
for i in heater leftSolid rightSolid
|
||||
do
|
||||
rm -f 0*/$i/{nut,alphat,epsilon,k,U,p_rgh}
|
||||
done
|
||||
|
||||
|
||||
for i in bottomWater topAir heater leftSolid rightSolid
|
||||
do
|
||||
changeDictionary -region $i > log.changeDictionary.$i 2>&1
|
||||
done
|
||||
|
||||
# Create coupling geometry
|
||||
runApplication createExternalCoupledPatchGeometry \
|
||||
-regions '(topAir heater)' coupleGroup
|
||||
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,3 @@
|
||||
Modification of the heatTransfer chtMultiRegionFoam tutorial that demonstrates
|
||||
the externalCoupled functionObject in combination with the ./externalSolver
|
||||
script to simulate coupling to an external code.
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -18,5 +17,4 @@ FoamFile
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,22 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object radiationProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
radiation off;
|
||||
|
||||
radiationModel none;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -9,39 +9,43 @@ FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 4e-06;
|
||||
|
||||
boundaryField
|
||||
thermoType
|
||||
{
|
||||
frontAndBack
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleEnthalpy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 4e-06;
|
||||
nMoles 1;
|
||||
molWeight 18;
|
||||
}
|
||||
topAndBottom
|
||||
equationOfState
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 4e-06;
|
||||
rho 1000;
|
||||
}
|
||||
hot
|
||||
thermodynamics
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 4e-06;
|
||||
Cp 4181;
|
||||
Hf 0;
|
||||
}
|
||||
cold
|
||||
transport
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 4e-06;
|
||||
mu 959e-6;
|
||||
Pr 6.62;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object radiationProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
radiation off;
|
||||
|
||||
radiationModel none;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -9,39 +9,45 @@ FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object nut;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -1 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
thermoType
|
||||
{
|
||||
frontAndBack
|
||||
type heSolidThermo;
|
||||
mixture pureMixture;
|
||||
transport constIso;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleEnthalpy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
type nutUWallFunction;
|
||||
value uniform 0;
|
||||
nMoles 1;
|
||||
molWeight 50;
|
||||
}
|
||||
topAndBottom
|
||||
|
||||
transport
|
||||
{
|
||||
type nutUWallFunction;
|
||||
value uniform 0;
|
||||
kappa 80;
|
||||
}
|
||||
hot
|
||||
|
||||
thermodynamics
|
||||
{
|
||||
type nutUWallFunction;
|
||||
value uniform 0;
|
||||
Hf 0;
|
||||
Cp 450;
|
||||
}
|
||||
cold
|
||||
|
||||
equationOfState
|
||||
{
|
||||
type nutUWallFunction;
|
||||
value uniform 0;
|
||||
rho 8000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/radiationProperties
|
||||
@ -0,0 +1 @@
|
||||
../heater/thermophysicalProperties
|
||||
@ -14,66 +14,77 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
( 0 0 -260)
|
||||
(76 0 -260)
|
||||
(76 2180 -260)
|
||||
( 0 2180 -260)
|
||||
( 0 0 260)
|
||||
(76 0 260)
|
||||
(76 2180 260)
|
||||
( 0 2180 260)
|
||||
(-0.1 -0.04 -0.05)
|
||||
( 0.1 -0.04 -0.05)
|
||||
( 0.1 0.04 -0.05)
|
||||
(-0.1 0.04 -0.05)
|
||||
(-0.1 -0.04 0.05)
|
||||
( 0.1 -0.04 0.05)
|
||||
( 0.1 0.04 0.05)
|
||||
(-0.1 0.04 0.05)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (30 10 10) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (35 150 15) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
frontAndBack
|
||||
maxY
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
(2 3 7 6)
|
||||
(3 7 6 2)
|
||||
);
|
||||
}
|
||||
|
||||
topAndBottom
|
||||
minX
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 4 7 3)
|
||||
);
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 6 5 1)
|
||||
);
|
||||
}
|
||||
minY
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(1 5 4 0)
|
||||
);
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(0 3 2 1)
|
||||
);
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(3 2 1 0)
|
||||
);
|
||||
}
|
||||
|
||||
hot
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(6 5 1 2)
|
||||
);
|
||||
}
|
||||
|
||||
cold
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(4 7 3 0)
|
||||
);
|
||||
}
|
||||
);
|
||||
@ -81,3 +92,5 @@ boundary
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / O peration | Version: dev-OpenCFD.feature-externalCoupled |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -15,35 +15,47 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
4
|
||||
6
|
||||
(
|
||||
frontAndBack
|
||||
maxY
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 1050;
|
||||
startFace 228225;
|
||||
nFaces 300;
|
||||
startFace 8300;
|
||||
}
|
||||
topAndBottom
|
||||
minX
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 10500;
|
||||
startFace 229275;
|
||||
type patch;
|
||||
nFaces 100;
|
||||
startFace 8600;
|
||||
}
|
||||
hot
|
||||
maxX
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 2250;
|
||||
startFace 239775;
|
||||
type patch;
|
||||
nFaces 100;
|
||||
startFace 8700;
|
||||
}
|
||||
cold
|
||||
minY
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 2250;
|
||||
startFace 242025;
|
||||
nFaces 300;
|
||||
startFace 8800;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 300;
|
||||
startFace 9100;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 300;
|
||||
startFace 9400;
|
||||
}
|
||||
)
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object regionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
regions
|
||||
(
|
||||
fluid (bottomWater topAir)
|
||||
solid (heater leftSolid rightSolid)
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/radiationProperties
|
||||
@ -0,0 +1 @@
|
||||
../heater/thermophysicalProperties
|
||||
@ -0,0 +1 @@
|
||||
../bottomWater/g
|
||||
@ -0,0 +1 @@
|
||||
../bottomWater/radiationProperties
|
||||
@ -10,7 +10,7 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
location "constant/bottomWater";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -31,17 +31,17 @@ mixture
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.96;
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1004.4;
|
||||
Cp 1000;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.831e-05;
|
||||
Pr 0.705;
|
||||
mu 1.8e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1 @@
|
||||
../bottomWater/turbulenceProperties
|
||||
@ -1,20 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Dummy external solver to communicate with OpenFOAM via externalCoupled
|
||||
# boundary conditions
|
||||
# functionObject
|
||||
#
|
||||
# Functionality is hard-coded for this particular test case
|
||||
# - patch temperatures increased by 1K on each step
|
||||
#
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Check for unassigned variables
|
||||
set -u
|
||||
|
||||
echo "Executing dummy external solver"
|
||||
|
||||
commsDir="comms"
|
||||
regionGroupName="heater_topAir"
|
||||
patchGroupName="coupleGroup"
|
||||
fieldName="T"
|
||||
|
||||
lockFile="${commsDir}/OpenFOAM.lock"
|
||||
dataFile="${commsDir}/data"
|
||||
dataFile="${commsDir}/${regionGroupName}/${patchGroupName}/${fieldName}"
|
||||
waitSec=1
|
||||
timeOut=10
|
||||
nSteps=200 # maximum number of time steps. Note: should be more than
|
||||
# number of iterations on the OpenFOAM side
|
||||
refGrad=0
|
||||
valueFraction=1
|
||||
|
||||
@ -27,16 +36,21 @@ init()
|
||||
{
|
||||
log "initialisation: creating ${dataFile}.in"
|
||||
|
||||
# Hard-coded for 2 patches of size 2250
|
||||
n=2250
|
||||
refCold=283
|
||||
refHot=303
|
||||
# Hard-coded for patch of size 8 (heater/minY)
|
||||
n1=8
|
||||
refValue1=500
|
||||
touch "${dataFile}.in"
|
||||
for i in $(seq 1 $n); do
|
||||
echo "$refHot $refGrad $valueFraction" >> "${dataFile}.in"
|
||||
log "initialisation: adding $n1 data elements with refValue $refValue1"
|
||||
for i in $(seq 1 $n1); do
|
||||
echo "$refValue1 $refGrad $valueFraction" >> "${dataFile}.in"
|
||||
done
|
||||
for i in $(seq 1 $n); do
|
||||
echo "$refCold $refGrad $valueFraction" >> "${dataFile}.in"
|
||||
|
||||
# Hard-coded for patch of size 40 (topAir/minX)
|
||||
n2=40
|
||||
refValue2=300
|
||||
log "initialisation: adding $n2 data elements with refValue $refValue2"
|
||||
for i in $(seq 1 $n2); do
|
||||
echo "$refValue2 $refGrad $valueFraction" >> "${dataFile}.in"
|
||||
done
|
||||
|
||||
# create lock file to pass control to OF
|
||||
@ -44,6 +58,10 @@ init()
|
||||
}
|
||||
|
||||
|
||||
# create the comms directory
|
||||
mkdir -p ${commsDir}/${regionGroupName}/${patchGroupName}
|
||||
|
||||
|
||||
# tutorial case employs the 'initByExternalOption', so we need to provide
|
||||
# the initial values
|
||||
init
|
||||
@ -51,7 +69,7 @@ init
|
||||
|
||||
totalWait=0
|
||||
step=0
|
||||
while [ 1 ]; do
|
||||
while [ $step -lt $nSteps ]; do
|
||||
if [ -f $lockFile ]; then
|
||||
log "found lock file ${lockFile} - waiting"
|
||||
totalWait=$(expr $totalWait + $waitSec)
|
||||
@ -70,9 +88,10 @@ while [ 1 ]; do
|
||||
log "sleeping for $waitSec secs to simulate external process"
|
||||
sleep $waitSec
|
||||
|
||||
log "creating ${dataFile}.in"
|
||||
log "updating ${dataFile}.in from ${dataFile}.out"
|
||||
|
||||
awk '{if( $1 != "#" ){print $2+1 " 0 1"}}' ${dataFile}.out > ${dataFile}.in
|
||||
awk '{if( $1 != "#" ){print $1+1 " 0 1"}}' \
|
||||
${dataFile}.out | tee ${dataFile}.in
|
||||
|
||||
log "creating lock file ${lockFile}"
|
||||
touch ${lockFile}
|
||||
@ -0,0 +1,3 @@
|
||||
fvSolution is used for outer correctors specification.
|
||||
fvSchemes is only so that pre-processing activities can proceed
|
||||
|
||||
@ -0,0 +1,173 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
U
|
||||
{
|
||||
internalField uniform (0.001 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0.001 0 0);
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"bottomWater_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa fluidThermo;
|
||||
kappaName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0.1;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default steadyState;
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
@ -28,18 +28,19 @@ divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,K) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,h) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,k) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,epsilon) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,omega) bounded Gauss limitedLinear 0.2;
|
||||
div(phi,U) Gauss upwind;
|
||||
div(phi,K) Gauss linear;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div(phi,R) Gauss upwind;
|
||||
div(R) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear orthogonal;
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
@ -49,13 +50,13 @@ interpolationSchemes
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default orthogonal;
|
||||
default corrected;
|
||||
}
|
||||
|
||||
wallDist
|
||||
fluxRequired
|
||||
{
|
||||
method meshWave;
|
||||
default no;
|
||||
p_rgh;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,68 +10,78 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
rho
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
rhoFinal
|
||||
{
|
||||
$rho;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-7;
|
||||
relTol 0.01;
|
||||
|
||||
smoother DICGaussSeidel;
|
||||
smoother GaussSeidel;
|
||||
|
||||
cacheAgglomeration true;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|omega)"
|
||||
p_rghFinal
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-8;
|
||||
relTol 0.1;
|
||||
$p_rgh;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|R)"
|
||||
{
|
||||
solver PBiCG;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-7;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(U|h|k|epsilon|R)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-7;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
SIMPLE
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor yes;
|
||||
momentumPredictor on;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
|
||||
residualControl
|
||||
{
|
||||
p_rgh 1e-2;
|
||||
U 1e-3;
|
||||
h 1e-3;
|
||||
|
||||
// possibly check turbulence fields
|
||||
"(k|epsilon|omega)" 1e-3;
|
||||
}
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
rho 1.0;
|
||||
p_rgh 0.7;
|
||||
}
|
||||
equations
|
||||
{
|
||||
U 0.3;
|
||||
h 0.3;
|
||||
"(k|epsilon|omega)" 0.7;
|
||||
"h.*" 1;
|
||||
"U.*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,96 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Library defines new boundary conditions
|
||||
libs ("libOpenFOAM.so" "libjobControl.so");
|
||||
|
||||
application chtMultiRegionFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1;
|
||||
|
||||
deltaT 0.001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
maxCo 0.6;
|
||||
|
||||
// Maximum diffusion number
|
||||
maxDi 10.0;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
functions
|
||||
{
|
||||
externalCoupled
|
||||
{
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libjobControl.so");
|
||||
|
||||
type externalCoupled;
|
||||
|
||||
// Directory to use for communication
|
||||
commsDir "${FOAM_CASE}/comms";
|
||||
|
||||
// Does external process start first
|
||||
initByExternal true;
|
||||
|
||||
// Additional output
|
||||
log true;
|
||||
|
||||
regions
|
||||
{
|
||||
// Region name (wildcards allowed)
|
||||
"(topAir|heater)"
|
||||
{
|
||||
// In topAir adjust the minX patch (fixedValue)
|
||||
|
||||
// Patch or patchGroup
|
||||
coupleGroup
|
||||
{
|
||||
// Fields to output in commsDir
|
||||
writeFields (T);
|
||||
// Fields to read from commsDir
|
||||
readFields (T);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,19 +10,36 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method simple;
|
||||
|
||||
simpleCoeffs
|
||||
ddtSchemes
|
||||
{
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
|
||||
@ -10,20 +10,13 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType RAS;
|
||||
|
||||
RAS
|
||||
PIMPLE
|
||||
{
|
||||
RASModel kOmegaSST;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs on;
|
||||
nOuterCorrectors 1;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,77 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minY
|
||||
{
|
||||
type patch;
|
||||
inGroups (coupleGroup);
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"heater_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
heater_to_leftSolid
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
minY
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -10,39 +10,35 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application buoyantSimpleFoam;
|
||||
numberOfSubdomains 4;
|
||||
|
||||
startFrom startTime;
|
||||
method scotch;
|
||||
|
||||
startTime 0;
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
stopAt endTime;
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
endTime 100;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 10;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
scotchCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(alpha,h) Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,40 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
h
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-06;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
hFinal
|
||||
{
|
||||
$h;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"leftSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
leftSolid_to_heater
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/fvSchemes
|
||||
@ -0,0 +1 @@
|
||||
../heater/fvSolution
|
||||
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"rightSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa solidThermo;
|
||||
kappaName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../heater/fvSchemes
|
||||
@ -0,0 +1 @@
|
||||
../heater/fvSolution
|
||||
@ -0,0 +1,179 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object changeDictionaryDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
{
|
||||
boundary
|
||||
{
|
||||
minX
|
||||
{
|
||||
inGroups (coupleGroup);
|
||||
}
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
internalField uniform (0.1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform ( 0 0 0 );
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappa fluidThermo;
|
||||
kappaName none;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,72 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
note "mesh decomposition control dictionary";
|
||||
location "system";
|
||||
object decomposeParDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones (heater solid1 solid3);
|
||||
|
||||
method scotch;
|
||||
// method hierarchical;
|
||||
// method simple;
|
||||
// method manual;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
}
|
||||
|
||||
hierarchicalCoeffs
|
||||
{
|
||||
n (2 2 1);
|
||||
delta 0.001;
|
||||
order xyz;
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
manualCoeffs
|
||||
{
|
||||
dataFile "decompositionData";
|
||||
}
|
||||
|
||||
|
||||
//// Is the case distributed
|
||||
//distributed yes;
|
||||
//// Per slave (so nProcs-1 entries) the directory above the case.
|
||||
//roots
|
||||
//(
|
||||
// "/tmp"
|
||||
// "/tmp"
|
||||
//);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1 @@
|
||||
../bottomWater/fvSchemes
|
||||
@ -0,0 +1 @@
|
||||
../bottomWater/fvSolution
|
||||
@ -0,0 +1,178 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
actions
|
||||
(
|
||||
// Heater
|
||||
{
|
||||
name heaterCellSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-0.01001 0 -100 )(0.01001 0.00999 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name heaterCellSet;
|
||||
type cellSet;
|
||||
action add;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-0.01001 -100 -0.01001)(0.01001 0.00999 0.01001);
|
||||
}
|
||||
}
|
||||
{
|
||||
name heater;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set heaterCellSet;
|
||||
}
|
||||
}
|
||||
|
||||
// leftSolid
|
||||
{
|
||||
name leftSolidCellSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 0 -100 )(-0.01001 0.00999 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name leftSolid;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set leftSolidCellSet;
|
||||
}
|
||||
}
|
||||
|
||||
// rightSolid
|
||||
{
|
||||
name rightSolidCellSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.01001 0 -100 )(100 0.00999 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name rightSolid;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set rightSolidCellSet;
|
||||
}
|
||||
}
|
||||
|
||||
// topAir
|
||||
{
|
||||
name topAirCellSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 0.00999 -100 )(100 100 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name topAir;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set topAirCellSet;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// bottomWater is all the other cells
|
||||
{
|
||||
name bottomWaterCellSet;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set heaterCellSet;
|
||||
}
|
||||
}
|
||||
{
|
||||
name bottomWaterCellSet;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set leftSolidCellSet;
|
||||
}
|
||||
}
|
||||
{
|
||||
name bottomWaterCellSet;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set rightSolidCellSet;
|
||||
}
|
||||
}
|
||||
{
|
||||
name bottomWaterCellSet;
|
||||
type cellSet;
|
||||
action add;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set topAirCellSet;
|
||||
}
|
||||
}
|
||||
{
|
||||
name bottomWaterCellSet;
|
||||
type cellSet;
|
||||
action invert;
|
||||
}
|
||||
{
|
||||
name bottomWater;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set bottomWaterCellSet;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user