Commit Graph

5332 Commits

Author SHA1 Message Date
3c4261be37 viewFactorsGen: Write VTK directly without a system call 2021-06-24 10:08:40 +01:00
02b97a714a polygonTriangulate: Added robust polygon triangulation algorithm
The new algorithm provides robust quality triangulations of non-convex
polygons. It also produces a best attempt for polygons that are badly
warped or self intersecting by minimising the area in which the local
normal is in the opposite direction to the overal polygon normal. It is
memory efficient when applied to multiple polygons as it maintains and
reuses its workspace.

This algorithm replaces implementations in the face and
faceTriangulation classes, which have been removed.

Faces can no longer be decomposed into mixtures of tris and
quadrilaterals. Polygonal faces with more than 4 sides are now
decomposed into triangles in foamToVTK and in paraFoam.
2021-06-24 10:08:38 +01:00
01494463d0 FoamFile: 'version' entry is now optional, defaulting to 2.0
The FOAM file format has not changed from version 2.0 in many years and so there
is no longer a need for the 'version' entry in the FoamFile header to be
required and to reduce unnecessary clutter it is now optional, defaulting to the
current file format 2.0.
2021-06-23 20:50:10 +01:00
b28947604c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-06-23 10:18:56 +01:00
ebe0b6f0cb surfaceFilmModels::kinematicSingleLayer: Added maximum Courant number to info
e.g. in the tutorials/combustion/buoyantReactingFoam/Lagrangian/cylinder log:
.
.
.
Surface film: thermoSingleLayer
    added mass         = 0.043
    current mass       = 0.04300000007
    min/max(mag(U))    = 4.103129368e-18, 0.3516130906
    max Courant number = 0.1622700892
    min/max(delta)     = 0, 0.0009353648867
    coverage           = 0.01952279011
    ejected mass      = 0
      - patch: region0_to_wallFilmRegion_wallFilmFaces: 0
    transferred mass      = 0
      - patch: region0_to_wallFilmRegion_wallFilmFaces: 0
    min/mean/max(T)    = 299.9999757, 300, 300.0000115
    mass phase change  = 0
    vapourisation rate = 0
.
.
.
2021-06-23 10:14:32 +01:00
eaf88b252f templates: remove 'fixed' patch from nonRotatingPatches 2021-06-23 09:40:49 +01:00
4af28562c5 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D: Changed to enthalpy
Solving for enthalpy provides better convergence and stability than internal
energy.  Also correctPhi is now off pending the addition of compressibility
effects to the pcorr equation.
2021-06-22 22:04:05 +01:00
e566172eda MapFvSurfaceField: Generalised the mapping of surfaceField
to differentiate between flux field which require face-flipping and
non-extensive surface fields which do not.  Currently flux fields are
distinguished by being surfaceScalarField with dimensions of either volumetric
or mass flux.

This change corrects the handling of the surfaceVectorField Uf which was
previously mapped incorrectly on faces requiring the flipping of the flux
orientation.
2021-06-22 19:31:53 +01:00
bf0889e15f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-06-22 17:41:09 +01:00
b9751e8661 porousBafflePressureFvPatchField: Updated using dimMassFlux 2021-06-22 17:35:09 +01:00
7801f04dff dimensionSets: Added dimFlux (volumetric flux) and dimMassFlux (mass flux) 2021-06-22 17:32:31 +01:00
3168d93a38 dimensionSets: Added dimFlux (volumetric flux) and dimMassFlux (mass flux) 2021-06-22 16:56:40 +01:00
fac831df42 foamCleanCase: new simplified script to clean a case directory,
resetting it to its initial state.

