Commit Graph

7140 Commits

Author SHA1 Message Date
5b88d10737 test/IO/fileHandler: Updated to use foamRun 2023-05-25 13:23:58 +01:00
b9b6eeb9ef tutorials/modules/incompressibleVoF/floatingObjectWaves: New tutorial case
to demonstrate motion of a floating object due to waves without any mean flow,
generated by the waveForcing fvModel using the waves specification in
constant/waveProperties which is also used for the side boundary conditions.
2023-05-24 20:49:11 +01:00
6e95a6f58d Minor formatting correction 2023-05-24 15:43:11 +01:00
f9de03d979 TimeState: Removed redundant outputTime() function 2023-05-24 15:42:46 +01:00
74b702a11c surfaceInterpolation: Corrected the list of flux schemes printed if the scheme is not specified 2023-05-24 15:41:39 +01:00
ec2c06e9e5 twoPhaseSolver::alphaPredictor: Corrected handling for CrankNicolson ddt with dilatation 2023-05-24 15:40:50 +01:00
6230721333 egrMixture: Return oxidant only if both fu and egr are small
Resolves bug-report https://bugs.openfoam.org/view.php?id=3982
2023-05-23 16:41:34 +01:00
a8ba79374d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-05-23 16:27:50 +01:00
b625fb170e multiphaseEuler::phaseModel: Added const *Ref access functions
to simplify obtaining the reference to the phase velocity and fluxes for moving
phases.
2023-05-23 16:26:47 +01:00
8795f42eee lagrangian: InjectionModel: Corrected documentation/examples 2023-05-23 15:52:53 +01:00
c2fd3c2612 distributions::unintegrable: Prevent Gcc-13 warning 2023-05-23 10:52:58 +01:00
ed4bd53df6 multiphaseEuler: Prevent sigFpe errors from blending method NaN handling 2023-05-23 10:52:58 +01:00
fec6705dc9 OpenFOAM: Updated for gcc-13
gcc-13 has new code checking and warning mechanisms which are useful but not
entirely robust and produce many false positives, particularly with respect to
local references:

    warning: possibly dangling reference to a temporary

This commit resolves many of the new warning messages but the above false
warnings remain.  It is possible to switch off this warning but as it also
provides some useful checks it is currently left on.
2023-05-23 10:47:56 +01:00
9d7c3d8768 compressibleCavitation, incompressibleCavitation: Added usages documentation 2023-05-20 14:41:02 +01:00
2f9f8b4dd9 cavitationModels::Saito: New cavitation model for compressibleVoF and multiphaseEuler
in which the mass transfer rate is based on the theory of
evaporation/condensation on a plane interface.

Class
    Foam::compressible::cavitationModels::Saito

Description
    Saito cavitation model.

    Reference:
    \verbatim
        Saito, Y., Takami, R., Nakamori, I., & Ikohagi, T. (2007).
        Numerical analysis of unsteady behavior of cloud cavitation
        around a NACA0015 foil. Computational Mechanics, 40, 85-96.
   \endverbatim

Usage:
    \table
        Property | Description                      | Required | Default value
        liquid   | Name of the liquid phase         | yes      |
        pSat     | Saturation vapor pressure        | yes      |
        Ca       | Interfacial area concentration coefficient [1/m] | yes      |
        Cv       | Vapourisation rate coefficient   | yes      |
        Cc       | Condensation rate coefficient    | yes      |
        alphaNuc | Nucleation site volume fraction  | yes      |
    \endtable

    Example:
    \verbatim
        model       Saito;

        liquid      liquid;

        pSat        79995;

        Ca          0.1;  // Interfacial area concentration coefficient [1/m]
        Cc          1;
        Cv          1;
        alphaNuc    0.01;
    \endverbatim

SourceFiles
    Saito.C
