Commit Graph

5767 Commits

Author SHA1 Message Date
85e68669f0 multiphaseEulerFoam: Apply constraints to mass fraction equations 2022-02-23 15:28:51 +00:00
91553c31e0 fluxLimitedLangmuirHinshelwoodReactionRate: Stabilise divisions 2022-02-23 11:43:34 +00:00
305ce7b487 fluxLimitedLangmuirHinshelwoodReactionRate: Corrections
The pre-exponential factor provided to this reaction rate is assumed to
relate to surface area, so the units are kmol/m^2/s/(kmol/m^3)^sum{exp}.
A standard volumentic reaction, by comparison, (e.g., Arrhenius) would
have pre-exponential factor units of kmol/m^3/s/(kmol/m^3)^sum{exp}.

The use of the surface-area-volume ratio has been corrected to conform
to this definition.
2022-02-22 15:03:29 +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
69858a80ec fvMatrixSolve: Corrected for clang 20220221 2022-02-18 22:13:08 +00:00
842a6021f7 functionObjects::timeControl: Converted writeInterval and executeInterval to user-time
Resolves bug-report https://bugs.openfoam.org/view.php?id=3807
2022-02-18 16:34:53 +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
457230b4f9 fvMatrixSolve: Use standard solver settings rather than ".*Final" when running steady
For transient solvers which support steady operation using the steadyState ddt
scheme the ".*Final" solver settings are now only used for the final PIMPLE
iteration when running transient; for stead running the standard solver settings
are used for all PIMPLE iterations for compatibility with the equivalent steady
solvers.  This makes it easier to maintain both transient and steady cases for
transient solvers.
2022-02-17 09:34:23 +00:00
fd3cfe4364 tutorials::buoyantCavity::createGraphs: Updated for new sample file format 2022-02-17 09:33:28 +00:00
1950a11974 fvMesh: Construct changers after geometry pointers have been set
This allows changers to access geometry from the fvMesh on construction.
It also prevents a crash that occurs when a changer loads a field in
which there is a cyclic boundary condition.
2022-02-16 15:57:57 +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
fb4e237292 MomentumTransportModels: Added omega() function
Replaces the local definition of the omega function in
functionObjects::turbulenceFields.

Will also be used in interfacial transfers and coupling in multiphase turbulence
modelling where different turbulence models are used in different phases.
2022-02-15 22:03:12 +00:00
76b50e704d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-15 18:34:40 +00:00
adf6f25c0e compressibleMultiphaseInterFoam: Added missing fvModels.correct() 2022-02-15 18:34:16 +00:00
a6cee0edbc dimensionSets: Reformatted so the .C and .H files match 2022-02-15 18:33:52 +00:00
9e7ddc9c9b functionObjects: layerAverage: Corrected documentation 2022-02-15 15:53:38 +00:00
3b037cd6c3 multiphaseEulerFoam::phaseSystem: Added access to deltaN 2022-02-14 12:50:53 +00:00
dbc4b4b20b tutorials::wingMotion_snappyHexMesh::blockMeshDict: replaced symmetryPlane with patch
to ensure createPatch removes the original front and back patches after
extrusion.
2022-02-10 19:54:58 +00:00
5e8439aab1 setRDeltaT: Added support for optional minDeltaT
For some cases, in particular those with very small cells created by snapping in
corners for example, it may be beneficial to convergence rate to limit the
minimum LTS time-step, the new minDeltaT control provides this.
2022-02-10 15:57:46 +00:00
0eca1c697a hexRef8.H: Corrected function documentation formatting 2022-02-10 14:48:56 +00:00
989cf27554 snappyHexMesh, createPatch: Keep all constraint patches even if zero size
This change ensures that special constraint type patches, like internal used for
load-balancing, are not deleted by snappyHexMesh or createPatch.
2022-02-10 14:47:07 +00:00
a82f5a6fe2 GeometricField: Move sub-classes outside of the field
This permits forward declaration of the boundary and internal fields.
References and pointers to boundary fields and sliced internal fields
can now be used in situations where full instantiation of the geometric
field is not possible due to cyclic dependencies.

