Commit Graph

120 Commits

Author SHA1 Message Date
8397d21905 tutorials/modules: Updated the film tutorials to avoid the need to pre-load libisothermalFilm.so 2023-03-08 10:57:43 +00:00
cee34fea3c tutorials/modules/CHT/rivuletBox: New CHT/film/fluid tutorial case
Demonstration case for three region coupling with film consisting of an
aluminium panel with surface film running down forming rivulets in a box of air
which moved due to buoyancy with 6-way thermal and velocity coupling between the
panel<->film<->air<->panel.  The case runs serial and parallel with arbitrary
decomposition.

Currently extrudeToRegionMesh does not directly support three region coupling so
foamDictionary is used to edit the of the boundary files of box and film regions
to add box<->film coupling.
2023-03-07 13:28:50 +00:00
9df3600f11 tutorials/modules/film/rivuletPanel/Allrun: Corrected for Alltest 2023-03-03 14:50:29 +00:00
25dd524c84 generic.*Patch: Moved to new genericPatches library
genericPatches is linked into mesh generation and manipulation utilities but not
solvers so that the solvers now check for the availability of the specified
patch types.  Bugs in the tutorials exposed by this check have been corrected.
2023-03-03 09:03:47 +00:00
7cc5cba5b4 tutorials/modules/CHT/rivuletPanel: Renamed extrudeToRegionMeshDict 2023-03-02 18:56:57 +00:00
796cfb3b3a solvers::film: new solver module to simulate thermal liquid films and CHT
Class
    Foam::solvers::film

Description
    Solver module for flow of compressible liquid films

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian particles,
    radiation, surface film etc. and constraining or limiting the solution.

solvers::film is derived from solvers::isothermalFilm adding an energy equation
and temperature update with support for heat transfer to the wall using the
standard ThermophysicalTransportModels library utilising the filmWall patch type
or mappedFilmWall for CHT heat transfer to the adjacent solid region.  A huge
advantage of this consistency with the rest of OpenFOAM is that the standard
thermal coupled boundary conditions can be used without modification, e.g.
temperatureCoupled.

Two variants of the rivuletPanel tutorial case are provided,
tutorials/modules/film/rivuletPanel demonstrates heat transfer to a fixed
temperature wall and tutorials/modules/CHT/rivuletPanel demonstrates conjugate
heat transfer to a thin aluminium panel simulated in a region using the
solvers::solid solver executed with solvers::film using foamMultiRun.

More functionality will be added through the power of fvModels.
2023-02-28 19:33:12 +00:00
dcbd54c131 solvers::isothermalFilm: New solver module to simulate isothermal liquid films
Class
    Foam::solvers::isothermalFilm

Description
    Solver module for flow of compressible isothermal liquid films

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

The implementation of this new film solver is in fully conservative form,
solving for the film volume-fraction rather film thickness which ensures
conservation on curved and irregular surfaces and even around corners.

Also the formulation is consistent with standard FV solvers in other fundamental
respects using boundary conditions rather than volume forces to apply surface
stresses and transfers.  This hugely advantageous approach, which allows the
reuse of many of the standard OpenFOAM libraries, in particular standard
compressibleMomentumTransportModels for the wall and internal film stresses, is
achieved using the special patch types filmWall and filmSurface to handle the
difference between the film thickness and the film cell layer height.

The specification of physical properties, boundary conditions, optional models
etc. etc. is handled in the same manner as all the other solver modules, making
much easier to use and to maintain the code.

Currently only coupling to the wall is supported with laminar transport, surface
tension, a new and more accurate contact angle algorithm and gravity which is
sufficient to demonstrate rivulet flow for example as in the tutorial case
provided: tutorials/modules/isothermalFilm/rivuletPanel

Support for coupling to an adjacent fluid region, Lagrangian impingement and
ejection, transfer to and from a VoF phase etc. will be added in the future via
the standard fvModels interface.
2023-02-28 19:16:49 +00:00
5a54b126e3 tutorials/modules/incompressibleVoF/capillaryRise/0/alpha.water.orig: Updated contactAngle BC 2023-02-28 16:24:28 +00:00
da062f389d tutorials: compressibleVoF/ballValve: Corrected name of cavitation model 2023-02-28 09:17:05 +00:00
ea8a922ee8 tutorials/modules/CHT: Removed unnecessary files and entries 2023-02-26 19:45:15 +00:00
a004189e35 tutorials::extrudeMeshDict: Corrected object name 2023-02-26 19:44:48 +00:00
aeadea4377 Standardised name of area-per-unit-volume to Av
This change applies to diameter models within the multiphaseEuler
module, heat transfer fvModels, and the LopesdaCosta porosity and
turbulence models.

