Commit Graph

87 Commits

Author SHA1 Message Date
fbe65c0865 tutorials/multiphase/multiphaseEulerFoam: Multiphase blending changes
Updated tutorials for the changes to the blending system. Cases using
"none" blending have been updated to use "continuous" or "segregated" as
appropriate.

The bed tutorial has been extended to include a proper switch to a bed
drag model (AttouFerschneider) when the solid phase displaces the
fluids. This change made the trickleBed case a subset of the bed case,
so the trickleBed has been removed.
2022-01-28 09:24:28 +00:00
64a6562a1e tutorials/multiphase/multiphaseEulerFoam: Backwards compatible changes
These changes are not required for the cases to run with the new
phaseInterface system. The syntax prior to this commit will be read in
the new phaseInterface system's backwards compatibility mode.
2022-01-28 09:24:28 +00:00
807e517274 tutorials/multiphase/multiphaseEulerFoam: Non-backwards compatible changes
These changes are required for the cases to run with the new
phaseInterface system.
2022-01-28 09:24:28 +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
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
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
bf042b39a7 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-12-08 13:39:12 +00:00
7dfb7146ea tutorials::blockMeshDict: Removed redundant mergePatchPairs and edges entries 2021-12-08 13:02:40 +00:00
053eed714d functionObjects: layerAverage: Replacment for postChannel
This function generates plots of fields averaged over the layers in the
mesh. It is a generalised replacement for the postChannel utility, which
has been removed. An example of this function's usage is as follows:

    layerAverage1
    {
        type            layerAverage;
        libs            ("libfieldFunctionObjects.so");

        writeControl    writeTime;

        setFormat       raw;

        // Patches and/or zones from which layers extrude
        patches         (bottom);
        zones           (quarterPlane threeQuartersPlane);

        // Spatial component against which to plot
        component       y;

        // Is the geometry symmetric around the centre layer?
        symmetric       true;

        // Fields to average and plot
        fields          (pMean pPrime2Mean UMean UPrime2Mean k);
    }
2021-12-08 12:48:54 +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
1a6b662b41 surfaceInterpolate: Made consistent with other function objects
The surfaceInterpolate function object is now a field expression. This
means it works in the same way as mag, grad, etc... It also now has a
packaged configuration and has been included into the postProcessing
test case.

It can be used in the following ways. On the command line:

   postProcess -func "surfaceInterpolate(rho, result=rhof)"

   rhoPimpleFoam -postProcess -func "surfaceInterpolate(thermo:rho, result=rhof)"

In the controlDict:

   functions
   {
       #includeFunc surfaceInterpolate(rho, result=rhof)
   }

By running:

   foamGet surfaceInterpolate

Then editing the resulting system/surfaceInterpolate file and then
running postProcess or adding an #includeFunc entry without arguments.
2021-10-08 09:10:27 +01:00
9765f87202 test/postProcessing/channel: Updated for changes in topoSet syntax 2021-08-12 10:58:51 +01:00
97e5fc3781 test: Renamed thermophysicalProperties files to physicalProperties 2021-08-12 10:53:52 +01:00
184bce4045 test: Fixed plots in population balance cases
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-08-12 10:25:23 +01:00
0a3a6312e5 test/postProcessing/channel/system/controlDict: Updated turbulenceFields functionObject call
muEff -> nuEff
2021-08-09 21:41:02 +01:00
65ef2cf331 physicalProperties: Standardised incompressible and compressible solver fluid properties
to provide a single consistent code and user interface to the specification of
physical properties in both single-phase and multi-phase solvers.  This redesign
simplifies usage and reduces code duplication in run-time selectable solver
options such as 'functionObjects' and 'fvModels'.

* physicalProperties
  Single abstract base-class for all fluid and solid physical property classes.

  Physical properties for a single fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties' dictionary.

  Physical properties for a phase fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties.<phase>' dictionary.

  This replaces the previous inconsistent naming convention of
  'transportProperties' for incompressible solvers and
  'thermophysicalProperties' for compressible solvers.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the
  'physicalProperties' dictionary does not exist.