It has been possible as a result of this change to type the pointer to
the cell volumes field in fvMesh. Previously this was done with a void
pointer and explicit casting.
2022-02-10 09:45:41 +00:00
a2bfa0e911 multiphaseEulerFoam: noSintering: Corrected dimensions 2022-02-09 11:59:28 +00:00
c468a63830 compressibleInterFoam::VoFSurfaceFilm: Added maxDeltaT
to limit the time-step by comparing the film Courant number with the maximum
Courant number obtain from the optional maxCo entry in the system/<film
region>/fvSolution file.  If maxCo is not provided the film model does not limit
the time-step.

See tutorials/multiphase/compressibleInterFoam/laminar/cylinder as an example
demonstrating this functionality.
2022-02-09 11:45:42 +00:00
3ec5bf9257 setDeltaT: Simplified implementation 2022-02-09 11:44:20 +00:00
e478bb9b09 fvModels: Added maxDeltaT() function to provide a time-step limiter
fvModels.maxDeltaT() calls are now included in the setDeltaT.H files to
additionally limit the time-step if any fvModel require it.
2022-02-08 16:27:06 +00:00
e22870f508 compressibleMultiphaseInterFoam: Added contErr to avoid unboundedness in U and T 2022-02-08 16:25:44 +00:00
13b78294ff compressibleMultiphaseInterFoam: Added support for fvModels and fvConstraints 2022-02-08 16:25:10 +00:00
83f0335151 totalPressureFvPatchScalarField: Updated documentation 2022-02-07 23:44:33 +00:00
5a31b3bf44 dynamicPressureFvPatchScalarField: Simplified the handling of the external kinetic energy 2022-02-07 21:03:41 +00:00
c45f189750 dynamicPressureFvPatchScalarField: Updated to use the patch density
when evaluating the external total pressure from the static pressure and
tangential velocity.  This improves numerical stability and solution smoothness
for compressible cases.
2022-02-07 18:48:15 +00:00
a36082e62f totalPressureFvPatchScalarField: Formalised the handling of external tangential flow
The external pressure p0 is now formally the static pressure in the presence of
tangential flow and the corresponding total pressure is calculated from this
static pressure using the tangential velocity obtained from the
pressureInletOutletVelocity boundary condition if available.  In the case that
there is no external tangential flow the external total pressure is equal to the
static pressure p0 as before.

Description
    Inflow, outflow and entrainment pressure boundary condition based on a
    constant total pressure assumption.

    For outflow the patch pressure is set to the external static pressure.

    For inflow the patch pressure is evaluated from the patch velocity and the
    external total pressure obtained from the external static pressure \c p_0
    and external velocity \c U_0 which is looked-up from the the optional \c
    tangentialVelocity entry in the \c pressureInletOutletVelocity velocity
    boundary condition for the patch if that boundary condition is used,
    otherwise \c U_0 is assumed zero and the external total pressure is equal to
    the external static pressure.

    The patch pressure is evaluated from the external conditions using one of
    the following expressions depending on the flow conditions and
    specification of compressibility:

    1. incompressible subsonic:
        \f[
            p_p = p_0 + 0.5 |U_0|^2 - 0.5 |U|^2
        \f]
        where
        \vartable
            p_p     | pressure at patch [m^2/s^2]
            p_0     | external static pressure [m^2/s^2]
            U       | velocity [m/s]
            U_0     | external velocity [m/s]
        \endvartable

    2. compressible subsonic:
        \f[
            p_p = p_0 + 0.5 \rho |U_0|^2 - 0.5 \rho |U|^2
        \f]
        where
        \vartable
            p_p     | pressure at patch [Pa]
            p_0     | external static pressure [Pa]
            \rho    | density [kg/m^3]
            U       | velocity [m/s]
            U_0     | external velocity [m/s]
        \endvartable

    3. compressible transonic (\f$\gamma = 1\f$):
        \f[
            p_p = \frac{p_0 + 0.5 \rho |U_0|^2}{1 + 0.5 \psi |U|^2}
        \f]
        where
        \vartable
            p_p     | pressure at patch [Pa]
            p_0     | external static pressure [Pa]
            \psi    | compressibility [m^2/s^2]
            \rho    | density [kg/m^3]
            U       | velocity [m/s]
            U_0     | external velocity [m/s]
        \endvartable

    4. compressible supersonic (\f$\gamma > 1\f$):
        \f[
            p_p = \frac{p_0 + 0.5 \rho |U_0|^2}
                       {(1 + 0.5 \psi G |U|^2)^{\frac{1}{G}}}
        \f]
        where
        \vartable
            p_p     | pressure at patch [Pa]
            p_0     | external static pressure [Pa]
            \psi    | compressibility [m^2/s^2]
            \rho    | density [kg/m^3]
            G       | coefficient given by \f$\frac{\gamma}{1-\gamma}\f$ []
            \gamma  | ratio of specific heats (Cp/Cv) []
            U       | velocity [m/s]
            U_0     | external velocity [m/s]
        \endvartable

    The modes of operation are set by the dimensions of the pressure field
    to which this boundary condition is applied, the \c psi entry and the value
    of \c gamma:
    \table
        Mode                    | dimensions | psi   | gamma
        incompressible subsonic | p/rho      |       |
        compressible subsonic   | p          | none  |
        compressible transonic  | p          | psi   | 1
        compressible supersonic | p          | psi   | > 1
    \endtable