2023-05-19 16:53:41 +01:00
f098b2e033 tutorials/modules/multiRegion/film/hotBoxes: Removed temporary files 2023-05-17 21:49:20 +01:00
a1c85e0771 tutorials: Improved Cp coefficients for air
Resolves bug report https://bugs.openfoam.org/view.php?id=3981
2023-05-17 19:58:46 +01:00
34c0e8b45b surfaceFilmModels: Superseded by the new isothermalFilm and film solver modules
The new general multi-region framework using the isothermalFilm and film solver
modules and executed with foamMultiRun is a much more flexible approach to the
inclusion of liquid films in simulations with the support for coupling to other
regions of various types e.g. gas flows, Lagrangian clouds, VoF, CHT etc.  This
has all been achieved with a significant reduction in the number of lines of
code and significant improvements in code structure, readability and
maintainability.
2023-05-17 16:01:48 +01:00
c67a019ee1 tutorials/modules/multiRegion/film/hotBoxes: New film tutorial case
converted from the old modules/multicomponentFluid/hotBoxes tutorial case.
2023-05-17 14:35:34 +01:00
18dd1e5b5b fvModels::filmCloudTransfer: Ensure film->cloud transfer consistency 2023-05-17 14:34:12 +01:00
00cb37652f foamRun,foamMultiRun: fvModels are now corrected directly
This ensures that all fvModels in all regions are updated before continuity is
predicted in any region so that inter-region mass transfers are included in the
region continuity equations.
2023-05-17 14:31:11 +01:00
b51aaf0464 tutorials/modules/multiRegion/film/VoFToFilm,cylinderVoF: Added Allclean 2023-05-17 14:22:20 +01:00
22302722a7 tutorials/modules/multiRegion/film: Updated to write binary 2023-05-17 14:21:20 +01:00
09174939a7 triIntersect: Protect against another geometrically impossible configuration 2023-05-16 10:03:08 +01:00
2cf8f66852 isothermalFilm/fvModels/filmCloudTransfer/ejectionModels: New film->cloud transfer sub-models
The filmCloudTransfer fvModel now supports an optional ejection model which
provides transfer of film to cloud by dripping from an inverted surface or
curvature separation:

Class
    Foam::filmEjectionModels::dripping

Description
    Dripping film to cloud ejection transfer model

    On an inverted surface if the film thickness is sufficient to generate a
    valid parcel the equivalent mass is removed from the film and transfered to
    the cloud as a parcel containing droplets with a diameter obtained from
    the specified parcelDistribution.

Usage
    Example usage:
    \verbatim
    filmCloudTransfer
    {
        type    filmCloudTransfer;

        libs    ("libfilmCloudTransfer.so");

        ejection
        {
            model   dripping;

            deltaStable 5e-4;

            minParticlesPerParcel 10;

            parcelDistribution
            {
                type            RosinRammler;
                Q               0;
                min             1e-3;
                max             2e-3;
                d               7.5e-05;
                n               0.5;
            }
        }
    }
    \endverbatim

Class
    Foam::filmEjectionModels::BrunDripping

Description
    Brun dripping film to cloud ejection transfer model

    If the film thickness exceeds the critical value needed to generate one or
    more drops, the equivalent mass is removed from the film.  The critical film
    thickness is calculated from the Rayleigh-Taylor stability analysis of film
    flow on an inclined plane by Brun et.al.

    Reference:
    \verbatim
        Brun, P. T., Damiano, A., Rieu, P., Balestra, G., & Gallaire, F. (2015).
        Rayleigh-Taylor instability under an inclined plane.
        Physics of Fluids (1994-present), 27(8), 084107.
    \endverbatim

    The diameter of the drops formed are obtained from the local capillary
    length multiplied by the \c dCoeff coefficient which defaults to 3.3.

    Reference:
    \verbatim
        Lefebvre, A. (1988).
        Atomisation and sprays
        (Vol. 1040, No. 2756). CRC press.
    \endverbatim

