Commit Graph

1833 Commits

Author SHA1 Message Date
376b51b58b multiphaseEulerFoam::populationBalanceModel: improved dilatation treatment
The population balance model considers dilatation originating from density
change and mass transfer via source terms describing nucleation as well as
"drift" of the size distribution to smaller or larger sizes. Numerically, the
treatment does not necessarily equal the total dilatation, hence a correction is
introduced to ensure boundedness of the size group fractions.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2022-04-29 16:18:03 +01:00
3ef1a3287e applications/solvers/multiphase::pEqn: Check for rAU validity before resetting
Avoids problems when the mesh is not changing but correctPhi is set true.
2022-04-27 14:56:14 +01:00
8aecadcafd particleTracks: Made compatible with dynamicMesh and updated annotated dictionary 2022-04-26 17:19:56 +01:00
2cf6090203 driftFluxFoam::relativeVelocityModels::MichaelsBolger: alphaMax in now obtain from phaseProperties 2022-04-22 16:54:01 +01:00
64a2a3bf75 driftFluxFoam::relativeVelocityModels: Added MichaelsBolger model for flocculated suspensions
Description
    Michaels & Bolger relative velocity model

    Reference:
    \verbatim
        Michaels, A. S., & Bolger, J. C. (1962).
        Settling rates and sediment volumes
        of flocculated kaolin suspensions.
        Industrial & Engineering Chemistry Fundamentals, 1(1), 24-33.
    \endverbatim

Usage
    Example usage:
    \verbatim
        relativeVelocityModel MichaelsBolger;

        MichaelsBolgerCoeffs
        {
            a0          0;    // Extended Michaels & Bolger coefficient,
            a1          4.65; // Exponent

            alphaMax    0.6;  // Maximum dispersed phase-fraction
                              // (packing fraction)
        }
    \endverbatim
2022-04-22 16:50:41 +01:00
620cbe9d1f driftFluxFoam: Generalised the treatment of the effect of flow curvature
Rather than rely on the MRF rotation the effect of acceleration due to flow
curvature on the dispersed is now handled directly using the Ud.grad(Ud) term
derived from the phase momentum equation.  This means that any flow curvature
from bulk rotation to recirulation zones now affect the separation of the
dispersed phase from the continuous phase in a physical manner.
2022-04-13 11:24:56 +01:00
5e99344348 multiphaseEulerFoam::populationBalanceModel: Removed temporary dilatation correction
and updated tutorials to work with the current phase limit stabilisation.
2022-04-12 10:23:42 +01:00
48e2ff1fec cavitatingFoam: Corrected correctUf call to use the absolute flux
Resolves bug-report https://bugs.openfoam.org/view.php?id=3825
2022-04-11 16:08:05 +01:00
b8ce733e4b fvMesh: Separated fvMesh::move() and fvMesh::update()
fvMesh::update() now executes at the beginning of the time-step, before time is
incremented and handles topology change, mesh to mesh mapping and redistribution
without point motion.  Following each of these mesh changes fields are mapped
from the previous mesh state to new mesh state in a conservative manner.  These
mesh changes not occur at most once per time-step.

fvMesh::move() is executed after time is incremented and handles point motion
mesh morphing during the time-step in an Arbitrary Lagrangian Eulerian approach
requiring the mesh motion flux to match the cell volume change.  fvMesh::move()
can be called any number of times during the time-step to allow iterative update
of the coupling between the mesh motion and field solution.
2022-04-08 18:46:12 +01:00
0289f383eb rigidBodyDynamics: Added rotating joint
This joint allows two bodies to rotate relative to each other at a
specified speed. The relative motion is completely specified, so this
joint has zero degrees of freedom.

It could be used, for example, to attach a rotating propeller to a
moving ship:

    bodies
    {
        hull
        {
            ...
        }
        propeller
        {
            type            rigidBody;

            // Dynamic properties
            mass            ...;
            centreOfMass    ...;
            inertia         ...;

            // The propeller is connected to the hull
            parent          hull;

            // The position relative to the hull
            transform       (1 0 0 0 1 0 0 0 1) (20 0 0);

            // Rotation settings
            joint
            {
                type            rotating;
                omega           (6 0 0);
            }
        }
    }
2022-04-05 11:36:39 +01:00
98fa8df9a1 motionSolvers::motionSolverList: Updated as a PtrDictionary
so that the input is now dictionary rather than list of dictionaries which
provides support for dictionary substitutions within the motionSolver
sub-dictionaries and also simplifies lookup of specific motionSolvers within the
list.  For example the dynamicMeshDict for the floatingObject case with a second
floating object would be:

mover
{
    type            motionSolver;

    libs            ("libfvMeshMovers.so" "librigidBodyMeshMotion.so");

    motionSolver       motionSolverList;

    solvers
    {
        floatingObject
        {
            motionSolver rigidBodyMotion;

            report          on;

            solver
            {
                type Newmark;
            }

            accelerationRelaxation 0.7;

            bodies
            {
                floatingObject
                {
                    type            cuboid;
                    parent          root;

                    // Cuboid dimensions
                    Lx              0.3;
                    Ly              0.2;
                    Lz              0.5;

                    // Density of the cuboid
                    rho             500;

                    // Cuboid mass
                    mass            #calc "$rho*$Lx*$Ly*$Lz";
                    L               ($Lx $Ly $Lz);
                    centreOfMass    (0 0 0.25);
                    transform       (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);

                    joint
                    {
                        type            composite;
                        joints
                        (
                            {
                                type Py;
                            }
                            {
                                type Ry;
                            }
                        );
                    }

                    patches         (floatingObject);
                    innerDistance   0.05;
                    outerDistance   0.35;
                }
            }
        }

        anotherFloatingObject
        {
        .
        .
        .
        }
    }
}
2022-04-04 16:38:20 +01:00
7592a81c6e polyMeshMap: New mesh to mesh map for the new mapping update function mapMesh(const polyMeshMap&)
This new mapping structure is designed to support run-time mesh-to-mesh mapping
to allow arbitrary changes to the mesh structure, for example during extreme
motion requiring significant topology change including region disconnection etc.
2022-04-04 11:15:41 +01:00
1aa194e18b Updated documentation for the distribute(const polyDistributionMap&) function 2022-04-01 09:11:09 +01:00
6047f27aac polyDistributionMap: renamed from polyMeshDistributionMap for consistency with polyTopoChangeMap 2022-03-31 23:44:47 +01:00
3ace8f434b polyTopoChangeMap: Renamed from mapPolyMesh to clarify purpose and scope
The polyTopoChangeMap is the map specifically relating to polyMesh topological
changes generated by polyTopoChange and used to update and map mesh related
types and fields following the topo-change.
2022-03-31 22:05:37 +01:00
2e6eb5f2ce polyMeshDistributionMap: renamed mapDistributePolyMesh -> polyMeshDistributionMap
This is a map data structure rather than a class or function which performs the
mapping operation so polyMeshDistributionMap is more logical and comprehensible
than mapDistributePolyMesh.
2022-03-31 18:01:44 +01:00
b4bcb29d6a multiphaseEulerFoam: Added models
Added solid particle coalescence model by Adachi, Stuart and Fokkink
(1994), solid particle breakage model by Kusters (1991) and spherical
particle lift force model by Saffman-Mei (1992).

Patch contributed by Kasper Gram Bilde and Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-03-30 11:28:42 +01:00
b2eff135e6 FaceCellWave: Removed unnecessary intermediate MeshWave class 2022-03-25 12:41:50 +00:00
08b67ff147 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-03-23 16:36:25 +00:00
ddbf2d7853 fvMesh: fvSchemes and fvSolution are now demand-driven
fvMesh is no longer derived from fvSchemes and fvSolution, these are now
demand-driven and accessed by the member functions schemes() and solution()
respectively.  This means that the system/fvSchemes and system/fvSolution files
are no longer required during fvMesh constructions simplifying the mesh
generation and manipulation phase; theses files are read on the first call of
their access functions.

The fvSchemes member function names have also been simplified taking advantage
of the context in which they are called, for example

    mesh.ddtScheme(fieldName) -> mesh.schemes().ddt(fieldName)
2022-03-23 16:23:55 +00:00
32be464010 fixedValueConstraint, fixedTemperatureConstraint: Permit applying only a fraction of the constraint
An optional Function1 can now be supplied to a fixedValueConstraint
which controls what proportion of the constraint is applied. This can be
used to ramp, pulse, or limit the duration of the constraint. For
example, ramping up of the constraint could be specified as follows:

    scalarSource
    {
        type            fixedValueConstraint;

        selectionMode   points;
        points          ((0 0.1 0));

        fieldValues
        {
            s               1;
        }

        fraction
        {
            type            ramp;
            duration        0.1;
        }
    }
2022-03-23 12:58:33 +00:00
fbf7374bef driftFluxFoam: Added MRF centrifugal acceleration effect to the relativeVelocityModels
This required changing the formulation of the relative velocity in terms of a
scalar velocity coefficient Vc rather than the velocity V0 such that

    V0 = Vc*g

where g is the acceleration due to gravity.  With MRF rotation

    V0 = Vc*(g + <MRF centrifugal acceleration>)
