Commit Graph

5293 Commits

Author SHA1 Message Date
013a33a109 TDACChemistryModel: Better error messaging when missing "elements" entries 2021-04-20 08:27:59 +01:00
735c169a25 Corrected documentation for Doxygen
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-04-19 14:34:10 +01:00
f60252ff7b etc/codeTemplates/dynamicCode: Added rhoThermo and rhoReactionThermo dynamic compilation support
for multiphaseEulerFoam, compressibleInterFoam and compressibleMultiphaseInterFoam
2021-04-16 20:18:11 +01:00
29bbbd6984 etc/codeTemplates/dynamicCode: Added fluidReactionThermo dynamic compilation support
for chemFoam, fireFoam, buoyantReactingFoam, reactingFoam, chtMultiRegionFoam,
buoyantReactingParticleFoam, reactingParticleFoam, simpleReactingParticleFoam

If the combination of property models selected in thermophysicalProperties is
not already compiled and present in the standard libraries the thermophysical
property package will be constructed and compiled automatically using the
standard dynamicCode system provided in OpenFOAM.

The thermophysical property package is constructed automatically from the
etc/codeTemplates/dynamicCode files for the corresponding base thermo type,
fluidThermo, fluidReactionThermo etc. If the corresponding codeTemplates files
do not exist the standard thermo lookup error message is generated as before.

As with all other dynamicCode options in OpenFOAM (codeStream,
codedFunctionObject etc.) dynamic compilation of the thermophysical property
package is only enabled if allowSystemOperations is set true.
2021-04-16 18:42:38 +01:00
d4d269e93e etc/codeTemplates/dynamicCode/psiuReactionThermo: Pruned selection tables for compressibility based EoSs 2021-04-16 15:39:45 +01:00
c81dc67e8f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-16 12:24:55 +01:00
ae0e8e0751 etc/codeTemplates/dynamicCode: Added psiuReactionThermo dynamic compilation support
for XiFoam and PDRFoam
2021-04-16 12:24:00 +01:00
07adb183b4 StandardChemistryModel: Integrate from old time properties
Chemistry integration occurs over the simulation timestep, and should
therefore be initialised with old time properties. This is now the case.
This means that outer iteration of the chemistry within a timestep is
now correct.

In addition, the laminar combustion model (and derivations) has a new
flag which prevents it from being corrected more than once per timestep.
This flag is true by default, as outer iteration of a typical reaction
system is expensive and provides limited benefit.
2021-04-16 08:48:36 +01:00
ad0082a7eb etc/codeTemplates/dynamicCode: Added psiThermo dynamic compilation support
for rhoCentralFoam
2021-04-15 19:17:36 +01:00
9132abf492 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-15 16:43:40 +01:00
04cab84af6 basicThermo: Added support for dynamic compilation of thermophysical property packages
If the combination of property models selected in thermophysicalProperties is
not already compiled and present in the standard libraries the thermophysical
property package will be constructed and compiled automatically using the
standard dynamicCode system provided in OpenFOAM.

The thermophysical property package is constructed automatically from the
etc/codeTemplates/dynamicCode files for the corresponding base thermo
type (e.g. fluidThermo), currently these are provided only for fluidThermo but
the others will be added shortly.  If the corresponding codeTemplates files do
not exist the standard thermo lookup error message is generated as before.

As with all other dynamicCode options in OpenFOAM (codeStream,
codedFunctionObject etc.) dynamic compilation of the thermophysical property
package is only enabled if allowSystemOperations is set true.
2021-04-15 16:32:50 +01:00
ed5341f7f2 multiphaseEulerFoam: InterfaceCompositionPhaseChangePhaseSystem: Fixed sign
Resolves bug report https://bugs.openfoam.org/view.php?id=3664
2021-04-15 11:57:25 +01:00
b6114a79ee Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-15 10:46:13 +01:00
3de28f8736 interFoam,compressibleInterFoam,multiphaseEulerFoam: Ensure divU is registered for mapping
divU is cached before mesh-motion and mapped post-motion to drive the optional pcorr flux
update to ensure the fluxes are conservative following mesh motion and change.
2021-04-15 10:44:04 +01:00
000876bbc6 multiphaseEulerFoam: Pressure implicit thermal mass transfer
The phase system now have the ability to specify the derivative of mass
transfer rates w.r.t. pressure. This permits implicit handling of
pressure-coupled mass transfer processes.

