Commit Graph

5885 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
58444464aa initialConditions: Corrected header
Resolves bug-report https://bugs.openfoam.org/view.php?id=3831
2022-04-29 12:29:05 +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
54de79b573 fvMeshTopoChangersRefiner: Avoid writing the pointLevel and cellLevel files if the mesh has not changed 2022-04-27 14:55:34 +01:00
95b6b0c003 tutorials: Renamed 2D MRF mixer vessel cases to mixerVessel2DMRF 2022-04-27 12:31:09 +01:00
2beec217d9 tutorials: interFoam: mixerVessel2D: Fix typo 2022-04-27 12:17:21 +01:00
3a2f1b7dd7 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-04-27 12:10:56 +01:00
dd8e1fb5e0 LaheyKEpsilon: coefficient C3 -> C4 to avoid name clash with C3 in the base kEpsilon 2022-04-27 12:09:20 +01:00
b92fdc82f5 tutorials: pipeCyclic: Overhaul
The refinement cell set is now generated directly using boxToCell. The
mesh now uses cyclic, rather than cyclicAMI, patches so that propagation
of the refinement across the coupling can be tested. Field files have
been simplified by using #includeEtc to set constraints. A best practice
velocity/pressure specification has been set for the outlet boundary.
Unused fields and settings have been removed.
2022-04-27 11:54:41 +01:00
7b3631bc53 surfaceInterpolation::phaseStabilised, phaseStabilisedSnGrad: phase-fraction stabilised schemes
New interpolation and snGrad schemes to help stabilise multiphaseEulerFoam runs
on poor meshes by reverting to a bounded form when the phase-fraction
corresponding to the phase of the field argument is less than 1e-3.  If this
approach proves effective and it would be useful to adjust the phase-fraction
limit it could be made a user input.

Class
    Foam::phaseStabilised

Description
    Phase-stabilised interpolation scheme

    which applies upwind to the faces at which the upwind phase-fraction is less
    than 1e-3.

Class
    Foam::fv::phaseStabilisedSnGrad

Description
    snGrad scheme with phase-fraction limited non-orthogonal correction.

    When the phase-fraction is less than 1e-3 the non-orthogonal correction is
    set to 0.

Example specification in fvSchemes:

gradSchemes
{
    default         Gauss linear;
    limited         cellLimited Gauss linear 1;
}

divSchemes
{
    default                         none;

    .
    .
    .

    "div\(alphaRhoPhi.*,U.*\)"      Gauss phaseStabilised linearUpwindV limited;
    "div\(phi.*,U.*\)"              Gauss phaseStabilised linearUpwindV limited;

    "div\(alphaRhoPhi.*,(h|e).*\)"  Gauss phaseStabilised limitedLinear 1;
    "div\(alphaRhoPhi.*,K.*\)"      Gauss phaseStabilised limitedLinear 1;
    "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)" Gauss phaseStabilised limitedLinear 1;

    .
    .
    .
}