2022-03-17 17:35:15 +00:00
a578586c2c processorTopology: Un-templated
The template parameters were only ever polyBoundaryMesh and
processorPolyPatch. Un-templating makes mainteance and bug-fixing
quicker as it means minor modifications no longer cause a full rebuild
of OpenFOAM.
2022-03-17 11:58:06 +00:00
ec3187fa52 splitBaffles: Added support for hexRef8
so that the pointLevel file is updated for use by hexRef8 in subsequent mesh
manipulations, refinement/unrefinement etc.
2022-03-16 12:17:25 +00:00
08b7a94452 mapFields, mapFieldsPar: Removed the subtract option and supporting complexity in meshToMesh0 and meshToMesh
The subtract option in mapFieldsPar was not implemented correctly and the
significant complexity in meshToMesh required to support it creates an
unwarranted maintenance overhead.  The equivalent functionality is now provided
by the more flexible, convenient and simpler subtract functionObject.
2022-03-15 23:21:32 +00:00
dfc28bb580 multiphaseEulerFoam: populationBalance: Updated and improved source code documentation
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2022-03-11 09:13:03 +00:00
3995456979 parallelProcessing: Various improvements
boundaryProcAddressing has been removed. This has not been needed for a
long time. decomposePar has been optimised for mininum IO, rather than
minimum memory usage. decomposePar has also been corrected so that it
can decompose sequences of time-varying meshes.
2022-03-10 20:31:30 +00:00
318f78b660 fluent3DMeshToFoam: Updated for Fluent R2021
Resolves feature request https://bugs.openfoam.org/view.php?id=3815
2022-03-09 11:11:53 +00:00
aa02cd4d25 multiphaseEulerFoam::fractal: Corrected stabilisation of kappa including the influence of fi 2022-03-01 20:46:47 +00:00
8cecaa8b6e MultiComponentPhaseModel: Replaced local residualAlpha_ with phase.residualAlpha()
There is no clear need for a residualAlpha to be defined specifically for Yi and
read from the fvSolution dictionary, the phase.residualAlpha() should be
suitable to stabilise the Yi equations.
2022-03-01 18:00:06 +00:00
3df883d7e6 multiphaseEulerFoam: Improved stabilisation of Yi, fi and kappa when alpha -> 0
The new stabilisation approach avoids any conservation error where the
phase-fraction is greater than residualAlpha by only applying the stabilising
terms to the transport equations in regions where the phase-fraction is less
than residualAlpha.
2022-02-28 19:08:28 +00:00
d87a939ea6 snappyHexMesh: the addLayersControls sub-dictionary in snappyHexMeshDict is now optional
If

addLayers       off;

then

addLayersControls
{
.
.
.
}

need not be present in the snappyHexMeshDict.
2022-02-25 09:42:34 +00:00
a34ddef943 snappyHexMesh: Check that input mesh is 3D, i.e. does not contain empty patches
required for mesh relaxation after snapping.
2022-02-24 16:42:39 +00:00
7e71f8ea67 surfaceOrient: Improved message 2022-02-24 16:42:12 +00:00
85e68669f0 multiphaseEulerFoam: Apply constraints to mass fraction equations 2022-02-23 15:28:51 +00:00
b827c0d740 Compressible solvers: Improved transonic option in the pressure equation
The handling of the div(phid,p) term for transonic support in the pressure
equation is now consistent such that conservation is achieved at convergence of
the pressure system irrespective of the scheme chosen for div(phid,p) and the
relaxation of the pressure equation.

The rhoSimpleFoam tutorials have been updated and improved.
2022-02-22 13:05:40 +00:00
d40ecd78eb buoyantFoam: Merged buoyantSimpleFoam and buoyantPimpleFoam
Solver for steady or transient buoyant, turbulent flow of compressible fluids
for ventilation and heat-transfer, with optional mesh motion and mesh topology
changes.  Created by merging buoyantSimpleFoam and buoyantPimpleFoam to provide
a more general solver and simplify maintenance.
2022-02-18 12:20:54 +00:00
46895490c7 Compressible solver pEqn.H: Standardised the treatment of density
In rhoPimpleFoam, rhoSimpleFoam, buoyantPimpleFoam and buoyantSimpleFoam the
density prediction step at the start of pEqn.H is now consistent between these
solvers and the other compressible solvers.  If the density is relaxed in the
corrector it is now also relaxed following the predictor which improves
consistency, stability and convergence.
2022-02-18 10:33:40 +00:00
fd50abcc85 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-02-16 11:20:50 +00:00
9925df5407 multiphaseEulerFoam::fvModels::phaseTurbulenceStabilisation: Phase turbulence stabilisation
Description
    Phase turbulence stabilisation

    In the limit of a phase-fraction->0 the turbulence properties cannot be
    obtained from the phase turbulence model, coupling to the other phase/phases
    is required.  The phaseTurbulenceStabilisation fvModel stabilises the phase
    turbulence properties by adding transfer terms from the corresponding
    properties of the other phases when the phase-fraction is less than the
    specified \c alphaInversion.  This implementation is a generalisation of
    the approach used in the Foam::RASModels::LaheyKEpsilon and
    Foam::RASModels::continuousGasKEpsilon models to handle phase-inversion and
    free-surface flow and can be used with any combination of RAS turbulence
    models.

    To stabilise the solution of the phase turbulence equations \c
    alphaInversion can be set to a small value e.g. 1e-2, but unless the phase
    turbulence model is specifically designed to handle phase-inversion and both
    continuous and dispersed regimes it may be useful to set \c alphaInversion
    to a higher value, corresponding to the phase-fraction at which transision
    from continuous to dispersed happens and effectively use the turbulence
    properties of the other phase when the phase is dispersed.  This is of
    course an approximation to the real system and if accurate handling of both
    the continuous and dispersed phase regimes is required specially developed
    models should be used.

