Commit Graph

5782 Commits

Author SHA1 Message Date
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
f6e8193553 surfaceFilmModels::waxSolventEvaporation: Corrected dm
rhoInf already included in evapRateCoeff
2022-02-26 10:13:31 +00:00
0e9e15d8dd Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-26 09:50:38 +00:00
e89c5736db surfaceFilmModels::waxSolventEvaporation: Improved stability where film thickness -> 0 2022-02-26 09:49:46 +00:00
bb172b77ef FixedList: Correction to comparison operators 2022-02-25 17:23:21 +00:00
d87a939ea6 snappyHexMesh: the addLayersControls sub-dictionary in snappyHexMeshDict is now optional
If

addLayers       off;

then

addLayersControls
{
.
.
.
}

need not be present in the snappyHexMeshDict.
2022-02-25 09:42:34 +00:00
93be3fc011 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-24 22:41:28 +00:00
99cfbd818f blockMesh: Added warning to set defaultPatch appropriately for snappyHexMesh and 2D cases
The defaultPatch type currently defaults to empty which is appropriate for 1D
and 2D cases but not when creating the initial blockMesh for snappyHexMesh as
the presence of empty patches triggers the inappropriate application of 2D point
constraint corrections following snapping and morphing.  To avoid this hidden
problem a warning is now generated from blockMesh when the defaultPatch is not
explicitly set for cases which generate a default patch, i.e. for which the
boundary is not entirely defined.  e.g.

.
.
.
Creating block mesh topology

--> FOAM FATAL IO ERROR:
The 'defaultPatch' type must be specified for the 'defaultFaces' patch, e.g. for snappyHexMesh

    defaultPatch
    {
        name default; // optional
        type patch;
    }

or for 2D meshes

    defaultPatch
    {
        name frontAndBack; // optional
        type empty;
    }
.
.
.

All the tutorials have been update to include the defaultPatch specification as
appropriate.
2022-02-24 21:35:09 +00:00
518024dbad boundBox: Improved function documentation 2022-02-24 16:52:19 +00:00
32e7b52c81 motionSmootherAlgoCheck::checkMesh: improved minVol test and removed unused tests
motionSmootherAlgoCheck::checkMesh is used by snappyHexMesh to check the mesh
after snapping and morphing.  The minVol test which checks for collapsed cells
is now relative to the cube of the minimum bounding box length so that it is
less dependent on the size of the geometry and less likely to need changing for
very small geometries.

The default value is set in
etc/caseDicts/mesh/generation/meshQualityDict
etc/caseDicts/mesh/generation/meshQualityDict.cfg

//- Minimum cell pyramid volume relative to min bounding box length^3
//  Set to a fraction of the smallest cell volume expected.
//  Set to very negative number (e.g. -1e30) to disable.
minVol 1e-10;

The unused minArea and minTriangleTwist tests have been removed
2022-02-24 16:44:34 +00:00
a34ddef943 snappyHexMesh: Check that input mesh is 3D, i.e. does not contain empty patches
required for mesh relaxation after snapping.
2022-02-24 16:42:39 +00:00
7e71f8ea67 surfaceOrient: Improved message 2022-02-24 16:42:12 +00:00
92eaa31793 processorCyclicPolyPatch: Removed unused constructors 2022-02-24 16:16:25 +00:00
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