Also updated documentation of foamCleanTutorials.
2021-06-22 11:52:54 +01:00
ace45a5f35 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2021-06-22 10:39:19 +01:00
a172463bd0 tutorials: added multiregion support to CleanFunctions and
removed redundant foamCleanPolyMesh script
2021-06-22 10:39:14 +01:00
3baba56734 dynamicMesh: Renamed boundaryMesh to repatchMesh and removed unused code 2021-06-22 09:48:36 +01:00
9283955b99 tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer: Removed unnecessary files 2021-06-21 22:39:45 +01:00
7a176e360c codedFunction1Template.H: Added fieldTypes.H 2021-06-21 22:37:47 +01:00
b2b7240733 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2021-06-21 16:45:10 +01:00
5f64d07ca8 tutorials: remove redirects to /dev/null 2021-06-21 16:44:38 +01:00
a913639957 Field.C: Removed unnecessary #includes 2021-06-21 16:21:04 +01:00
0ef0247628 snappyHexMesh: Renamed shellSurfaces to the more logical refinementRegions 2021-06-21 14:22:43 +01:00
ca35389788 snappyHexMesh: 'refinementRegions', 'refinementSurfaces' and 'features' are now optional
entries in 'castellatedMeshControls' in snappyHexMeshDict to remove unnecessary clutter.
2021-06-21 13:30:53 +01:00
887f67ea84 snappyHexMesh: Changed confusing 'refinementSurfaces' option 'cellZoneInside' to 'mode'
for example

    cellZoneInside  inside;

becomes

    mode            inside;

in snappyHexMeshDict

Support for the previous name 'cellZoneInside' is maintained for backward
compatibility.
2021-06-21 13:26:00 +01:00
c8307122c6 surfaceFieldValue: Corrected input of the orientWeightField
Resolves bug-report https://bugs.openfoam.org/view.php?id=3689
2021-06-19 12:12:06 +01:00
af5ec2230c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-06-18 16:37:54 +01:00
7e97a9b234 internalFvPatchField, internalFvsPatchField: Added mapping for redistribution 2021-06-18 16:37:16 +01:00
f4a65fbada sampling: Renamed and moved classes from fileFormats
The writer class has been renamed setWriter in order to clarify its
usage. The coordSet and setWriter classes have been moved into the
sampling library, as this fits their usage.
2021-06-18 13:57:11 +01:00
77f3c014bc searchableSurfaces: Removed dependence on the set writers 2021-06-18 13:57:09 +01:00
0ba5f5b8a9 fileFormats: Added generic write functions for VTK poly data
The new write functions are currently being utilised by setSet and the
vtkSurfaceWriter, but it should eventually be possible for more examples
of VTK poly data writing to be converted to use these functions.
2021-06-18 13:54:56 +01:00
464ad80e35 fvPatchFields: Reordered constructor definitions to match declarations 2021-06-17 10:19:05 +01:00
30d25869f3 conformalVoronoiMesh: Updated for changes to fvSubsetMesh 2021-06-16 19:13:09 +01:00
5204403f3e fvMeshSubset: Added new constraint patch type 'internal' into which exposed internal faces are added
This new constraint type is preferable to the 'empty' type used previously as it
support patch field values for post-processing and other purposes.

The internalFvPatchField operates as a 'zeroGradient' type so that the adjacent
cell values are displayed on the faces exposed by the sub-setting.

The internalFvsPatchField operates as a 'calculated' type so that the internal
face values are displayed on the faces exposed by the sub-setting.

The immediate benefit of this change can be seen when using 'subsetMesh' without
the '-noFields' option to create and write a sub-set of an 'fvMesh' with field
values, now the face values of the 'exposed' internal faces can be visualised.
2021-06-16 19:05:58 +01:00
25abd43a25 ListOps: Added count function to return the number of occurrences of a value in a list 2021-06-16 15:15:48 +01:00
fa766e8f3d fvPatchFields: Reordered constructor definitions to match declarations 2021-06-16 12:10:39 +01:00
4b01e40a93 Dictionaries: use 'e' rather than 'E' in exponential floating point numbers 2021-06-15 18:25:51 +01:00
ad1f53a06d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-06-15 16:11:55 +01:00
926ba22b74 refineMesh: Rationalised and standardised the coordinate axes naming to e1, e2 and e3
the previous naming tan1, tan2, normal was non-intuitive and very confusing.

