Commit Graph

6819 Commits

Author SHA1 Message Date
b3d90497c2 decomposePar, reconstructPar: Prevent unnecessary stitching 2023-03-23 10:25:36 +00:00
7cdb206f9a polyMesh::swap: Corrected copy of patch identifier 2023-03-22 14:44:39 +00:00
683aca12f6 fvMeshTopoChangers::meshToMesh: Maintain valid meshes during mapping
The current mesh is now swapped with the new mesh prior to the mapping
of fields and other properties. Previously the new mesh was copied into
the current mesh.

This change means that both meshes are valid during the mapping
operation, and properties of either can be used. It should also now be
be more efficient as a swap operation just exchanges list pointers and
sizes, whilst a copy requires duplicating all the primitive mesh data.
2023-03-22 14:12:28 +00:00
182490e0b2 fvMeshStitcher: Prevent addition of small couplings from interfering with stabilisation
Resolves bug report https://bugs.openfoam.org/view.php?id=3965
2023-03-21 16:12:03 +00:00
00e25bd828 triIntersect: Additional overflow protection in projection solution 2023-03-21 16:11:03 +00:00
ede5ec4830 multiphaseEuler: Create the drag and virtual mass tables on demand
reduces storage and unnecessary evaluation of unused tables.
2023-03-18 14:50:19 +00:00
6c19e3dc17 incompressibleFluid: Provide protected access to member functions
to allow the derivation of specialised versions.
2023-03-18 14:49:32 +00:00
5d2ea7db89 tutorials/modules/multiRegion: New sub-directory for all multi-region cases
run with foamMultiRun
2023-03-17 15:47:34 +00:00
8cc00bdfdc tutorials/modules/compressibleVoF/ballValve: Replaced 0/U with 0/U.orig
The velocity field is initialised by potentialFoam
2023-03-17 09:12:14 +00:00
5fb42f1a94 tutorials: Corrected the file format specification for all ascii files 2023-03-16 18:44:08 +00:00
e62ddc2f62 multiphaseEuler::dragModels: Refactored to remove the need for the residualRe entry 2023-03-16 15:51:59 +00:00
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
6ff9a04dd2 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-03-15 11:12:42 +00:00
72b876e566 fvModels::filmToVoFTransfer,VoFtoFilmTransfer: New collaborating fvModels to transfer phase between VoF and film
These two new fvModels operate between a film and a VoF region to transfer film
to the corresponding VoF phase when the film is thick enough to be resolved by
the VoF solver or from the VoF phase to the film when the near-wall resolution
is too low and it is better to treat it as a wall film.

This functionality is equivalent to the VoFPatchTransfer fvModel developed for
the old film implementation but coded in a much more general manner with
implicit treatment of the mass loss from the film or VoF region for better
numerical stability and robustness.

The simple tutorials/modules/CHT/VoFToFilm case is provided to demonstrate a
film being deposited on a surface as the plate is withdrawn from a liquid.  It
is an updated version of the tutorials/modules/compressibleVoF/plateFilm case.
2023-03-15 11:05:00 +00:00
89931bab6c solver modules: Started adding const access to physical state for fvModels 2023-03-15 11:03:02 +00:00
efdcfa9cc8 fvModels::interfaceTurbulenceDamping: Corrected documentation 2023-03-15 09:18:49 +00:00
a188987e36 tutorials/modules/CHT/rivuletBox/0/film/p: Cleaned 2023-03-15 09:18:23 +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
87b606c45e foamDictionary.C: fixed typo 2023-03-14 11:33:17 +00:00
c5107bc42f surfaceCheck: make the -verbose option do something 2023-03-10 23:05:50 +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
0b0957f03d filmSurfaceVelocityFvPatchVectorField: Added option to use the fluid viscous shear stress rather than the simple drag model
Class
    Foam::filmSurfaceVelocityFvPatchVectorField

