Commit Graph

1174 Commits

Author SHA1 Message Date
5196e09fe2 Rationalised reactionThermo -> multicomponentThermo
Now that the reaction system, chemistry and combustion models are completely
separate from the multicomponent mixture thermophysical properties package that
supports them it is inconsistent that thermo is named reactionThermo and the
name multicomponentThermo better describes the purpose and functionality.
2022-07-29 14:38:05 +01:00
7970715232 multiphaseEulerFoam: Prevented incorrect warnings
When two phases interact, neither of which can become continuous, only a
general model is appropriate. A warning should not be issued regarding a
general model's use for this configuration.
2022-07-14 09:10:37 +01:00
55238c317a Fix for compilation with older versions of Clang 2022-07-13 11:20:22 +01:00
d03b945ba9 Resolving warnings from icpx 2022-07-10 21:11:52 +01:00
ce73ec45f9 Updates for single-precision compilation 2022-07-10 19:39:57 +01:00
f0e693176d fvMeshTopoChangers::meshToMesh: Added support for changes in decomposition between meshes
If the sequence of meshes are decomposed independently the number, order and
potentially type of processor patches is likely to change.  Thus the processor
patches and patch fields must be replaced with those of the new mesh.
2022-07-10 16:06:17 +01:00
534ef0868c multiphaseEulerFoam::functionObjects: renamed moments and sizeDistribution
+ moments -> populationBalanceMoments
+ sizeDistribution -> populationBalanceSizeDistribution
2022-07-08 15:47:20 +01:00
75bbfd0294 chtMultiRegionFoam: Renamed nEcorr -> nEcorrectors
for consistency with other PIMPLE iteration controls
2022-07-04 16:11:46 +01:00
0f8a020c70 setDeltaT: Corrected time-step increase limiter 2022-06-21 15:26:36 +01:00
d54f5ab9ad polyMesh: Changed topoChanging -> topoChanged
The topoChanged flag now indicates that the mesh topology has changed at the
start of the current time-step rather than it is changing during the run, for
subsequent time-steps without topology change it is set false until the next
topology change.
2022-06-10 12:01:28 +01:00
e3298597e1 compressibleInterFoam: Register dgdt to ensure it is mapped after mesh topology change 2022-06-04 11:14:26 +01:00
68151b8d01 multiphaseEulerFoam::kineticTheoryModel: Simplified the name of the divDevTau term in fvSchemes
For a single particle phase the divDevTau term in fvSchemes is now specified
thus:

    divDevTau(U.particles)    Gauss linear;

previously:
    div((((thermo:rho.particles*nut.particles)*dev2(T(grad(U.particles))))+(((thermo:rho.particles*lambda.particles)*div(phi.particles))*I))) Gauss linear;
2022-05-26 11:00:16 +01:00
3b4470d499 multiphaseEulerFoam, MovingPhaseModel: Register fields
All construct-on-demand fields are now registered, so tha they resize
and map appropriately when mesh changes occur
2022-05-25 16:02:57 +01:00
6d3e31f8e0 multiphaseEulerFoam::kineticTheoryModels, phasePressureModel: now use the phase.alphaMax()
rather than read and use a potentially inconsistent local value for alphaMax.
2022-05-25 13:47:18 +01:00
f54376b20c Code documentation: corrected typos 2022-05-20 10:42:25 +01:00
583fc4aec0 driftFluxFoam::relativeVelocityModel: Updated dispersed-phase flow acceleration estimate
// Dispersed phase velocity
    // const volVectorField Ud(mixture_.U() + Udm_);

    // Use the mixture rather than the dispersed-phase velocity to approximate
    // the dispersed-phase acceleration to improve stability as only the mixture
    // momentum equation is coupled to continuity and pressure
    //
    // This approximation is valid only in the limit of small drift-velocity.
    // For large drift-velocity an Euler-Euler approach should be used in
    // which both the continuous and dispersed-phase momentum equations are
    // solved and coupled to the pressure.
    const volVectorField& Ud = mixture_.U();

    return g_ - (Ud & fvc::grad(Ud));
