Commit Graph

4635 Commits

Author SHA1 Message Date
3cc2ded6d0 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-03 15:45:18 +01:00
2f30c1364b heatTransfer solvers: Added optional pressure reference
Added optional pressure reference pRef to p_rgh in buoyantPimpleFoam,
buoyantSimpleFoam and chtMultiRegionFoam which handles cases in which the
pressure variation is small compared to the pressure level more accurately.

The pRef value is provided in the optional constant/pRef file.

All tutorials and templates have been updated to use pRef as appropriate.
2020-07-03 15:41:58 +01:00
3f5df8fb78 reacting*EulerFoam/.../kineticTheoryModel: Run without drag
This change protects the lookup of the drag model so that if it is not
found then the drag terms in the Theta equation are set to zero. This is
not likely to be correct usage in physical cases, but is useful for
doing uncoupled simulations for the purpose of model verification.
2020-07-03 09:04:32 +01:00
1611e0dbfb PLIC,MPLIC: New piecewise-linear interface compression schemes
A new family of interface compression interpolation schemes based on
piecewise-linear interface calculation (PLIC). PLIC represents an interface by
surface-cuts which split each cell to match the volume fraction of the phase in
that cell. The surface-cuts are oriented according to the point field of the
local phase fraction. The phase fraction on each cell face — the interpolated
value — is then calculated from the amount submerged below the surface-cut.

The basic PLIC method generates a single cut so cannot handle cells in which
there are multiple interfaces or where the interface is not fully resolved. In
those cells, the interpolation reverts to an alternative scheme, typically
standard interface compression. PLIC, with a fallback to interface compression,
produces robust solutions for real engineering cases. It can run with large time
steps so can solve problems like hydrodynamics of a planing hull, with rigid
body motion of the hull (above). The user selects PLIC by the following setting
in fvSchemes:

    div(phi,alpha)      Gauss PLIC interfaceCompression vanLeer 1;

The multicut PLIC (MPLIC) scheme extends PLIC to handle multiple
surface-cuts. Where a single cut is insufficient, MPLIC performs a topological
face-edge-face walk to produce multiple splits of a cell. If that is still
insufficient, MPLIC decomposes the cell into tetrahedrons on which the cuts are
applied. The extra cutting carries an additional computational cost but requires
no fallback. The user selects MPLIC by the following setting in the fvSchemes
file:

    div(phi,alpha)      Gauss MPLIC;

Variants of the PLIC and MPLIC schemes are also available which use velocities
at the face points to calculate the face flux. These PLICU and MPLICU schemes
are likely to be more accurate in regions of interface under high shear.

More details can be found here:
https://cfd.direct/openfoam/free-software/multiphase-interface-capturing

Jakub Knir
CFD Direct Ltd.
2020-07-02 13:24:05 +01:00
fa79bab863 interfaceCompression: New run-time selectable VoF interface compression scheme
A new run-time selectable interface compression scheme framework has been added
to the two-phase VoF solvers to provide greater flexibility, extensibility and
more consistent user-interface.  The previously built-in interface compression
is now in the standard run-time selectable surfaceInterpolationScheme
interfaceCompression:

Class
    Foam::interfaceCompression

Description
    Interface compression corrected scheme, based on counter-gradient
    transport, to maintain sharp interfaces during VoF simulations.

    The interface compression is applied to the face interpolated field from a
    suitable 2nd-order shape-preserving NVD or TVD scheme, e.g.  vanLeer or
    vanAlbada.  A coefficient is supplied to control the degree of compression,
    with a value of 1 suitable for most VoF cases to ensure interface integrity.
    A value larger than 1 can be used but the additional compression can bias
    the interface to follow the mesh more closely while a value smaller than 1
    can lead to interface smearing.

    Example:
    \verbatim
    divSchemes
    {
        .
        .
        div(phi,alpha)     Gauss interfaceCompression vanLeer 1;
        .
        .
    }
    \endverbatim

The separate scheme for the interface compression term "div(phirb,alpha)" is no
longer required or used nor is the compression coefficient cAlpha in fvSolution
as this is now part of the "div(phi,alpha)" scheme specification as shown above.

Backward-compatibility is provided by checking the specified "div(phi,alpha)"
scheme against the known interface compression schemes and if it is not one of
those the new interfaceCompression scheme is used with the cAlpha value
specified in fvSolution.