Usage
    Example usage:
    \verbatim
    phaseTurbulenceStabilisation
    {
        type    phaseTurbulenceStabilisation;

        libs    ("libmultiphaseEulerFoamFvModels.so");

        phase   air;

        alphaInversion  0.1;
    }
    \endverbatim
2022-02-16 11:17:24 +00:00
898924aa48 multiphaseEulerFoam::fvModels::interfaceTurbulenceDamping: Free-surface phase turbulence damping function
Implementation of the interFoam VoFTurbulenceDamping for multiphaseEulerFoam.
In this implementation no distinction is made between a dispersed phase and the
interface so it is formally only applicable when interface compression is used
between the phase and the other phases.  Special handling for dispersed phases
may be added in the future.

Description
    Free-surface phase turbulence damping function

    Adds an extra source term to the mixture or phase epsilon or omega
    equation to reduce turbulence generated near a free-surface.  The
    implementation is based on

    Reference:
    \verbatim
        Frederix, E. M. A., Mathur, A., Dovizio, D., Geurts, B. J.,
        & Komen, E. M. J. (2018).
        Reynolds-averaged modeling of turbulence damping
        near a large-scale interface in two-phase flow.
        Nuclear engineering and design, 333, 122-130.
    \endverbatim

    but with an improved formulation for the coefficient \c A appropriate for
    unstructured meshes including those with split-cell refinement patterns.
    However the dimensioned length-scale coefficient \c delta remains and must
    be set appropriatly for the case by performing test runs and comparing with
    known results.  Clearly this model is far from general and more research is
    needed in order that \c delta can be obtained directly from the interface
    flow and turbulence conditions.

Usage
    Example usage:
    \verbatim
    interfaceTurbulenceDamping
    {
        type    interfaceTurbulenceDamping;

        libs    ("libmultiphaseEulerFoamFvModels.so");

        phase   water;

        // Interface turbulence damping length scale
        // This is a required input as described in section 3.3 of the paper
        delta   1e-4;
    }
    \endverbatim
2022-02-16 11:12:26 +00:00
d0c63582a2 multiphaseEulerFoam: sizeDistribution: Corrected spatial averaging of concentration fields
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2022-02-16 10:22:45 +00:00
fb4e237292 MomentumTransportModels: Added omega() function
Replaces the local definition of the omega function in
functionObjects::turbulenceFields.

Will also be used in interfacial transfers and coupling in multiphase turbulence
modelling where different turbulence models are used in different phases.
2022-02-15 22:03:12 +00:00
adf6f25c0e compressibleMultiphaseInterFoam: Added missing fvModels.correct() 2022-02-15 18:34:16 +00:00
3b037cd6c3 multiphaseEulerFoam::phaseSystem: Added access to deltaN 2022-02-14 12:50:53 +00:00
5e8439aab1 setRDeltaT: Added support for optional minDeltaT
For some cases, in particular those with very small cells created by snapping in
corners for example, it may be beneficial to convergence rate to limit the
minimum LTS time-step, the new minDeltaT control provides this.
2022-02-10 15:57:46 +00:00
989cf27554 snappyHexMesh, createPatch: Keep all constraint patches even if zero size
This change ensures that special constraint type patches, like internal used for
load-balancing, are not deleted by snappyHexMesh or createPatch.
2022-02-10 14:47:07 +00:00
a2bfa0e911 multiphaseEulerFoam: noSintering: Corrected dimensions 2022-02-09 11:59:28 +00:00
c468a63830 compressibleInterFoam::VoFSurfaceFilm: Added maxDeltaT
to limit the time-step by comparing the film Courant number with the maximum
Courant number obtain from the optional maxCo entry in the system/<film
region>/fvSolution file.  If maxCo is not provided the film model does not limit
the time-step.

See tutorials/multiphase/compressibleInterFoam/laminar/cylinder as an example
demonstrating this functionality.
2022-02-09 11:45:42 +00:00
3ec5bf9257 setDeltaT: Simplified implementation 2022-02-09 11:44:20 +00:00