It was not practical to maintain backward compatibility but all tutorials and
example refineMeshDict files have been updated to provide examples of the
change.
2021-06-15 16:08:55 +01:00
301eac2089 primitives: Added 2D barycentric tensor 2021-06-15 13:50:58 +01:00
be9fb841a1 snappyHexMesh: Simplified and rationalised the region refinement level specification
The inside or outside region refinement level is now specified using the simple
"level <level>" entry in refinementRegions e.g.

    refinementRegions
    {
        refinementBox
        {
            mode    inside;
            level   5;
        }
    }

rather than

    refinementRegions
    {
        refinementBox
        {
            mode    inside;
            levels  ((1E15 5));
        }
    }

where the spurious "1E15" number is not used and the '((...))' is unnecessary clutter.
2021-06-15 13:20:44 +01:00
7b7fa5a9af compressibleMultiphaseInterFoam: Added test for contact angle in both phases in interface pair
to ensure that the contact angle specification is used irrespective of which
phase it is specified in.  An error is reported if both phases of the interface
pair have a contact angle specification as the specifications might be
inconsistent.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3688
2021-06-15 10:14:21 +01:00
de76426d86 multiphaseInterFoam: Added test for contact angle in both phases in interface pair
to ensure that the contact angle specification is used irrespective of which
phase it is specified in.  An error is reported if both phases of the interface
pair have a contact angle specification as the specifications might be
inconsistent.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3688
2021-06-14 10:42:16 +01:00
28745eca4b multiphaseEulerFoam: Updated tutorials for improved internal energy pressure work term 20210612 2021-06-11 23:23:17 +01:00
6c0087d005 multiphaseEulerFoam: Updated the internal energy pressure work term
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    "div\(alphaPhi.*,p\)" -> "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)"

and all the tutorials have been updated accordingly.
2021-06-11 19:36:33 +01:00
62c782367d multiphaseEulerFoam: Formatting improvements to population balance test cases
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-11 14:17:39 +01:00
8106c1bef4 unityLewisFourier,unityLewisEddyDiffusivity: Changed the specie diffusivity to be based on the enthalpy diffusivity
such that the Lewis number is unity with respect to enthalpy even when solving
for internal energy providing more consistent behaviour between the energy
choices.
2021-06-11 12:06:01 +01:00
0ea1b2cb00 ThermophysicalTransportModels: Changed the thermal differential diffusion term to use sensible enthalpy
Differential diffusion of species requires a corresponding term in the enthalpy
equation and the same term in the internal energy equation, not the analogous
term for internal energy as previously implemented.  With this correction the
internal energy equation is now consistent with the enthalpy equation.
2021-06-11 11:57:54 +01:00
90831fbb55 Compressible and reacting flow solvers: Changed the internal energy pressure work for consistency with enthalpy
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    div(phiv,p) -> div(phi,(p|rho))

and all the tutorials have been updated accordingly.
2021-06-11 11:34:38 +01:00
881bbfa591 chtMultiRegionFoam: Added optional hydrostatic initialisation of pressure
Class
    Foam::hydrostaticInitialisation

Description
    Optional hydrostatic initialisation of p_rgh and p by solving for and
    caching the hydrostatic ph_rgh and updating the density such that

        p = ph_rgh + rho*gh + pRef

    This initialisation process is applied at the beginning of the run (not on
    restart) if the \c hydrostaticInitialisation switch is set true in
    fvSolution/PIMPLE or fvSolution/SIMPLE.  The calculation is iterative if the
    density is a function of pressure and an optional number of iterations \c
    nHydrostaticCorrectors may be specified which defaults to 5.
2021-06-11 11:33:31 +01:00
012df9d699 chtMultiRegionFoam: Added optional hydrostatic initialisation of pressure
Class
    Foam::hydrostaticInitialisation

Description
    Optional hydrostatic initialisation of p_rgh and p by solving for and
    caching the hydrostatic ph_rgh and updating the density such that

        p = ph_rgh + rho*gh + pRef

    This initialisation process is applied at the beginning of the run (not on
    restart) if the \c hydrostaticInitialisation switch is set true in
    fvSolution/PIMPLE or fvSolution/SIMPLE.  The calculation is iterative if the
    density is a function of pressure and an optional number of iterations \c
    nHydrostaticCorrectors may be specified which defaults to 5.
2021-06-11 11:31:19 +01:00