Usage
    Example usage:
    \verbatim
    filmCloudTransfer
    {
        type    filmCloudTransfer;

        libs    ("libfilmCloudTransfer.so");

        ejection
        {
            model   BrunDripping;

            deltaStable 5e-4;
        }
    }
    \endverbatim

Class
    Foam::filmEjectionModels::curvatureSeparation

Description
    Curvature induced separation film to cloud ejection transfer model

    Assesses film curvature via the mesh geometry and calculates a force
    balance of the form:

        F_sum = F_inertial + F_body + F_surface_tension

    If F_sum < 0, the film separates and is transferred to the cloud
    if F_sum >= 0 the film remains attached.

    Reference:
    \verbatim
        Owen, I., & Ryley, D. J. (1985).
        The flow of thin liquid films around corners.
        International journal of multiphase flow, 11(1), 51-62.
    \endverbatim

Usage
    Example usage:
    \verbatim
    filmCloudTransfer
    {
        type    filmCloudTransfer;

        libs    ("libfilmCloudTransfer.so");

        ejection
        {
            model   curvatureSeparation;

            deltaStable 5e-4;
        }
    }
    \endverbatim

The new tutorials/modules/multiRegion/film/cylinderDripping tutorial case
demonstrates a film dripping into the cloud.  The standard cylinder case is
turned upside-down (by changing the orientation of gravity) with an initial
0.2mm film of water over the surface which drips when the thickness is greater
than 0.5mm.  Settings for all three ejection models are provided in the
constant/film/fvModels dictionary with the standard dripping model selected.
20230516
2023-05-15 17:59:31 +01:00
b2d74bfdb4 fvCellSet: Remove output of the number of cells which is not correct in parallel
The volume of the fvCellSet is summed over all processors and is the correct
representation of the region for FV, it is not clear that writing the number of
cells in the set in the header of the functionObject output is useful and can be
obtained by other means.
2023-05-15 16:12:50 +01:00
d02c119326 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-05-15 14:21:04 +01:00
6928511a3d nutWallFunctionFvPatchScalarField::yPlusLam: Improved ypl calculation
to ensure nut is always positive
2023-05-15 14:19:18 +01:00
50d9644d8c fvMeshStitcher: Ensure error face areas always increase in size from original stabilisation 2023-05-12 17:30:17 +01:00
c9bf66a632 fvMeshStitcher: Stabilise calculation of error face areas 2023-05-12 14:45:49 +01:00
3479c6a37f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-05-12 11:06:47 +01:00
c4f7b1dcbf tutorials/modules/incompressibleVoF/floatingObject/constant/dynamicMeshDict.sixDoF: Removed unused entry 2023-05-12 11:06:03 +01:00
7d2208b735 multiphaseEuler::MovingPhaseModel: Read alphaRhoPhi if present and auto write
Needed by the phaseScalarTransport functionObject and other phase
post-processing tools.
2023-05-12 11:05:14 +01:00
2085f63705 foamCloneCase: do not copy Uf files 2023-05-12 09:29:46 +01:00
0d2fd78864 lagrangian: InjectionModel: New uniformParcelSize control
Lagrangian injections now have a 'uniformParcelSize' control, which
specifies what size of the parcels is kept uniform during a given time
step. This control can be set to 'nParticles', 'surfaceArea' or
'volume'. The particle sizes, by contrast, are specified by the size
distribution.

For example, if 'uniformParcelSize nParticles;' is specified then all
parcels introduced at a given time will have the same number of
particles. Every particle in a parcel has the same properties, including
diameter. So, in this configuration, the larger diameter parcels contain
a much larger fraction of the total particulate volume than the smaller
diameter ones. This may be undesirable as the effect of a parcel on the
simulation might be more in proportion with its volume than with the
number of particles it represents. It might be preferable to create a
greater proportion of large diameter parcels so that their more
significant effect is represented by a finer Lagrangian discretisation.
This can be achieved by setting 'uniformParcelSize volume;'. A setting
of 'uniformParcelSize surfaceArea;' might be appropriate if the limiting
effect of a Lagrangian element scales with its surface area; interfacial
evaporation, for example.

