Commit Graph

1114 Commits

Author SHA1 Message Date
66600b5497 chtMultiRegionFoam: Corrected multiple fluid region support for nEcorr
Resolves bug-report https://bugs.openfoam.org/view.php?id=3799
2022-02-04 15:05:53 +00:00
2fc40b7895 multiphaseEulerFoam: blending: Skip coefficient evaluation for constant case 2022-02-03 15:47:37 +00:00
39a8cb41a2 multiphaseEulerFoam: BlendedInterfacialModel: Fix for Clang 2022-02-01 15:09:55 +00:00
3c2fc7ca99 zeroDimensionalFvMesh: Centralised generation of zero-dimensional meshes 2022-01-28 17:25:22 +00:00
ba130ec083 multiphase: Rationalised alphaContactAngle handling
Alpha contact angle boundaries are now specified in the following way
for multiphase solvers (i.e., multiphaseInterFoam,
compressibleMultiphaseInterFoam, and multiphaseEulerFoam):

   boundaryField
   {
       wall
       {
           type            alphaContactAngle;
           contactAngleProperties
           {
               water
               {
                   // Constant contact angle
                   theta0 90;
               }
               oil
               {
                   // Dynamic contact angle
                   theta0 90;
                   uTheta 1;
                   thetaA 125;
                   thetaR 85;
               }
           }
           value           uniform 0;
       }
   }

All solvers now share the same implementation of the alphaContactAngle
boundary condition and the contact angle correction algorithm.

If alpha contact angle boundary conditions are used they must be
specified for all phases or an error will result. The consistency of the
input will also be checked. The angles given for water in the alpha.air
file must be 180 degrees minus the angles given for air in the
alpha.water file.
2022-01-28 17:25:22 +00:00
428c541680 multiphaseEulerFoam: Multiphase blending
Blending of sub-models has been extended so that it provides the
necessary functionality for the simulation of three or more phases.

Models now, by default, blend within the two-phase subset. So, the
functions which specify blending coefficients are evaluated using
`alpha1/(alpha1 + alpha2)` and `alpha2/(alpha1 + alpha2)`, rather than
just `alpha1` and `alpha2`. This ensures that the functions behave
consistently in multiphase configurations as the combined fraction of
both phases reduces.

Additional "displaced" categories of model are now available. These
allow the interface modelling to change as a third phase fraction
becomes significant and displaces the phases associated with the
interface in question. These can be specified using displaced phase
interfaces. If they are not supplied then the non-displaced models apply
instead.

Additional "general" categories are also now available. These span the
entire range of the subset's phase fraction space and apply if models
for the more specific configurations (i.e., displaced and segregated)
are omitted.

For example, to specify standard SchillerNaumann droplet/bubble drag
modelling outside of a solid bed, and the bed-specific AttouFerschneider
drag model within the bed, the following specification could be used:

    drag
    {
        air_dispersedIn_water
        {
            type            SchillerNaumann;
            residualRe      1e-3;
        }

        water_dispersedIn_air
        {
            $air_dispersedIn_water;
        }

        air_water_displacedBy_solid
        {
            type            AttouFerschneider;
            gas             air;
            liquid          water;
            solid           solid;
            E1              280;
            E2              4.8;
        }

        solid_dispersedIn_air
        {
            $air_water_displacedBy_solid;
        }

        solid_dispersedIn_water
        {
            $air_water_displacedBy_solid;
        }
    }

The "air_water_displacedBy_solid" model shown above is a
"general-displaced" model, in that its application does not depend on
dispersal of the air-water system; it only depends on the level of
displacement by the solid. Alternatively, a set of three
"dispersed-displaced" and "segregated-displaced" models could have been
provided with the following syntax:

        air_dispersedIn_water_displacedBy_solid
        {
            ...
        }

        air_segregatedWith_water_displacedBy_solid
        {
            ...
        }

        water_dispersedIn_air_displacedBy_solid
        {
            ...
        }

The blending methods themselves have changed slightly. There are now two
new methods; "segregated" for churning configurations in which no phase
is ever considered dispersed in another, and "continuous" where a
specified phase is always considered to be continuous and all other
phases are considered dispersed. These models replace the "none" model.