User input changes have been made backwards-compatible, so existing
AoV/a/Sigma/... entries and fields should continue to work.
2023-02-22 12:58:14 +00:00
2cf966de89 tutorials: Examples of mapFieldsPar usage
Two pitzDaily variants have been added; pitzDailySteadyMappedToPart, and
pitzDailySteadyMappedToRefined. These demonstrate usage of workflows
which involve mapping between cases with mapFieldsPar.

The pitzDailySteadyMappedToPart case demonstrates mapping onto a small
section of the mesh; in this case in the vicinity of the the corner of
the backstep. This mesh is not consistent with the source data, so
fields are required in the zero directory and cutting patches are used
to specify the properties at the inlets.

The pitzDailySteadyMappedToRefined case demonstrates mapping onto a
geometrically similar case with a different mesh density. This mesh is
consistent with the source, so no fields are needed and no cutting
patches are used. This case does, however, perturb the geometry of the
block mesh a bit, so that some of the refined case is not overlapping
the original case. This provides a test of the stabilisation
procedures within the mesh-to-mesh mapping functions.
2023-02-16 15:15:24 +00:00
f95eb5fd11 meshToMesh, mapFieldsPar: Rationalisation
Cell-to-cell interpolation has been moved to a hierarchy separate from
meshToMesh, called cellsToCells. The meshToMesh class is now a
combination of a cellsToCells object and multiple patchToPatch objects.
This means that when only cell-to-cell interpolation is needed a basic
cellsToCells object can be selected.

Cell-to-cell and vol-field-to-vol-field interpolation now has two well
defined sets of functions, with a clear distinction in how weights that
do not sum to unity are handled. Non-unity weights are either
normalised, or a left-over field is provided with which to complete the
weighted sum.

The left-over approach is now consistently applied in mapFieldsPar,
across both the internal and patch fields, if mapping onto an existing
field in the target case. Warning are now generated for invalid
combinations of settings, such as mapping between inconsistent meshes
without a pre-existing target field.

All mapping functions now take fields as const references and return tmp
fields. This avoids the pattern in which non-const fields are provided
which relate to the source, and at some point in the function transfer
to the target. This pattern is difficult to reason about and does not
provide any actual computational advantage, as the fields invariably get
re-allocated as part of the process anyway.

MeshToMesh no longer stores the cutting patches. The set of cutting
patches is not needed anywhere except at the point of mapping a field,
so it is now supplied to the mapping functions as an argument.

The meshToMesh topology changer no longer supports cutting patch
information. This did not previously work. Cutting patches either get
generated as calculated, or they require a pre-existing field to specify
their boundary condition. Neither of these options is suitable for a
run-time mesh change.

More code has been shared with patchToPatch, reducing duplication.
2023-02-16 11:12:36 +00:00
029f58f433 multiphaseEuler: sphericalDiffusiveMassTransfer: Removed unused Lewis number setting 2023-02-09 16:49:34 +00:00
d913607f3d tutorials/modules/incompressibleVoF/damBreakWithObstacle: Added relaxation for stability 2023-02-08 19:16:09 +00:00
61c1d096a5 tutorials/modules/incompressibleVoF/sloshingTank3D3DoF: Set pressure reference to 0 2023-02-07 17:07:17 +00:00
0d49a11326 fvMeshTopoChangersRefiner: The correctFluxes entry in dynamicMeshDict is now optional
Solvers ensure fluxes are maintained and updated correctly after topology change
and it no longer the responsibility of fvMeshTopoChangersRefiner to attempt
this.
2023-02-07 17:05:45 +00:00
d1cb329706 tutorials: movingCone: Corrected and simplified
The '-region' option has been leveraged to significantly simplify the
meshing and decomposition in the movingCone cases. These cases have also
been corrected to restore the variation in decomposition between the
different meshes, which is important for thoroughly testing the patch
field mapping. The shockFluid case has also had its duration extended a
little in order to span the final mesh mapping time.
2023-02-07 16:14:30 +00:00
c41f303c30 solvers::twoPhaseVoFSolver: Register alphaPhiCorr0.<phase1> for redistribution 2023-02-07 14:23:06 +00:00
295223624b Rationalised and standardised cell, face and point set selection controls
The keyword 'select' is now used to specify the cell, face or point set
selection method consistently across all classes requiring this functionality.