Previously, this control was provided by 'parcelBasisType'. However,
this control also effectively specified the size exponent of the
supplied distribution. This interdependence was not documented and was
problematic in that it coupled physical and numerical controls.
'parcelBasisType' has been removed, and the size exponent of the
distribution is now specified independently of the new
'uniformParcelSize' control along with the rest of the distribution
coefficients or data. See the previous commit for details.

It is still possible to specify a fixed number of particles per parcel
using the 'nParticle' control. The presence of this control is used to
determine whether or not the number of particles per parcel is fixed, so
a 'fixed' basis type is no longer needed.

A number of bugs have been fixed with regards to lack of
interoperability between the various settings in the injection models.
'uniformParcelSize' can be changed freely and the number of parcels and
amount of mass that an injector introduces will not change (this was not
true of 'parcelBasisType'). Redundant settings are no longer read by the
injection models; e.g., mass is not read if the number of particles per
parcel is fixed, duration is not specified for steady tracking, etc...

The 'inflationInjection' model has been removed as there are no examples
of its usage, its purpose was not clearly documented, and it was not
obvious how it should be updated as a result of these changes.
2023-05-11 15:42:23 +01:00
cae41959dd distributions: Generalised statistical distributions
This new class hierarchy replaces the distributions previously provided
by the Lagrangian library.

All distributions (except fixedValue) now require a "size exponent", Q,
to be specified along with their other coefficients. If a distribution's
CDF(x) (cumulative distribution function) represents what proportion of
the distribution takes a value below x, then Q determines what is meant
by "proportion":

- If Q=0, then "proportion" means the number of sampled values expected
  to be below x divided by the total number of sampled values.

- If Q=3, then "proportion" means the expected sum of sampled values
  cubed for values below x divided by the total sum of values cubed. If
  x is a length, then this can be interpreted as a proportion of the
  total volume of sampled objects.

- If Q=2, and x is a length, then the distribution might represent the
  proportion of surface area, and so on...

In addition to the user-specification of Q defining what size the given
distribution relates to, an implementation that uses a distribution can
also programmatically define a samplingQ to determine what sort of
sample is being constructed; whether the samples should have an equal
number (sampleQ=0), volume (sampleQ=3), area (sampleQ=2), etc...

A number of fixes to the distributions have been made, including fixing
some fundamental bugs in the returned distribution of samples, incorrect
calculation of the distribution means, renaming misleadingly named
parameters, and correcting some inconsistencies in the way in which
tabulated PDF and CDF data was processed. Distributions no longer
require their parameters to be defined in a sub-dictionary, but a
sub-dictionary is still supported for backwards compatibility.

The distributions can now generate their PDF-s as well as samples, and a
test application has been added (replacing two previous applications),
which thoroughly checks consistency between the PDF and the samples for
a variety of combinations of values of Q and sampleQ.

Backwards incompatible changes are as follows:

- The standard deviation keyword for the normal (and multi-normal)
  distribution is now called 'sigma'. Previously this was 'variance',
  which was misleading, as the value is a standard deviation.

- The 'massRosinRammler' distribution has been removed. This
  functionality is now provided by the standard 'RosinRammler'
  distributon with a Q equal to 0, and a sampleQ of 3.

- The 'general' distribution has been split into separate distributions
  based on whether PDF or CDF data is provided. These distributions are
  called 'tabulatedDensity' and 'tabulatedCumulative', respectively.
2023-05-11 15:42:17 +01:00
db83ae3e8a TimeFunctions1: Added construct from time and Function1 2023-05-11 14:31:32 +01:00
bd7d1a438a scalar: Added optimised integer powers and roots 2023-05-11 10:05:30 +01:00
b5783e22aa lagrangian/parcel: Added sizeDistribution cloud function
This function outputs a graph of a cloud's particle and parcel size
distributions. It can be enabled by putting the following settings in
the 'cloudFunctions' section of the cloud's properties file:

    sizeDistribution1
    {
        type        sizeDistribution;
        nPoints     40;
        setFormat   raw;
    }