More details can be found here:
https://cfd.direct/openfoam/free-software/multiphase-interface-capturing

Henry G. Weller
CFD Direct Ltd.
2020-07-02 10:13:15 +01:00
70cfa1a47c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-02 09:45:06 +01:00
5ef8edfc0c tutorials/heatTransfer/chtMultiRegionFoam/reverseBurner: Changed to perfectGas
Only perfectGas and real-gas equations of state are consistent with standard
Janaf thermo data based on Cp.  Using other equations of state is possible but
the Janaf Cp data would have to be modified for consistency.
2020-07-02 09:42:07 +01:00
da7627910f Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2020-07-01 14:43:04 +01:00
197b148010 flowWithOpenBoundary: tutorial case to explore p and U boundary conditions at an open boundary 2020-07-01 14:42:33 +01:00
e8a2c4570b surfaceFeatures: Prevent floating point error when edge is parallel to plane 2020-07-01 14:33:41 +01:00
559e6f9ce5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-07-01 13:27:21 +01:00
6a76542985 fvOptions::fixedTemperatureConstraint: Added phase support 2020-07-01 13:26:48 +01:00
08603410b6 basicThermo, basicSpecieMixture: Added sensible enthalpy methods 2020-06-30 08:34:15 +01:00
4d0661ccd0 alphatWallBoilingWallFunction: Added missing mapping and cloning functionality 2020-06-30 08:34:15 +01:00
393d8e17fd potentialFoam: Ensure that the flux field phi is relative in MRF regions 2020-06-29 16:53:09 +01:00
6f4b667181 equationOfState: Changed "departure" to "contribution"
The term "departure function" relates to difference between real and ideal gas
thermodynamic properties but the implementation is more general than that and
handles all contributions from the equations of state to the thermodynamic
properties.  To reflect this the term "departure" has been replaced with
"contribution".
2020-06-28 18:05:45 +01:00
658b0c5195 reactingMultiphaseEulerFoam: Make phase fluxes relative in MRF regions 2020-06-25 19:28:19 +01:00
20c66b0c2b reactingEulerFoam::MomentumTransferPhaseSystem::AFfs: Ensure the face force field list exists for single phase 2020-06-25 10:29:03 +01:00
23fb1ccb6d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-06-24 17:09:15 +01:00
993bbc35de Standardised private member function section header 2020-06-24 17:08:40 +01:00
1fec2bae30 reactingEulerFoam::MomentumTransferPhaseSystem: Removed unused member function declaration 2020-06-24 17:06:01 +01:00
72b145356b config.csh/settings: corrected typo 2020-06-24 16:06:33 +01:00
ed9e420ea1 wmake: added rules for linuxArm64Gcc to compile on aarch64 (Arm-based) processors.
No code change was required to compile OpenFOAM on Arm using the Gcc compiler.
2020-06-24 16:01:49 +01:00
6268e426d7 wmake/rules/General/moc: Updated
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 15:20:57 +01:00
87c7a76e3f reactingEulerFoam::shapeModel/shapeModel.H: Updated documentation
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 14:51:17 +01:00
b2b9f3a56b reactingEulerFoam::shapeModels/spherical: Corrected source file link
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-06-24 14:48:45 +01:00
f544de4f81 setRDeltaT: Corrected typo 2020-06-24 14:40:29 +01:00
c6089ae3a6 solutionControl: Check residuals after function object execution
This change means that fields that are solved for by function objects
(e.g., a scalar transport field) can now be included in time/iteration
loop convergence tests.

Resolves bug report https://bugs.openfoam.org/view.php?id=3510
2020-06-23 10:13:34 +01:00
3b2230d6c7 ILList: Added explicit call to base constructor
Prevents a compiler warning when using the "transfer" method
20200614
2020-06-12 16:29:53 +01:00
fa9cccf11d equationOfState: Separated entropy contributions into Sp and Sv
The entropy contribution from the equation of state corrects the integral of the
heat capacity divided by temperature for changes in pressure in the case of Cp
named Sp or changes in volume in the case of Cv, named Sv.  This for enthalpy
based thermodynamics Sp is needed and for internal energy Sv is needed.
2020-06-11 00:09:34 +01:00
4ad1559fff Updated thermal baffle tutorials to use internal energy 2020-06-11 00:08:29 +01:00
c109bec4cc chtMultiRegionFoam: Changed solid energy from enthalpy to internal energy
The solid is currently assumed incompressible (the solid pressure is not
updated) and in general would be near incompressible so internal energy is a
more appropriate energy choice than enthalpy which would require a pressure work
term currently not implemented.  Additionally due to the way in which the
conduction is handled in terms of the gradient of energy the accuracy of the
current enthalpy implementation is sensitive to the pressure distribution as
this introduces an enthalpy gradient from the p/rho term which would need to be
corrected; this issue is avoided by solving for internal energy instead.