'select' replaces the inconsistently named 'regionType' and 'selectionMode'
keywords used previously but backwards-compatibility is provided for user
convenience.  All configuration files and tutorials have been updated.

Examples of 'select' from the tutorial cases:

functionObjects:

    cellZoneAverage
    {
        type            volFieldValue;
        libs            ("libfieldFunctionObjects.so");

        writeControl    writeTime;
        writeInterval   1;

        fields          (p);
        select          cellZone;
        cellZone        injection;

        operation       volAverage;
        writeFields     false;
    }

    #includeFunc populationBalanceSizeDistribution
    (
        name=numberDensity,
        populationBalance=aggregates,
        select=cellZone,
        cellZone=outlet,
        functionType=numberDensity,
        coordinateType=projectedAreaDiameter,
        allCoordinates=yes,
        normalise=yes,
        logTransform=yes
    )

fvModel:

    cylinderHeat
    {
        type            heatSource;

        select          all;

        q               5e7;
    }

fvConstraint:

    momentumForce
    {
        type            meanVelocityForce;

        select          all;

        Ubar            (0.1335 0 0);
    }
2023-02-01 16:17:16 +00:00
dc85d509b0 #includeFunc, #includeModel, #includeConstraint: Changed entry renaming option to "name"
This is a more intuitive keyword than "funcName" or "entryName". A
function object's name and corresponding output directory can now be
renamed as follows:

    #includeFunc patchAverage
    (
        name=cylinderT, // <-- was funcName=... or entryName=...
        region=fluid,
        patch=fluid_to_solid,
        field=T
    )

Some packaged functions previously relied on a "name" argument that
related to an aspect of the function; e.g., the name of the faceZone
used by the faceZoneFlowRate function. These have been disambiguated.
This has also made them consistent with the preferred input syntax of
the underlying function objects.

Examples of the changed #includeFunc entries are shown below:

    #includeFunc faceZoneAverage
    (
        faceZone=f0, // <-- was name=f0
        U
    )

    #includeFunc faceZoneFlowRate
    (
        faceZone=f0 // <-- was name=f0
    )

    #includeFunc populationBalanceSizeDistribution
    (
        populationBalance=bubbles,
        regionType=cellZone,
        cellZone=injection, // <-- was name=injection
        functionType=volumeDensity,
        coordinateType=diameter,
        normalise=yes
    )

    #includeFunc triSurfaceAverage
    (
        triSurface=mid.obj, // <-- was name=mid.obj
        p
    )

    #includeFunc triSurfaceVolumetricFlowRate
    (
        triSurface=mid.obj // <-- was name=mid.obj
    )

    #includeFunc uniform
    (
        fieldType=volScalarField,
        fieldName=alpha, // <-- was name=alpha
        dimensions=[0 0 0 0 0 0 0],
        value=0.2
    )
2023-02-01 12:40:40 +00:00
5982e04bc8 #includeFunc: Changed entry renaming option funcName -> entryName
so that the same option with a rational name is also available for #includeModel
and #includeConstraint.  Support for funcName is maintained for
backwards-compatibility.
2023-01-31 18:25:10 +00:00
75da5c3d4c fvModels: heatTransfer, interRegionHeatTransfer: Usability improvements
The input syntax of the heatTransfer and interRegionHeatTransfer
fvModels has been modified to make it more usable and consistent with
the rest of OpenFOAM.

The settings for area per unit volume (AoV) are no longer controlled by
the heat transfer coefficient model. Instead they belong to the fvModel
itself and are specified within the base fvModel's dictionary.

The heat transfer coefficient model has been renamed to
"heatTransferCoefficientModel" to better account for exactly what it
does. It is now selected using an entry called
"heatTransferCoefficientModel", rather than "type". As a sub-sub model,
"type" clashes with the outer fvModel's "type" entry unless a Coeffs
dictionary is used. This change has made the Coeffs sub-dictionary
optional, as it should be, unless model-specific keywords require
disambiguation.

