Commit Graph

6819 Commits

Author SHA1 Message Date
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
ab71ac6c1f tutorials/modules/multiRegion/film: Corrected location entries 2023-05-05 12:15:21 +01:00
26f93274fb multiphaseEuler: Remove duplicate writing of partitioningModel for liquidPhase in boiling BC
Patch contributed by Timo Niemi, VTT.
2023-05-04 16:25:19 +01:00
1fe47ea346 tutorials: wallBoiling: Corrected blockMeshDict 2023-05-04 13:17:16 +01:00
4b91dc790f foamToC: Added -listAllLibs option
Now the -allLibs option loads all the libraries without listing them to reduce
the amount of output when it is not needed and the new -listAllLibs option loads
all the libraries and lists them as they are loaded which may be useful to find
libraries which do not load due to duplicate entries for example.
2023-05-04 10:54:12 +01:00
ef42ba6db3 etc/caseDicts/annotated/extrudeToRegionMeshDict: Added documentation for 'intrude' 2023-05-02 20:35:59 +01:00
f6cd566b91 tutorials: Removed old surfaceFilm tutorial cases
Replaced by new versions updated for the new film solver module located in the
tutorials/modules/multiRegion/film directory.
2023-05-02 18:43:38 +01:00
f850266cdf extrudeToRegionMesh: Added 'intrude' option
With the new film implementation the single cell layer film region is extruded
into (overlapping with) the primary/fluid region which can now be generated with
extrudeToRegionMesh using the new 'intrude' option, e.g. for the
tutorials/modules/multiRegion/film/splashPanel case the extrudeToRegionMeshDict
contains:

region          film;

patches         (film);

extrudeModel    linearNormal;

intrude         yes;

adaptMesh       no;

patchTypes      (mappedExtrudedWall);
patchNames      (film);

regionPatchTypes   (filmWall);
regionPatchNames   (wall);

regionOppositePatchTypes    (mappedFilmSurface);
regionOppositePatchNames    (surface);

nLayers         1;

expansionRatio  1;

linearNormalCoeffs
{
    thickness       0.002;
}
2023-05-02 17:22:03 +01:00
f0421f0823 tutorials/modules/multiRegion/film/splashPanel: Updated tutorial
based on tutorials/modules/multicomponentFluid/splashPanel to demonstrate
droplet->flim splashing using the Bai model.
2023-05-02 10:38:11 +01:00
fd4f862cc0 parcelSurfaceFilmModels: By default read the surfaceFilmProperties dictionary 2023-04-30 20:25:20 +01:00
28305bbb2b tutorials/modules/multiRegion/film/cylinder: New Lagrangian->film tutorial case
equivalent to the tutorials/modules/multicomponentFluid/cylinder except that a
70deg contact-angle is applied to the film on the wall.
2023-04-30 18:49:00 +01:00
e3ca69060c tutorials/modules/multiRegion/film/cylinderVoF: Minor updates 2023-04-30 17:16:51 +01:00
3aa0f9e6bd film::thermophysicalPredictor: Removed temporary diagnostic messages 2023-04-30 17:16:23 +01:00
7b95a0d31c tutorials/modules/multiRegion/film/cylinderVoF/Allrun: Added runApplication 2023-04-30 17:03:01 +01:00
a2ad716761 isothermalFilm/fvModels/filmCloudTransfer: New models to transfer Lagrangian parcels to film
The parcel transfer occurs from the cloudFilmTransfer surfaceFilmModel specified
in the <fluid> region constant/<fluid>/cloudProperties dictionary:

.
.
.
libs        ("libfilmCloudTransfer.so");
.
.
.
    surfaceFilmModel cloudFilmTransfer;

and the film filmCloudTransfer specified in the <film> region
constant/<film>/fvModels dictionary:

.
.
.
    filmCloudTransfer
    {
        type    filmCloudTransfer;

        libs    ("libfilmCloudTransfer.so");
    }

For an example of cloud->film->VoF transfer see the
tutorials/modules/multiRegion/film/cylinder tutorial case.

Note that parcel transfer from film to Lagrangian cloud is not yet supported,
this will be added soon.
2023-04-30 10:19:25 +01:00
4c68b4bf5b multiphaseEuler/interfacialModels/dragModels/Ergun: Reverted handling of the continuous phase-fraction
back to the form in the original multiphaseEulerFoam, i.e. using the dispersed
phase-fraction directly rather than 1 - continuous phase fraction.
2023-04-29 21:42:34 +01:00
8f3d044b6a filmToVoFTransfer: Updated to lookup VoFtoFilmTransfer from any position in the fvModels 2023-04-26 21:01:30 +01:00
25b99e15c1 tutorials/modules/multiRegion/film: Removed unnecessary Allclean scripts 2023-04-26 21:00:44 +01:00
67ff5da438 ThermoSurfaceFilm: Rationalised names 2023-04-26 14:22:37 +01:00
6666400d17 tutorials/modules/compressibleVoF/plateFilm: Superseded by tutorials/modules/multiRegion/film/VoFToFilm 2023-04-26 12:48:34 +01:00
9733e8e36c parcelSurfaceFilmModels: Relocated ThermoSurfaceFilm from lagrangian 2023-04-26 11:51:44 +01:00
f676f14e1d lagrangian: Refactored to remove direct dependency on surfaceFilm
The lagrangian<->surfaceFilm interface is now in the new
src/parcelSurfaceFilmModels library.
2023-04-26 11:36:45 +01:00