Commit Graph

1207 Commits

Author SHA1 Message Date
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
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
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.
2023-05-15 17:59:31 +01:00
c4f7b1dcbf tutorials/modules/incompressibleVoF/floatingObject/constant/dynamicMeshDict.sixDoF: Removed unused entry 2023-05-12 11:06:03 +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
0b621c2908 tutorials: circuitBoardCooling: Fix unconfirmed completion in testLoopReport 2023-05-09 15:28:02 +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
474e9c0c55 tutorials/modules/multiRegion/film/splashPanel/system/film/fvSolution: Corrected nCorr -> nCorrectors 2023-05-05 21:55:38 +01:00
ab71ac6c1f tutorials/modules/multiRegion/film: Corrected location entries 2023-05-05 12:15:21 +01:00
1fe47ea346 tutorials: wallBoiling: Corrected blockMeshDict 2023-05-04 13:17:16 +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
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
25b99e15c1 tutorials/modules/multiRegion/film: Removed unnecessary Allclean scripts 2023-04-26 21:00:44 +01:00
6666400d17 tutorials/modules/compressibleVoF/plateFilm: Superseded by tutorials/modules/multiRegion/film/VoFToFilm 2023-04-26 12:48:34 +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
f38fd3e314 solvers::twoPhaseSolver: new base-class for twoPhaseVoFSolver and incompressibleDriftFlux
to separate the interface treatment between VoF and drift-flux and avoid code
duplication.
2023-04-24 21:13:04 +01:00
b949c295ba solvers::incompressibleDriftFlux: New solver module for two-phase flow with drift-flux
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces driftFluxFoam and all the corresponding
tutorials have been updated and moved to
tutorials/modules/incompressibleDriftFlux.

Class
    Foam::solvers::incompressibleDriftFlux

Description
    Solver module for 2 incompressible fluids using the mixture approach with
    the drift-flux approximation for relative motion of the phases, with
    optional mesh motion and mesh topology changes including adaptive
    re-meshing.

    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved with mixture transport modelling in which a
    single laminar, RAS or LES model is selected to model the momentum stress.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

SourceFiles
    incompressibleDriftFlux.C

See also
    Foam::solvers::VoFSolver
    Foam::solvers::twoPhaseVoFSolver
    Foam::solvers::compressibleVoF
2023-04-22 09:00:41 +01:00
9cdd2a3e7a fvConstraints, fvModels: zeroDimensionalFixedPressure
A constraint and a model have been added, both called
zeroDimensionalFixedPressure, that together act to maintain a pressure
constraint in a zero-dimensional case. These must be used
simultaneously. The desired pressure can be specified as a time-varying
Function1.

These replace the pressureConstraintSource, which has been removed.

The new classes operate by obtaining the residual of the complete
pressure equation, and using that to calculate the mass or volume
sources that need adding to the fluid in order to maintain the
constraint. This process is far more convergent than the previous
approach, it does not require the fluid to have a certain thermodynamic
model, and it is generalisable to multiphase.

This functionality requires only minimal specification. The constraint
contains all the settings and should be specified in
system/fvConstraints as follows:

    zeroDimensionalFixedPressure1
    {
        type            zeroDimensionalFixedPressure;

        // Name of the pressure field, default = p
        //p               p;

        // Name of the density field, default = rho
        //rho             rho;

        // Constant pressure value
        pressure        1e5;

        //// Time-varying pressure value
        //pressure
        //{
        //    type            table;
        //    values
        //    (
        //        (0 1e5)
        //        (1 1e5)
        //        (1.1 1.4e5)
        //        (10 1.4e5)
        //    );
        //}
    }

The model is then added to constant/fvModels, and requires no settings:

    zeroDimensionalFixedPressure1
    {
        type            zeroDimensionalFixedPressure;
    }
