Commit Graph

6484 Commits

Author SHA1 Message Date
864dba76dc tutorials/compressible/rhoCentralFoam/shockTube: simplified schemes 2023-01-16 16:31:22 +00:00
9b76ddb257 ParaView: Updated default version to 5.10.1 2023-01-16 16:29:48 +00:00
3055b16c90 rhoCentralFoam: Further reorganisation 2023-01-16 16:29:06 +00:00
ec7afd8386 alphatPhaseChangeWallFunctions: Clean up
The fixedDmdt phase change boundary condition has been removed as this
is not a physical model and was only ever needed for testing.

The phase change wall function interface has been simplified and made a
mix-in, rather than a derivation from a fixed value patch field. This
reduces forwarding and mapping code and permits wall functions to derive
from patch fields other than fixed value.

Minor style and consisteny improvements have been made to the wall
boiling wall function.
2023-01-13 14:25:56 +00:00
f6342ac8dd alphatWallBoilingWallFunction: Improvements for Low-Re operation
This change introduces a more physical limiter for the logarithmic
liquid temperature extrapolation employed in the model. It also adds an
operation to turn off extrapolation alltogether for cases with very low
y+ in which the extrapolation behaviour becomes unreliable.

Patch contributed by Juho Peltola, VTT.
2023-01-13 10:40:13 +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
35256e5280 rhoCentralFoam: Added 'const' to constant field declarations to improve readability 2023-01-10 18:48:41 +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
7f1fb2fb11 PtrListDictionary: Added conversion to UPtrListDictionary with dynamic up-casting of pointers 2023-01-09 19:58:06 +00:00
9666594d6a UPtrList: Added missing non-const operator()() to access the pointers 2023-01-09 19:56:56 +00:00
ead885c508 incompressibleTwoPhaseMixture -> incompressibleTwoPhaseVoFMixture, compressibleTwoPhaseMixture -> compressibleTwoPhaseVoFMixture
to distinguish between mixtures specifically for VoF simulations
2023-01-09 19:54:41 +00:00
a329c2e8e5 OpenFOAM: Added ULPtrList and UPtrListDictionary container classes 2023-01-08 16:26:32 +00:00
167c207e49 incompressiblePhase, compressiblePhase: Refactored using the new phase base-class
used in the incompressibleMultiphaseMixture and compressibleMultiphaseMixture
respectively which are used in multiphaseInterFoam and
compressibleMultiphaseInterFoam respectively.

