Commit Graph

4016 Commits

Author SHA1 Message Date
05ffb6a6ff Info: Use nl rather than "\n..." to ensure region-prefixed printing 2023-04-05 17:14:24 +01:00
3229b0e645 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-04-05 15:58:53 +01:00
cb241c5f00 fvModels::checkApplied: Check for sub-cycling
so that fvModel usage is not checked within the sub-cycling loop.
2023-04-05 15:57:52 +01:00
6a3b5d1c25 mappedPatchBase: Clear out if the neighbour is cleared out
This fixes situations in which the mapping is used between a region with
a changing mesh and a region with a non-changing mesh, and where the
non-changing-mesh region owns the mapping. It ensures that changes in
the changing-mesh region trigger re-generation of the mapping in the
adjacent non-changing-mesh region.
2023-04-05 14:35:31 +01:00
becee61eef parcelCloud: Ensure region-prefixed printing 2023-04-04 17:14:09 +01:00
fa296c0454 mappedPatchBase: Fix typo Neigbour -> Neighbour 2023-04-04 16:59:39 +01:00
0080177d88 invIncGammaRatio_P: Additional divide by zero protection 2023-04-04 16:42:34 +01:00
9ea964a525 fv::sixDoFAccelerationSource: Added sources for phase-momentum equations 2023-04-04 16:24:09 +01:00
28fc55b1f0 invIncGammaRatio_P: Completed implementation
Added the iterative improvement stage detailed at the end of section 4
of the reference:

    DiDonato, A. R., & Morris Jr, A. H. (1986).
    Computation of the incomplete gamma function ratios and their inverse.
    ACM Transactions on Mathematical Software (TOMS), 12(4), 377-393.
2023-04-04 15:19:01 +01:00
5048b7e54a applications/solvers: Replaced fvCFD.H with appropriate include files 2023-04-01 19:31:01 +01:00
f6a730f0ac multiphaseEuler::cellPressureCorrector: Use constrainH rather than constrainHbyA 2023-04-01 17:22:14 +01:00
e66484a82d fvCorrectPhi: Wrapper for CorrectPhi to simplify solvers 2023-04-01 16:23:57 +01:00
07478d25c0 fvMeshTopoChanger: Corrected header documentation 2023-03-31 17:12:52 +01:00
e33b53c7c7 CorrectPhi: Change the divU argument to autoPtr<volScalarField>
If divU is valid the velocity divergence is included in the pcorr equation.
This simplifies the logic in multiphase moveMesh functions supporting
incompressible (with or without mass sources) and compressible fluids.
2023-03-31 08:53:59 +01:00
21052fdcb1 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-03-29 16:02:54 +01:00
113d07862c solvers::multiphase: Improved CorrectPhi handling for compressible multiphase flows
The mixture compressibility/density is now included in CorrectPhi for
compressible mixtures, consistent with the compressibility handling in the
pressure equation.  This improves consistency, robustness and convergence of the
pcorr equation.
2023-03-29 15:59:13 +01:00
15e7b64094 Cloud: Corrected mapping for multiple partial topology changes 2023-03-28 15:48:48 +01:00
e5a5e1913c nonConfomalCoupled: Prevent repeated writing of constant/fvMesh/polyFaces 2023-03-28 12:27:59 +01:00
6233f98806 fv::zeroDimensionalMassSource: Support use of multiple sources
The computation of the current and total accumulated mass is now shared
across all zeroDimensionalMassSource models. So, multiple models can be
used simultaneously.
2023-03-28 12:27:56 +01:00
d7e3306761 fv::massSource: Support mass sinks
If a negative mass flow rate is specified, the mass source fvModel will
now remove mass by adding implicit sources to the transport equations.
Properties are thereby removed at their current value. This is stable,
and is analogous to a zero-gradient outlet boundary condition.
2023-03-28 12:27:52 +01:00
8dfffc9d42 regIOobject: Rename objects owned by the registry 2023-03-28 08:38:44 +01:00
d7fe6a71d1 fvc::ddtCorr: Added support for Euler-Euler multiphase
to allow the multiphase algorithms to be updated to support ddtCorr with
2nd-order ddt schemes.
2023-03-26 23:08:15 +01:00
e98dcc5aa8 solvers: Added ddtCorr support in MRF regions by extending the use of Uf and rhoUf
to provide the old-time absolute flux.  This avoids possible
pressure-velocity-flux decoupling (staggering) within the MRF region using
ddtCorr to better couple the velocity and flux fields.
2023-03-24 17:23:14 +00:00
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
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