A heat transfer coefficient model can now be specified as follows:

    heatTransfer1
    {
        type            heatTransfer;

        heatTransferCoeffs
        {
            selectionMode   all;
            semiImplicit    true;
            Ta              298;
            AoV             100;

            heatTransferCoefficientModel variable; // constant, function1

            constantCoeffs
            {
                htc             1000;
            }

            variableCoeffs
            {
                a               0.332;
                b               0.5;
                c               0.333333;
                Pr              0.7;
                L               0.1;
            }
        }
    }

Alternatively, the coefficient sub-dictionaries can all be omitted,
giving the following syntax:

    heatTransfer1
    {
        type            heatTransfer;

        selectionMode   all;
        semiImplicit    true;
        Ta              298;
        AoV             100;

        heatTransferCoefficientModel variable;

        a               0.332;
        b               0.5;
        c               0.333333;
        Pr              0.7;
        L               0.1;
    }
2023-01-31 16:15:39 +00:00
644a5945da fvModels: Constraints for zero-dimensional cases
Two fvModels have been added, densityConstraintSource and
pressureConstraintSource, for constraining the density or pressure of
zero-dimensional cases. The constrained property's variation in time is
specified by means of a Function1.

The constraints are maintained by adding or removing an appropriate
amount of mass. Properties are added or removed with this mass at their
current values. Both constraints therefore represent uniform expansion
or contraction in an infinite space. In the case of the pressure
constraint, the compressibility is used to determine this amount of
mass, and in the case of non-linear equations of state iteration may be
necessary to enforce the constraint accurately.

These models can be used to extend the concept of a zero-dimensional
simulation to one that uniformly expands or contracts, or features a
mass source or sink.

Example specification of a time-varying density constraint, in
constant/fvModels:

    densityConstraintSource1
    {
        type            densityConstraintSource;
        rho
        {
            type            scale;
            values
            (
                (0 1.16)
                (1 1.16)
                (1.1 2.02)
                (10 2.02)
            );
        }
    }

Example specification of a constant pressure constraint:

    pressureConstraintSource1
    {
        type            pressureConstraintSource;
        p               1e5;
    }

An example in which the pressure is constrained is provided. This
example shows the reaction of nc7h16, and duplicates the behaviour of
the corresponding chemFoam case.
2023-01-31 16:14:07 +00:00
3a269eb3d7 #includeModel, #includeConstraint: New dictionary directives
#includeModel includes an fvModel configuration file into the fvModels file
 #includeConstraint includes an fvModel configuration file into the fvConstraints file

These operate in the same manner as #includeFunc does for functionObjects and
search the etc/caseDicts/fvModels and etc/caseDicts/fvConstraints directories
for configuration files and apply optional argument substitution.

Class
    Foam::functionEntries::includeFvModelEntry

Description
    Specify a fvModel dictionary file to include, expects the
    fvModel name to follow with option arguments (without quotes).

    Searches for fvModel dictionary file in user/group/shipped
    directories allowing for version-specific and version-independent files
    using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/fvModels
      - ~/.OpenFOAM/caseDicts/fvModels
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvModels
      - $WM_PROJECT_SITE/etc/caseDicts/fvModels
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvModels
      - $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvModels
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/fvModels

    The optional field arguments included in the name are inserted in 'field' or
    'fields' entries in the fvModel dictionary and included in the name
    of the fvModel entry to avoid conflict.

    Examples:
    \verbatim
        #includeModel clouds
        #includeModel surfaceFilms
    \endverbatim

    Other dictionary entries may also be specified using named arguments.

See also
    Foam::includeFvConstraintEntry
    Foam::includeFuncEntry

Class
    Foam::functionEntries::includeFvConstraintEntry