This improvement requires the scheme and solver settings for the solids in
chtMultiRegionFoam cases to be changed from "h" to "e" and the thermo-physical
properties in <solid>/thermophysicalProperties to be set to the corresponding
internal energy forms, e.g.:

    thermo          eConst;
    .
    .
    .
    energy          sensibleInternalEnergy;

All tutorials have be updated to reflect this and provide guidance when updating
cases.
2020-06-10 15:38:54 +01:00
f2ad07bd12 face: Created static versions of area and centre methods
This lets you run the calculations with any list of points defining a
face, without having to allocate an identity face.
2020-06-09 11:58:08 +01:00
7dd592ff40 boost: Corrected include path 2020-06-09 09:27:56 +01:00
517270e215 foamDictionary: Removed documentation for the unused -case option
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
2020-06-04 10:19:06 +01:00
44cf9977c3 Use the new primitive mesh magFaceAreas where appropriate 2020-06-03 17:11:56 +01:00
6ef064984d cyclicACMI: Updated handling of magFaceAreas
Resolves bug-report https://bugs.openfoam.org/view.php?id=3502
2020-06-03 17:11:01 +01:00
4250d7ce42 Added "using" statements to avoid warning messages from clang 2020-06-02 21:37:36 +01:00
80f15bd984 thermophysicalModels: Refactored mixtures
to separate those based on pure species from the simplified combustion mixtures
based on composite reactant and product pseudo species.
2020-06-02 17:24:44 +01:00
1bd80e958b reactionThermo/mixtures: renamed getLocalThermo -> specieThermo
This function returns the thermo package for a particular specie and the new
name is far more logical.
2020-06-01 16:09:43 +01:00
6f2a75b2f7 tutorials/compressible/rhoPimpleFoam/RAS/squareBendLiq: Set the rho solver to diagonal 20200531 2020-05-26 09:54:17 +01:00
cf36a5de3c solidDisplacementFoam: Correct handling of the re-reading of the controls
when the fvSolution file is changed during the run

Resolves bug-report https://bugs.openfoam.org/view.php?id=3498
2020-05-25 11:08:59 +01:00
4d73bfad2a Doxygen::Doxyfile: Replaced the index bar with the more convenient tree-view 2020-05-22 18:42:59 +01:00
54f0ddcb7d ThermophysicalTransportModels/.../nonUnityLewisEddyDiffusivity: Corrected header documentation 2020-05-22 15:36:31 +01:00
9b23ae3b1b lagrangian/spray/submodels/BreakupModel/SHF: Prevent divide-by-zero
Resolves bug report https://bugs.openfoam.org/view.php?id=3495
2020-05-22 09:06:22 +01:00
8604c1eb5f lagrangian/distributionModels/RosinRammler: Corrected min/max handling
The clipping of the RosinRammler distribution now behaves in the same
way as if the un-clipped distribution were sampled and results out of
bounds were discarded. This has made it consistent with other
distribution models, such as massRosinRammler.

Resolves bug report https://bugs.openfoam.org/view.php?id=3492
2020-05-22 08:38:00 +01:00
cda505c718 solidDisplacementFoam: Added Function1 support for the pressure specification 2020-05-20 19:14:52 +01:00
1217724ed9 tutorials/incompressible/simpleFoam/pitzDaily/system/blockMeshDict: copy of $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
Added a local copy of the $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
corresponding to the OpenFOAM test instructions.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3497
2020-05-18 15:40:25 +01:00
73503b1a38 functionObjects::age: Added fvOption support 2020-05-18 15:09:57 +01:00
19d4f192f9 primitiveMesh: Added magFaceAreas
fvMesh: magSf() now returns the sliced primitiveMesh::magFaceAreas
2020-05-14 17:06:53 +01:00