2022-05-17 14:01:59 +01:00
0ead4cbc81 driftFluxFoam::mixtureViscosityModels::Quemada: Improved stability in the limit of alpha -> alphaMax 2022-05-17 14:01:24 +01:00
7dd5c4d3fa XiFoam: Removed redundant rhoEqn solution after mesh topology change
Resolves bug-report https://bugs.openfoam.org/view.php?id=3838
2022-05-14 13:00:27 +01:00
7e84102215 MRF: Added support for moving mesh cases including MRF regions
Now stationary MRF regions may be embedded in moving mesh cases.  While in
principle MRF regions moving with the mesh is supported by this development
there is no special handling with the MRF implementation to support the required
specification of the motion of the MRF regions.
2022-05-04 11:34:45 +01:00
01d82d1e51 rhoPimpleFoam, XiFoam: Updated pEqn to support the fixedFluxExtrapolatedPressure BC 2022-05-03 22:39:44 +01:00
376b51b58b multiphaseEulerFoam::populationBalanceModel: improved dilatation treatment
The population balance model considers dilatation originating from density
change and mass transfer via source terms describing nucleation as well as
"drift" of the size distribution to smaller or larger sizes. Numerically, the
treatment does not necessarily equal the total dilatation, hence a correction is
introduced to ensure boundedness of the size group fractions.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2022-04-29 16:18:03 +01:00
3ef1a3287e applications/solvers/multiphase::pEqn: Check for rAU validity before resetting
Avoids problems when the mesh is not changing but correctPhi is set true.
2022-04-27 14:56:14 +01:00
2cf6090203 driftFluxFoam::relativeVelocityModels::MichaelsBolger: alphaMax in now obtain from phaseProperties 2022-04-22 16:54:01 +01:00
64a2a3bf75 driftFluxFoam::relativeVelocityModels: Added MichaelsBolger model for flocculated suspensions
Description
    Michaels & Bolger relative velocity model

    Reference:
    \verbatim
        Michaels, A. S., & Bolger, J. C. (1962).
        Settling rates and sediment volumes
        of flocculated kaolin suspensions.
        Industrial & Engineering Chemistry Fundamentals, 1(1), 24-33.
    \endverbatim

Usage
    Example usage:
    \verbatim
        relativeVelocityModel MichaelsBolger;

        MichaelsBolgerCoeffs
        {
            a0          0;    // Extended Michaels & Bolger coefficient,
            a1          4.65; // Exponent

            alphaMax    0.6;  // Maximum dispersed phase-fraction
                              // (packing fraction)
        }
    \endverbatim
2022-04-22 16:50:41 +01:00
620cbe9d1f driftFluxFoam: Generalised the treatment of the effect of flow curvature
Rather than rely on the MRF rotation the effect of acceleration due to flow
curvature on the dispersed is now handled directly using the Ud.grad(Ud) term
derived from the phase momentum equation.  This means that any flow curvature
from bulk rotation to recirulation zones now affect the separation of the
dispersed phase from the continuous phase in a physical manner.
2022-04-13 11:24:56 +01:00
5e99344348 multiphaseEulerFoam::populationBalanceModel: Removed temporary dilatation correction
and updated tutorials to work with the current phase limit stabilisation.
2022-04-12 10:23:42 +01:00
48e2ff1fec cavitatingFoam: Corrected correctUf call to use the absolute flux
Resolves bug-report https://bugs.openfoam.org/view.php?id=3825
2022-04-11 16:08:05 +01:00
b8ce733e4b fvMesh: Separated fvMesh::move() and fvMesh::update()
fvMesh::update() now executes at the beginning of the time-step, before time is
incremented and handles topology change, mesh to mesh mapping and redistribution
without point motion.  Following each of these mesh changes fields are mapped
from the previous mesh state to new mesh state in a conservative manner.  These
mesh changes not occur at most once per time-step.

