Commit Graph

115 Commits

Author SHA1 Message Date
081db9a350 lagrangian: drag: Various improvements
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
2019-03-15 08:49:39 +00:00
c59c82ac0e radiationModels: Relocation, namespace changes, and fixed Qdot access
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.
2019-02-11 08:38:56 +00:00
b292fc6d8d radiation: Changed to dictionary constructors for dimensioned types
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.
2019-02-04 09:18:37 +00:00
da77e6a77f tutorial simplifiedSiwek: Updated chemistry stability settings for the new Jacobian
Resolves bug-report https://bugs.openfoam.org/view.php?id=3155
2019-01-29 22:38:47 +00:00
4221e43dfc combustion: Removed Qdot field from solvers
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.
2019-01-24 14:29:17 +00:00
14aad10fa4 tutorials: Improvements to reacting case setups
Added headers to all reactions files to prevent warnings in paraview.
Added references for known mechanisms. Removed unused reaction and
thermophysical property files.
2019-01-22 15:53:11 +00:00
c370ec0583 tutorials/hotBoxes: Removed empty file 2018-11-30 09:29:51 +00:00
ee443e201f Rationalised the handling of "Final" solver and relaxation factor settings
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.
2018-11-17 19:42:23 +00:00
06d8f79814 coneInjection: Combined cone and coneNozzle injections
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);
        }
    }
2018-11-12 15:02:03 +00:00
f9971f80d7 thermophysicalModels::equationOfState: Completed departure functions for all except adiabaticPerfectFluid
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.
2018-10-19 10:31:42 +01:00
d57d36b30e subsetMesh: Added -noFields option
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.
2018-07-31 18:14:47 +01:00
d627582dd6 combustionModel: Removed the deprecated "active" switch.
To switch-off combustion choose the "noCombustion" model selected with the name
"none" in the combustionProperties file:

combustionModel none;
2018-07-26 10:55:10 +01:00
ab31777e9c radiation: Removed the redundant "radiation off" switch from radiationProperties
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.
2018-07-25 08:10:30 +01:00
29fc94d3e2 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev into mergeDyM 2018-07-10 20:10:01 +01:00
71a4e548df Updated git hooks to check new header format 2018-07-09 16:59:03 +01:00
fdbf3c134f Rationalized dictionary and configuration file headers 2018-07-09 15:40:05 +01:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
ec87585127 icoUncoupledKinematicParcelFoam: Merged with icoUncoupledKinematicParcelDyMFoam
icoUncoupledKinematicParcelFoam can now run with static or dynamic meshes selected in the
constant/dynamicMeshDict dictionary.
2018-07-03 10:44:07 +01:00
019ae8bab3 tutorials: Changed compressed ascii output to binary to improve IO performance
also rationalized the writeCompression specification
2018-06-27 15:25:52 +01:00
4dc35c6810 thermophysicalModels: Implementation of the full algebraic Jacobian
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
2018-06-15 12:26:59 +01:00
a2d222b3eb tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel: Added missing cp
Resolves bug-report https://bugs.openfoam.org/view.php?id=2976
2018-06-11 08:24:12 +01:00
2bd229df02 tutorials: Added the new Allmesh scripts 2018-06-10 17:40:12 +01:00
4e0f49a858 tutorials: Rationalized the naming of the meshing script when it is separated from Allrun to Allmesh 2018-06-10 16:08:36 +01:00
0813f80ebd tutorials: removed redundant entries from snappyHexMeshDict files 2018-06-09 14:26:11 +01:00
7c3732aa5a meshQualityDict: 'master' dictionary relocated to 'etc/caseDicts/mesh/generation' 2018-06-09 14:18:16 +01:00
d9689398f1 tutorials/lagrangian/reactingParcelFoam/hotBoxes: Avoided unnecessary use of changeDictionary 2018-05-31 18:38:36 +01:00
9841f9aafb tutorials: Removed unused changeDictionaryDict files 2018-05-31 10:55:26 +01:00
bf52a98e09 tutorials::Allrun: getApplication -> $(getApplication) 2018-05-28 22:20:07 +01:00
87e32ab499 Code style: Updated line comments to start with a space
//This is a comment   ->   // This is a comment
2018-05-01 11:57:50 +01:00
d8954d4370 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-16 23:10:09 +00:00
1d38ceb900 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-15 22:59:56 +00:00
df6e2da2dd OpenFOAM field reading: Automated the handling of <field>.orig files
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.
2018-02-14 17:42:14 +00:00
f578347934 tutorials: Corrected headers 2017-12-31 20:15:10 +00:00
15a2e7f6e9 combustionModel, chemistryModel: Simplified model selection
Updated all tutorials to the new format
2017-12-11 15:20:47 +00:00
94666e5a95 tutorials/lagrangian/reactingParcelFoam/hotBoxes: Corrected Allrun-parallel script
Patch contributed by Federico Piscaglia
Resolves bug-report https://bugs.openfoam.org/view.php?id=2757
2017-11-14 20:48:53 +00:00
56ed10b666 DPMFoam, MPPICFoam: Renamed alphaPhic -> alphaPhi.<continuous phase name>
for consistency with multiphase solvers and compatibility with the generalized
TurbulenceModels library.
2017-10-11 23:04:42 +01:00
f53f52a691 createPatch: writing the cyclic match OBJ files is now optional
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
2017-09-09 23:00:27 +01:00
7d9a91661c MPPIC: Standardised cyclone tutorial scripts 2017-09-04 12:01:29 +01:00
82675f0976 Merged reactingParcelFilmFoam into reactingParcelFoam
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.
2017-08-29 09:33:45 +01:00
531cab4ccb reactingParcelFilmFoam: Updated to use rhoThermo rather than psiThermo
for generality and consistency with reactingParcelFoam
2017-08-24 14:28:55 +01:00
c2d8052e1c cloudSolution: Check consistency between the transient option
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.
2017-08-22 13:58:25 +01:00
8c5f4b36f8 tutorials: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:47:34 -05:00
c9a6995082 tutorials/lagrangian: Added mixedVesselAMI2D
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.
2017-04-28 11:00:31 +01:00
e3c67dc111 fvOptions: The "<type>Coeffs" sub-dictionary is now optional
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.
2017-04-13 13:30:17 +01:00
a026c36309 reactingParcelFilmFoam tutorials: Updated contact-angle specification 2017-03-28 08:27:48 +01:00
54b96fb765 verticalChannel tutorial: removed 'bounded' from the 'div(phid,p)' scheme. 2017-03-08 11:34:08 +00:00
95574a6c6b liquidProperties, solidProperties: Simplified input
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;
}
2017-02-18 12:43:10 +00:00
081f1784f9 liquidProperties: Simplified dictionary format
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;
            }
        }
    }
2017-02-17 22:08:42 +00:00
abc50e214c thermophysicalModels: Changed specie thermodynamics from mole to mass basis
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.
2017-02-17 11:22:14 +00:00
6f338ed716 PaSR: Removed deprecated "turbulentReaction" switch
To run with laminar reaction rates choose the "laminar" combustion model rather
than setting "turbulentReaction no;" in the "PaSR" model.
2017-01-20 17:17:14 +00:00