Commit Graph

3988 Commits

Author SHA1 Message Date
496850ebb2 functionObjects::fieldValues::volFieldValue: Added support for VolInternalField
It is now possible to calculate field values of VolInternalFields, e.g. the
cached kEpsilon:G field in the
tutorials/modules/incompressibleFluid/pitzDailySteady case:

    #includeFunc cellMax(kEpsilon:G)
2023-03-15 13:59:29 +00:00
839fc789d5 blockMesh: The 'boundary' entry is now optional
If not present a single default boundary patch will be created.
2023-03-15 11:19:01 +00:00
89931bab6c solver modules: Started adding const access to physical state for fvModels 2023-03-15 11:03:02 +00:00
388a6f656d fvModels,fvConstraints: Added direct access to the size of the list of models/constraints
This changes allows the use of forAll to loop over the models/constraints.
2023-03-15 09:17:12 +00:00
092968c178 DemandDrivenMeshObject: Removed New(Mesh& mesh)
Const-ness of the object generated or returned is independent of the const-ness
of the mesh.
2023-03-15 09:14:00 +00:00
17939acb5e surfaceFilm: Reverted filmName -> regionName for backwards compatibility 2023-03-10 15:45:20 +00:00
b3231229f4 mappedPatchBase: Rationalised the names of mapping functions
to improve code comprehensibility:

    distribute -> fromNeigbour
    reverseDistribute -> toNeigbour
2023-03-10 15:10:12 +00:00
5b9fe57c23 VoFPatchTransfer: Rationalised the names of the cached fields and their origin
required rationalisation of the names of variables and functions in
surfaceFilmModels to clarify which relate to the film region.
2023-03-09 13:58:08 +00:00
4d63b39e3e foamMultiRun: Added automatic region prefixing to the Info statements in the log
e.g. for the rivuletBox case the output for a time-step now looks like:

film  Courant Number mean: 0.0003701330848 max: 0.1862204919
panel Diffusion Number mean: 0.007352456305 max: 0.1276468109
box   Courant Number mean: 0.006324172752 max: 0.09030825997
      deltaT = 0.001550908752
      Time = 0.08294s

film  diagonal:  Solving for alpha, Initial residual = 0, Final residual = 0, No Iterations 0
film  diagonal:  Solving for alpha, Initial residual = 0, Final residual = 0, No Iterations 0
box   diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
film  DILUPBiCGStab:  Solving for Ux, Initial residual = 0.009869417958, Final residual = 2.132619614e-11, No Iterations 2
film  DILUPBiCGStab:  Solving for Uy, Initial residual = 0.0002799662756, Final residual = 6.101011285e-12, No Iterations 1
film  DILUPBiCGStab:  Solving for Uz, Initial residual = 1, Final residual = 1.854120599e-12, No Iterations 2
box   DILUPBiCGStab:  Solving for Ux, Initial residual = 0.004071057403, Final residual = 4.79249226e-07, No Iterations 1
box   DILUPBiCGStab:  Solving for Uy, Initial residual = 0.006370817152, Final residual = 9.606673696e-07, No Iterations 1
box   DILUPBiCGStab:  Solving for Uz, Initial residual = 0.0158299327, Final residual = 2.104129791e-06, No Iterations 1
film  DILUPBiCGStab:  Solving for e, Initial residual = 0.0002888908396, Final residual = 2.301587523e-11, No Iterations 1
panel GAMG:  Solving for e, Initial residual = 0.00878508958, Final residual = 7.807579738e-12, No Iterations 1
box   DILUPBiCGStab:  Solving for h, Initial residual = 0.004403989559, Final residual = 1.334113552e-06, No Iterations 1
film  DILUPBiCGStab:  Solving for alpha, Initial residual = 0.0002760406755, Final residual = 2.267583256e-14, No Iterations 1
film  time step continuity errors : sum local = 9.01334987e-12, global = 2.296671859e-13, cumulative = 1.907846466e-08
box   GAMG:  Solving for p_rgh, Initial residual = 0.002842335602, Final residual = 1.036572819e-05, No Iterations 4
box   diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
box   time step continuity errors : sum local = 4.538744531e-07, global = 1.922637799e-08, cumulative = -6.612579497e-09
box   GAMG:  Solving for p_rgh, Initial residual = 1.283128787e-05, Final residual = 7.063185653e-07, No Iterations 2
box   diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
box   time step continuity errors : sum local = 3.069629869e-08, global = 3.780547824e-10, cumulative = -6.234524715e-09
      ExecutionTime = 19.382601 s  ClockTime = 20 s