* phaseProperties
  All multi-phase solvers (VoF and Euler-Euler) now read the list of phases and
  interfacial models and coefficients from the
  'constant/<region>/phaseProperties' dictionary.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the 'phaseProperties'
  dictionary does not exist.  For incompressible VoF solvers the
  'transportProperties' is automatically upgraded to 'phaseProperties' and the
  two 'physicalProperties.<phase>' dictionary for the phase properties.

* viscosity
  Abstract base-class (interface) for all fluids.

  Having a single interface for the viscosity of all types of fluids facilitated
  a substantial simplification of the 'momentumTransport' library, avoiding the
  need for a layer of templating and providing total consistency between
  incompressible/compressible and single-phase/multi-phase laminar, RAS and LES
  momentum transport models.  This allows the generalised Newtonian viscosity
  models to be used in the same form within laminar as well as RAS and LES
  momentum transport closures in any solver.  Strain-rate dependent viscosity
  modelling is particularly useful with low-Reynolds number turbulence closures
  for non-Newtonian fluids where the effect of bulk shear near the walls on the
  viscosity is a dominant effect.  Within this framework it would also be
  possible to implement generalised Newtonian models dependent on turbulent as
  well as mean strain-rate if suitable model formulations are available.

* visosityModel
  Run-time selectable Newtonian viscosity model for incompressible fluids
  providing the 'viscosity' interface for 'momentumTransport' models.

  Currently a 'constant' Newtonian viscosity model is provided but the structure
  supports more complex functions of time, space and fields registered to the
  region database.

  Strain-rate dependent non-Newtonian viscosity models have been removed from
  this level and handled in a more general way within the 'momentumTransport'
  library, see section 'viscosity' above.

  The 'constant' viscosity model is selected in the 'physicalProperties'
  dictionary by

      viscosityModel  constant;

  which is equivalent to the previous entry in the 'transportProperties'
  dictionary

      transportModel  Newtonian;

  but backward-compatibility is provided for both the keyword and model
  type.

* thermophysicalModels
  To avoid propagating the unnecessary constructors from 'dictionary' into the
  new 'physicalProperties' abstract base-class this entire structure has been
  removed from the 'thermophysicalModels' library.  The only use for this
  constructor was in 'thermalBaffle' which now reads the 'physicalProperties'
  dictionary from the baffle region directory which is far simpler and more
  consistent and significantly reduces the amount of constructor code in the
  'thermophysicalModels' library.

* compressibleInterFoam
  The creation of the 'viscosity' interface for the 'momentumTransport' models
  allows the complex 'twoPhaseMixtureThermo' derived from 'rhoThermo' to be
  replaced with the much simpler 'compressibleTwoPhaseMixture' derived from the
  'viscosity' interface, avoiding the myriad of unused thermodynamic functions
  required by 'rhoThermo' to be defined for the mixture.

  Same for 'compressibleMultiphaseMixture' in 'compressibleMultiphaseInterFoam'.

This is a significant improvement in code and input consistency, simplifying
maintenance and further development as well as enhancing usability.

Henry G. Weller
CFD Direct Ltd.
2021-07-30 17:19:54 +01:00
15a27fee87 topoSet: the sourceInfo sub-dictionary of the topoSetDict actions is now optional
and only needed if there is a name clash between entries in the source
specification and the set specification, e.g. "name":

    {
        name    rotorCells;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name    cylinder;
        }
    }
2021-07-27 14:07:37 +01:00
6b31a866d7 Corrected headers 2021-07-15 15:34:07 +01:00
e9733e50ba functionObjects: Renamed streamLine and streamLines to streamlines 2021-07-14 10:35:02 +01:00
98b90398f1 tutorials: Updated for new preconfigurations 2021-07-14 10:35:02 +01:00
5d0d9a4fa3 postProcess: Improve usability of packaged function objects
Packaged function objects can now be deployed equally effectively by
(a) using a locally edited copy of the configuration file, or by
(b) passing parameters as arguments to the global configuration file.

For example, to post-process the pressure field "p" at a single location
"(1 2 3)", the user could first copy the "probes" packaged function
object file to their system directory by calling "foamGet probes". They
could then edit the file to contain the following entries:

    points ((1 2 3));
    field  p;