The linear and hyperbolic blending methods now support a "none" entry,
which can be set for parameters for phases that cannot become
continuous. For example, in an air-water-particles simulation the air
and water may become continuous, but the particles may not. A suitable
linear blending specification for this scenario might be as follows:

    blending
    {
        default
        {
            type            linear;
            minFullyContinuousAlpha.air 0.8;
            minPartlyContinuousAlpha.air 0.2;
            minFullyContinuousAlpha.water 0.8;
            minPartlyContinuousAlpha.water 0.2;
            minFullyContinuousAlpha.solid none;
            minPartlyContinuousAlpha.solid none;
        }
    }

The blending now provides far more feedback in terms of warnings and
errors when invalid or inadvisable specifications are made.

It is now also possible to visualise the various models' utilisation of
the phase fraction space. If the keyword "format" is placed in the
blending section of constant/phaseProperties then a plot (1 or 2 phases)
or surface (3 or more phases) file will be written out which shows the
phase fractions and the coefficients with which various models are
combined.
2022-01-28 09:24:28 +00:00
6bd200d0b5 multiphaseEulerFoam: New phaseInterface system to replace phasePair
A new class, phaseInterface, has been added to represent interfacial
configurations between pairs of phases. This class and its derivations
explicitly represent different configurations (e.g., dispersal,
segregation, displacement) by type and provide a run-time selection
mechanism so that these configurations can be uniquely named and
intuitively selected for sub-models to apply to.

For example, drag models can be selected for an air-water system with
full phase inversion with the following syntax in
constant/phaseProperties:

    drag
    {
        air_dispersedIn_water
        {
            type            IshiiZuber;
        }

        air_segregatedWith_water
        {
            type            segregated;
            m               0.5;
            n               8;
        }

        steam_dispersedIn_water
        {
            type            SchillerNaumann;
            residualRe      1e-3;
        }
    }

As well as the entries now being underscore separated, note also that
the sub model sections are now dictionaries ("{ ... }"), rather than
lists ("( ... );"). If a list is provided instead, then the input will
be considered to be in the old syntax, and will be read in a backwards
compatibility mode.

The new dictionary syntax permits substitution and therefore reuse of
settings, reducing the workload associated with setting up a large case
with many model combinations. In future it may be possible to introduce
wildcards to further reduce the verbosity of the input.

The new phase-interface classes and keywords and the phase-pairs and
keywords that they replace are listed below:

    Default/General:            phaseInterface "<phase>_<phase>"
                            replaces phasePair "(<phase> and <phase>)"

          Dispersed:   dispersedPhaseInterface "<phase>_dispersedIn_<phase>"
                     replaces orderedPhasePair "(<phase> in <phase>)"

         Segregated:  segregatedPhaseInterface "<phase>_segregatedWith_<phase>"
                            replaces phasePair "(<phase> and <phase>)"

              Sided:       sidedPhaseInterface "<phase>_<phase>_inThe_<phase>"
                     replaces orderedPhasePair "(<phase> in <phase>)"

          Displaced:   displacedPhaseInterface "<phase>_<phase>_displacedBy_<phase>"
                                        is new

Interface combinations are also possible. There can be, for example, an
interface which is both dispersed and sided. This class is the
dispersedSidedPhaseInterface and can be selected with the keyword
"<phase>_dispersedIn_<phase>_inThe_<phase>". This is needed, for
example, in two-resistance heat transfer modelling, where a different
model can be selected to represent heat transfer within the fluids on
either side of an interface.

A full list of all available phase interface relationships can be
generated by specifying an incorrect name, and viewing the output of the
error message that results.

The "displaced" interface is not currently used, but will shortly be
utilised to allowing the user to control how models between phases
change as the fraction of a third phase becomes significant and
displaces the phases associated with the interface in question.

Notes for developers:

There is no centralised storage of phase interface relationships in the
phase system any more; the table of phasePairs has been removed, and
there is no correcponding table of phaseInterfaces. Models now locally
store their own phaseInterface objects, or a derivation thereof, rather
than a reference to a centrally stored object. These phaseInterface
classes hold only references so there is no cost associated with their
duplication in multiple sub models.

If a model requires an interface of a specific type, it has to down-cast
the interface provided to it. There is a `phaseSystem::modelCast` method
for this purpose which also provides meaningful error messages in the
event that an inappropriate interface was specified and the cast fails.

Model generation is now hierarchical. Wrapper models (blended and sided)
are constructed with the same interface as non-wrapper models (drag,
virtual mass, etc...). The wrapper model constructors call the
constructors of their sub-models directly, rather than requiring model
pointers to be passed in.