Usage
    \table
        Property     | Description                | Required | Default value
        U            | Velocity field name        | no       | U
        phi          | Flux field name            | no       | phi
        rho          | Density field name         | no       | rho
        psi          | Compressibility field name | no       | none
        gamma        | (Cp/Cv)                    | no       | 1
        p0           | External pressure          | yes      |
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            totalPressure;
        p0              uniform 1e5;
    }
    \endverbatim
2022-02-07 12:59:25 +00:00
fec6837f8f tutorials/multiphase: totalPressure -> prghTotalPressure
For most multiphase flows it is more appropriate to evaluate the total pressure
from the static pressure obtained from p_rgh rather than from p_rgh directly.
2022-02-07 12:32:20 +00:00
f85f45fe4b tutorials/multiphase/interFoam/laminar/wave: Added tangentialVelocity to top boundary
to match the air flow in the domain.
2022-02-06 19:21:33 +00:00
5df9ec5b1e tutorials/heatTransfer/buoyantSimpleFoam: Updated solver settings to improve convergence
Also changed from internal energy to enthalpy which is preferable for
steady-state simulations.
2022-02-06 11:44:07 +00:00
3f2f3c8a43 totalPressureFvPatchScalarField: Improved handling of the pressureInletOutletVelocity tangential velocity 2022-02-04 22:09:13 +00:00
a7030ee97e CompactListList: Removed unnecessary templating and create unallocated base 2022-02-04 15:17:27 +00:00
05bb716bf8 totalPressureFvPatchScalarField: Updated handling of tangentialVelocity 2022-02-04 15:07:08 +00:00
66600b5497 chtMultiRegionFoam: Corrected multiple fluid region support for nEcorr
Resolves bug-report https://bugs.openfoam.org/view.php?id=3799
2022-02-04 15:05:53 +00:00
c8cecdfff4 fvPatchFields: Replaced 1 - pos0(phi) with the simpler neg(phi) 2022-02-04 14:14:34 +00:00
edce47e02c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-03 21:08:56 +00:00
68cb2aef55 solidBodyMotionFunctions::sixDoFMotion: Corrected reading of translationRotation entry
following mesh change.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3798
2022-02-03 21:07:40 +00:00
2fc40b7895 multiphaseEulerFoam: blending: Skip coefficient evaluation for constant case 2022-02-03 15:47:37 +00:00
f45ad46f37 sampling: Corrected the order of cell and face points in a line-cell-face sampled set 2022-02-03 14:44:58 +00:00
991489eeb8 fvModels::actuationDiskSource: Corrected handling of source orientation
The flow rate to the disk is now (dHat & U_o) and the momentum source
orientation dHat where dHat is the unit disk direction (orientation).

    Constant values for momentum source for actuation disk
    \f[
        T = 2 \rho A (\hat{d}\dot U_{o})^2 a (1-a) \hat{d}
    \f]

    where:
    \vartable
        A    | Disk area
        dHat | Unit disk direction
        U_o  | Upstream velocity
        a    | 1 - Cp/Ct
        Cp   | Power coefficient
        Ct   | Thrust coefficient
    \endvartable
2022-02-03 11:03:30 +00:00
e4277bedf5 pressureInletOutletVelocityFvPatchVectorField: Updated documentation 2022-02-02 21:37:17 +00:00