2023-04-20 10:26:47 +01:00
060690b6fa driftFluxFoam: Updated in preparation for conversion into a solver module 2023-04-18 16:28:19 +01:00
050c617d3b tutorials/modules/compressibleVoF/throttle/system/fvConstraints: Updated to improve stability 2023-04-18 16:27:31 +01:00
776ecc9a40 solvers::compressibleVoF: Updated to supersede cavitatingFoam
compressibleVoF supports cavitation fvModels which provide a more physical and
controllable approach to cavitation modelling than the simple homogeneous
equilibrium approximation used in cavitatingFoam.

The tutorials/multiphase/cavitatingFoam/RAS/throttle case has been converted to
tutorials/modules/compressibleVoF/throttle which demonstrates how to update
cases from cavitatingFoam to compressibleVoF.

A cavitatingFoam script is provided to redirect users to update their cases to
compressibleVoF.
2023-04-18 09:42:32 +01:00
5bcca1cca9 compressibleVoF,compressibleMultiphaseVoF: Apply fvConstraints to the pressure
Replaces the hard-coded pMin.
2023-04-17 10:32:32 +01:00
e40198353b solvers::incompressibleDenseParticleFluid: New solver module for particle laden incompressible flow
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces denseParticleFoam and all the corresponding
tutorials have been updated and moved to
tutorials/modules/incompressibleDenseParticleFluid.

Class
    Foam::solvers::incompressibleDenseParticleFluid

Description

    Solver module for transient flow of incompressible isothermal fluids coupled
    with particle clouds including the effect of the volume fraction of
    particles on the continuous phase, with optional mesh motion and change.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, constraining or limiting
    the solution.
2023-04-11 16:56:13 +01:00
2f0346d68e libwaves.so: Now included in the alpha and U wave BC specification
rather than in controlDict.
2023-04-06 09:55:13 +01:00
f1a57dde9c tutorials/modules/incompressibleFluid/channel395/system/postChannelDict: Removed
The postChannel utility has been replaced by the more flexible layerAverage
functionObject.
2023-04-06 09:27:53 +01:00
28e581831c tutorials: mixerVessel2D: Consistency improvements
Horizontal mixers have been renamed to mixerVesselHorizontal2D. The
incompressible mixerVessel2D has been reinstated to provide a comparison
with the corresponding MRF case. All rotational speeds have been
standardised at 60 rpm, except for the compressible case in which the
higher speed is justified in order to demonstrate the simulation of
compressibility effects.
2023-04-05 11:01:20 +01:00
9e0373cc12 codedFunctionObjectTemplate: Added #include "volFields.H"
The codedFunctionObjectTemplate is based on regionFunctionObject requiring
fvMesh.H and most manipulate volFields so it makes sense for volFields.H to be
included by default.
2023-04-02 10:41:22 +01:00
0e8c5edada tutorials/modules/incompressibleFluid/pitzDailyScalarTransport/system/controlDict: Added volFields.H 2023-04-01 22:53:46 +01:00
cd8ab17ea5 tutorials/modules/incompressibleFluid/blockedChannel/system/generateAlphas: Added volFields.H 2023-04-01 22:22:56 +01:00
d5023b907f applications/utilities: Replaced fvCFD.H with appropriate include files 2023-04-01 18:59:28 +01:00
e66484a82d fvCorrectPhi: Wrapper for CorrectPhi to simplify solvers 2023-04-01 16:23:57 +01:00
0cfc03e14a tutorials/modules/compressibleVoF/ballValve: Added cavitationVolume functionObject
to calculate and log the cavitation volume.
2023-03-31 08:53:14 +01:00
a8cb8a61da solvers::multiphaseEuler: New cell momentum/pressure algorithm
The cell-base momentum/pressure algorithm in the multiphaseEuler solver module
has been substantially updated to improve consistency, conservation and reduce
drag generated staggering patterns at sharp interfaces and the boundaries with
stationary phases.  For most if not all cases this new algorithm can be used to
provide well resolved and reliable solutions where the faceMomentum algorithm
would have been chosen previously in order to obtain sufficiently smooth
solutions but at the expense of a noticeable loss in accuracy and resolution.