Sub-model lookup has been significantly generalised and simplified.
There is now just one `phaseSystem::lookupInterfacialModel` method which
takes a phaseInterface as its argument. Looking up a model for a
specific configuration just requires providing the appropriate
phaseInterface. E.g., this call will return the virtual mass model for
gas bubbles in liquid:

    lookupSubModel<virtualMassModel>(dispersedPhaseInterface(gas, liquid))

Whilst this call will return the drag model for the segregated regime:

    lookupSubModel<dragModel>(segregatedPhaseInterface(phase1, phase2))

And this call will return the complete blended heat transfer model:

    lookupSubModel<blendedHeatTransferModel>(phaseInterface(phase1, phase2))
2022-01-28 09:24:15 +00:00
f4b497bd81 driftFluxFoam::mixtureViscosityModels: Added the basic Quemada viscosity model for for colloidal dispersions
currently without strain-rate dependency.

Class
    Foam::mixtureViscosityModels::Quemada

Description
     Quemada viscosity model for for colloidal dispersions.

     References:
     \verbatim
         Quemada, D. (1998).
         Rheological modelling of complex fluids. I.
         The concept of effective volume fraction revisited.
         The European Physical Journal-Applied Physics, 1(1), 119-127.
    \endverbatim

Usage
    Example usage:
    \verbatim
    viscosityModel  Quemada;

    alphaMax    0.6; // Maximum dispersed phase-fraction (packing fraction)
    q           2;   // Exponent, defaults to 2

    rho         1996;
    \endverbatim
2022-01-26 15:25:30 +00:00
66f325fc41 multiphaseEulerFoam: Add "none" diameterModel for phases that are always continuous
This model will generate an error if the diameter is requested. This
will happen if another sub model is included that depends on the
diameter of the continuous phase. It therefore provides a check that the
sub-modelling combination is valid.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-19 15:21:06 +00:00
3cc9475b45 multiphaseEulerFoam: Added reporting of selected binary breakup model
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-19 15:15:05 +00:00
bf3ec0eb87 multiphaseEulerFoam: populationBalance: Removed unused header includes
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-19 15:13:31 +00:00
62ad471222 multiphaseEulerFoam: Made segregated drag model numerically symmetric 2022-01-13 10:12:20 +00:00
30c877a7ab multiphaseEulerFoam: Use phaseSystem::propertiesName 2022-01-13 10:12:20 +00:00
3f1bb7ee13 multiphaseEulerFoam: Minor fixes to population balance function objects
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-11 14:07:01 +00:00
32b656f8a7 multiphaseEulerFoam, turbulentDispersionModel: Corrected face-force for multiphase case
This is a completion of commit 64da7a2c. The fix has now also been
applied to the face-momentum equation.
2022-01-11 13:55:46 +00:00
cc96abda03 basicThermo: Cache thermal conductivity kappa rather than thermal diffusivity alpha
Now that Cp and Cv are cached it is more convenient and consistent and slightly
more efficient to cache thermal conductivity kappa rather than thermal
diffusivity alpha which is not a fundamental property, the appropriate form
depending on the energy solved for.  kappa is converted into the appropriate
thermal diffusivity for the energy form solved for by dividing by the
corresponding cached heat capacity when required, which is efficient.
2022-01-10 20:19:00 +00:00
794255284f multiphaseEulerFoam: revised sizeDistribution functionObject
Following the addition of the new moments functionObject, all related
functionality was removed from sizeDistribution.

In its revised version, sizeDistribution allows for different kinds of
weighted region averaging in case of field-dependent representative
particle properties.

A packaged function has also been added to allow for command line solver
post-processing.

For example, the following function object specification returns the
volume-based number density function:

    numberDensity
    {
        type                sizeDistribution;
        libs                ("libmultiphaseEulerFoamFunctionObjects.so");
        writeControl        writeTime;
        populationBalance   bubbles;
        functionType        numberDensity;
        coordinateType      volume;
        setFormat           raw;
    }

The same can be achieved using a packaged function:

    #includeFunc sizeDistribution
    (
        populationBalance=bubbles,
        functionType=numberDensity,
        coordinateType=volume,
        funcName=numberDensity
    )

Or on the command line:

    multiphaseEulerFoam -postProcess -func "
    sizeDistribution
    (
        populationBalance=bubbles,
        functionType=numberDensity,
        coordinateType=volume,
        funcName=numberDensity
    )"

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-07 09:48:30 +00:00
36c565b9bf multiphaseEulerFoam: new functionObject "moments"
This function calculates integral (integer moments) or mean properties
(mean, variance, standard deviation) of a size distribution computed with
multiphaseEulerFoam. It has to be run with multiphaseEulerFoam, either
at run-time or with -postProcess. It will not work with the postProcess
utility.