Also the PtrDictionary of phases has been replaced by PtrListDictionary of
phases and iterations over the linked-list replaced by forAll loops which is
easier to use and consistent with the multiphaseEuler solver module.
2023-01-08 16:22:06 +00:00
9e51bb48ce foamyHexMesh, foamyQuadMesh: Removed pending funding for further development and maintenance 2023-01-06 22:23:59 +00:00
f16e60c517 multiphaseInterFoam::multiphaseMixture::phase: simplified interface 2023-01-06 18:46:41 +00:00
06893a0bc6 VoFSolver: New base-class for twoPhaseVoFSolver and multiphaseVoFSolver
Much of the VoF functionality, particularly relating to momentum solution, is
independent of the number of phases and it is useful to hold this generic VoF
data and functionality in an abstract base-class and derive twoPhaseVoFSolver
and multiphaseVoFSolver from it, adding two-phase and multiphase functionality
respectively.
2023-01-06 16:51:10 +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
fdebabaeca Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-01-05 17:04:22 +00:00
6d1758167d incompressibleTwoPhaseMixture, compressibleTwoPhaseMixture: Moved into incompressibleVoF and compressibleVoF
simplifying the src/twoPhaseModels libraries
2023-01-05 17:02:44 +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
56e87c469f solvers::solid: Updated documentation 2023-01-04 13:21:31 +00:00
a61759e1a0 Removed temporary file 2023-01-04 12:14:08 +00:00
a8289ff84a applications/solvers/modules/Allwmake: Added solidDisplacement 2023-01-03 21:15:06 +00:00
a63600620a applications/solvers/modules/Allwmake: Added solidDisplacement 2023-01-03 21:13:46 +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
20c7c7c21a Resolve warning messages generated by Clang-15 2023-01-03 11:26:15 +00:00
b082f06ac0 solidDisplacementFoam: Merged the solidEquilibriumDisplacementFoam functionality
The accelerationFactor option in solidEquilibriumDisplacementFoam is now
available in solidDisplacementFoam when running steady-state, providing a >5x
speed-up to convergence of the updated beamEndLoad case.  This makes
solidEquilibriumDisplacementFoam redundant and it has been removed.
2023-01-03 09:57:28 +00:00
c64996b207 solidEquilibriumDisplacementFoam: Combined the tractionDisplacement and tractionDisplacementCorrection BCs
so that the same BC can be used for both solidDisplacementFoam and
solidEquilibriumDisplacementFoam.  Also updated the beamEndLoad tutorial and
added a solidDisplacementFoam version to test the combined BC.
2023-01-02 22:30:25 +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
623ebf7013 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-12-25 11:43:34 +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
f2543d7ecb Cloud: Protect topo change against null topology changes 2022-12-23 08:38:47 +00:00
709b18b172 semiImplicitSource, ReactingCloud: Corrected signs of SuSp terms 2022-12-23 08:38:47 +00:00
1a24f1e30c multiphaseEuler::predictThermophysicalTransport: Moved into the energyPredictor() loop
to support the update the alphat boundary condition within the energy corrector
loop which may be needed for wall-boiling simulations.
2022-12-22 23:20:14 +00:00
45b00932f9 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-12-22 23:12:46 +00:00
c1ab4fc165 multiphaseEuler::ThermalPhaseChangePhaseSystem: Corrected diagnostic messages when running in parallel
Patch contributed by Timo Niemi, VTT.
2022-12-22 23:11:41 +00:00
c0d56c905a fieldAverage: Corrected initialisation of iteration and time totals 2022-12-21 15:29:05 +00:00
063ab567d4 solvers::solid: Changed the writing of the diffusion number for consistency with Courant number 2022-12-21 12:31:50 +00:00
1366eb20f3 multiphaseEuler::MomentumTransferPhaseSystem: Removed optional (1 - phase) prefactor from alphaDByAf
Tests have shown that the alphaDByAf phase-pressure diffusion coefficient
provides better stability without the optional (1 - phase) prefactor without
introducing excessive smearing of the solution.
2022-12-21 12:12:31 +00:00
386893f593 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-12-21 11:50:10 +00:00
6e19328e60 fvConstraints::limitPressure: Corrected comments 2022-12-21 11:49:31 +00:00
f5fdac2969 dynamicMeshDict: Corrected read in multi-region cases 2022-12-21 11:00:09 +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
d9ba28b427 momentumTransportModels: Added a new predict() function in addition to the existing correct() function
Some momentumTransportModels like the laminar Stokes and generalisedNewtonian
models do no solve transport equations and the transport coefficients they
provide can be predicted at the beginning of the time-step rather than corrected
at the end, after conservative fluxes are available.  A particular advantage of
this approach is that complex data cached in the momentumTransportModels
can now be deleted following mesh topology changes and recreated in the
predict() call which is more efficient than attempting to register and map the
data.

Currently the predict() function is only used for the Stokes and
generalisedNewtonian models but it will be extended in the future to cover many
LES models which also do not require the solution of transport equations.

All solvers and solver modules have been update to call the
momentumTransportModel::predict() function at the beginning of the time-step,
controlled by the new PIMPLE transportPredictionFirst control as appropriate.
2022-12-16 10:12:22 +00:00
96974f8914 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-12-16 10:11:46 +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
99f120c45e sampling/probes: Support null or partial topology changes 2022-12-16 08:39:52 +00:00
c10e352075 ThermophysicalTransportModels::MaxwellStefan: Added support for mesh topology change, mapping and redistribution 2022-12-15 15:29:29 +00:00
4e8f8655ce Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-12-15 15:16:22 +00:00