The dense drag models (WenYu, ErgunWenYu and PlessisMasliyah) have been
extended so that they can create their own void-fraction field when one
is not otherwise available.
The duplicated functionality in the drag models has been generalised and
is now utilised by multiple models.
References have been added for all models for which they could be found.
In addition, an additional drag model, SchillerNaumann, has been added.
This is of the same form as sphereDrag, and is designed for the same
scenario; sparsely distributed spherical particles. The SchillerNaumann
form is more widely referenced and should now be considered standard.
The thermo-parcel-specific force instantiation macro has been removed,
as all the force models are now possible to use with all parcel types.
Resolves bug report https://bugs.openfoam.org/view.php?id=3191
The radiation modelling library has been moved out of
thermophysicalProperties into the top-level source directory. Radiation
is a process, not a property, and belongs alongside turbulence,
combustion, etc...
The namespaces used within the radiation library have been made
consistent with the rest of the code. Selectable sub-models are in
namespaces named after their base classes. Some models have been
renamed remove the base type from the suffix, as this is unnecessary.
These renames are:
Old name: New name:
binaryAbsorptionEmission binary
cloudAbsorptionEmission cloud
constantAbsorptionEmission constant
greyMeanAbsorptionEmission greyMean/greyMeanCombustion
greyMeanSolidAbsorptionEmission greyMeanSolid
wideBandAbsorptionEmission wideBand/wideBandCombustion
cloudScatter cloud
constantScatter constant
mixtureFractionSoot mixtureFraction
Some absorption-emission models have been split into versions which do
and don't use the heat release rate. The version that does has been
given the post-fix "Combustion" and has been moved into the
combustionModels library. This removes the dependence on a registered
Qdot field, and makes the models compatible with the recent removal of
that field from the combustion solvers.
This allows coefficients of the constantAbsorptionEmission and
constantScatter to be entered as pure numbers, with the name and
dimensions set automatically, rather than having to specify them
manually.
The Qdot field has been removed from all reacting solvers, in favour of
computing on the fly whenever it is needed. It can still be generated
for post-processing purposes by means of the Qdot function object. This
change reduces code duplication and storage for all modified solvers.
The Qdot function object has been applied to a number of tutorials in
order to retain the existing output.
A fix to Qdot has also been applied for multi-phase cases.
Added headers to all reactions files to prevent warnings in paraview.
Added references for known mechanisms. Removed unused reaction and
thermophysical property files.
Now for transient simulations "Final" solver settings are required for ALL
equations providing consistency between the solution of velocity, energy,
composition and radiation properties.
However "Final" relaxation factors are no longer required for fields or
equations and if not present the standard value for the variable will be
applied. Given that relaxation factors other than 1 are rarely required for
transient runs and hence the same for all iterations including the final one
this approach provide simpler input while still providing the flexibility to
specify a different value for the final iteration if required. For steady cases
it is usual to execute just 1 outer iteration per time-step for which the
standard relaxation factors are appropriate, and if more than one iteration is
executed it is common to use the same factors for both. In the unlikely event
of requiring different relaxation factors for the final iteration this is still
possible to specify via the now optional "Final" specification.
coneInjection has been extended to include the functionality of
coneNozzleInjection, and the latter has been removed.
Some parameters have changed names. The "positionAxis" entry from
coneInjection has been removed in preferance of coneNozzleInjection's
single "position" and "direction" entries. This means that only one
injection site is possible per model (dictionary substitutions mean that
only minimal additions are required to add further injection sites with
the same parameters). The name of the velocity magnitude has been
standardised as "Umag" and "innerDiameter" and "outerDiamater" have been
renamed "dInner" and "dOuter" for consistency with the inner and outer
spray angles.
Velocity magnitude and diameters are no longer read when they are not
required.
The randomisation has been altered so that the injections generate a
uniform distribution on an cross section normal to the direction of
injection. Previously there was an unexplained bias towards the
centreline.
An example specification with a full list of parameters is shown below.
injectionModels
{
model1
{
type coneInjection;
// Times
SOI 0;
duration 1;
// Quantities
massTotal 0; // <-- not used with these settings
parcelBasisType fixed;
parcelsPerSecond 1000000;
flowRateProfile constant 1;
nParticle 1;
// Sizes
sizeDistribution
{
type fixedValue;
fixedValueDistribution
{
value 0.0025;
}
}
// Geometry
positions (-0.15 -0.1 0);
directions (1 0 0);
thetaInner 0;
thetaOuter 45;
// - Inject at a point
injectionMethod point;
// - Or, inject over a disc:
/*
injectionMethod disc;
dInner 0;
dOuter 0.05;
*/
// Velocity
// - Inject with constant velocity
flowType constantVelocity;
Umag 1;
// - Or, inject with flow rate and discharge coefficient
// This also requires massTotal, dInner and dOuter
/*
flowType flowRateAndDischarge;
Cd 0.9;
*/
// - Or, inject at a pressure
/*
flowType pressureDrivenVelocity;
Pinj 10e5;
*/
}
model2
{
// The same as model1, but at a different position
$model1;
position (-0.15 0.1 0);
}
}
Changed liquid thermo from sensibleEnthalpy to sensibleInternalEnergy in
tutorials. It is generally more convergent and stable to solve for internal
energy if the fluid is incompressible or weakly compressible.
With the -noFields option the mesh is subset but the fields are not changed.
This is useful when the field fields have been created to correspond to the mesh
after the mesh subset.
To switch-off radiation set
radiationModel none;
in radiationProperties which instantiates "null" model that does not read any
data or coefficients or evaluate any fields.
including third-body and pressure dependent derivatives, and derivative of the
temperature term. The complete Jacobian is more robust than the incomplete and
partially approximate form used previously and improves the efficiency of the
stiff ODE solvers which rely on the Jacobian.
Reaction rate evaluation moved from the chemistryModel to specie library to
simplfy support for alternative reaction rate expressions and associated
Jacobian terms.
Temperature clipping included in the Reaction class. This is inactive by default
but for most cases it is advised to provide temperature limits (high and
low). These are provided in the foamChemistryFile with the keywords Thigh and
Tlow. When using chemkinToFoam these values are set to the limits of the Janaf
thermodynamic data. With the new Jacobian this temperature clipping has proved
very beneficial for stability and for some cases essential.
Improvement of the TDAC MRU list better integrated in add and grow functions.
To get the most out of this significant development it is important to re-tune
the ODE integration tolerances, in particular the absTol in the odeCoeffs
sub-dictionary of the chemistryProperties dictionary:
odeCoeffs
{
solver seulex;
absTol 1e-12;
relTol 0.01;
}
Typically absTol can now be set to 1e-8 and relTol to 0.1 except for ignition
time problems, and with theses settings the integration is still robust but for
many cases a lot faster than previously.
Code development and integration undertaken by
Francesco Contino
Henry G. Weller, CFD Direct
Now if a <field> file does not exist first the compressed <field>.gz file is
searched for and if that also does not exist the <field>.orig file is searched
for.
This simplifies case setup and run scripts as now setField for example can read
the <field>.orig file directly and generate the <field> file from it which is
then read by the solver. Additionally the cleanCase function used by
foamCleanCase and the Allclean scripts automatically removed <field> files if
there is a corresponding <field>.orig file. So now there is no need for the
Allrun scripts to copy <field>.orig files into <field> or for the Allclean
scripts to explicitly remove them.
The new optional switch 'writeCyclicMatch' can be set to 'true' to enable the writing of
the cyclic match OBJ files; defaults to 'false'.
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2685
The combined solver includes the most advanced and general functionality from
each solver including:
Continuous phase
Lagrangian multiphase parcels
Optional film
Continuous and Lagrangian phase reactions
Radiation
Strong buoyancy force support by solving for p_rgh
The reactingParcelFoam and reactingParcelFilmFoam tutorials have been combined
and updated.
and the continuous-phase simulation type
For LTS and steady-state simulations the transient option does not need to be
provided as only steady-state tracking is appropriate. For transient running
the Lagrangian tracking may be steady or transient.
This tutorial demonstrates moving mesh and AMI with a Lagrangian cloud.
It is very slow, as interaction lists (required to compute collisions)
are not optimised for moving meshes. The simulation time has therefore
been made very short, so that it finishes in a reasonable time. The
mixer only completes a small fraction of a rotation in this time. This
is still sufficient to test tracking and collisions in the presence of
AMI and mesh motion.
In order to generate a convincing animation, however, the end time must
be increased and the simulation run for a number of days.
For example the actuationDiskSource fvOption may now be specified
disk1
{
type actuationDiskSource;
fields (U);
selectionMode cellSet;
cellSet actuationDisk1;
diskDir (1 0 0); // Orientation of the disk
Cp 0.386;
Ct 0.58;
diskArea 40;
upstreamPoint (581849 4785810 1065);
}
rather than
disk1
{
type actuationDiskSource;
active on;
actuationDiskSourceCoeffs
{
fields (U);
selectionMode cellSet;
cellSet actuationDisk1;
diskDir (1 0 0); // Orientation of the disk
Cp 0.386;
Ct 0.58;
diskArea 40;
upstreamPoint (581849 4785810 1065);
}
}
but this form is supported for backward compatibility.
The entries for liquid and solid species can now be simply be the name unless
property coefficients are overridden in which are specified in a dictionary as
before e.g. in the tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek case
the water is simply specified
liquids
{
H2O;
}
and solid ash uses standard coefficients but the coefficients for carbon are
overridden thus
solids
{
C
{
rho 2010;
Cp 710;
kappa 0.04;
Hf 0;
emissivity 1.0;
}
ash;
}
The defaultCoeffs entry is now redundant and supported only for backward
compatibility. To specify a liquid with default coefficients simply leave the
coefficients dictionary empty:
liquids
{
H2O {}
}
Any or all of the coefficients may be overridden by specifying the properties in
the coefficients dictionary, e.g.
liquids
{
H2O
{
rho
{
a 1000;
b 0;
c 0;
d 0;
}
}
}
The fundamental properties provided by the specie class hierarchy were
mole-based, i.e. provide the properties per mole whereas the fundamental
properties provided by the liquidProperties and solidProperties classes are
mass-based, i.e. per unit mass. This inconsistency made it impossible to
instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
transport solvers on liquidProperties. In order to combine VoF with film and/or
Lagrangian models it is essential that the physical propertied of the three
representations of the liquid are consistent which means that it is necessary to
instantiate the thermodynamics packages on liquidProperties. This requires
either liquidProperties to be rewritten mole-based or the specie classes to be
rewritten mass-based. Given that most of OpenFOAM solvers operate
mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
is more consistent and efficient if the low-level thermodynamics is also
mass-based.
This commit includes all of the changes necessary for all of the thermodynamics
in OpenFOAM to operate mass-based and supports the instantiation of
thermodynamics packages on liquidProperties.
Note that most users, developers and contributors to OpenFOAM will not notice
any difference in the operation of the code except that the confusing
nMoles 1;
entries in the thermophysicalProperties files are no longer needed or used and
have been removed in this commet. The only substantial change to the internals
is that species thermodynamics are now "mixed" with mass rather than mole
fractions. This is more convenient except for defining reaction equilibrium
thermodynamics for which the molar rather than mass composition is usually know.
The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
equilibriumFlameT utilities in which the species thermodynamics are
pre-multiplied by their molecular mass to effectively convert them to mole-basis
to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
equilibriumCO
// Reactants (mole-based)
thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();
// Oxidant (mole-based)
thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
thermo N2(thermoData.subDict("N2")); N2 *= N2.W();
// Intermediates (mole-based)
thermo H2(thermoData.subDict("H2")); H2 *= H2.W();
// Products (mole-based)
thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
thermo CO(thermoData.subDict("CO")); CO *= CO.W();
// Product dissociation reactions
thermo CO2BreakUp
(
CO2 == CO + 0.5*O2
);
thermo H2OBreakUp
(
H2O == H2 + 0.5*O2
);
Please report any problems with this substantial but necessary rewrite of the
thermodynamic at https://bugs.openfoam.org
Henry G. Weller
CFD Direct Ltd.