The following function object specification for example returns the first
moment of the volume-based number density function which is equivalent to
the phase fraction of the particulate phase:

    moments
    {
        type                moments;
        libs                ("libmultiphaseEulerFoamFunctionObjects.so");
        executeControl      timeStep;
        writeControl        writeTime;
        populationBalance   bubbles;
        momentType          integerMoment;
        coordinateType      volume;
        order               1;
    }

The same can be achieved using a packaged function:

    #includeFunc moments
    (
        populationBalance=bubbles,
        momentType=integerMoment,
        coordinateType=volume,
        order=1,
        funcName=moments
    )

Or on the command line:

    multiphaseEulerFoam -postProcess -func "
        moments
        (
            populationBalance=bubbles,
            momentType=integerMoment,
            coordinateType=volume,
            order=1,
            funcName=moments
        )"

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-01-07 09:48:30 +00:00
dbf600af43 lagrangian: Added interface for mesh redistribution 2021-12-26 12:03:45 +00:00
9691eb13a6 compressibleInterFoam::VoFClouds: Added prototype call to redistribute the clouds 2021-12-24 17:17:01 +00:00
5ed8dbb463 fvModels: Added support for mesh redistribution and load-balancing 2021-12-24 15:02:30 +00:00
ad20aecf0e surfaceFilmModel: film model selection now handled by fvModel
There is no longer any need for the surfaceFilmModel abstract base class and
"New" selection method as surface films are now handled within the fvModel
framework.  This makes the surfaceFilmModel entry in the surfaceFilmProperties
dictionary redundant.

The surfaceFilm and VoFSurfaceFilm fvModels now instantiate a thermoSingleLayer
providing direct access to all the film functions, simplifying the
implementation better ensuring consistency between the film and primary region
equations.
2021-12-16 20:51:08 +00:00
3761c48e1c multiphaseEulerFoam: Make aspect ratio models sub-models of force models
These models are quite configuration specific. It makes sense to make
them sub-models of the force (drag or lift) models that use them, rather
than making them fundamental properties of the phase system.
2021-12-14 11:26:16 +00:00
491f355d97 multiphaseEulerFoam, phasePair: Made aspect ratio method consistent 2021-12-09 21:08:02 +00:00
1548508149 multiphaseEulerFoam, BlendedInterfacialModel: Removed unused constructor 2021-12-09 21:08:02 +00:00
72687d3e46 multiphaseEulerFoam, dragModel: Removed unused constructor 2021-12-09 09:14:36 +00:00
25a6d068f0 sampledSets, streamlines: Various improvements
Sampled sets and streamlines now write all their fields to the same
file. This prevents excessive duplication of the geometry and makes
post-processing tasks more convenient.

"axis" entries are now optional in sampled sets and streamlines. When
omitted, a default entry will be used, which is chosen appropriately for
the coordinate set and the write format. Some combinations are not
supported. For example, a scalar ("x", "y", "z" or "distance") axis
cannot be used to write in the vtk format, as vtk requires 3D locations
with which to associate data. Similarly, a point ("xyz") axis cannot be
used with the gnuplot format, as gnuplot needs a single scalar to
associate with the x-axis.

Streamlines can now write out fields of any type, not just scalars and
vectors, and there is no longer a strict requirement for velocity to be
one of the fields.

Streamlines now output to postProcessing/<functionName>/time/<file> in
the same way as other functions. The additional "sets" subdirectory has
been removed.

The raw set writer now aligns columns correctly.

The handling of segments in coordSet and sampledSet has been
fixed/completed. Segments mean that a coordinate set can represent a
number of contiguous lines, disconnected points, or some combination
thereof. This works in parallel; segments remain contiguous across
processor boundaries. Set writers now only need one write method, as the
previous "writeTracks" functionality is now handled by streamlines
providing the writer with the appropriate segment structure.

Coordinate sets and set writers now have a convenient programmatic
interface. To write a graph of A and B against some coordinate X, in
gnuplot format, we can call the following:

    setWriter::New("gnuplot")->write
    (
        directoryName,
        graphName,
        coordSet(true, "X", X), // <-- "true" indicates a contiguous
        "A",                    //     line, "false" would mean
        A,                      //     disconnected points
        "B",
        B
    );

This write function is variadic. It supports any number of
field-name-field pairs, and they can be of any primitive type.

