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'
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;
}
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.
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
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;
}
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.
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.
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.
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.
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.
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.
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.
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.