fvMesh::move() is executed after time is incremented and handles point motion
mesh morphing during the time-step in an Arbitrary Lagrangian Eulerian approach
requiring the mesh motion flux to match the cell volume change.  fvMesh::move()
can be called any number of times during the time-step to allow iterative update
of the coupling between the mesh motion and field solution.
2022-04-08 18:46:12 +01:00
7592a81c6e polyMeshMap: New mesh to mesh map for the new mapping update function mapMesh(const polyMeshMap&)
This new mapping structure is designed to support run-time mesh-to-mesh mapping
to allow arbitrary changes to the mesh structure, for example during extreme
motion requiring significant topology change including region disconnection etc.
2022-04-04 11:15:41 +01:00
1aa194e18b Updated documentation for the distribute(const polyDistributionMap&) function 2022-04-01 09:11:09 +01:00
6047f27aac polyDistributionMap: renamed from polyMeshDistributionMap for consistency with polyTopoChangeMap 2022-03-31 23:44:47 +01:00
3ace8f434b polyTopoChangeMap: Renamed from mapPolyMesh to clarify purpose and scope
The polyTopoChangeMap is the map specifically relating to polyMesh topological
changes generated by polyTopoChange and used to update and map mesh related
types and fields following the topo-change.
2022-03-31 22:05:37 +01:00
2e6eb5f2ce polyMeshDistributionMap: renamed mapDistributePolyMesh -> polyMeshDistributionMap
This is a map data structure rather than a class or function which performs the
mapping operation so polyMeshDistributionMap is more logical and comprehensible
than mapDistributePolyMesh.
2022-03-31 18:01:44 +01:00
b4bcb29d6a multiphaseEulerFoam: Added models
Added solid particle coalescence model by Adachi, Stuart and Fokkink
(1994), solid particle breakage model by Kusters (1991) and spherical
particle lift force model by Saffman-Mei (1992).

Patch contributed by Kasper Gram Bilde and Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-03-30 11:28:42 +01:00
08b67ff147 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-03-23 16:36:25 +00:00
ddbf2d7853 fvMesh: fvSchemes and fvSolution are now demand-driven
fvMesh is no longer derived from fvSchemes and fvSolution, these are now
demand-driven and accessed by the member functions schemes() and solution()
respectively.  This means that the system/fvSchemes and system/fvSolution files
are no longer required during fvMesh constructions simplifying the mesh
generation and manipulation phase; theses files are read on the first call of
their access functions.

The fvSchemes member function names have also been simplified taking advantage
of the context in which they are called, for example

    mesh.ddtScheme(fieldName) -> mesh.schemes().ddt(fieldName)
2022-03-23 16:23:55 +00:00
32be464010 fixedValueConstraint, fixedTemperatureConstraint: Permit applying only a fraction of the constraint
An optional Function1 can now be supplied to a fixedValueConstraint
which controls what proportion of the constraint is applied. This can be
used to ramp, pulse, or limit the duration of the constraint. For
example, ramping up of the constraint could be specified as follows:

    scalarSource
    {
        type            fixedValueConstraint;

        selectionMode   points;
        points          ((0 0.1 0));

        fieldValues
        {
            s               1;
        }

        fraction
        {
            type            ramp;
            duration        0.1;
        }
    }
2022-03-23 12:58:33 +00:00
fbf7374bef driftFluxFoam: Added MRF centrifugal acceleration effect to the relativeVelocityModels
This required changing the formulation of the relative velocity in terms of a
scalar velocity coefficient Vc rather than the velocity V0 such that

    V0 = Vc*g

where g is the acceleration due to gravity.  With MRF rotation

    V0 = Vc*(g + <MRF centrifugal acceleration>)
2022-03-17 17:35:15 +00:00
dfc28bb580 multiphaseEulerFoam: populationBalance: Updated and improved source code documentation
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2022-03-11 09:13:03 +00:00
aa02cd4d25 multiphaseEulerFoam::fractal: Corrected stabilisation of kappa including the influence of fi 2022-03-01 20:46:47 +00:00
8cecaa8b6e MultiComponentPhaseModel: Replaced local residualAlpha_ with phase.residualAlpha()
There is no clear need for a residualAlpha to be defined specifically for Yi and
read from the fvSolution dictionary, the phase.residualAlpha() should be
suitable to stabilise the Yi equations.
2022-03-01 18:00:06 +00:00
3df883d7e6 multiphaseEulerFoam: Improved stabilisation of Yi, fi and kappa when alpha -> 0
The new stabilisation approach avoids any conservation error where the
phase-fraction is greater than residualAlpha by only applying the stabilising
terms to the transport equations in regions where the phase-fraction is less
than residualAlpha.
2022-02-28 19:08:28 +00:00
85e68669f0 multiphaseEulerFoam: Apply constraints to mass fraction equations 2022-02-23 15:28:51 +00:00
b827c0d740 Compressible solvers: Improved transonic option in the pressure equation
The handling of the div(phid,p) term for transonic support in the pressure
equation is now consistent such that conservation is achieved at convergence of
the pressure system irrespective of the scheme chosen for div(phid,p) and the
relaxation of the pressure equation.