This implicit handling has been applied to the mass transfers that are
modelled by the thermal phase system. This should result in significant
stability improvements. The implicit handling can be toggled on or off
by means of a "pressureImplicit" switch in constant/phaseProperties. It
is on by default.

Patch contributed by Juho Peltola, VTT.
2021-04-14 16:28:27 +01:00
e5dd6117b2 POSIX:cp: Changed from character-wise to buffer copy
Resolves patch request https://bugs.openfoam.org/view.php?id=3661
2021-04-14 12:09:55 +01:00
bf340f02e3 twoPhaseMixtureThermo: Corrected Alpha2 constructor
Resolves bug-report https://bugs.openfoam.org/view.php?id=3662
2021-04-14 11:35:48 +01:00
4f6ea81d0c multiphaseEulerFoam: LaakkonenAlopaeusAittamaa: Updated to a more recent reference
The former implementation of the daughterSizeDistributionModel based on
Laakkonen et al. (2006) had the issue of not conserving the total
particle number and volume properly, except when the coefficient C4 is
set to a value of 2. The issue is solved by following the work of
Laakkonen et al. (2007).

The default coefficients in both the breakupModel and the
daughterSizeDistributionModel were updated as well according to the
suggestions of the authors.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2021-04-13 15:07:15 +01:00
65d28880fa multiphaseEulerFoam: daughterSizeDistributionModels: Removed particleNumber parameter
The current implementation of the uniform daughterSizeDistribution model
is not general enough to support uniform breakup into multiple fragments
while conserving both the total particle number and volume, except for
binary breakup (which was the default setting).

The model has therefore been renamed to uniformBinary, i.e. resulting in
two fragments.

It is currently used for verification purposes only. If the need for a
more general form arises, then that will require additional development.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2021-04-13 14:51:57 +01:00
6054ea53b9 multiphaseInterFoam: Added a simple RAS tutorial 20210412 2021-04-09 16:17:37 +01:00
66387d3aa5 tutorials/incompressible/simpleFoam/pitzDaily/0/f: Corrected header
Resolves bug-report http://bugs.openfoam.org/view.php?id=3657
2021-04-08 15:13:33 +01:00
693b2d5b0c tutorials/multiphase/interFoam/laminar/damBreakWithObstacle: Removed test fvConstraints 2021-04-06 14:41:40 +01:00
3057554b41 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-06 14:36:43 +01:00
fe9de1c783 dynamicRefineFvMesh: Added support for region based and multi-field refinement
Description
    Dynamic mesh refinement/unrefinement based on volScalarField values.

    Refinement can optionally be specified in a cellZone or in multiple
    regions, each controlled by a different volScalarField.

Usage
    Example of single field based refinement in all cells:
    \verbatim
        dynamicFvMesh   dynamicRefineFvMesh;

        // How often to refine
        refineInterval  1;

        // Field to be refinement on
        field           alpha.water;

        // Refine field in between lower..upper
        lowerRefineLevel 0.001;
        upperRefineLevel 0.999;

        // If value < unrefineLevel unrefine
        unrefineLevel   10;

        // If value < unrefineLevel (default=great) unrefine
        // unrefineLevel   10;
        // Have slower than 2:1 refinement
        nBufferLayers   1;

        // Refine cells only up to maxRefinement levels
        maxRefinement   2;

        // Stop refinement if maxCells reached
        maxCells        200000;

        // Flux field and corresponding velocity field. Fluxes on changed
        // faces get recalculated by interpolating the velocity. Use 'none'
        // on surfaceScalarFields that do not need to be reinterpolated.
        correctFluxes
        (
            (phi none)
            (nHatf none)
            (rhoPhi none)
            (alphaPhi0.water none)
            (ghf none)
        );

        // Write the refinement level as a volScalarField
        dumpLevel       true;
    \endverbatim

    Example of single field based refinement in two regions:
    \verbatim
        dynamicFvMesh   dynamicRefineFvMesh;

        // How often to refine
        refineInterval  1;

        refinementRegions
        {
            region1
            {
                cellZone        refinementRegion1;

                // Field to be refinement on
                field           alpha.water;

                // Refine field in between lower..upper
                lowerRefineLevel 0.001;
                upperRefineLevel 0.999;

                // Refine cells only up to maxRefinement levels
                maxRefinement   1;

                // If value < unrefineLevel unrefine
                unrefineLevel   10;
            }

            region2
            {
                cellZone        refinementRegion2;

                // Field to be refinement on
                field           alpha.water;

                // Refine field in between lower..upper
                lowerRefineLevel 0.001;
                upperRefineLevel 0.999;

                // Refine cells only up to maxRefinement levels
                maxRefinement   2;

                // If value < unrefineLevel unrefine
                unrefineLevel   10;
            }
        }

        // If value < unrefineLevel (default=great) unrefine
        // unrefineLevel   10;
        // Have slower than 2:1 refinement
        nBufferLayers   1;

        // Stop refinement if maxCells reached
        maxCells        200000;

        // Flux field and corresponding velocity field. Fluxes on changed
        // faces get recalculated by interpolating the velocity. Use 'none'
        // on surfaceScalarFields that do not need to be reinterpolated.
        correctFluxes
        (
            (phi none)
            (nHatf none)
            (rhoPhi none)
            (alphaPhi0.water none)
            (ghf none)
        );

        // Write the refinement level as a volScalarField
        dumpLevel       true;
    \endverbatim