laplacianSchemes
{
    default         Gauss linear limited corrected 0.33;

    phaseStabilised Gauss linear phaseStabilised limited corrected 0.33;

    laplacian(((alpha.air*thermo:rho.air)*nuEff.air),U.air) $phaseStabilised;
    laplacian(((alpha.water*thermo:rho.water)*nuEff.water),U.water) $phaseStabilised;

    laplacian((alpha.air*alphaEff),h.air) $phaseStabilised;
    laplacian((alpha.water*alphaEff),e.water) $phaseStabilised;
}
2022-04-27 11:03:01 +01:00
24066e1f90 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-04-27 10:29:49 +01:00
4aab8572a4 momentumTransportModels::RAS: Corrected documentation of C3 coefficient
Resolves bug-report https://bugs.openfoam.org/view.php?id=3830
2022-04-27 10:28:37 +01:00
8aecadcafd particleTracks: Made compatible with dynamicMesh and updated annotated dictionary 2022-04-26 17:19:56 +01:00
14a9515aa0 surfaceInterpolation: Updated and rationalised documentation: differencing -> interpolation 2022-04-26 14:43:54 +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
929c69340f PrimitivePatch: Removed virtualisation and unused constructors
PrimitivePatch is a geometry engine. Is not used, and is not designed to
be used, as an abstract interface. That function is left to
PrimitivePatch's immediate derivations, such as polyPatch and
MeshedSurface.
2022-04-22 12:10:01 +01:00
681e58bbda surfaceInterpolation: simplified headers of schemes 2022-04-21 15:51:09 +01:00
18cd22fe5d volFieldValue: Corrected min and max operation for scalars
Resolves bug report https://bugs.openfoam.org/view.php?id=3828
2022-04-21 15:16:31 +01:00
d5820be68b layerAverage: Re-write layer generation using mesh wave
This change means this function is determining the sequence in which
points are plotted topologically. This makes it possible to plot a layer
average along a pipe that goes through many changes of direction.

Previously, the function determined the order by means of a geometric
sort in the plot direction. This only worked when the layers were
perpendicular to one of the coordinate axes.
2022-04-21 13:27:22 +01:00
d67aecf0cb functionObjects: New function to reconstruct cell velocity from face flux
This is a simple function that provides a convenient way for a user to
call fvc::reconstruct for the purposes of post-processing flux fields;
e.g., to construct a cell velocity from a face flux.

It can be used to generate output during a run by adding the following
settings to a case's controlDict:

    functions
    {
        #includeFunc reconstruct(phi)
    }

Or it can be executed as a postProcessing step by calling:

    postProcess -func "reconstruct(phi)"
2022-04-21 09:27:01 +01:00
ff1a3fdd9d surfaceInterpolation::surfaceInterpolation: Simplified implementation 2022-04-21 09:02:06 +01:00
c444fd4538 MomentumTransportModels: Removed temporary diagnostic messages 2022-04-21 09:01:15 +01:00
3bac211785 epsilonmWallFunction: New wall-function specifically for the mixtureKEpsilon model
epsilonm is obtained by combining epsilon.gas and epsilon.liquid in a two-phase
system, each of which will apply the epsilonWallFunction at walls; the
epsilonmWallFunction propagates the resulting wall epsilonm into the near-wall
cells.

If the 0/epsilonm file is provided the epsilonmWallFunction should be specified
for walls, if the 0/epsilonm file is not provided it will be generated
automatically and the epsilonmWallFunction applied to walls for which the
epsilonWallFunction is specified in the epsilon.liquid file.
2022-04-20 18:48:35 +01:00
a4a03db574 DiagTensor: Added SymmTensor combination operations 2022-04-14 09:25:07 +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
043b06f129 adjustPhi: Include cyclic patches when calculating the total flux through the domain
to handle cyclic cases where a body-force is used to drive the mean flow.
2022-04-12 10:19:46 +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
9297b3c679 regIOobject: Added a move constructor
to resolve an issue with the unexpected registration of DimensionedFields
constructed from an unregistered temporary field.
2022-04-08 18:57:37 +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
d867d35a82 phaseCompressibleMomentumTransportModels: Added RNGkEpsilon 2022-04-08 09:23:48 +01:00
47b0cd54dd fvMeshTopoChangers::meshToMesh: New fvMesh topoChanger which maps to a sequence of meshes at run-time
With fvMeshTopoChangers::meshToMesh it is now possible to map the solution to a
specified sequence of pre-generated meshes at run-time to support arbitrary mesh
changes, refinements, un-refinements, changes in region topology, geometry,
etc.  Additionally mesh-motion between the sequence of meshes is supported to
allow for e.g. piston and valve motion in engines.