film  Courant Number mean: 0.0003684434169 max: 0.1840342756
panel Diffusion Number mean: 0.007352456305 max: 0.1276468109
box   Courant Number mean: 0.006292704463 max: 0.09016861809
      deltaT = 0.001550908752
      Time = 0.0844909s

where each line printed by each region solver is prefixed by the region name.
Global messages for the time-step and time are just prefixed with spaces to
align them with the region output.
2023-03-08 10:59:13 +00:00
67e692b5a8 foamRun, foamMultiRun: Pre-load the solver libraries before the mesh/meshes are constructed
to ensure that any solver-specific patch types are available before mesh construction.
2023-03-07 13:18:33 +00:00
423fa5ba55 filmSurfaceVelocityFvPatchVectorField: New film surface boundary condition
Class
    Foam::filmSurfaceVelocityFvPatchVectorField

Description
    Film surface velocity boundary condition

    Evaluates the surface velocity from the shear imposed by the neighbouring
    fluid velocity using a simple drag model based on the difference between the
    fluid and film velocities multiplied by the coefficient \c Cs.  This simple
    model is used in preference to the standard viscous shear stress model in
    order to provide some means to include the drag enhancing effect
    of surface ripples, rivulets etc. in the film surface.

Usage
    \table
        Property     | Description             | Required    | Default value
        Cs           | Fluid-film drag coefficient | yes |
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            filmSurfaceVelocity;
        Cs              0.005;
    }
    \endverbatim
2023-03-06 21:19:20 +00:00
03cafc63ae basicSpecieMixture::index(const volScalarField& Yi) const: Added support for multiphase
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2023-03-06 12:20:20 +00:00
0cfd98cccc MRFFreestreamVelocityFvPatchVectorField: Corrected and simplified the documentation 2023-03-06 12:20:03 +00:00
143797a812 mappedPatchBase::validateMapForField: Updated calls, adding internal field argument 2023-03-03 23:48:17 +00:00
12decc028d mappedFilmPressureFvPatchScalarField: New film BC to map the neighbouring fluid pressure to the film
mappedFilmPressureFvPatchScalarField is derived from the new mappedFvPatchField
base-class for mapped patch fields including mappedValueFvPatchField.

Class
    Foam::mappedFilmPressureFvPatchScalarField

Description
    Film pressure boundary condition which maps the neighbouring fluid patch
    pressure to both the surface patch and internal film pressure field.