2021-04-06 14:35:17 +01:00
f8d557e342 porosityModels: DarcyForchheimer: Enable debug output 2021-04-01 11:12:09 +01:00
6572132e4a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-03-30 19:08:28 +01:00
ca93e2b4c4 spatialTransform: Change rotation transformation convention
for consistency with the the book on which the implementation of
spatialTransform is based:

        Featherstone, R. (2008).
        Rigid body dynamics algorithms.
        Springer.
2021-03-30 19:03:56 +01:00
fff055ba5b functionObjects: forces: Phase groupings for field name defaults 2021-03-30 18:40:42 +01:00
b370628d9e functionObjects: forces: Added support for Euler-Euler multiphase 2021-03-30 18:34:11 +01:00
8a5ee8aac1 MomentumTransportModels: Library builds of multiphase models
The MomentumTransportModels library now builds of a standard set of
phase-incompressible and phase-compressible models. This replaces most
solver-specific builds of these models.

This has been made possible by the addition of a new
"dynamicTransportModel" interface, from which all transport classes used
by the momentum transport models now derive. For the purpose of
disambiguation, the old "transportModel" has also been renamed
"kinematicTransportModel".

This change has been made in order to create a consistent definition of
phase-incompressible and phase-compressible MomentumTransportModels,
which can then be looked up by functionObjects, fvModels, and similar.

Some solvers still build specific momentum transport models, but these
are now in addition to the standard set. The solver does not build all
the models it uses.

There are also corresponding centralised builds of phase dependent
ThermophysicalTransportModels.
2021-03-30 13:27:20 +01:00
227734ddf8 transform: Standardised the Rx, Ry, Rz and Ra rotational tranformations
so that they operate in the conventional manner in a right-handed coordinate
system:

//- Rotational transformation tensor about the x-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Rx(const scalar& omega)

//- Rotational transformation tensor about the y-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Ry(const scalar& omega)

//- Rotational transformation tensor about the z-axis by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Rz(const scalar& omega)

//- Rotational transformation tensor about axis a by omega radians
//  The rotation is defined in a right-handed coordinate system
//  i.e. clockwise with respect to the axis from -ve to +ve
//  (looking along the axis).
inline tensor Ra(const vector& a, const scalar omega)
2021-03-30 13:11:48 +01:00
0df21c5515 unitConversion: Removed templating which is no longer needed 2021-03-30 11:41:06 +01:00
8fdf4eb6de CsvTableReader: Removed temporary work-around for binary dictionary list entry
Resolves bug-report http://bugs.openfoam.org/view.php?id=3651
2021-03-30 11:24:35 +01:00
0d679d926a surfaceTransformPoints: Updated to use the new transformer class
Description
    Transform (translate, rotate, scale) a surface.

Usage
    \b surfaceTransformPoints "\<transformations\>" \<input\> \<output\>
    Supported transformations:
      - \par translate=<translation vector>
        Translational transformation by given vector
      - \par rotate=(\<n1 vector\> \<n2 vector\>)
        Rotational transformation from unit vector n1 to n2
      - \par Rx=\<angle [deg] about x-axis\>
        Rotational transformation by given angle about x-axis
      - \par Ry=\<angle [deg] about y-axis\>
        Rotational transformation by given angle about y-axis
      - \par Rz=\<angle [deg] about z-axis\>
        Rotational transformation by given angle about z-axis
      - \par Ra=\<axis vector\> \<angle [deg] about axis\>
        Rotational transformation by given angle about given axis
      - \par scale=\<x-y-z scaling vector\>
        Anisotropic scaling by the given vector in the x, y, z
        coordinate directions

    Example usage:
        surfaceTransformPoints \
            "translate=(-0.586 0 -0.156), \
            Ry=3.485, \
            translate=(0.586 0 0.156)" \
            constant/geometry/w3_orig.stl constant/geometry/w3.stl