Description
    Specify a fvConstraint dictionary file to include, expects the
    fvConstraint name to follow with option arguments (without quotes).

    Searches for fvConstraint dictionary file in user/group/shipped
    directories allowing for version-specific and version-independent files
    using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/fvConstraints
      - ~/.OpenFOAM/caseDicts/fvConstraints
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvConstraints
      - $WM_PROJECT_SITE/etc/caseDicts/fvConstraints
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvConstraints
      - $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvConstraints
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/fvConstraints

    The optional field arguments included in the name are inserted in 'field' or
    'fields' entries in the fvConstraint dictionary and included in the name
    of the fvConstraint entry to avoid conflict.

    Examples:
    \verbatim
        #includeConstraint limitPressure(minFactor=0.1, maxFactor=2)
        #includeConstraint limitTemperature(min=101, max=1000)
    \endverbatim
    or for a multiphase case:
    \verbatim
        #includeConstraint limitLowPressure(min=1e4)
        #includeConstraint limitTemperature(phase=steam, min=270, max=2000)
        #includeConstraint limitTemperature(phase=water, min=270, max=2000)
    \endverbatim

    Other dictionary entries may also be specified using named arguments.

See also
    Foam::includeFvModelEntry
    Foam::includeFuncEntry
2023-01-30 18:59:07 +00:00
fbda1df996 particleFoam, rhoParticleFoam: Replaced by solvers::functions with the fvModel functionObject
particleFoam has been superseded and replaced by the more general functions
solver module executed by the foamRun application:

    foamRun -solver functions

The incompressibleFluid solver specified by either the subSolver or if not
present the solver entry in the controlDict is instantiated to provide the
physical fields needed by fvModel functionObject in which the clouds fvModel is
selected to evolve the Lagrangian particles.  See:

    tutorials/modules/incompressibleFluid/hopperParticles
    tutorials/modules/incompressibleFluid/mixerVessel2DParticles

rhoParticleFoam has been superseded and replaced by the more general functions
solver module executed by the foamRun application:

    foamRun -solver functions

The isothermalFluid solver specified by either the subSolver or if not present
the solver entry in the controlDict is instantiated to provide the physical
fields needed by fvModel functionObject in which the clouds fvModel is selected
to evolve the Lagrangian particles.
2023-01-28 21:02:23 +00:00
59409fb463 tutorials/modules/incompressibleFluid/pitzDailyScalarTransport: Added coded functionObject
which stops the run when the mixing defined as mean(T)/max(T) > 0.9.
2023-01-27 16:40:22 +00:00
2da6c4cc62 functionObjects::scalarTransport: diffusion -> diffusivity
It in more logical to name the diffusivity entry, types and variables
"diffusivity" rather than "diffusion".
2023-01-27 14:49:01 +00:00
8de6cd744e solvers::functions: New solver module to execute functionObjects in a time-loop
Description
    Solver module to execute the \c functionObjects for a specified solver

    The solver specified by either the \c subSolver or if not present the \c
    solver entry in the \c controlDict is instantiated to provide the physical
    fields needed by the \c functionObjects.  The \c functionObjects are then
    instantiated from the specifications are read from the \c functions entry in
    the \c controlDict and executed in a time-loop also controlled by entries in
    \c controlDict and the \c maxDeltaT() returned by the sub-solver.

    The fields and other objects registered by the sub-solver are set to
    NO_WRITE as they are not changed by the execution of the functionObjects and
    should not be written out each write-time.  Fields and other objects created
    and changed by the execution of the functionObjects are written out.

solvers::functions in conjunction with the scalarTransport functionObject
replaces scalarTransportFoam and provide more general handling of the scalar
diffusivity.
2023-01-27 14:31:58 +00:00
260a8502f0 solvers::movingMesh: New solver module to move the mesh
Executes the mover, topoChanger and distributor specified in the
dynamicMeshDict.

Replaces the moveMesh and earlier moveDynamicMesh utilities.
2023-01-27 14:27:52 +00:00
bc23162499 tutorials: Remove unused combustionProperties files 2023-01-26 08:31:21 +00:00
513578ebd0 tutorials/modules/shockFluid/shockTube: Apply nOuterCorrectors
applying 2 outer correctors allows an increase in time-step from 1e-6 to 5e-6
without introducing numerical wiggles in the solution.
2023-01-25 15:53:04 +00:00
104be8eae9 Corrected typos 2023-01-24 22:01:34 +00:00
9fadb7fccf solvers::shockFluid: Now solves for rho, U and e while conserving rho*U and rho*E
By solving for U and e rather than rhoU and rhoE the convection and stress
matrices can be combined and solved together avoiding the need for Strang
splitting.  Conservation of rho*U and rho*E is ensured by constructing and
solving the three equations in sequence, constructing each using the results of
the solution of the previous equations.
2023-01-24 18:17:46 +00:00
9adabe8cbd compressible::alphatWallBoilingWallFunction: Naming consistency
Tutorials have been updated to use the new consistent names within the
wall boiling system. The changes are backwards compatible so all
tutorials should run both before and after this change.
2023-01-24 14:27:41 +00:00
377080de52 compressible::alphatWallBoilingWallFunction: Improved solution procedure
This boundary condition now solves for the wall temperature by interval
bisection, which should be significantly more robust than the previous
fixed-point iteration procedure. There is a new non-dimensional
"tolerance" setting that controls how tightly this solution procedure
solves the wall temperature. The "relax" setting is no longer used.

