How settings from BaramFlow are used in NextFOAM
BaramFlow uses NextFOAM, a fork of OpenFOAM developed by NEXTfoam Co.,Ltd. This section describes how various settings in BaramFlow are applied to NextFOAM. Terms used in NextFOAM are italicized.
General
Time
Time is set in the ddtSchemes dictionary in the system/fvSchemes file.
If Time is steady, the pressure-based solver uses steadyState for single-phase flows and localEuler for two-phase flows. Density-based solver uses localEuler.
ddtSchemes
{
default <steadyState or localEuler>;
}
ddtSchemes
{
default <Euler or backward>;
}
Gravity
Set the input vector of gravity in the constant/g file as follows
dimensions [0 1 -2 0 0 0 0];
value (<x-value> <y-value> <z-value>);
Operating Conditions
Set the input value of Operating Conditions in constant/operatingConditions file as follows
operatingPressure operatingPressure [1 -1 -2 0 0 0 0] <value>;
Model
Turbulence
Turbulence is set in the constant/turbulenceProperties file as follows
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
viscosityRatioMax 1e5;
}
turbulence and printCoeffs are always on.
viscosityRatioMax is the input value of Maximum Viscosity Ratio at [Numerical Conditions] - [Advanced].
Laminar
simulationType laminar;
For Newtonian fluids, there are no additional settings. For non-Newtonian flow, set the model in the laminar dictionary. Non-Newtonian models can be Cross, Herschel-Bulkley, Bird-Carreau, or Non-Newtonian power law. The coefficients for each model are set as follows
Cross
laminar
{
model generalizedNewtonian;
viscosityModel CrossPowerLaw;
CrossPowerLawCoeffs
{
nu0 <value>;
nuInf <value>;
m <value>;
n <value>;
tauStar <value>;
}
}
laminar
{
model generalizedNewtonian;
viscosityModel HerschelBulkley;
HerschelBulkleyCoeffs
{
nu0 <value>;
tau0 <value>;
k <value>;
n <value>;
}
}
laminar
{
model generalizedNewtonian;
viscosityModel BirdCarreau;
BirdCarreauCoeffs
{
nu0 <value>;
nuInf <value>;
k <value>;
n <value>;
a <value>;
}
}
laminar
{
model generalizedNewtonian;
viscosityModel powerLaw;
powerLawCoeffs
{
nuMax <value>;
nuMin <value>;
k <value>;
n <value>;
}
}
Spalart-Allmaras
Always as follows
simulationType RAS;
RAS
{
RASModel SpalartAllmaras;
turbulence on;
printCoeffs on;
viscosityRatioMax <value>;
}
k-epsilon
simulationType RAS;
RAS
{
RASModel kEpsilon; // RNGkEpsilon, realizableKE
turbulence on;
printCoeffs on;
viscosityRatioMax <value>;
kEpsilonCoeffs
{
Prt <value>;
Sct <value>;
}
ReyStar 60;
deltaRey 10;
}
RASModel is kEpsilon for Standard일, RNGkEpsilon for RNG, realizableKE for Realizable.
Prt is the input of 'for internal Field' of 'Turbulent Prandtl Number'.
Sct is the input of 'Turbulent Schmidt Number'.
ReyStar and deltaRey is used for Enhanced Wall Treatment(two layer) and is fixed as 60 and 10.
k-omega SST
Always as follows
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
viscosityRatioMax <value>;
}
LES
simulationType of LES is LES. 'Subgrid-Scale model', 'Length-Scale model' and corresponding dictionaries are needed.
Subgrid-Scale model is set at LESModel and Length-Scale model is at delta.
simulationType LES;
LES
{
LESModel <Smagorinsky or WALE or dynamicKEqn or kEqn>;
turbulence on;
printCoeffs off;
delta <cubeRootVol or dynamicKEqn or kEqn>;
viscosityRatioMax <value>;
SmagorinskyCoeffs
{
Ck <value>;
Ce <value>;
Sct <value>;
}
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
Subgrid-Scale model
You can choose between Smagorinsky-Lilly(Smagorinsky), WALE(WALE), Kinetic-Energy Transport(dynamicKEqn), One Equation Eddy Viscosity(kEqn). For Smagorinsky-Lilly, the dictionary looks like the above, and for the rest, it looks like this
WALE
WALECoeffs
{
Ck <value>;
Ce <value>;
Cw <value>;
Sct <value>;
}
dynamicKEqnCoeffs
{
filter simple;
Sct <value>;
}
kEqnCoeffs
{
Ck <value>;
Ce <value>;
Sct <value>;
}
Sct is turbulent Schmidt number and only use for species transport. If species is not included, always use 0.7.
Length-Scale model
You can choose between Cube-root Volume(cubeRootVol), Van Driest(dynamicKEqn), smooth(smooth). For Cube-root Volume, the dictionary looks like the above, and for the rest, it looks like this.
Van Driest
vanDriestCoeffs
{
delta cubeRootVol;
kappa 0.41;
Aplus 26;
Cdelta 0.158;
calcInterval 1;
cubeRootVolCoeffs
{
deltaCoeff 2.0;
}
}
smoothCoeffs
{
delta cubeRootVol;
maxDeltaRatio 1.1;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
DES
simulationType of DES model is LES.
RAS Model, DES Option, Length-Scale Model and corresponding dictionaries are needed.
simulationType LES;
LES
{
LESModel SpalartAllmarasDES; //kOmegaSSTDES;
turbulence on;
delta <cubeRootVol or dynamicKEqn or smooth>;
viscosityRatioMax <value>;
SpalartAllmarasDESCoeffs
{
CDES <value>;
lowReCorrection <yes or no>;
Sct <value>;
}
kOmegaSSTDES
{
CDESkom <value>;
CDESkeps <value>;
Sct <value>;
}
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
RAS Model
You can choose between Spalart-Allmaras(SpalartAllmarasDES), k-omega SST(kOmegaSSTDES).
For Spalart-Allmaras, there is Low-Re Damping option. When useing this option, lowReCorrection of SpalartAllmarasDESCoeffs is yes and otherwise no.
DES Option
For Delayed DES, there is Shielding Function options of DDES and IDDES. For IDDES, Lengh-Scale Model disappears.
For DDES, LESModel is SpalartAllmarasDDES or kOmegaSSTDDES according to RAS Model.
simulationType LES;
LES
{
LESModel SpalartAllmarasDDES; //kOmegaSSTDDES;
turbulence on;
delta <cubeRootVol or dynamicKEqn or smooth>;
viscosityRatioMax <value>;
SpalartAllmarasDDESCoeffs
{
CDES <value>;
lowReCorrection <yes or no>;
Sct <value>;
}
kOmegaSSTDDES
{
CDESkom <value>;
CDESkeps <value>;
Sct <value>;
}
cubeRootVolCoeffs
{
deltaCoeff 1;
}
}
For IDDES, LESModel is SpalartAllmarasIDDES or kOmegaSSTIDDES according to RAS Model.
simulationType LES;
LES
{
LESModel SpalartAllmarasIDDES; //kOmegaSSTIDDES;
turbulence on;
delta IDDESDelta;
viscosityRatioMax 1e5;
SpalartAllmarasIDDESCoeffs
{
CDES <value>;
lowReCorrection <yes or no>;
Sct <value>;
}
kOmegaSSTIDDES
{
CDESkom <value>2;
CDESkeps <value>;
Sct <value>;
}
IDDESDeltaCoeffs
{
hmax maxDeltaxyzCubeRoot;
maxDeltaxyzCubeRootCoeffs
{
}
}
}
Length-Scale Model
Lengh-Scale Model is same as LES.
Energy
Energy optopn is set in the system/fvSolution file. solveEnergy of SIMPLE and PIMPLE dictionary is yes or no.
SiMPLE //PIMPLE
{
...
solveEnergy <yes or no>;
...
}
Species
Species is set in the constant/thermophysicalProperties file.
thermoType dictionary
mixture is set as multiComponentMixture.
thermoType
{
type heRhoThermo;
mixture multiComponentMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
species dictionary
Write the chemical species to be used in the calculation. You must also specify an inertSpecie. It does not calculate the transport equations and uses a mass fraction of 1 minus the sum of the remaining chemical species values.
species
(
<species1>
<species2>
...
);
inertSpecie <specie1>
dictionaries of each species
There must be material properties dictionary for each species. The dictionary is same with mixture dictionary except thers is Dm at transport.
<specie1>
{
thermodynamics
{
...
}
transport
{
mu <value>;
Pr <value>;
Dm <value>;
}
specie
{
...
}
equationOfState
{
...
}
}
<specie2>
...
User-defined Scalars
User-defined Scalars is set in the functions dictionary of system/controlDict file.
If diffussivity is Constant, input value is set at D. If diffussivity is 'Laminar and Turbulent Diffusivity' , input values are set at alphaD and alphaDt.
functions
{
...
<name>
{
type scalarTransport;
libs ("/baram/solvers/openfoam/lib/libsolverFunctionObjects.so");
field <uds name>;
schemesField scalar;
nCorr 2;
writeControl runTime;
writeInterval <value>;
D <value>; // Constant
//alphaD <value>; // Laminar and Turbulent Viscosity
//alphaDt <value>; // Laminar and Turbulent Viscosity
}
}
schemesField is fixed as scalar. So there must be settings for scalar at system/fvSolution and system/fvSchemes file.
writeInterval is the input value of 'Save Interval' at 'Run Conditions'.
Materials
Material properties are set in the constant/thermophysicalProperties file for single-phase and in constant/transportProperties for multi-phase. For non-Newtonial flow properties are set in the constant/turbulenceProperties file.
thermophysicalProperties
thermoType dictionary
There are mixture, transport, thermo, equationOfState, specie and energy in thermoType.
For fluid
thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIso;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}
-
type : heRhoThermo for fluid, heSolidThermo for solid
-
mixture : If species is not included, pureMixture, otherwise multiComponentMixture. For solid, pureMixture.
-
transport : If viscosity and thermal conductivity is constant, const, if polynimial, polynomial. For solid, if thermal conductivity is constant constIso.
-
thermo : hConst for specific heat is constant, hPolynomial for Polynomial.
-
equationOfState : rhoConst for density is constant, perfectGas for Perfect gas, incompressiblePerfectGas for Incompressible perfect gas. icoPolynomial for Polynomial
-
specie : always specie
-
energy : always sensibleEnthalpy
mixture dictionary
If species is not included, material properties are set in mixture dictionary. There are thermodynamics, transport, specie, equationOfState in mixture. Example is as follows
...
mixture
{
thermodynamics
{
Cp 1006.0;
Hf 0;
}
transport
{
mu 1.79e-05;
Pr 0.7349959183673469;
}
specie
{
nMoles 1;
molWeight 28.966;
}
equationOfState
{
rho 1.225;
}
}
...
thermodynamics
Set Cp and Hf. Cp is specific heat capacity and Hf is heat of formation. BaramFlow has no capability of chemical reaction yet, so Hf is not used and set as 0.
If Cp is constant, dictionary is as follows
thermodynamics
{
Cp <value>;
Hf 0;
}
If Cp is Polynomial, dictionary is like this
thermodynamics
{
Hf 0;
Sf 0;
CpCoeffs<8> (<a0> <a1> <a2> ... <a7>)
}
As polynomial equation is expressed as 7th equation as follows, 8 coefficients are required. The coefficients not given are set as 0.
\(Cp = a_0 + a_1 T + a_2 T^2 + a_3 T^3 + a_4 T^4 + a_5 T^5 + a_6 T^6 + a_7 T^7\)
transport
Set viscosity, mu and Prandtl Number, Pr.
If viscosity and thermal conductivity is constannt,
transport
{
mu <value>;
Pr <value>;
}
If viscosity and thermal conductivity is polynomial,
transport
{
muCoeffs<8> (<a0> <a1> <a2> ... <a7>)
kappaCoeffs<8> (<a0> <a1> <a2> ... <a7>)
}
If viscosity is Sutherland,
transport
{
As <value>;
Ts <value>;
}
specie
Set molecular weight at specie
specie
{
nMoles 1;
molWeight <value>;
}
equationOfState
If density is constant,
equationOfState
{
rho <value>;
}
If density is polynomial
equationOfState
{
rhoCoeffs<8> (<a0> <a1> <a2> ... <a7>)
}
If density is perfect gas, equationOfState dictionary is not needed.
if density is incomprssible perect gas,
equationOfState
{
pRef <value>;
}
transportProperties
Define material properties for multi-phase flow. There must be phases dictionary and additional dictionaries for each phase.
Surface tension and Cavitation is set here.
phases
For 2 pahse
phases (<phase1> <phase2>);
For more than 2 pahse
phases
(
<phase1>
{
transportModel Newtonian;
nu <value>;
rho <value>;
}
<phase2>
{
transportModel Newtonian;
nu <value>;
rho <value>;
}
...
);
Properties for each phase
For 2 phase
<phase1>
{
transportModel Newtonian;
nu <value>;
rho <value>;
}
<phase2>
{
transportModel Newtonian;
nu <value>;
rho <value>;
}
For more than 2 phase, noting is needed because properties are set in phases.
Surface tension
For 2 phase
sigma <value>;
For more than 2 phase, values for each other are needed as follows
sigmas
(
(<phase1> <phase2>) <value>
(<phase1> <phase3>) <value>
(<phase2> <phase3>) <value>
...
);
Cavitation
Set vapor pressure at pSat and cavitation model at phaseChangeTwoPhaseMixture
pSat <value>;
phaseChangeTwoPhaseMixture SchnerrSauer; //Kunz, Merkle, Zwart
Coefficients for each model must be set as dictionary as follows
Schnerr-Sauer model
SchnerrSauerCoeffs
{
n <value>;
dNuc <value>;
Cc <value>;
Cv <value>;
}
KunzCoeffs // MerkleCoeffs
{
UInf <value>;
tInf <value>;
Cc <value>;
Cv <value>;
}
ZwartCoeffs
{
aNuc <value>;
dNuc <value>;
Cc <value>;
Cv <value>;
}
Cell Zone Conditions
Multiple Reference Frame, MRF
MRF is set in the constant/MRFProperties file as follows
<name>
{
cellZone <cell zone name>;
active yes;
nonRotatingPatches
(
<patch name 1>
<patch name 2>
...
);
origin (<x> <y> <z>);
axis (<x-axis> <y-axis> <z-axis>);
omega <radian per sec>;
}
omega is calculate from the input of RPM to rps(radian per sec)
Sliding Mesh
Sliding Mesh is set in the constant/dynamicMeshDict file as follows
dynamicFvMesh dynamicMotionSolverListFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
motionSolver fvMotionSolvers;
solvers
{
<name>
{
solver solidBody;
solidBodyMotionFunction rotatingMotion;
cellZone rotating;
rotatingMotionCoeffs
{
origin (<x> <y> <z>);
axis (<x-axis> <y-axis> <z-axis>);
omega <radian per sec>;
}
}
}
omega is calculate from the input of RPM to rps(radian per sec)
Porous Zone
Porous Zone is set in the system/fvOptions file.
Power Law model
Inputs of C0 and C1 is used at powerLawCoeffs.
<name>
{
type explicitPorositySource;
explicitPorositySourceCoeffs
{
type powerLaw;
powerLawCoeffs
{
C0 <value>;
C1 <value>;
coordinateSystem
{
type cartesian;
origin (<x> <y> <z>);
rotation
{
type axesRotation;
e1 (1 0 0);
e2 (0 1 0);
}
}
}
selectionMode cellZone;
cellZone <cell zone name>;
}
}
Darcy Forchheimer model
Input values of direction vector 1 and 2 are used at e1 and e2 of _coordinateSystem. Inertial Resistance Coefficient(f, Forchheimer coefficient) and Viscous Resistance Coefficient(d, Darcy coefficient) is used at f and d of DarcyForchheimerCoeffs.
<name>
{
type explicitPorositySource;
explicitPorositySourceCoeffs
{
type DarcyForchheimer;
DarcyForchheimerCoeffs
{
d d [ 0 -2 0 0 0 0 0 ] (<x-d> <y-d> <z-d>);
f f [ 0 -1 0 0 0 0 0 ] (<x-f> <y-f> <z-f>);
coordinateSystem
{
type cartesian;
origin (<x> <y> <z>);
rotation
{
type axes;
e1 (<x-dir1> <y-dir1> <z-dir1>);
e2 (<x-dir2> <y-dir2> <z-dir2>);
}
}
}
selectionMode cellZone;
cellZone <cell zone name>;
}
}
Actuator Disk
Actuator Disk is set in the system/fvOptions file.
Input of Disk Direction is used at diskDir, Power Coefficient at Cp, Thrust Coefficient at Ct, Disk Area at diskArea, Upstream Point at monitorCoeffs and Force Computation method at variant.
actuationDiskSource_porousZone
{
type actuationDiskSource;
fields (U);
diskDir (<x-dir> <y-dir> <z-dir>);
Cp <value>;
Ct <value>;
diskArea <value>;
monitorMethod points;
monitorCoeffs
{
points ((<x> <y> <z>));
}
variant <Froude or variableScaling>;
selectionMode cellZone;
cellZone <cell zone name>;
}
Source Terms
Mass, energy, turbulence and species source can be set in the system/fvOptions file.
What the source term is for is set at sources. rho for mass, h for energy, k, epsilon, omega, nuTilda for turbulence.
The value is given in sources as (\
There are 2 options of 'Value for Entire Cell Zone' and 'Value per Unit Volume' for Specification Method. It is set at volumeMode as absolute for 'Value for Entire Cell Zone' and specific for 'Value per Unit Volume'.
When giving source term to an entire region rather than a cell zone, the selectionMode will be all.
<name>
{
type scalarSemiImplicitSource;
volumeMode <absolute or specific>;
sources
{
rho (<value> 0.0); // h, k, epsilon, omega, nuTilda, <species>
}
selectionMode cellZone; //all;
cellZone <cell zone name>;
}
<name>
{
type scalarSemiImplicitSource;
volumeMode <absolute or specific>;
sources
{
h
{
explicit table ( (<t0> <t1> ...) (<flowrate0> <flowrate1>) ... );
implicit none;
}
}
selectionMode cellZone;
cellZone <cell zone name>;
}
<name>
{
type scalarSemiImplicitSource;
volumeMode <absolute or specific>;
sources
{
h
{
explicit polynomial ( (<a0> 0) (<a1> 1) ... );
implicit none;
}
}
selectionMode cellZone;
cellZone <cell zone name>;
}
Source term of user defined scalar
Source term of user defined scalar is not set in system/fvOptions file, but in the functions dictionary of system/controlDict file.
In the user define scalar dictionary of functions, fvOptions dictionary is set as follows
functions
{
...
<name>
{
type scalarTransport;
...
fvOptions
{
<name>
{
type scalarSemiImplicitSource;
volumeMode absolute;
sources
{
<uds name> (<value> 0.0);
}
selectionMode cellZone;
cellZone <cell zone name>;
}
}
}
}
Fixed Values
You can fix velocity, temprature, turbulence, specie and user defined scalars in the file system/fvOptions.
Velocity
type is meanVelocityForce.
Input velocity is set at Ubar, relaxation factors are at relaxation.
<name>
{
type meanVelocityForce;
active yes;
fields (U);
Ubar (<Ux> <Uy> <Uz>);
relaxation <value>;
selectionMode cellZone;
cellZone <cell zone name>;
}
Temperature
type is fixedTemperatureConstraint.
Input temperature is set at temperature.
fixedTemperature_porousZone
{
type fixedTemperatureConstraint;
active yes;
mode uniform;
temperature constant <value>;
selectionMode cellZone;
cellZone <cell zone name>;
}
Turbulence and Species
type is scalarFixedValueConstraint.
Field and input value is set at fixedValues.
fixedTemperature_porousZone
{
type scalarFixedValueConstraint;
active yes;
fieldValues
{
k <value>; // epsilon, omega, nuTilda
}
selectionMode cellZone;
cellZone <cell zone name>;
}
Fixed value of user defined scalar
Fixed value of user defined scalar is not set in system/fvOptions, but in the functions dictionary of system/controlDict file.
In the user define scalar dictionary of functions, fvOptions dictionary is set as follows
functions
{
...
<name>
{
type scalarTransport;
...
fvOptions
{
<name>
{
type scalarFixedValueConstraint;
active yes;
fieldValues
{
<uds name> <value>;
}
selectionMode cellZone;
cellZone <cell zone name>;
}
}
}
}
Boundary Conditions
Boundary Conditions are set in files in 0 folder.
Velocity Inlet
U
Velocity Specification Method : Magnitude, Normal to Boundary
<boundayr name>
{
type surfaceNormalFixedValue;
refValue uniform -<value>;
}
Velocity Specification Method : Component
<boundayr name>
{
type fixedValue;
value uniform (<Ux> <Uy> <Uz>);
}
<boundayr name>
{
type uniformNormalFixedValue;
uniformValue table;
uniformValueCoeffs
{
values
(
(<time0> -<velocityMagnitude0>)
(<time1> -<velocityMagnitude1>)
(<time2> -<velocityMagnitude2>)
...
);
}
}
<boundayr name>
{
type uniformFixedValue;
uniformValue table;
uniformValueCoeffs
{
values
(
(<time0> (<Ux0> <Uy0> <Uz0>))
(<time1> (<Ux1> <Uy1> <Uz1>))
(<time2> (<Ux2> <Uy2> <Uz2>))
...
);
}
}
<boundayr name>
{
type timeVaryingMappedFixedValue;
points points_U;
}
<number of points>
(
(<x-coordinate0> <y-coordinate0> <z-coordinate0>)
(<x-coordinate1> <y-coordinate1> <z-coordinate1>)
...
)
<number of points>
(
(<Ux0> <Uy0> <Uz0>)
(<Ux1> <Uy1> <Uz1>)
...
)
p_rgh
<boundayr name>
{
type zeroGradient;
}
T
Constant
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
<boundayr name>
{
type uniformFixedValue;
uniformValue table;
uniformValueCoeffs
{
values
(
(<time0> <T0>)
(<time1> <T1>)
(<time2> <T2>)
...
);
}
}
<boundayr name>
{
type uniformFixedValue;
uniformValue polynomial
(
(a0 0)
(a1 1)
(a2 2)
...
);
}
k
Specification Method : K and Epsilon
<boundayr name>
{
type inletOutlet;
inletValue uniform <inlet value>;
value uniform <value>;
}
<boundayr name>
{
type turbulentIntensityInletOutletTKE;
turbIntensity uniform <value>;
value uniform <value>;
}
epsilon, omega
Specification Method : K and Epsilon
<boundayr name>
{
type inletOutlet;
inletValue uniform <inlet value>;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletTDR;
viscosityRatio uniform <value>;
value uniform <value>;
}
nuTilda
Specification Method : Modifed Turbulent Viscosity
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletNuTilda;
viscosityRatio <value>;
value uniform <value>;
}
nut, alphat
<boundayr name>
{
type calculated;
value uniform <value>;
}
volume fraction, species, user defined scalar
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
Flow Rate Inlet
U
Flow Rate Specification Method : Volume Flow Rate
<boundayr name>
{
type flowRateInletVelocity;
volumetricFlowRate <value>;
}
<boundayr name>
{
type flowRateInletVelocity;
massFlowRate <value>;
rhoInlet <value>;
}
Dictionary of p_rgh, T, turbulence is the same with Velocity Inlet
Pressure Inlet
U
<boundayr name>
{
type pressureInletOutletVelocity;
value uniform <value>;
}
p_rgh
<boundayr name>
{
type totalPressure;
p0 uniform <value>;
}
Dictionary of T, turbulence is the same with Velocity Inlet
ABL Inlet
U
<boundayr name>
{
type atmBoundaryLayerInletVelocity;
flowDir (<x-dir> <y-dir> <z-dir>);
zDir (<x-dir> <y-dir> <z-dir>);
Uref <value>;
Zref <value>;
z0 <value>;
d <value>;
}
p_rgh
<boundayr name>
{
type zeroGradient;
}
k
<boundayr name>
{
type atmBoundaryLayerInletK;
flowDir (<x-dir> <y-dir> <z-dir>);
zDir (<x-dir> <y-dir> <z-dir>);
Uref <value>;
Zref <value>;
z0 <value>;
d <value>;
}
epsilon
<boundayr name>
{
type atmBoundaryLayerInletEpsilon;
flowDir (<x-dir> <y-dir> <z-dir>);
zDir (<x-dir> <y-dir> <z-dir>);
Uref <value>;
Zref <value>;
z0 <value>;
d <value>;
}
omega
<boundayr name>
{
type atmBoundaryLayerInletOmega;
flowDir (<x-dir> <y-dir> <z-dir>);
zDir (<x-dir> <y-dir> <z-dir>);
Uref <value>;
Zref <value>;
z0 <value>;
d <value>;
}
nut
<boundayr name>
{
type calculated;
value uniform <value>;
}
Free Stream
U
<boundayr name>
{
type freestreamVelocity;
freestreamValue uniform <value>;
}
p_rgh
<boundayr name>
{
type freestreamPressure;
freestreamValue uniform <value>;
}
T
<boundayr name>
{
type freestream;
freestreamValue uniform <value>;
}
k
Specification Method : K and Epsilon
<boundayr name>
{
type freestream;
freestreamValue uniform <value>;
}
<boundayr name>
{
type turbulentIntensityInletOutletTKE;
turbIntensity uniform <value>;
value uniform <value>;
}
epsilon, omega
Specification Method : K and Epsilon
<boundayr name>
{
type freestream;
freestreamValue uniform <inlet value>;
}
<boundayr name>
{
type viscosityRatioInletOutletTDR;
viscosityRatio uniform <value>;
value uniform <value>;
}
nuTilda
Specification Method : Modifed Turbulent Viscosity
<boundayr name>
{
type freestream;
freestreamValue uniform <inlet value>;
}
<boundayr name>
{
type viscosityRatioInletOutletNuTilda;
viscosityRatio <value>;
value uniform <value>;
}
nut, alphat
<boundayr name>
{
type calculated;
value uniform <value>;
}
species, user defined scalar
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
Open Channel Inlet
U
<boundayr name>
{
type variableHeightFlowRateInletVelocity;
alpha alpha.<secondary material name>;
flowRate <value>;
value uniform <value>;
}
p_rgh
<boundayr name>
{
type zeroGradient;
}
alpha.\
<boundayr name>
{
type variableHeightFlowRate;
lowerBound 0.0;
upperBound 1.0;
value uniform <value>;
}
Dictionary of turbulence is the same with Velocity Inlet
Far-field Riemann
U
<boundayr name>
{
type farfieldRiemann;
flowDir (<x-dir> <y-dir> <z-dir>);
MInf <value>;
pInf <value>;
TInf <value>;
value uniform (<Ux> <Ux> <Ux>);
}
p, T
<boundayr name>
{
type farfieldRiemann;
flowDir (<x-dir> <y-dir> <z-dir>);
MInf <value>;
pInf <value>;
TInf <value>;
value uniform <value>;
}
Dictionary of turbulence is the same with Velocity Inlet
Subsonic Inlet
U
<boundayr name>
{
type subsonicInlet;
flowDir (<x-dir> <y-dir> <z-dir>);
p0 <value>;
T0 <value>;
value uniform (<Ux> <Ux> <Ux>);
}
p, T
<boundayr name>
{
type subsonicInlet;
flowDir (<x-dir> <y-dir> <z-dir>);
p0 <value>;
T0 <value>;
value uniform <value>;
}
Dictionary of turbulence is the same with Velocity Inlet
Supersonic Inflow
U
<boundayr name>
{
type fixedValue;
value uniform (<Ux> <Ux> <Ux>);
}
p, T
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
Dictionary of turbulence is the same with Velocity Inlet
Pressure Outlet
U
Without Non-reflecging Boundary option
<boundayr name>
{
type pressureInletOutletVelocity;
value uniform (<Ux> <Ux> <Ux>);
}
<boundayr name>
{
type waveTransmissive;
gamma <value>;
}
p_rgh
Without Non-reflecging Boundary option
<boundayr name>
{
type totalPressure;
p0 uniform <value>; # value is static pressure
}
<boundayr name>
{
type waveTransmissive;
gamma <value>;
}
T
Without Specify Backflow Properties
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type inletOutletTotalTemperature;
gamma <value>;
inletValue uniform <value>;
T0 uniform <value>;
}
k
Without Specify Backflow Properties
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type turbulentIntensityInletOutletTKE;
turbIntensity uniform <value>;
value uniform <value>;
}
epsilon, omega
Without Specify Backflow Properties
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletTDR;
inletValue uniform <value>;
value uniform <value>;
}
nuTilda
Without Specify Backflow Properties
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletNuTilda;
inletValue uniform <value>;
value uniform <value>;
}
nut, alphat
Without Specify Backflow Properties
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type calculated;
value uniform <value>;
}
Open Channel Outlet
U
<boundayr name>
{
type outletPhaseMeanVelocity;
Umean <value>;
alpha alpha.<sescondary phase name>;
value uniform <value>;
}
p_rgh
<boundayr name>
{
type zeroGradient;
}
k
Specification Method : K and Epsilon
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type turbulentIntensityInletOutletTKE;
turbIntensity uniform <value>;
value uniform <value>;
}
epsilon, omega
Specification Method : K and Epsilon
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletTDR;
viscosityRatio uniform <value>;
value uniform <value>;
}
nuTilda
Specification Method : Modified Turbulent Viscosity
<boundayr name>
{
type inletOutlet;
inletValue uniform <value>;
value uniform <value>;
}
<boundayr name>
{
type viscosityRatioInletOutletNuTilda;
inletValue uniform <inlet value>;
value uniform <value>;
}
nut
<boundayr name>
{
type calculated;
value uniform <value>;
}
Outflow
U, p_rgh, T, k, epsilon, omega, nuTilda
<boundayr name>
{
type zeroGradient;
}
Subsonic Outflow
U, p, T
<boundayr name>
{
type subsonicOutflow;
pExit <value>;
value uniform <value>;
}
k, epsilon, omega, nuTilda
<boundayr name>
{
type zeroGradient;
}
nut, alphat
<boundayr name>
{
type calculated;
value uniform <value>;
}
Supersonic Outflow
U, p_rgh, T, k, epsilon, omega, nuTilda
<boundayr name>
{
type zeroGradient;
}
Wall
U
No Slip
<boundayr name>
{
type fixedValue;
value uniform (0 0 0)
}
<boundayr name>
{
type slip;
}
<boundayr name>
{
type movingWallVelocity;
value uniform (0 0 0)
}
<boundayr name>
{
type fixedValue;
value uniform (0 0 0)
}
<boundayr name>
{
type fixedValue;
value uniform (<Ux> <Uy> <Uz>)
}
<boundayr name>
{
type rotatingWallVelocity;
origin (<x> <y> <z>);
axis (<x> <y> <z>);
omega <value>;
}
p_rgh
<boundayr name>
{
type fixedFluxPressure;
}
p of density based solver
<boundayr name>
{
type zeroGradient;
}
T
Adiabatic
<boundayr name>
{
type zeroGradient;
}
<boundayr name>
{
type fixedValue;
value uniform <value>;
}
<boundayr name>
{
type externalWallHeatFluxTemperature;
mode flux;
q uniform <value>;
kappaMethod fluidThermo;
value uniform <value>;
}
<boundayr name>
{
type externalWallHeatFluxTemperature;
mode coefficient;
h uniform <value>;
Ta uniform <value>;
kappaMethod fluidThermo;
value uniform <value>;
thicknessLayers (<value0> <value1> <...>);
kappaLayers (<value0> <value1> <...>);
}
k
<boundayr name>
{
type kqRWallFunction;
value uniform <value>;
}
epsilon
Standard Wall Function
<boundayr name>
{
type epsilonWallFunction;
value uniform <value>;
}
<boundayr name>
{
type epsilonBlendedWallFunction;
value uniform <value>;
}
<boundayr name>
{
type atmEpsilonWallFunction;
z0 <value>;
d <value>;
value uniform <value>;
}
omega
<boundayr name>
{
type omegaBlendedWallFunction;
blending tanh;
value uniform <value>;
}
nuTilda
<boundayr name>
{
type zeroGradient;
}
nut
Standard Wall Function
<boundayr name>
{
type nutkWallFunction;
value uniform <value>;
}
<boundayr name>
{
type nutSpaldingWallFunction;
value uniform <value>;
}
<boundayr name>
{
type atmNutkWallFunction;
z0 <value>;
value uniform <value>;
}
alphat
Adiabatic boundary condition
<boundayr name>
{
type compressible::alphatWallFunction;
Prt <value>;
value uniform <value>;
}
<boundayr name>
{
type compressible::alphatJayatillekeWallFunction;
Prt <value>;
value uniform <value>;
}
Thermo-Coupled Wall
U
<boundayr name>
{
type fixedValue;
value uniform (0 0 0);
}
p_rgh
<boundayr name>
{
type fixedFluxPressure;
}
T
<boundayr name>
{
type compressible::turbulentTemperatureRadCoupledMixed;
Tnbr T;
kappaMethod fluidThermo;
value uniform <value>;
}
k
<boundayr name>
{
type kqRWallFunction;
value uniform <value>;
}
epsilon
Standard Wall Function
<boundayr name>
{
type epsilonWallFunction;
value uniform <value>;
}
<boundayr name>
{
type epsilonBlendedWallFunction;
value uniform <value>;
}
omega
<boundayr name>
{
type omegaBlendedWallFunction;
blending tanh;
value uniform <value>;
}
nuTilda
<boundayr name>
{
type zeroGradient;
}
nut
k-epsilon, Standard Wall Function
<boundayr name>
{
type nutkWallFunction;
value uniform <value>;
}
<boundayr name>
{
type nutSpaldingWallFunction;
value uniform <value>;
}
alphat
<boundayr name>
{
type compressible::alphatJayatillekeWallFunction;
value uniform <value>;
}
Region Interface
U
<boundayr name>
{
type fixedValue;
value uniform (0 0 0);
}
p_rgh
<boundayr name>
{
type fixedFluxPressure;
}
T
<boundayr name>
{
type compressible::turbulentTemperatureCoupledBaffleMixed;
}
k
<boundayr name>
{
type kqRWallFunction;
}
epsilon
standard wall function
<boundayr name>
{
type epsilonWallFunction;
}
<boundayr name>
{
type epsilonBlendedWallFunction;
}
omega
<boundayr name>
{
type omegaBlendedWallFunction;
}
nuTilda
<boundayr name>
{
type zeroGradient;
}
nut
k-epsilon, standard wall function
<boundayr name>
{
type nutkWallFunction;
}
<boundayr name>
{
type nutSpaldingWallFunction;
}
alphat
<boundayr name>
{
type compressible::alphatJayatillekeWallFunction;
}
Empty
<boundayr name>
{
type empty;
}
Wedge
<boundayr name>
{
type wedge;
}
Symmetry
<boundayr name>
{
type symmetry;
}
Interface
<boundayr name>
{
type cyclicAMI;
}
Cyclic
<boundayr name>
{
type cyclic;
}
Porous Jump
All fields except p_rgh
<boundayr name>
{
type cyclic;
}
<boundayr name>
{
type porousBafflePressure;
patchType cyclic;
D <value>;
I <value>;
length <value>;
value uniform <value>;
}
Fan
All fields except p_rgh
<boundayr name>
{
type cyclic;
}
<boundayr name>
{
type fan;
patchType cyclic;
jumpTable csvFile;
jumpTableCoeffs
{
nHeaderLine 0;
refColumn 0;
componentColumns (1);
separator ",";
mergeSeparators no;
file "<path and file name>";
}
}
Numerical Conditions
Numerical Conditions are set in system/fvSolution and system/fvSchemes file.
Pressure-Velocity Coupling Scheme
Pressure-Velocity Coupling Scheme is set at consistent of SIMPLE and PIMPLE dictionary of system/fvSolution file.
no for SIMPLE, yes for SIMPLEC
SIMPLE
{
consistent <yes or no>;
...
}
Momentum Predictor
Momentum Predictor is set at the momentumPredictor of PIMPLE dictionary in the system/fvSolution file.
PIMPLE
{
...
momentumPredictor <on or off>;
...
}
Flux Type
Flux Type is set at Riemann dictionary in the system/fvSolution file. Riemann dictionary is used only for density based solver and as follows
Riemann
{
fluxScheme <roeFlux or AUSMplusFlux or AUSMplusUpFlux>;
secondOrder <yes or no>;
reconGradScheme VKLimited Gauss linear 1;
roeFluxCoeffs
{
epsilon <value>;
}
AUSMplusUpFluxCoeffs
{
MInf <value>;
}
}
Entropy Fix Coefficient is set at epsilon of roeFluxCoeffs, Cut-off Mach Number is at MInf of AUSMplusUpFluxCoeffs.
Discretization Schemes
Time
Time is set at ddtSchemes dictionary in the system/fvSchemes file.
Euler for First Order Implicit , backward for Second Order Implicit
ddtSchemes
{
default <Euler or backward>;
}
Pressure
Pressure is set at interpolationSchemes dictionar in the system/fvSchemes file.
For Linear
interpolationSchemes
{
default linear;
interpolate(p) linear;
interpolate(p_rgh) linear;
}
interpolationSchemes
{
default linear;
interpolate(p) momentumWeighted;
interpolate(p_rgh) momentumWeighted;
}
interpolationSchemes
{
default linear;
interpolate(p) momentumWeightedReconstruct;
interpolate(p_rgh) momentumWeightedReconstruct;
}
Momentum, Energy, Turbulence, Volume Fraction
These are set in divSchemes dictionary in the system/fvSchemes file.
For First Order Upwind
divSchemes
{
default Gauss linear;
div(phi,U) Gauss upwind;
div(rhoPhi,U) Gauss upwind;
div(phiNeg,U) Gauss upwind;
div(phiPos,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,omega) Gauss upwind;
div(phi,nuTilda) Gauss upwind;
div(phi,alpha) Gauss upwind;
div(phirb,alpha) Gauss upwind;
div(phi,scalar) Gauss upwind;
}
For Second Order Upwind
divSchemes
{
default Gauss linear;
div(phi,U) Gauss linearUpwind momentumReconGrad;
div(rhoPhi,U) Gauss linearUpwind momentumReconGrad;
div(phiNeg,U) Gauss MinmodV;
div(phiPos,U) Gauss MinmodV;
div(phi,k) Gauss linearUpwind turbulenceReconGrad;
div(phi,epsilon) Gauss linearUpwind turbulenceReconGrad;
div(phi,omega) Gauss linearUpwind turbulenceReconGrad;
div(phi,nuTilda) Gauss linearUpwind turbulenceReconGrad;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div(phi,scalar) Gauss linearUpwind momentumReconGrad;
}
For density based solver
Discretization scheme of Flow is set at Riemann dictionary in the system/fvSolution file. For 'First Order Upwind' secondOrder is no, otherwise yes
Riemann
{
...
secondOrder <yes or no>;
...
}
For turbulence same as pressure based solver.
Under-Relaxation Factors
Relaxation Factors is set at relaxationFactors dictionary in the system/fvSolution file.
Input values are set as follows
relaxationFactors
{
fields
{
p <value>;
pFinal <value>;
p_rgh <value>;
p_rghFinal <value>;
rho <value>;
rhoFinal <value>;
}
equations
{
U <value>;
UFinal <value>;
h <value>;
hFinal <value>;
"(k|epsilon|omega|nuTilda)" <value>;
"(k|epsilon|omega|nuTilda)Final" <value>;
alpha.waterLiquid <value>;
alpha.waterLiquidFinal <value>;
scalar <value>;
scalarFinal <value>;
}
}
Improve Stability
Improve Stability option is set at laplacianSchemes dictionary in the system/fvSchemes file.
If option is Off
laplacianSchemes
{
default Gauss linear corrected;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}
Max Iterations per Time Step, Number of Correctors
These are set at PIMPLE dictionary in the system/fvSolution file.
nOuterCorrectors for Max Iterations per Time Step, nCorrectors for Number of Correctors
PIMPLE
{
...
nCorrectors <value>;
nOuterCorrectors <value>;
...
}
Multiphase
Multiphase related setups are set at solvers dictionary in the system/fvSolution file.
solvers
{
...
"alpha.*"
{
...
nAlphaSubCycles <value>;
nAlphaCorr <value>;
MULESCorr <yes or no>;
cAlpha <value>;
nLimiterIter <value>;
...
}
...
}
If MULES Variant is Explicit, MULESCorr is no, otherwise yes
Phase Interface Compression Factor is set at cAlpha.
Number of MULES iterations over the limiter is set at nLimiterIter.
Convergence Criteria
For pressure based solver convergence criteria is set at residualControl dictionary of SIMPLE and PIMPLE in the system/fvSolution file.
SIMPLE
{
...
residualControl
{
p <value>;
p_rgh <value>;
U <value>;
h <value>;
"(k|epsilon|omega|nuTilda)" <value>;
"alpha.*" <value>;
}
}
PIMPLE
{
...
residualControl
{
...
p_rgh
{
tolerance <value>;
relTol <value>;
}
U
{
tolerance <value>;
relTol <value>;
}
...
}
}
LU-SGS
{
residualControl
{
rho 0.001;
rhoU 0.001;
rhoE 0.001;
"(k|epsilon|omega|nuTilda)" 0.001;
}
}
Limits
limitT dictionary in the system/fvOptions file is used for limit temperature.
limitT
{
type limitTemperature;
active yes;
selectionMode all;
min 1;
max 5000;
}
Equations
In SIMPLE and PIMPLE dictionary in the system/fvSolution file, you can on/off equations of flow, energy and species.
SIMPLE // PIMPLE
{
...
solveFlow <yes or no>;
solveEnergy <yes or no>;
solveSpecies <yes or no>;
...
}
3 terms of energy equation as Viscous dissipation, Kinetic energy, Pressure Work can be of/off in the constant/thermophysicalProperties file.
includeViscousDissipation <true of false>;
includeKineticEnergy <true of false>;
includePressureWork <true of false>;
Default numerical conditions
SIMPLE in fvSolution file
nNonOrthogonalCorrectors, pRefCell, pRefValue are fixed as 0.
SIMPLE
{
...
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
...
}
PIMPLE in fvSolution file
turbOnFinalIterOnly is false. nAlphaSpreadIter and nAlphaSweepIter is 0, rDeltaTSmoothingCoeff and rDeltaTDampingCoeff is 0.5.
PIMPLE
{
...
turbOnFinalIterOnly false;
nAlphaSpreadIter 0;
nAlphaSweepIter 0;
rDeltaTSmoothingCoeff 0.5;
rDeltaTDampingCoeff 0.5;
...
}
solvers in fvSolution file
solvers dictionary is for matrix solver for each field.
solver and preconditioner are depend on field.
tolerance is fixed as 1e-16, relative tolerance(relTol) is 0.1, minimum iteration(minIter) is 1 and maximum iteration(maxIter) is 5 except volume fraction(alpha).
For alpha, tolerance is fixed as 1e-8, relTol is 0, minIter is 1 and maxIter is 10.
Pressure
p_rgh uses PCG solver and GAMG preconditioner.
solvers
{
...
p_rgh
{
solver PCG;
preconditioner
{
preconditioner GAMG;
smoother DIC;
tolerance 1e-5;
relTol 0.1;
}
tolerance 1e-16;
relTol 0.1;
minIter 1;
maxIter 5;
}
...
}
Velocity, turbulence, species, user defined scalar
U, k, epsilon, omega, nuTilda, scalar and Yi use PBiCGStab solver and DILU preconditioner.
solvers
{
...
"(U|k|epsilon|omega|nuTilda|scalar|Yi)"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-16;
relTol 0.1;
minIter 1;
maxIter 5;
}
...
}
Energy
h uses PBiCGStab solver and GAMG preconditioner.
solvers
{
...
h
{
solver PBiCGStab;
preconditioner
{
preconditioner GAMG;
smoother DILU;
tolerance 1e-5;
relTol 0.1;
}
tolerance 1e-16;
relTol 0.1;
minIter 1;
maxIter 5;
}
...
}
Density
rho uses PCG solver and DIC preconditioner.
solvers
{
...
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-16;
relTol 0.1;
minIter 1;
maxIter 5;
}
...
}
alpha
alpha uses smoothSolver solver and symGaussSeidel smoother.
icAlpha is fixed as 0 and alphaApplyPrevCorr is fixed as yes.
solvers
{
...
"alpha.*"
{
solver smoothSolver;
smoother symGaussSeidel;
icAlpha 0;
alphaApplyPrevCorr yes;
tolerance 1e-8;
relTol 0;
minIter 1;
maxIter 10;
}
...
}
fieldBounds in fvSolution file
fieldBounds is used only in density based solver for limit values as follows
fieldBounds
{
p 1e-06 1e+10;
rho 1e-06 1e+10;
h 1e-06 1e+10;
e 1e-06 1e+10;
rhoE 1e-06 1e+10;
T 1e-06 3e+4;
U 3e+4;
}
gradSchemes in fvSchemes file
In pressure based solver always use Gauss linear. momentumReconGrad, energyReconGrad and turbulenceReconGrad are definition to use in divSchemes.
gradSchemes
{
default Gauss linear;
momentumReconGrad VKLimited Gauss linear 1.0;
energyReconGrad VKLimited Gauss linear 1.0;
turbulenceReconGrad VKLimited Gauss linear 1.0;
}
gradSchemes
{
default Gauss linear;
grad(k) VKLimited Gauss linear 0.5;
grad(epsilon) VKLimited Gauss linear 0.5;
grad(omega) VKLimited Gauss linear 0.5;
grad(nuTilda) VKLimited Gauss linear 0.5;
reconGrad VKLimited Gauss linear 0.5;
}
interpolationSchemes in fvSchemes file
In density based solver setup is fixed as follows
interpolationSchemes
{
default linear;
interpolate(rho) linearUpwind phi grad(rho);
}
snGradSchemes int fvSchemes file
Always use setup below
snGradSchemes
{
default corrected;
}
Monitor
Monitor is set in functions dictionary in the system/controlDict file.
Force
functions
{
...
<name of forces>
{
type forces;
libs ("/baram/solvers/openfoam/lib/libforces.so");
patches
(
<patch name 1>
...
);
CofR (<x> <x> <x>);
updateHeader false;
log false;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval <value>;
}
<name of force coefficients>
{
type forceCoeffs;
libs ("/baram/solvers/openfoam/lib/libforces.so");
patches
(
<patch name 1>
...
);
coefficients (Cd Cl CmPitch);
rho rho;
Aref <value>;
lRef <value>;
magUInf <value>;
rhoInf <value>;
dragDir (<x-dir> <y-dir> <z-dir>);
liftDir (<x-dir> <y-dir> <z-dir>);
CofR (<x> <y> <z>);
updateHeader false;
log false;
pRef <value>;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval <value>;
}
}
Point
functions
{
...
<name>
{
type probes;
libs ("/baram/solvers/openfoam/lib/libsampling.so");
fields (<field>);
probeLocations ( (<x> <y> <z>) );
updateHeader false;
log false;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval <value>;
}
}
Surface
functions
{
...
<name>
{
type surfaceFieldValue;
libs ("/baram/solvers/openfoam/lib/libfieldFunctionObjects.so");
regionType patch;
name <patch name>;
surfaceFormat none;
fields (<field>);
operation <value>;
writeFields false;
updateHeader false;
log false;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval <value>;
}
}
Volume
functions
{
...
<name>
{
type volFieldValue;
libs ("/baram/solvers/openfoam/lib/libfieldFunctionObjects.so");
regionType cellZone;
name <cel zone name>;
fields (<field>);
operation <value>;
writeFields false;
updateHeader false;
log false;
executeControl timeStep;
executeInterval 1;
writeControl timeStep;
writeInterval <value>;
}
}
Residual
To create and save residual data, use functions dictionary in the system/controlDict file.
fields are depend on solver.
functions
{
...
<name>
{
type solverInfo;
libs ("/baram/solvers/openfoam/lib/libutilityFunctionObjects.so");
executeControl timeStep;
executeInterval 1;
writeResidualFields no;
fields
(
U
p_rgh
k
epsilon
...
);
}
}
Initialization
To initialize volume value, system/setFields file is used.
Values of defaultFieldValues is the input values for all domain and values of regions are for certain volume.
defaultFieldValues
(
volScalarFieldValue <field> <value>
...
);
regions
(
boxToCell
{
box (<x1> <y1> <z1>) (<x2> <y2> <z2>);
fieldValues
(
volScalarFieldValue <field> <value>
...
);
}
...
);
defaultFieldValues
(
volScalarFieldValue alpha.<secondary phase1> <value>
volScalarFieldValue alpha.<primaty phase> <1-value>
);
regions
(
boxToCell
{
box (<x1> <y1> <z1>) (<x2> <y2> <z2>);
fieldValues
(
volScalarFieldValue alpha.<secondary phase1> <value>
volScalarFieldValue alpha.<primaty phase1> <1-value>
);
}
);
Run Conditions
Run Conditions are set in the system/controlDict file as follows
application <solver>;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime <value>;
deltaT <value>;
writeControl adjustableRunTime;
writeInterval <value>;
purgeWrite <value>;
writeFormat <binary or ascii>;
writePrecision <value>;
writeCompression off;
writeAtEnd true;
timeFormat general;
timePrecision <value>;
runTimeModifiable yes;
adjustTimeStep <yes or no>;
maxCo <value>;
maxDi <value>;
maxAlphaCo <value>;
- endTime : value of Number of Iteration or End Time
- deltaT : value of Time Step Size
- writeInterval : value of Save Interval
- purgeWrite : value of Retain Only the Most Recent Files
- writeFormat : value of Data Write Format
- writePrecision : value of Data Write Precision
- timePrecision : value of Time Precision
- adjustTimeStep : value of Time Stepping Method
- maxCo : value of Courant Number
- maxDi : value of Maximum Diffusion Number
- maxAlphaCo : value of Max Courant Number for VoF