The tutorials/incompressible/pimpleFoam/laminar/movingCone case has been updated
to provide a demonstration of the advantages of this run-time mesh-mapping by
mapping to meshes that are finer behind the cone and coarser in front of the
cone as the cone approaches the end of the domain, thus maintaining good
resolution while avoiding excessive cell aspect ratio as the mesh is squeezed.
The dynamicMeshDict for the movingCone case is;

mover
{
    type            motionSolver;

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

    motionSolver    velocityComponentLaplacian;

    component       x;
    diffusivity     directional (1 200 0);
}

topoChanger
{
    type    meshToMesh;

    libs    ("libmeshToMeshTopoChanger.so");

    times   (0.0015 0.003);

    timeDelta 1e-6;
}

which lists the mesh mapping times 0.0015s 0.003s and meshes for these times in
directories constant/meshToMesh_0.0015 and constant/meshToMesh_0.003 are
generated in the Allrun script before the pimpleFoam run:

runApplication -a blockMesh -dict blockMeshDict.2
rm -rf constant/meshToMesh_0.0015
mkdir constant/meshToMesh_0.0015
mv constant/polyMesh constant/meshToMesh_0.0015

runApplication -a blockMesh -dict blockMeshDict.3
rm -rf constant/meshToMesh_0.003
mkdir constant/meshToMesh_0.003
mv constant/polyMesh constant/meshToMesh_0.003

runApplication -a blockMesh -dict blockMeshDict.1

runApplication $application

Note: This functionality is experimental and has only undergone basic testing.
It is likely that it does not yet work with all functionObject, fvModels
etc. which will need updating to support this form of mesh topology change.
2022-04-06 16:37:22 +01:00
1c8f92f52a cyclicPolyPatch: Option to pass transformation to component constructor 2022-04-06 14:52:25 +01:00
796e1cb2e0 cyclicTransform: Added null constructor to permit storage in a list 2022-04-06 12:26:47 +01:00
a2ceff7360 nearWallDist: Reuse boundary field resize code 2022-04-05 15:33:21 +01:00
485d7f661f fvPatchDistWave: Reuse changed faces array 2022-04-05 15:26:08 +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
9d702d58b5 nearWallDist, wallDist: Parallel consistentency and finer control
The near wall distances calculated for use in wall functions and the
corrections applied to near wall cells as part of the meshWave
wall/patch distance method have been made consistent across processor
and cyclic boundaries.

The extent to which these corrections are performed in the meshWave
method is now controllable by an nCorrectors entry. This defaults to 2,
which produces a result rougly equivalent to the previous correction
procedure. A higher level of correction could be specified as follows,
in system/fvSchemes:

   wallDist
   {
       method meshWave;
       nCorrectors 3;
   }

Corrections replace basic cell-centre-face-centre distances with more
accurate cell-centre-face-polygon calculations in which all the points
and edges of the wall face are taken into account. The number of
correctors represents the number of layers of cells that these
corrections propagate into the mesh from the wall faces in question.

Note that correctors are expensive, and returns diminish as the number
of corrections increase, as the error in the basic calculation reduces
with distance from the wall faces. It is unlikely that more than 2 or
3 correctors would ever be warranted. Indeed, this control is
potentially more useful in reducing the number of corrections to 1 or 0
in order to reduce the computational expense in dynamic mesh cases where
distances are being constantly recomputed.
2022-04-05 10:54:54 +01:00
8408dcb821 vanDriestDelta: Replace mutable static with tracking data 2022-04-05 10:54:54 +01:00
93479bdf55 FaceCellWave, FvFaceCellWave: Corrections to cyclicAMI handling 2022-04-05 10:54:54 +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
c1acd88a37 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-04-04 11:24:24 +01:00
4fe853fa87 Updated to support compilation with 64bit label
Resolves bug-report https://bugs.openfoam.org/view.php?id=3821
2022-04-04 11:22:01 +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
cd2f614a48 Added new polyTopoChangeMap and polyDistributionMap directories 2022-03-31 23:46:50 +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