The boundary condition no longer triggers re-evaluation of the
temperature condition in order to re-calculate the heat flux within the
solution iteration. Instead, it extracts physical coefficients from the
form of the boundary condition and uses these to form a linearised
approximation of the heat flux. This is a more general approach, and
will not trigger side-effects associated with re-evaluating the
temperature condition.

The fixedMultiphaseHeatFlux condition has been replaced by a
uniformFixedMultiphaseHeatFlux condition, which constructs a mixed
constraint which portions a specified heat flux between the phases in
such a way as to keep the boundary temperature uniform across all
phases. This can be applied to all phases. It is no longer necessary to
apply a heat flux model to one "master" phase, then map the resulting
temperature to the others. An example specification of this boundary
condition is as follows:

    wall
    {
        type            uniformFixedMultiphaseHeatFlux;
        q               1000;
        relax           0.3;
        value           $internalField;
    }

The wall boiling tutorials have been updated to use these new functions,
and time-varying heat input has been used to replace the
stop-modify-restart pattern present in the single-region cases.
2023-01-24 10:28:59 +00:00
fe5a991ade solvers::shockFluid: New solver module for density-based solution of compressible flow
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces rhoCentralFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/shockFluid.

Unlike rhoCentralFoam shockFluid supports mesh refinement/unrefinement, topology
change, run-time mesh-to-mesh mapping, load-balancing in addition to general
mesh-motion.

The tutorials/modules/shockFluid/movingCone case has been updated to demonstrate
run-time mesh-to-mesh mapping mesh topology change based on the
tutorials/modules/incompressibleFluid/movingCone.  shockFluid s

Description
    Solver module for density-based solution of compressible flow

    Based on central-upwind schemes of Kurganov and Tadmor with support for
    mesh-motion and topology change.

    Reference:
    \verbatim
        Greenshields, C. J., Weller, H. G., Gasparini, L.,
        & Reese, J. M. (2010).
        Implementation of semi‐discrete, non‐staggered central schemes
        in a colocated, polyhedral, finite volume framework,
        for high‐speed viscous flows.
        International journal for numerical methods in fluids, 63(1), 1-21.
    \endverbatim

SourceFiles
    shockFluid.C

See also
    Foam::solvers::fluidSolver
    Foam::solvers::incompressibleFluid
2023-01-18 14:10:48 +00:00
d0016c5fd5 tutorials/modules/fluid/shockTube: Updated for consistency with the rhoCentralFoam case 2023-01-16 16:33:20 +00:00
20d30d2d1e tutorials/modules/fluid/forwardStep: Updated for consistency with the rhoCentralFoam case 2023-01-16 16:32:30 +00:00
320e70af1d mappedPatchBase: Add "samePatch" option
This option means that a one field can be mapped to another within the
same patch without specifying the patch name. E.g.:

    walls
    {
        type            mappedValue;

        //neighbourPatch  walls; // <-- Previously required. Still supported.

        samePatch       yes;     // <-- New alternative specification

        field           T.liquid;
        value           $internalField;
    }

This is useful when the boundary condition is specified using a regular
expression for the patch name.

    "wall_.*"
    {
        type            mappedValue;

        //neighbourPatch  ???;   // <-- No unique name can be given

        samePatch       yes;     // <-- Still works

        field           T.liquid;
        value           $internalField;
    }
2023-01-13 09:19:08 +00:00
64e1e4e097 solvers::compressibleMultiphaseVoF: New solver module for compressible multiphase VoF simulations
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces compressibleMultiphaseInterFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/compressibleMultiphaseVoF.