The first significant change in the momentum/pressure algorithm is in the
interpolation practice used to construct the flux predictor equation from the
cell momentum equation: rather than interpolating the H/A ratio to the faces
i.e. (H/A)_f the terms in the momentum equation are interpolated separately so
that H_f/A_f is used.  The same approach is used for the drag i.e. (D_f/A_f) and
virtual mass contributions.  The advantage of this change is that the phase
forces are now consistent in both the momentum and flux equations, i.e. sum to
zero for each pair of phases.

The second significant change is in the handling of ddtCorr which converts the
old-time time-derivative contributions in H from velocity to flux which is now
consistent due to the change to H/A interpolation and also generalised to use
the fvc::ddtCorr function which has been updated for multiphase.  Additionally
ddtCorr may optionally be applied to the time-derivative in the virtual mass
term in a consistent manner so that the contributions to the flux equation sum
to zero for each pair of phases.

The third significant change is the addition of an optional drag correction term
to the momentum corrector to reduce the staggering patters generated in the
velocity field due to sudden changes in drag force between phase, e.g. at sharp
interfaces between phases or at the boundaries with stationary phases.  This is
particularly beneficial for fluidised bed simulations.  However this correction
is not and cannot be phase consistent, i.e. the correction does not sum to zero
for pairs of phases it is applied to so a small drag error is introduced, but
tests so far have shown that the error is small and outweighed by the benefit in
the reduction in numerical artefacts in the solution.

The final significant change is in the handling of residualAlpha for drag and
virtual mass to provide stable and physical phase velocities in the limit of the
phase-fraction -> 0.  The new approach is phase asymmetric such that the
residual drag is applied only to the phase with a phase-fraction less than
residualAlpha and not to the carrier phase.  This change ensures that the flow
of a pure phase is unaffected by the residualAlpha and residual drag of the
other phases that are stabilised in pure phase region.

There are now four options in the PIMPLE section of the fvSolutions dictionary
relating to the multiphase momentum/pressure algorithm:

PIMPLE
{
    faceMomentum        no;
    VmDdtCorrection     yes;
    dragCorrection      yes;
    partialElimination  no;
}

faceMomentum:
    Switches between the cell and face momentum equation algorithms.
    Provides much smoother and reliable solutions for even the most challenging
    multiphase cases at the expense of a noticeable loss in accuracy and resolution.
    Defaults to 'no'.

VmDdtCorrection:
    Includes the ddtCorr correction term to the time-derivative part of the
    virtual-mass term in the flux equation which ensures consistency between the
    phase virtual mass force on the faces but generates solutions which are
    slightly less smooth and more likely to contain numerical artefacts.
    Defaults to 'no'.

    Testing so far has shown that the loss in smoothness is small and there is
    some noticeable improvement is some cases so in the future the default may
    be changed to 'yes'.

dragCorrection:
    Includes the momentum corrector drag correction term to reduce the
    staggering patters generated in the velocity field due to sudden changes in
    drag force at the expense of a small error in drag consistency.
    Defaults to 'no'

partialElimination:
    Switches the partial-elimination momentum corrector which inverts the drag
    matrix for both the momentum equations and/or flux equations to provide a
    drag implicit correction to the phase velocity and flux fields.  The
    algorithm is the same as previously but updated for the new consistent drag
    interpolation.

All the tutorials/modules/multiphaseEuler tutorial cases have been updated and
tested with the above developments and the four options set appropriately for
each.
2023-03-30 12:27:48 +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
7f1933d136 tutorials/modules/multiphaseEuler/titaniaSynthesis*: Updated writeObjects 2023-03-25 17:10:19 +00:00
92dacbfcf0 tutorials/modules/incompressibleFluid/pitzDailyScalarTransport: Added subSolverTime entry
to make restart simpler
2023-03-25 14:52:24 +00:00
01f95cf27e tutorials/modules/multiphaseEuler/mixerVessel2D*: Changed to isothermal 2023-03-25 14:06:11 +00:00
2e761c31ef tutorials/modules/multiphaseEuler/mixerVessel2DMRF: Added missing virtualMass entries
to avoid warning messages
2023-03-24 17:22:11 +00:00
4b6cf83ab0 tutorials/Allrun: Prevent unconfirmed completion for foamDictionary logs 2023-03-23 14:19:11 +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