mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/externalCoupled' into develop
- update tutorial and adjust function object for updated infrastructure.
This commit is contained in:
@ -15,6 +15,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Decompose
|
||||
runApplication decomposePar -allRegions
|
||||
|
||||
## Can verify parallel operation of createExternalCoupledPatchGeometry
|
||||
# \rm -f log.createExternalCoupledPatchGeometry
|
||||
# runParallel createExternalCoupledPatchGeometry \
|
||||
# -regions '(topAir heater)' coupleGroup \
|
||||
# -commsDir $PWD/comms
|
||||
|
||||
# Run OpenFOAM
|
||||
runParallel $(getApplication) &
|
||||
|
||||
|
||||
@ -28,6 +28,6 @@ runApplication createExternalCoupledPatchGeometry \
|
||||
echo
|
||||
echo "creating files for paraview post-processing"
|
||||
echo
|
||||
paraFoam -touchAll
|
||||
paraFoam -touchAll 2>/dev/null
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/bottomWater";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -20,13 +20,17 @@ fieldName="T"
|
||||
|
||||
lockFile="${commsDir}/OpenFOAM.lock"
|
||||
dataFile="${commsDir}/${regionGroupName}/${patchGroupName}/${fieldName}"
|
||||
waitSec=1
|
||||
timeOut=10
|
||||
nSteps=200 # maximum number of time steps. Note: should be more than
|
||||
waitSec=5
|
||||
timeOut=100
|
||||
nSteps=1000 # maximum number of time steps. Note: should be more than
|
||||
# number of iterations on the OpenFOAM side
|
||||
refGrad=0
|
||||
valueFraction=1
|
||||
|
||||
|
||||
# Remove any old junk
|
||||
\rm -f $lockFile 2>/dev/null
|
||||
|
||||
log()
|
||||
{
|
||||
echo "External: $@"
|
||||
@ -53,7 +57,7 @@ init()
|
||||
echo "$refValue2 $refGrad $valueFraction" >> "${dataFile}.in"
|
||||
done
|
||||
|
||||
# create lock file to pass control to OF
|
||||
# Create lock file to pass control to OpenFOAM
|
||||
touch ${lockFile}
|
||||
}
|
||||
|
||||
@ -61,7 +65,6 @@ init()
|
||||
# create the comms directory
|
||||
mkdir -p ${commsDir}/${regionGroupName}/${patchGroupName}
|
||||
|
||||
|
||||
# tutorial case employs the 'initByExternalOption', so we need to provide
|
||||
# the initial values
|
||||
init
|
||||
@ -69,11 +72,24 @@ init
|
||||
|
||||
totalWait=0
|
||||
step=0
|
||||
while [ $step -lt $nSteps ]; do
|
||||
if [ -f $lockFile ]; then
|
||||
log "found lock file ${lockFile} - waiting"
|
||||
while [ $step -lt $nSteps ]
|
||||
do
|
||||
if [ -f $lockFile ]
|
||||
then
|
||||
if grep -q "status=done" ${lockFile}
|
||||
then
|
||||
log "found lock file ${lockFile} with 'status=done' - finished"
|
||||
break
|
||||
elif [ -s $lockFile ]
|
||||
then
|
||||
log "found lock file ${lockFile} containing '$(cat $lockFile)' - waiting"
|
||||
else
|
||||
log "found lock file ${lockFile} - waiting"
|
||||
fi
|
||||
|
||||
totalWait=$(expr $totalWait + $waitSec)
|
||||
if [ $totalWait -gt $timeOut ]; then
|
||||
if [ $totalWait -gt $timeOut ]
|
||||
then
|
||||
log "timeout"
|
||||
break
|
||||
else
|
||||
@ -91,7 +107,7 @@ while [ $step -lt $nSteps ]; do
|
||||
log "updating ${dataFile}.in from ${dataFile}.out"
|
||||
|
||||
awk '{if( $1 != "#" ){print $1+1 " 0 1"}}' \
|
||||
${dataFile}.out | tee ${dataFile}.in
|
||||
${dataFile}.out >| ${dataFile}.in
|
||||
|
||||
log "creating lock file ${lockFile}"
|
||||
touch ${lockFile}
|
||||
@ -100,5 +116,7 @@ done
|
||||
|
||||
log "done"
|
||||
|
||||
# Remove the lock file too
|
||||
\rm -f $lockFile 2>/dev/null
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -14,158 +14,154 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
U
|
||||
{
|
||||
U
|
||||
internalField uniform (0.001 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform (0.001 0 0);
|
||||
|
||||
boundaryField
|
||||
minX
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0.001 0 0);
|
||||
}
|
||||
type fixedValue;
|
||||
value uniform (0.001 0 0);
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
minX
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"bottomWater_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod fluidThermo;
|
||||
kappa none;
|
||||
value uniform 300;
|
||||
}
|
||||
"bottomWater_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod fluidThermo;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
minX
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
minX
|
||||
{
|
||||
minX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
}
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0.1;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
minX
|
||||
{
|
||||
minX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
p
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Library defines new boundary conditions
|
||||
libs ("libOpenFOAM.so" "libjobControl.so");
|
||||
libs ("libOpenFOAM.so" "libfieldFunctionObjects.so");
|
||||
|
||||
application chtMultiRegionFoam;
|
||||
|
||||
@ -26,11 +26,12 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1;
|
||||
endTime 0.5;
|
||||
|
||||
deltaT 0.001;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.1;
|
||||
|
||||
purgeWrite 0;
|
||||
@ -56,40 +57,7 @@ adjustTimeStep yes;
|
||||
|
||||
functions
|
||||
{
|
||||
externalCoupled
|
||||
{
|
||||
// Where to load it from (if not already in solver)
|
||||
libs ("libfieldFunctionObjects.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#include "externalCoupled"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
// control for external coupled simulation
|
||||
externalCoupled
|
||||
{
|
||||
// Where to load it from (if not already in solver)
|
||||
libs ("libfieldFunctionObjects.so");
|
||||
|
||||
type externalCoupled;
|
||||
|
||||
// Directory to use for communication
|
||||
commsDir "${FOAM_CASE}/comms";
|
||||
|
||||
// Does external process start first
|
||||
initByExternal true;
|
||||
|
||||
// Cleanup behaviour on termination (remove|done)
|
||||
stateEnd done;
|
||||
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -14,62 +14,56 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
boundary
|
||||
{
|
||||
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;
|
||||
kappaMethod solidThermo;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
heater_to_leftSolid
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
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;
|
||||
kappaMethod solidThermo;
|
||||
kappa none;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
heater_to_leftSolid
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
kappa none;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
minY
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
type fixedValue;
|
||||
value uniform 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,50 +14,45 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
boundary
|
||||
{
|
||||
boundary
|
||||
minZ
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
type patch;
|
||||
}
|
||||
|
||||
T
|
||||
maxZ
|
||||
{
|
||||
internalField uniform 300;
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
boundaryField
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"leftSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
kappa none;
|
||||
value uniform 300;
|
||||
}
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"leftSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
leftSolid_to_heater
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
kappa none;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
leftSolid_to_heater
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
thicknessLayers (1e-3);
|
||||
kappaLayers (5e-4);
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,39 +14,35 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
boundary
|
||||
{
|
||||
boundary
|
||||
minZ
|
||||
{
|
||||
minZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type patch;
|
||||
}
|
||||
type patch;
|
||||
}
|
||||
|
||||
T
|
||||
maxZ
|
||||
{
|
||||
internalField uniform 300;
|
||||
type patch;
|
||||
}
|
||||
}
|
||||
|
||||
boundaryField
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"rightSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
kappa none;
|
||||
value uniform 300;
|
||||
}
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
"rightSolid_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod solidThermo;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,164 +14,160 @@ FoamFile
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dictionaryReplacement
|
||||
boundary
|
||||
{
|
||||
boundary
|
||||
minX
|
||||
{
|
||||
inGroups (coupleGroup);
|
||||
}
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
internalField uniform (0.1 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
minX
|
||||
{
|
||||
inGroups (coupleGroup);
|
||||
type fixedValue;
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform ( 0 0 0 );
|
||||
value uniform ( 0.1 0 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
U
|
||||
T
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
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 );
|
||||
}
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod fluidThermo;
|
||||
value uniform 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
T
|
||||
epsilon
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
"topAir_to_.*"
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
Tnbr T;
|
||||
kappaMethod fluidThermo;
|
||||
kappa none;
|
||||
value uniform 300;
|
||||
}
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
epsilon
|
||||
k
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.01;
|
||||
value uniform 0.01;
|
||||
}
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
k
|
||||
p_rgh
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 0.1;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_rgh
|
||||
p
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
".*"
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e5;
|
||||
}
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
internalField uniform 1e5;
|
||||
|
||||
boundaryField
|
||||
maxX
|
||||
{
|
||||
".*"
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
type calculated;
|
||||
value uniform 1e5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/bottomAir";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -1,74 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/bottomWater";
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 300;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform 300;
|
||||
inletValue uniform 300;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 300;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
value uniform 300;
|
||||
Tnbr T;
|
||||
kappaMethod fluidthermo;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
value uniform 300;
|
||||
Tnbr T;
|
||||
kappaMethod fluidthermo;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type compressible::turbulentTemperatureCoupledBaffleMixed;
|
||||
value uniform 300;
|
||||
Tnbr T;
|
||||
kappaMethod fluidthermo;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,62 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0/bottomWater";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0.001 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0.001 0 0);
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform (0.01 0 0);
|
||||
inletValue uniform (0 0 0);
|
||||
}
|
||||
minY
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type noSlip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,68 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/bottomWater";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -3 0 0 0 0];
|
||||
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform 0.01;
|
||||
inletValue uniform 0.01;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0.01;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,68 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/bottomWater";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type inletOutlet;
|
||||
value uniform 0.1;
|
||||
inletValue uniform 0.1;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0.1;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,67 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/bottomWater";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,67 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/bottomWater";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
minX
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
maxX
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
minY
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
minZ
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
maxZ
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_rightSolid
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_leftSolid
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
bottomWater_to_heater
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -7,12 +7,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
cleanCase
|
||||
rm -rf VTK
|
||||
rm -rf constant/cellToRegion constant/polyMesh/sets
|
||||
rm -rf 0/bottomAir
|
||||
rm -f 0/cellToRegion
|
||||
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
|
||||
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/bottomAir";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -10,7 +10,6 @@ FoamFile
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/bottomAir";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user