2021-03-29 16:14:48 +01:00
45dca30c51 surfaceTransformPoints: Generalised to apply a sequence of transformations
The transformation sequence is specified like a substitution string used by

Description
    Transform (translate, rotate, scale) a surface.

    The rollPitchYaw option takes three angles (degrees):
    - roll (rotation about x) followed by
    - pitch (rotation about y) followed by
    - yaw (rotation about z)

    The yawPitchRoll does yaw followed by pitch followed by roll.

Usage
    \b surfaceTransformPoints "\<transformations\>" \<input\> \<output\>

    Example usage:
        surfaceTransformPoints \
            "translate=(-0.586 0 -0.156), \
            rollPitchYaw=(0 -3.485 0), \
            translate=(0.586 0 0.156)" \
            constant/geometry/w3_orig.stl constant/geometry/w3.stl
2021-03-28 13:36:50 +01:00
516ee1675e unitConversion: templated degToRad and radToDeg to support vectors of angles 2021-03-28 13:36:00 +01:00
bf7ac24e9f foamDictionary: Improved the -set "<substitutions>" option
Multiple substitutions can be made using the convenient -set "<substitutions>"
option which combines the selection of the entries with the substitutions made
on them using the same argument syntax used by #includeFunc, e.g.

    foamDictionary system/controlDict -set "startTime=2000, endTime=3000"
2021-03-28 13:32:37 +01:00
7562bfb48c kinematicSingleLayer: Constrain phid for consistency with fixed velocity BCs 2021-03-26 15:40:48 +00:00
c771b7431b VoFSurfaceFilm: Corrected usage example 2021-03-25 13:22:45 +00:00
de9b29f0fd Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-03-24 18:50:28 +00:00
5cf60ba430 multiphaseEulerFoam::MomentumTransferPhaseSystem: Corrected access to absolute phi for moving mesh cases 2021-03-24 18:49:43 +00:00
42a558a1b0 multiphaseEulerFoam: linearTsub: Corrected model lookup and sign convention
Patch contributed by Juho Peltola, VTT.
2021-03-24 11:10:23 +00:00
0eafc13419 surfaceFilmModels::standardPhaseChange: Corrected energy transfer to the primary region
Assuming the heat required to cause the phase change is provided by the film the
energy transferred with the mass to the primary region corresponds to vapour
at the film surface temperature.
2021-03-24 08:10:02 +00:00
14d52461ce liquidProperties: Corrected handling of internal energy
Currently the NSRDS-based liquid properties provide no support for pressure and
the enthalpy functions do not include any pressure effects thus internal energy
is equal to the enthalpy.  If used with an enthalpy equation the pressure-work
term should not be included.
2021-03-22 16:33:02 +00:00
76e07b0da6 surfaceFilmModels: Replaced the simplistic constant heat capacity thermodynamics with rhoThermo
The constant heat capacity hacked thermo in surfaceFilmModels and the
corresponding transfer terms in Lagrangian have been replaced by the standard
OpenFOAM rhoThermo which provides a general handling of thermo-physical
properties, in particular non-constant heat capacity.  Further rationalisation
of liquid and solid properties has also been undertaken in support of this work
to provide a completely consistent interface to sensible and absolute enthalpy.

Now for surfaceFilmModels the thermo-physical model and properties are specified
in a constant/<region>/thermophysicalProperties dictionary consistent with all
other types of continuum simulation.

This significantly rationalises, simplifies and generalises the handling of
thermo-physical properties for film simulations and is a start at doing the same
for Lagrangian.
2021-03-21 23:04:40 +00:00
8ec5eac35e twoPhaseMixtureThermo: Corrected mixture molecular weight
Resolves bug-report https://bugs.openfoam.org/view.php?id=3645
2021-03-21 10:09:46 +00:00
7dc7956327 wallHeatTransferCoeff: Fixed read bug and standardised input 2021-03-19 14:37:13 +00:00
8312197b0f dictionary: Added backwards compatible stream lookup 2021-03-19 14:37:03 +00:00
34f6e40753 fvModels: massSource: Specify temperature in example 2021-03-19 09:43:24 +00:00
da288597e2 tutorials: Replaced semiImplicitSource with more specific fvModels 2021-03-19 09:43:24 +00:00