2023-03-03 22:26:58 +00:00
88754b3ed3 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-03-03 14:50:21 +00:00
0a34481ddc mappedExtrudedPatchBase: Corrected constructor used to clone mapped patches 2023-03-03 14:49:54 +00:00
b9711e593b fluxLimitedLangmuirHinshelwoodReactionRate: Prevent lookup of Av field for uniform Av 2023-03-03 10:24:28 +00:00
25dd524c84 generic.*Patch: Moved to new genericPatches library
genericPatches is linked into mesh generation and manipulation utilities but not
solvers so that the solvers now check for the availability of the specified
patch types.  Bugs in the tutorials exposed by this check have been corrected.
2023-03-03 09:03:47 +00:00
390c588cd4 mappedExtrudedPatchBase: New base class for extruded patches
mappedExtrudedPolyPatch and mappedExtrudedWallPolyPatch are now derived from mappedExtrudedPatchBase
2023-03-02 20:25:22 +00:00
4d4b98380f cellEdgeAddressing: Optimised memory usage 2023-03-02 12:35:31 +00:00
d66f5af22e dimensionSets: Clean up memory at the end of the run 2023-03-01 13:14:01 +00:00
3b1e46e4d5 momentumTransportModels::lambdaThixotropic: Added optional support for Bingham plastic
If the optional kinematic Bingham plastic yield stress sigmay [m^2/s^2] is
provided the viscosity is updated to include the Bingham plastic correction.
2023-03-01 11:55:52 +00:00
9b1a9c0832 alphaContactAngleFvPatchScalarField: write the value entry for post-processing 2023-02-28 16:24:07 +00:00
efabb9c935 fvModels: zeroDimensionalMassSource model
This fvModel applies a mass source to the continuity equation and to all
field equations, in a zero-dimensional case. Correction is made to
account for the mass that exits the domain due to expansion in space, so
that the model correctly applies a total mass flow rate. It is
implemented as a light wrapper around the massSource model.
2023-02-28 12:48:47 +00:00
2e93d37b90 nonConformal: Use explicit patch fields in fvMesh/polyFaces field
This permits further non-conformal connnection types to store additional
or alternative information in the fvMesh::polyFacesBf patch fields.
Previously, this field just used calculated patch fields types.

This change has required an update to the fvsPatchFields to make their
handling of IO of the value field consistent with the fvPatchFields. The
base class no longer writes out the value field by default.
2023-02-28 09:16:29 +00:00
ac1d67754a GeometricBoundaryField::reset: Removed field dereference
This permits this function to be applied to boundary fields without a
valid reference to an internal field
2023-02-28 08:12:26 +00:00
c7a69ef828 meshTools/nonConformal: Minor reorganisation 2023-02-28 08:12:26 +00:00
ed83890ec9 meshTools/mappedPatches: Put mesh change functions under correct heading 2023-02-28 08:12:25 +00:00
d8766935ec emptyFvsPatchField::map: Updated mapper argument 2023-02-26 09:46:25 +00:00
a838fa9a91 ThermophysicalTransportModels: separated macros in makeThermophysicalTransportModel
to allow tables for specific types of ThermophysicalTransportModel to be
created, i.e. laminar, RAS or LES rather than always creating all three.
2023-02-25 23:14:37 +00:00
6cac79b47b Reorganised linkage to avoid link errors from foamToC -allLibs 2023-02-24 22:40:12 +00:00
b97d24a372 fvPatch: Changed the deltaCoeffs() to virtual to allow special override 2023-02-24 15:38:17 +00:00
83e5c45764 contactAngleModels: New contact angle models library
used in the alphaContactAngleFvPatchScalarField boundary condition to replace
the need to derive specialised versions for different contact angle evaluation
methods.  This simplifies the code and provides a reusable system which could be
applied to other multiphase contact angle boundary conditions.
2023-02-24 15:35:25 +00:00
edbff308b4 patchToPatchInterpolation, interpolateSplineXY: Removed
These are not used anywhere. interpolateSplineXY's functionality can be
achieved with a table function1, and patchToPatchInterpolation has been
superseded at least twice; first by AMI and then by patchToPatch/NCC.
2023-02-23 08:33:17 +00:00
a432c3f6df src/finiteVolume/cfdTools: Removed unused code
Solver modules have replaced code that was previously shared between
solvers by means of #include-ing header files. Some of these headers are
now unused and have been removed. Others are only now used in a single
solver and have been moved into that solver.
2023-02-22 16:28:53 +00:00
aeadea4377 Standardised name of area-per-unit-volume to Av
This change applies to diameter models within the multiphaseEuler
module, heat transfer fvModels, and the LopesdaCosta porosity and
turbulence models.