The function object can then be executed by the postProcess application:

    postProcess -func probes

Or it can be called at run-time, by including from within the functions
section of the system/controlDict file:

    #includeFunc probes

Alternatively, the field and points parameters could be passed as
arguments either to the postProcess application by calling:

    postProcess -func "probes(points=((1 2 3)), p)"

Or by using the #includeFunc directive:

    #includeFunc probes(points=((1 2 3)), p)

In both cases, mandatory parameters that must be either edited or
provided as arguments are denoted in the configuration files with
angle-brackets, e.g.:

    points  (<points>);

Many of the packaged function objects have been split up to make them
more specific to a particular use-case. For example, the "surfaces"
function has been split up into separate functions for each surface
type; "cutPlaneSurface", "isoSurface", and "patchSurface". This
splitting means that the packaged functions now only contain one set of
relevant parameters so, unlike previously, they now work effectively
with their parameters passed as arguments. To ensure correct usage, all
case-dependent parameters are considered mandatory.

For example, the "streamlines" packaged function object has been split
into specific versions; "streamlinesSphere", "streamlinesLine",
"streamlinesPatch" and "streamlinesPoints". The name ending denotes the
seeding method. So, the following command creates ten streamlines with
starting points randomly seeded within a sphere with a specified centre
and radius:

    postProcess -func "streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1)"

The equivalent #includeFunc approach would be:

    #includeFunc streamlinesSphere(nPoints=10, centre=(0 0 0), radius=1)

When passing parameters as arguments, error messages report accurately
which mandatory parameters are missing and provide instructions to
correct the format of the input. For example, if "postProcess -func
graphUniform" is called, then the code prints the following error message:

    --> FOAM FATAL IO ERROR:

    Essential value for keyword 'start' not set
    Essential value for keyword 'end' not set
    Essential value for keyword 'nPoints' not set
    Essential value for keyword 'fields' not set

    In function entry:
        graphUniform

    In command:
        postProcess -func graphUniform

    The function entry should be:
        graphUniform(start = <point>, end = <point>, nPoints = <number>, fields = (<fieldNames>))

    file: controlDict/functions/graphUniform from line 15 to line 25.

As always, a full list of all packaged function objects can be obtained
by running "postProcess -list", and a description of each function can
be obtained by calling "foamInfo <functionName>". An example case has
been added at "test/postProcessing/channel" which executes almost all
packaged function objects using both postProcess and #includeFunc. This
serves both as an example of syntax and as a unit test for maintenance.
2021-07-14 10:32:49 +01:00
6b2dfd218a scripts: Replaced 'cp -r' with the POSIX compliant 'cp -R' 2021-07-06 17:41:08 +01:00
013bc08399 Moved tutorials/IO -> test/IO
The tutorials/IO/fileHandler case is a set of simple test for fileHandler not a
tutorial
2021-07-06 14:46:15 +01:00
01494463d0 FoamFile: 'version' entry is now optional, defaulting to 2.0
The FOAM file format has not changed from version 2.0 in many years and so there
is no longer a need for the 'version' entry in the FoamFile header to be
required and to reduce unnecessary clutter it is now optional, defaulting to the
current file format 2.0.
2021-06-23 20:50:10 +01:00
28745eca4b multiphaseEulerFoam: Updated tutorials for improved internal energy pressure work term 2021-06-11 23:23:17 +01:00
6c0087d005 multiphaseEulerFoam: Updated the internal energy pressure work term
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    "div\(alphaPhi.*,p\)" -> "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)"