Description
    Film surface velocity boundary condition

    Evaluates the surface velocity from the shear imposed by the neighbouring
    fluid velocity using either a simple drag model based on the difference
    between the fluid and film velocities multiplied by the coefficient \c Cs or
    if \c Cs is not specified or set to 0 the fluid viscous shear stress.

    The simple model might be used in preference to the fluid 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 | no | 0
    \endtable

    Example of the boundary condition specification using the simple drag model:
    \verbatim
    <patchName>
    {
        type            filmSurfaceVelocity;
        Cs              0.005;
        value           $internalField;
    }
    \endverbatim

    Example of the boundary condition specification using the fluid stress:
    \verbatim
    <patchName>
    {
        type            filmSurfaceVelocity;
        value           $internalField;
    }
    \endverbatim

See also
    Foam::mixedFvPatchField

SourceFiles
    filmSurfaceVelocityFvPatchVectorField.C
2023-03-08 13:12: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
8397d21905 tutorials/modules: Updated the film tutorials to avoid the need to pre-load libisothermalFilm.so 2023-03-08 10:57:43 +00:00
9621cbf704 regionSolvers: Added #include "solver.H" 2023-03-07 15:37:55 +00:00
cee34fea3c tutorials/modules/CHT/rivuletBox: New CHT/film/fluid tutorial case
Demonstration case for three region coupling with film consisting of an
aluminium panel with surface film running down forming rivulets in a box of air
which moved due to buoyancy with 6-way thermal and velocity coupling between the
panel<->film<->air<->panel.  The case runs serial and parallel with arbitrary
decomposition.

Currently extrudeToRegionMesh does not directly support three region coupling so
foamDictionary is used to edit the of the boundary files of box and film regions
to add box<->film coupling.
2023-03-07 13:28:50 +00:00
a0264c98e8 isothermalFilm: write value entry for film-specific BCs
to allow post-processing without loading the isothermalFilm library.
2023-03-07 13:27:41 +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
cbd9903de4 filmSurfaceVelocityFvPatchVectorField: Updated for clang 2023-03-07 08:18:25 +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
3d61e9aebe Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-03-03 22:29:00 +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
f50ff139fc Test-rigidBodyDynamics: Corrected and improved visualisation of pendulumAndSpring 2023-03-03 15:53:30 +00:00
9df3600f11 tutorials/modules/film/rivuletPanel/Allrun: Corrected for Alltest 2023-03-03 14:50:29 +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
32edc48db2 solvers: multiphaseEuler: Boiling on the surface of a stationary phase
A new wallBoiling heat transfer model has been added for use with the
thermalPhaseChangeMultiphaseSystem. This model operates similarly to the
alphatWallBoilingWallFunction. The difference is that the boiling generated by
the wallBoiling heat transfer model occurs on the surface of a third stationary
phase, within the volume of the simulation, rather than on a wall patch. This
can be used to model boiling within a packed bed or similar.

The wallBoiling heat transfer model and the alphatWallBoilingWallFunction share
underlying sub-models, so their specification is very similar. For example, in
constant/phaseProperties:

heatTransfer
{
    ...

    bed_dispersedIn_liquid_inThe_liquid
    {
        type            wallBoiling;

        liquidPhase     liquid;
        vapourPhase     gas;

        heatTransferModel
        {
            type            Gunn;
        }

        partitioningModel
        {
            type            Lavieville; // phaseFraction, linear, cosine
            alphaCrit       0.2;
        }
        nucleationSiteModel
        {
            type            LemmertChawla; // KocamustafaogullariIshii
        }
        departureDiameterModel
        {
            type            TolubinskiKostanchuk; // KocamustafaogullariIshii
        }
        departureFrequencyModel
        {
            type            KocamustafaogullariIshii; // Cole
            Cf              1.18;
        }
    }

    bed_dispersedIn_liquid_inThe_bed
    {
        type            spherical;
    }

    ...
}

Based on a patch contributed by Juho Peltola, VTT.
2023-03-03 14:23:51 +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
46e312679e mappedFilmSurface patches: New patch types to map between the film surface and fluid region 2023-03-02 21:49:10 +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
7cc5cba5b4 tutorials/modules/CHT/rivuletPanel: Renamed extrudeToRegionMeshDict 2023-03-02 18:56:57 +00:00
4d4b98380f cellEdgeAddressing: Optimised memory usage 2023-03-02 12:35:31 +00:00