User input changes have been made backwards-compatible, so existing
AoV/a/Sigma/... entries and fields should continue to work.
2023-02-22 12:58:14 +00:00
a535ff7c9a codedFunctionObject: Read executeAtStart control 2023-02-22 12:03:02 +00:00
218868e57b reaction: Delay lookup of area-per-unit-volume fields
This permits the creation of area-per-unit-volume fields with coded
function objects or similar, which construct after the chemistry system.
2023-02-22 12:02:58 +00:00
b95b6a0afd lagrangian: PatchCollisionDensity: Corrected number-density fields 2023-02-21 16:12:16 +00:00
e6b517a1e3 functionObjects: uniform, fieldsExpression: Support for dimensioned fields 2023-02-21 12:55:16 +00:00
9175fb13fd meshToMesh: Stabilisation
Stabilisation has been added to the mapping of fields between consistent
meshes. This means that if part of the target mesh is found not to
connect with the source mesh, then its values will be set by propagating
a value from the closest part of the target mesh did successfully
connect to the source. This propagation is achieved by means of a mesh
wave.

This stabilisation applies to both cell and patch fields, and any and
all ancillary fields that may be being stored by the patch boundary
conditions. It applies to the mapping performed by both mapFieldsPar and
the run-time mapping meshToMesh topology changer.

This fixes the previous situation in mapping between consistent meshes
in which target elements which did not connect to the source would be
given an undefined value, which would cause either a floating point
error, or (worse) incorrect operation.
2023-02-16 11:12:36 +00:00
2c247c3e8f meshTools/algorithms/PatchEdgeFaceWave: Added point object with data 2023-02-16 11:12:36 +00:00
f95eb5fd11 meshToMesh, mapFieldsPar: Rationalisation
Cell-to-cell interpolation has been moved to a hierarchy separate from
meshToMesh, called cellsToCells. The meshToMesh class is now a
combination of a cellsToCells object and multiple patchToPatch objects.
This means that when only cell-to-cell interpolation is needed a basic
cellsToCells object can be selected.

Cell-to-cell and vol-field-to-vol-field interpolation now has two well
defined sets of functions, with a clear distinction in how weights that
do not sum to unity are handled. Non-unity weights are either
normalised, or a left-over field is provided with which to complete the
weighted sum.

The left-over approach is now consistently applied in mapFieldsPar,
across both the internal and patch fields, if mapping onto an existing
field in the target case. Warning are now generated for invalid
combinations of settings, such as mapping between inconsistent meshes
without a pre-existing target field.

All mapping functions now take fields as const references and return tmp
fields. This avoids the pattern in which non-const fields are provided
which relate to the source, and at some point in the function transfer
to the target. This pattern is difficult to reason about and does not
provide any actual computational advantage, as the fields invariably get
re-allocated as part of the process anyway.

MeshToMesh no longer stores the cutting patches. The set of cutting
patches is not needed anywhere except at the point of mapping a field,
so it is now supplied to the mapping functions as an argument.

The meshToMesh topology changer no longer supports cutting patch
information. This did not previously work. Cutting patches either get
generated as calculated, or they require a pre-existing field to specify
their boundary condition. Neither of these options is suitable for a
run-time mesh change.

More code has been shared with patchToPatch, reducing duplication.
2023-02-16 11:12:36 +00:00
c8f177e453 streamlines: Protected operation agaist no streamlines being generated 2023-02-16 11:12:36 +00:00
9410d84a7e cutPoly: Documentation fixes 2023-02-16 10:30:18 +00:00
77b0299beb WallLocation: Corrected earlier compilation fix 2023-02-15 12:50:29 +00:00
04407a4d59 WallLocation: Fix for Clang 2023-02-15 09:21:18 +00:00
ffe32b0ade MRFZone: Added special treatment of fixed flux BCs for multiphaseEuler 2023-02-14 20:45:39 +00:00
602c909bcb patchDistWave, fvPatchDistWave: Simplified wall location structure 2023-02-10 17:02:28 +00:00