Support for Jplot and Xmgrace formats has been removed. Raw, CSV,
Gnuplot, VTK and Ensight formats are all still available.

The old "graph" functionality has been removed from the code, with the
exception of the randomProcesses library and associated applications
(noise, DNSFoam and boxTurb). The intention is that these should also
eventually be converted to use the setWriters. For now, so that it is
clear that the "graph" functionality is not to be used elsewhere, it has
been moved into a subdirectory of the randomProcesses library.
2021-12-07 11:18:27 +00:00
50fb2477bd compressibleInterFoam::pEqn: Limit pressure after calculating flux and dilatation rate
to avoid spurious phase-change from an inconsistency between the flux and the
dilatation rate that the pressure limiting might generate.
2021-12-06 23:12:19 +00:00
31fc0249cc compressibleInterFoam::pEqn: Update p_rgh BCs after limiting 2021-12-06 11:33:05 +00:00
f5db773002 compressibleInterFoam: Removed redundant fvModels.source call 2021-12-06 11:32:28 +00:00
f52d8694a3 chtMultiRegionFoam: Added optional thermal system sub-iteration
For some systems the thermal coupling between the solid and fluid regions
dominates overall convergence and it may be beneficial to sub-iterate over the
thermal system as the energy solution is cheaper than the pressure-velocity
system.  To test this the new optional nEcorr entry in system/fvSolution is
provided which defaults to 1, e.g.

PIMPLE
{
    nOuterCorrectors 1;
    nEcorr           2;
}

If this proves useful it could be extended and improved by adding convergence
controls.

Note that the solution of the solid regions is now before the fluid regions as
it make more sense if solid regions are sources or sinks of heat to solve them
before the fluid.
2021-11-29 10:43:03 +00:00
83375c4b5d buoyantPimpleFoam::pEqn: Relax p_rgh and p after the continuity check
Also update p_rgh if p is limited to ensure p_rgh and p are consistent.
2021-11-24 11:07:56 +00:00
daf9d6e2f6 buoyantPimpleFoam::pEqn: Moved p_rgh relaxation so that the relaxed p_rgh is used when updating p
This improves convergence of some steady-state chtMultiRegionFoam (which uses
the pEqn.H from buoyantPimpleFoam) cases but does not affect transient
simulations unless aggressive pressure relaxation is applied, i.e. transient
SIMPLE.
2021-11-18 14:52:19 +00:00
facc363a21 engineFoam: superseded by reactingFoam with fvMeshMover::engine
With the general run-time selectable fvMeshMovers engine compression simulations
can be performed with reactingFoam so there is no longer any need for engine
specific solvers or engineMesh.

An engineFoam script is provided to redirect users to reactingFoam with
instructions.
2021-11-07 23:50:43 +00:00
7a6d08e897 PDRFoam: Moved to sub-directory of XiFoam
PDRFoam is a Xi combustion model solver including porosity distributed
resistance and shares code with XiFoam so it is more logical that it should be
in a sub-directory of XiFoam to simplify compilation dependency.
2021-11-07 21:51:11 +00:00
640cd66a65 coldEngineFoam: superseded by rhoPimpleFoam with fvMeshMover::engine
With the general run-time selectable fvMeshMovers engine compression simulations
can be performed with rhoPimpleFoam so there is no longer any need for engine
specific solvers.

A coldEngineFoam script is provided to redirect users to rhoPimpleFoam with
instructions.
2021-11-07 19:09:44 +00:00
43f8daf1a7 XiFoam: Relocated the ignition library from engine to XiFoam
as this ignition method is specific to the Xi combustion model.
2021-11-07 19:07:01 +00:00
8f14b69fba XiFoam: Added mesh-motion to replace XiEngineFoam
With the addition of mesh-motion to XiFoam and the new engine fvMeshMover the
XiEngineFoam kivaTest simple IC engine example now runs in XiFoam and
XiEngineFoam has been removed.  This simplifies maintenance provides greater
extensibility.
2021-11-05 22:32:42 +00:00
e10830632e engineTime: Completely replaced engineTime derived from Time
with the run-time selectable engine userTime embedded in Time.