and all the tutorials have been updated accordingly.
2021-06-11 19:36:33 +01:00
62c782367d multiphaseEulerFoam: Formatting improvements to population balance test cases
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-11 14:17:39 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
af7b5bed7c tests: Updated for new pimple controls 2021-06-01 09:07:21 +01:00
811abdfc4b test/multiphase/multiphaseEulerFoam: Removed unused "name" entry from codedFunctionObjects 2021-05-19 18:09:43 +01:00
61012f472b tests: Rmeoved depreciated pMin entries 2021-04-29 11:16:13 +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
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
da288597e2 tutorials: Replaced semiImplicitSource with more specific fvModels 2021-03-19 09:43:24 +00:00
762fb48ddf multiphaseEulerFoam: Use pressureControl
pMin and pMax settings are now available in multiphaseEulerFoam in the
PIMPLE section of the system/fvOptions file. This is consistent with
other compressible solvers. The pMin setting in system/phaseProperties
is no longer read, and it's presence will result in a warning.
2021-03-17 08:42:03 +00:00
da3f4cc92e fvModels, fvConstraints: Rational separation of fvOptions between physical modelling and numerical constraints
The new fvModels is a general interface to optional physical models in the
finite volume framework, providing sources to the governing conservation
equations, thus ensuring consistency and conservation.  This structure is used
not only for simple sources and forces but also provides a general run-time
selection interface for more complex models such as radiation and film, in the
future this will be extended to Lagrangian, reaction, combustion etc.  For such
complex models the 'correct()' function is provided to update the state of these
models at the beginning of the PIMPLE loop.

fvModels are specified in the optional constant/fvModels dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The new fvConstraints is a general interface to optional numerical constraints
applied to the matrices of the governing equations after construction and/or to
the resulting field after solution.  This system allows arbitrary changes to
either the matrix or solution to ensure numerical or other constraints and hence
violates consistency with the governing equations and conservation but it often
useful to ensure numerical stability, particularly during the initial start-up
period of a run.  Complex manipulations can be achieved with fvConstraints, for
example 'meanVelocityForce' used to maintain a specified mean velocity in a
cyclic channel by manipulating the momentum matrix and the velocity solution.

fvConstraints are specified in the optional system/fvConstraints dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The separation of fvOptions into fvModels and fvConstraints provides a rational
and consistent separation between physical and numerical models which is easier
to understand and reason about, avoids the confusing issue of location of the
controlling dictionary file, improves maintainability and easier to extend to
handle current and future requirements for optional complex physical models and
numerical constraints.
2021-03-07 22:45:01 +00:00
a936156f6d multiphaseEulerFoam: populationBalance: Removed population balance name suffix
A population balance suffix after the phase suffix makes determining the
phase for a given name more complex. The additional suffix is also
unnecessary as a phase can only ever belong to one population balance,
so the phase name alone uniquely idetifies the grouping.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-03-03 14:06:35 +00:00
ed0686ea0c multiphaseEulerFoam: Support for frozen flow switch
multiphaseEulerFoam now supports the "frozenFlow" setting in
system/fvSolution/PIMPLE. With this switch on, the pressure-velocity
system is not solved. Energy and species transport are simulated using
fixed velocity and pressure fields. Non-transport effects on the phase
fraction, such as mass transfer or fvOption sources, are also included.

Note that this setting does not enforce conservation. In general, any
processes that alter the phase fraction have to be set up carefully in
order to avoid generating an inconsistent set of phase fractions.

This switch has been enabled in two zero-dimensional test cases which
are designed to operate at a constant pressure. The "frozenFlow" switch
now enforces this constant pressure directly. Previously the pressure
equation was being solved, but the system was not well posed, and the
cases were failing to run as a result.
2021-02-03 10:24:45 +00:00
33f2057e27 tests/fvMeshTools/cavity: Updated options passes to reconstructParMesh 2021-01-14 10:27:36 +00:00
402362edc3 multiphaseEulerFoam/.../sphericalHeatTransfer: Corrected conductivity
This is a model for heat transfer through the inside of a dispersed
phase. It should therefore use the dispersed phase conductivity.
2020-11-06 15:17:23 +00:00
e2b3598d38 tests: Updated to dictionary slash syntax 2020-11-04 10:51:43 +00:00
efbf198022 test/multiphase/multiphaseEulerFoam: Removed tests for mass-fraction scaling 2020-10-27 18:20:28 +00:00
095054d82e applications/solvers/combustion: Moved the inertSpecie functionality into basicSpecieMixture
and renamed defaultSpecie as its mass fraction is derived from the sum of the
mass fractions of all other species and it need not be inert but must be present
everywhere, e.g. N2 in air/fuel combustion which can be involved in the
production of NOx.