compressibleMultiphaseVoF is derived from the multiphaseVoFSolver which adds
compressible multiphase capability to the VoFSolver base-class used as the basis
of all two-phase and multiphase VoF solvers.

Class
    Foam::solvers::compressibleMultiphaseVoF

Description
    Solver module for the solution of multiple compressible, isothermal
    immiscible fluids using a VOF (volume of fluid) phase-fraction based
    interface capturing approach, with optional mesh motion and mesh topology
    changes including adaptive re-meshing.

    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved.

    A mixture approach for momentum transport is provided in which a single
    laminar, RAS or LES model is selected to model the momentum stress.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

SourceFiles
    compressibleMultiphaseVoF.C

See also
    Foam::solvers::VoFSolver
    Foam::solvers::multiphaseVoFSolver
2023-01-10 16:01:49 +00:00
ffdb211bdc solvers::incompressibleMultiphaseVoF: New solver module for multiphase VoF simulations
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces multiphaseInterFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/incompressibleMultiphaseVoF.

incompressibleMultiphaseVoF is derived from the multiphaseVoFSolver which adds
multiphase capability to the VoFSolver base-class used as the basis of all
two-phase and multiphase VoF solvers.

Class
    Foam::solvers::incompressibleMultiphaseVoF

Description
    Solver module for the solution of multiple incompressible, isothermal
    immiscible fluids using a VOF (volume of fluid) phase-fraction based
    interface capturing approach, with optional mesh motion and mesh topology
    changes including adaptive re-meshing.

    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved.

    A mixture approach for momentum transport is provided in which a single
    laminar, RAS or LES model is selected to model the momentum stress.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

SourceFiles
    incompressibleMultiphaseVoF.C

See also
    Foam::solvers::VoFSolver
    Foam::solvers::multiphaseVoFSolver
2023-01-10 10:12:43 +00:00
e5175383b1 multiphaseEuler: Remove duplication of thermal wall functions
The standard Jayatilleke thermal wall function now permits evaluation
via static functions. The boiling wall function now uses these
functions, thereby removing the phase-Jayatilleke base class and
associated duplication of the Jayatilleke model.
2023-01-06 09:27:29 +00:00
0a194458f5 mappedValue: Extended to allow in-patch mapping
It is now possible to map from one field to another within the same
patch, using the mappedValue boundary condition. The restriction is that
the mapping must be from a different field, otherwise field values are
being assigned to themselves, which produces an undefined result.

The mappedValue boundary condition can now be used in place of the
copiedFixedValue condition in the multiphaseEuler module. The
copiedFixedValue condition has therefore been removed.

In addition, the error messages that result from casting a patch to its
mapping engine (mappedPatchBase) have been standardised, and made more
specific to the situation in which the mapping is applied. It may be
inappropriate, for example, to map within the same region or patch.
These cases are now identified and appropriate error messages are
generated.

The error messages have also been made IO errors, so they now provide
context with regards to the dictionary entries that they relate to.
2023-01-05 15:16:17 +00:00
55be8068d4 solvers::solidDisplacement: New solver module for solid stress analysis
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces solidDisplacementFoam and
solidEquilibriumDisplacementFoam and all the corresponding tutorials have been
updated and moved to tutorials/modules/solidDisplacement.

Class
    Foam::solvers::solidDisplacement

Description
    Solver module for steady or transient segregated finite-volume solution of
    linear-elastic, small-strain deformation of a solid body, with optional
    thermal diffusion and thermal stresses.

    Solves for the displacement vector field D, also generating the stress
    tensor field sigma, including the thermal stress contribution if selected.

SourceFiles
    solidDisplacement.C
2023-01-03 18:12:04 +00:00
b7ea5fcc29 solvers::XiFluid: New solver module for compressible premixed/partially-premixed combustion
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces XiFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/XiFluid.

Class
    Foam::solvers::XiFluid