2023-05-11 10:02:23 +01:00
c077ceda1a sampledSet: Added setWriter::clone, and some minor formatting 2023-05-11 09:33:09 +01:00
0b621c2908 tutorials: circuitBoardCooling: Fix unconfirmed completion in testLoopReport 2023-05-09 15:28:02 +01:00
b5142dca74 modules/solid: Improved diffusion number calculation
The calculation of the diffusion number has been put into a form
consistent with finite-volume, rather than the finite-difference form
that was used previously.

This difference in formulations is analogus to that of the Courant
number in the fluid solvers. Whilst a textbook will typically define the
courant number as equal to 'U*deltaT/deltaX', in a finite-volume context
it is more appropriate to define it as 'Sum(phi)/V*deltaT' (where 'Sum'
is a sum over the cell's faces). Similarly, the finite-difference
Fourier number, 'kappa/rho/Cp*deltaT/deltaX^2', is more consistently
expressed for finite-volume as 'Sum(Sf*kappa*deltaX)/(V*rho*Cp)*deltaT'.

This makes the calculation of the diffusion number less sensitive to the
presence of small, poor quality faces, and therefore makes time-step
adjustment more robust on arbitrary polyhedral meshes.
2023-05-09 15:11:55 +01:00
472451a0ca mappedWall: Permit transformation
This change relaxes the previous restriction that mappedWall patches
cannot have transformation. It permits cyclic multi-region simulations
in which the cyclic plane lies on the interface between regions.

The mappedWall still differs from the mapped patch in that it is assumed
to be untransformed unless a transformation is explicitly specified. The
mapped patch, by contrast, will attempt to automatically calculate a
transformation from the geometry of the patches in the same way as is
done for cyclics.
2023-05-09 14:29:19 +01:00
cb610cf060 layerInfo: Corrected function inlining and contiguous trait 2023-05-09 11:40:11 +01:00
d7743bbf01 tutorials: circuitBoardCooling: Make the test loop run both extrusion strategies 2023-05-09 11:07:50 +01:00
74a63a08e4 mappedExtrudedPatchBase: Support patchToPatch coupling
This completes commit 381e0921 and permits patches on the "top" of
extruded regions to determine the point locations opposite as well as
the face centres and areas. This means that patches with dissimilar
meshes can now be coupled via the patchToPatch interpolation engine.

A few fixes have also been applied to extrudeToRegionMesh to make the
intrude option compatibile with extrusion into internal faces and
between opposing zones/sets/patches. The 'shadow' entries used for
extrusion inbetween opposing zones/sets/patches have also been renamed
to 'opposite' for consistency with the patch names and patch types
entries; e.g.,

    faceZones           (fz1 fz3);
    oppositeFaceZones   (fz2 fz4); // <-- was 'faceZonesShadow'

    faceSets            (fs1 fs3);
    oppositeFaceSets    (fs2 fs4); // <-- was 'faceSetsShadow'

    patches             (p1 p3);
    oppositePatches     (p2 p4); // <-- was 'patchesShadow'
2023-05-09 11:06:40 +01:00
e5aa8ab63c tutorials: circuitBoardCooling: Corrected location of baffle STL 2023-05-06 20:09:08 +01:00
efe8310371 filmSurfaceVelocityFvPatchVectorField: Added neighbour density mapping 2023-05-05 22:14:13 +01:00
474e9c0c55 tutorials/modules/multiRegion/film/splashPanel/system/film/fvSolution: Corrected nCorr -> nCorrectors 2023-05-05 21:55:38 +01:00
6e9673e1e2 filmSurfaceVelocityFvPatchVectorField: Corrected to use the dynamic rather than kinematic viscosity 2023-05-05 21:55:03 +01:00