All parts of the original engineTime relating to the engine geometry have been
moved to engineMesh.  This is part of the process of integrating engine
simulations within the standard moving-mesh solvers.
2021-11-03 19:33:41 +00:00
7f56646aba multiphaseEulerFoam::MovingPhaseModel: Register phase divU for refinement/unrefinement mapping 2021-11-03 11:40:15 +00:00
a817efc9c6 Updates to avoid warning messages from Clang 2021-11-02 16:54:25 +00:00
8cc05a479e MULES: Removed use of slicing and syncTools
MULES no longer synchronises the limiter field using syncTools. Surface
boundary field synchronisation is now done with a surface-field-specific
communication procedure that should result in scaling benefits relative
to syncTools. This change also means that the limiter does not need to
be continuous face field which is then sliced; it can be a standard
surface field.
2021-10-28 13:10:48 +01:00
aa6c04a43a functionObjects::scalarTransport: Added support for MULES with sub-cycling and semi-implicit options
Description
    Evolves a passive scalar transport equation.

    - To specify the field name set the \c field entry
    - To employ the same numerical schemes as another field set
      the \c schemesField entry,
    - The \c diffusivity entry can be set to \c none, \c constant, \c viscosity
    - A constant diffusivity is specified with the \c D entry,
    - If a momentum transport model is available and the \c viscosity
      diffusivety option specified an effective diffusivity may be constructed
      from the laminar and turbulent viscosities using the diffusivity
      coefficients \c alphal and \c alphat:
      \verbatim
          D = alphal*nu + alphat*nut
      \endverbatim

    Example:
    \verbatim
        #includeFunc scalarTransport(T, alphaD=1, alphaDt=1)
    \endverbatim

    For incompressible flow the passive scalar may optionally be solved with the
    MULES limiter and sub-cycling or semi-implicit in order to maintain
    boundedness, particularly if a compressive, PLIC or MPLIC convection
    scheme is used.

    Example:
    \verbatim
        #includeFunc scalarTransport(tracer, diffusion=none)

    with scheme specification:
        div(phi,tracer)     Gauss interfaceCompression vanLeer 1;

    and solver specification:
        tracer
        {
            nCorr      1;
            nSubCycles 3;

            MULESCorr       no;
            nLimiterIter    5;
            applyPrevCorr   yes;

            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-8;
            relTol          0;

            diffusion
            {
                solver          smoothSolver;
                smoother        symGaussSeidel;
                tolerance       1e-8;
                relTol          0;
            }
        }
    \endverbatim
2021-10-27 16:01:46 +01:00
c01118589f functionObjects: Added fields() function to provide list of required fields to postProcess
With this change each functionObject provides the list of fields required so
that the postProcess utility can pre-load them before executing the list of
functionObjects.  This provides a more convenient interface than using the
-field or -fields command-line options to postProcess which are now redundant.
2021-10-21 09:23:34 +01:00
71b5714fad coldEngineFoam: Updated for changes in XiEngineFoam 2021-10-19 12:05:57 +01:00
3ef3e96c3f Time: Added run-time selectable userTime option
replacing the virtual functions overridden in engineTime.

Now the userTime conversion function in Time is specified in system/controlDict
such that the solver as well as all pre- and post-processing tools also operate
correctly with the chosen user-time.

For example the user-time and rpm in the tutorials/combustion/XiEngineFoam/kivaTest case are
now specified in system/controlDict:

userTime
{
    type     engine;
    rpm      1500;
}

The default specification is real-time:

userTime
{
    type     real;
}

but this entry can be omitted as the real-time class is instantiated
automatically if the userTime entry is not present in system/controlDict.
2021-10-19 09:09:01 +01:00
0a54efe189 XiEngineFoam: Updated handling of ddtCorr 2021-10-18 22:09:55 +01:00
686f7fb21a Time: Simplification and rationalisation of userTime
First step towards merging userTime into Time so that post-processing tools
operate with the same userTime mode as the solvers.
2021-10-14 15:05:14 +01:00
12dc41d0fb compressibleInterFoam::TEqn: Added internal energy formulation option
The temperature equation in compressibleInterFoam is derived from the phase
total internal energy equations including the kinetic energy source terms.
While this formulation handles pressure loss more accurately the kinetic energy
source terms can cause numerical problems and more likely to induce negative
temperatures in regions where the pressure drops rapidly.  For such cases it may
be beneficial to solve a temperature equation derived from the phase internal
energy equations, i.e. without the kinetic energy source terms which is now
selectable by setting the optional totalInternalEnergy entry in
constant/phaseProperties to false:

    totalInternalEnergy false;

When this entry is omitted the total energy form is used providing
backward-compatibility.
2021-10-11 14:22:29 +01:00
2fe74a5bd2 twoPhaseMixture: Updated support for re-reading of phaseProperties 2021-10-11 14:21:56 +01:00