Description
    Solver module for compressible premixed/partially-premixed combustion with
    turbulence modelling.

    Combusting RANS code using the b-Xi two-equation model.
    Xi may be obtained by either the solution of the Xi transport
    equation or from an algebraic expression.  Both approaches are
    based on Gulder's flame speed correlation which has been shown
    to be appropriate by comparison with the results from the
    spectral model.

    Strain effects are encorporated directly into the Xi equation
    but not in the algebraic approximation.  Further work need to be
    done on this issue, particularly regarding the enhanced removal rate
    caused by flame compression.  Analysis using results of the spectral
    model will be required.

    For cases involving very lean Propane flames or other flames which are
    very strain-sensitive, a transport equation for the laminar flame
    speed is present.  This equation is derived using heuristic arguments
    involving the strain time scale and the strain-rate at extinction.
    the transport velocity is the same as that for the Xi equation.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, chemical reactions,
    combustion, Lagrangian particles, radiation, surface film etc. and
    constraining or limiting the solution.

    Reference:
    \verbatim
        Greenshields, C. J., & Weller, H. G. (2022).
        Notes on Computational Fluid Dynamics: General Principles.
        CFD Direct Ltd.: Reading, UK.
    \endverbatim

SourceFiles
    XiFluid.C

See also
    Foam::solvers::fluidSolver
    Foam::solvers::isothermalFluid
2022-12-29 23:53:33 +00:00
851c9391be solvers::incompressibleVoF: New solver module for incompressible two-phase flow with VoF
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces interFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/incompressibleVoF.

Both incompressibleVoF and compressibleVoF solver modules are derived from the
common two-phase VoF base-class solvers::VoFSolver which handles the
complexities of VoF interface-compression, boundedness and conservation with
2nd-order schemes in space and time using the semi-implicit MULES limiter and
solution proceedure.  This maximises code re-use, improves readability and
simplifies maintenance.

Class
    Foam::solvers::incompressibleVoF

Description
    Solver module for for 2 incompressible, isothermal immiscible fluids using a
    VOF (volume of fluid) phase-fraction based interface capturing approach,
    with optional mesh motion and mesh topology changes including adaptive
    re-meshing.

    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved.

    Either mixture or two-phase transport modelling may be selected.  In the
    mixture approach a single laminar, RAS or LES model is selected to model the
    momentum stress.  In the Euler-Euler two-phase approach separate laminar,
    RAS or LES selected models are selected for each of the phases.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

SourceFiles
    incompressibleVoF.C

See also
    Foam::solvers::VoFSolver
    Foam::solvers::compressibleVoF
2022-12-25 11:38:36 +00:00
74b302d6f8 solvers::compressibleVoF: Implemented new energy conservative temperature correction equation
In order to ensure temperature consistency between the phases it is necessary to
solve for the mixture temperature rather than the mixture energy or phase
energies which makes it very difficult to conserve energy.  The new temperature
equation is a temperature correction on the combined phase energy equations
which will conserve the phase and mixture energies at convergence.  The
heat-flux (Laplacian) term is maintained in mixture temperature form so
heat-transfer boundary conditions, in particular for CHT, remain in terms of the
mixture kappaEff.  The fvModels are applied to the phase energy equations and
the implicit part converted into an implicit term in the temperature correction
part of the equation to improve convergence and stability.

This development has required some change to the alphaEqn.H and interFoam has
been updated for consistency in preparation for conversion into the
solvers::incompressibleVoF modular module.

All compressibleVoF fvModels and tutorial cases have been updated for the above
change.  Note that two entries are now required for the convection terms in the
temperature equation, one for explicit phase energy terms and another for the
implicit phase temperature correction terms, e.g.

tutorials/modules/compressibleVoF/ballValve

    div(alphaRhoPhi,e) Gauss limitedLinear 1;
    div(alphaRhoPhi,T) Gauss upwind;

In the above the upwind scheme is selected for the phase temperature correction
terms as they are corrections and will converge to a zero contribution.  However
there may be cases which converge better if the same scheme is used for both the
energy and temperature terms, more testing is required.
2022-12-18 17:28:11 +00:00
76d44e9638 pimpleNoLoopControl: added predictTransport() function to control the transport modelling prediction
The new optional PIMPLE control transportPredictionFirst is used to select if
the transport modelling predictor is executed ever PIMPLE iteration or only on
the first, which is the default.

Also the transportCorr() function has been renamed correctTransport() for
consistency and the tutorials updated to use the new control name
transportCorrectionFinal instead of the previous name turbOnFinalIterOnly;
support for turbOnFinalIterOnly is maintained for backwards-compatibility.
2022-12-16 10:07:46 +00:00