The previous name inertSpecie in thermophysicalProperties is supported for
backward compatibility.
2020-10-26 20:57:01 +00:00
0efc492a77 multiphaseEulerFoam: Mass/heat transfer consistency and linearisation
All heat transfers that result from mass-transfer are now implemented in
terms of sensible enthalpy, so that they are consistent regardless of
which form of energy is being solved for. This has removed some spurious
temperature anomalies from a number of cases involving mass-transfer.

All heat transfers that result from mass-transfer are now linearised. In
the case of multi-specie systems this requires the specification of a
residual mass fraction, which is given by a new "residualY" keyword in
the constant/phaseProperties dictionary. If this entry is omitted for
multi-specie systems then linearisation is deactivated.

**** Details for developers ****

Methods have been added to the base heat transfer phase systems to
permit energy transfer as a result of phase change, without coupling to
a diffusive heat transfer model. These functions require a "weight" to
be specified in the call to define how the latent heat is divided
between either side of the interface. A weight of 0 indicates that the
latent heat is dissipated entirely in the upwind phase, and 1 means it
is entirely in the downwind phase.

The forms of latent heat calculation and transfer have been standardised
between the various phase systems. There are now two methods of
calculating the latent heat, and two methods of applying the transfer
(see below for details). These options are currently hard-coded into the
systems that use them, but they could be made user modifiable
per-mass-transfer in future.

Interface temperatures are now stored by the derived phase systems
alongside their corresponding mass transfer rates. These temperatures
are passed by argument to the phase-change heat transfer methods
provided by the base heat transfer systems. This allows multiple
mechanisms of mass transfer each involving different interface state to
occur across the same interface.

These changes have allowed all phase systems to use the same set of
base energy-transfer functionality.

**** Even more details for developers ****

The two forms of latent heat scheme available are:

    symmetric: The latent heat is calculated as the difference between
               the interface enthalpies on either side of an interface.
               This is the simplest form.

       upwind: The latent heat is calculated as the difference between
               the bulk enthalpy on the side of the interface that mass
               is being transferred from and the interface enthalpy on
               the side of the interface that mass is transferring to.
               This form may confer some stability benefits.

The two format of latent heat transfer are:

         heat: The latent heat is applied by transferring heat unequally
               on either side of an interface using the difference
               between the bulk phase temperatures and the interface
               temperature. No explicit latent heat source is required.
               This method has a stability advantage over the "mass"
               option, but the transfer is not energy conservative
               unless the interface temperature is exactly correct.

         mass: The latent heat is applied as an explicit mass transfer
               source to both sides of an interface. The ratio between
               the heat transfer coefficients on either side determines
               what proportion of the latent heat source ends up in each
               phase. Heat transfer is calculated equally on both sides
               of an interface using bulk phase temperatures and is not
               coupled to the thermal effect of phase change. This
               method has the advantage of being energy conservative
               even if the interface temperature is not exact, but it is
               less stable than the "heat" option at extreme conditions.
2020-09-08 16:26:37 +01:00
b929550ffc multiphaseEulerFoam: Added isothermalGrowth test case
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-04 15:01:44 +01:00
1cbb707a86 multiphaseEulerFoam/.../populationBalance: Added fvOption source terms
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:04 +01:00
f94884c87a multiphaseEulerFoam/.../populationBalance: Changed sizeGroup equations to volumetric form
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-09-02 20:31:03 +01:00
36731b2fe9 tutorials: Prevent foamDictionary output from printing during test loop
foamDictionary executions are now wrapped by runApplication like any
other execution so that they do not print during a test loop.
foamDictionary does not produce a conforming log, however, so
log.foamDictionary has been filtered out of the formation of the test
loop report so that false failures are not reported.
2020-07-24 14:11:32 +01:00
85c08332ef multiphaseEulerFoam: Reinstated two-phase tests
These single-cell tests were previously simulated using the now removed
reactingTwoPhaseEulerFoam.
2020-07-21 12:04:12 +01:00