The rhoSimpleFoam tutorials have been updated and improved.
2022-02-22 13:05:40 +00:00
d40ecd78eb buoyantFoam: Merged buoyantSimpleFoam and buoyantPimpleFoam
Solver for steady or transient buoyant, turbulent flow of compressible fluids
for ventilation and heat-transfer, with optional mesh motion and mesh topology
changes.  Created by merging buoyantSimpleFoam and buoyantPimpleFoam to provide
a more general solver and simplify maintenance.
2022-02-18 12:20:54 +00:00
46895490c7 Compressible solver pEqn.H: Standardised the treatment of density
In rhoPimpleFoam, rhoSimpleFoam, buoyantPimpleFoam and buoyantSimpleFoam the
density prediction step at the start of pEqn.H is now consistent between these
solvers and the other compressible solvers.  If the density is relaxed in the
corrector it is now also relaxed following the predictor which improves
consistency, stability and convergence.
2022-02-18 10:33:40 +00:00
fd50abcc85 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-16 11:20:50 +00:00
9925df5407 multiphaseEulerFoam::fvModels::phaseTurbulenceStabilisation: Phase turbulence stabilisation
Description
    Phase turbulence stabilisation

    In the limit of a phase-fraction->0 the turbulence properties cannot be
    obtained from the phase turbulence model, coupling to the other phase/phases
    is required.  The phaseTurbulenceStabilisation fvModel stabilises the phase
    turbulence properties by adding transfer terms from the corresponding
    properties of the other phases when the phase-fraction is less than the
    specified \c alphaInversion.  This implementation is a generalisation of
    the approach used in the Foam::RASModels::LaheyKEpsilon and
    Foam::RASModels::continuousGasKEpsilon models to handle phase-inversion and
    free-surface flow and can be used with any combination of RAS turbulence
    models.

    To stabilise the solution of the phase turbulence equations \c
    alphaInversion can be set to a small value e.g. 1e-2, but unless the phase
    turbulence model is specifically designed to handle phase-inversion and both
    continuous and dispersed regimes it may be useful to set \c alphaInversion
    to a higher value, corresponding to the phase-fraction at which transision
    from continuous to dispersed happens and effectively use the turbulence
    properties of the other phase when the phase is dispersed.  This is of
    course an approximation to the real system and if accurate handling of both
    the continuous and dispersed phase regimes is required specially developed
    models should be used.

Usage
    Example usage:
    \verbatim
    phaseTurbulenceStabilisation
    {
        type    phaseTurbulenceStabilisation;

        libs    ("libmultiphaseEulerFoamFvModels.so");

        phase   air;

        alphaInversion  0.1;
    }
    \endverbatim
2022-02-16 11:17:24 +00:00
898924aa48 multiphaseEulerFoam::fvModels::interfaceTurbulenceDamping: Free-surface phase turbulence damping function
Implementation of the interFoam VoFTurbulenceDamping for multiphaseEulerFoam.
In this implementation no distinction is made between a dispersed phase and the
interface so it is formally only applicable when interface compression is used
between the phase and the other phases.  Special handling for dispersed phases
may be added in the future.

Description
    Free-surface phase turbulence damping function

    Adds an extra source term to the mixture or phase epsilon or omega
    equation to reduce turbulence generated near a free-surface.  The
    implementation is based on

    Reference:
    \verbatim
        Frederix, E. M. A., Mathur, A., Dovizio, D., Geurts, B. J.,
        & Komen, E. M. J. (2018).
        Reynolds-averaged modeling of turbulence damping
        near a large-scale interface in two-phase flow.
        Nuclear engineering and design, 333, 122-130.
    \endverbatim

    but with an improved formulation for the coefficient \c A appropriate for
    unstructured meshes including those with split-cell refinement patterns.
    However the dimensioned length-scale coefficient \c delta remains and must
    be set appropriatly for the case by performing test runs and comparing with
    known results.  Clearly this model is far from general and more research is
    needed in order that \c delta can be obtained directly from the interface
    flow and turbulence conditions.

Usage
    Example usage:
    \verbatim
    interfaceTurbulenceDamping
    {
        type    interfaceTurbulenceDamping;

        libs    ("libmultiphaseEulerFoamFvModels.so");

        phase   water;

        // Interface turbulence damping length scale
        // This is a required input as described in section 3.3 of the paper
        delta   1e-4;
    }
    \endverbatim
2022-02-16 11:12:26 +00:00
d0c63582a2 multiphaseEulerFoam: sizeDistribution: Corrected spatial averaging of concentration fields
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-02-16 10:22:45 +00:00