Commit Graph

1064 Commits

Author SHA1 Message Date
cf3d6cd1e9 fvMeshMovers, fvMeshTopoChangers: General mesh motion and topology change replacement for dynamicFvMesh
Mesh motion and topology change are now combinable run-time selectable options
within fvMesh, replacing the restrictive dynamicFvMesh which supported only
motion OR topology change.

All solvers which instantiated a dynamicFvMesh now instantiate an fvMesh which
reads the optional constant/dynamicFvMeshDict to construct an fvMeshMover and/or
an fvMeshTopoChanger.  These two are specified within the optional mover and
topoChanger sub-dictionaries of dynamicFvMeshDict.

When the fvMesh is updated the fvMeshTopoChanger is first executed which can
change the mesh topology in anyway, adding or removing points as required, for
example for automatic mesh refinement/unrefinement, and all registered fields
are mapped onto the updated mesh.  The fvMeshMover is then executed which moved
the points only and calculates the cell volume change and corresponding
mesh-fluxes for conservative moving mesh transport.  If multiple topological
changes or movements are required these would be combined into special
fvMeshMovers and fvMeshTopoChangers which handle the processing of a list of
changes, e.g. solidBodyMotionFunctions:multiMotion.

The tutorials/multiphase/interFoam/laminar/sloshingTank3D3DoF case has been
updated to demonstrate this new functionality by combining solid-body motion
with mesh refinement/unrefinement:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  dev
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

mover
{
    type    motionSolver;

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

    motionSolver    solidBody;

    solidBodyMotionFunction SDA;

    CofG            (0 0 0);
    lamda           50;
    rollAmax        0.2;
    rollAmin        0.1;
    heaveA          4;
    swayA           2.4;
    Q               2;
    Tp              14;
    Tpn             12;
    dTi             0.06;
    dTp             -0.001;
}

topoChanger
{
    type    refiner;

    libs    ("libfvMeshTopoChangers.so");

    // How often to refine
    refineInterval  1;

    // Field to be refinement on
    field           alpha.water;

    // Refine field in between lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;

    // Have slower than 2:1 refinement
    nBufferLayers   1;

    // Refine cells only up to maxRefinement levels
    maxRefinement   1;

    // Stop refinement if maxCells reached
    maxCells        200000;

    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi none)
        (nHatf none)
        (rhoPhi none)
        (alphaPhi.water none)
        (meshPhi none)
        (meshPhi_0 none)
        (ghf none)
    );

    // Write the refinement level as a volScalarField
    dumpLevel       true;
}

// ************************************************************************* //

Note that currently this is the only working combination of mesh-motion with
topology change within the new framework and further development is required to
update the set of topology changers so that topology changes with mapping are
separated from the mesh-motion so that they can be combined with any of the
other movements or topology changes in any manner.

All of the solvers and tutorials have been updated to use the new form of
dynamicMeshDict but backward-compatibility was not practical due to the complete
reorganisation of the mesh change structure.
2021-10-01 15:50:06 +01:00
19bdfa969f fvModels, fvConstraints: Update as a result of mesh motion 2021-08-12 13:26:53 +01:00
fe98296668 multiphaseEulerFoam: Added coalescence and breakup models of Liao et al. (2015)
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-08-12 10:41:48 +01:00
79a6b73547 multiphaseEulerFoam: populationBalance: Apply solveOnFinalIterOnly to velocityGroup
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-08-12 10:28:54 +01:00
866441f33f multiphaseEulerFoam: Added reporting of selected population balance submodels to the log
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-08-12 10:27:13 +01:00
88585af6af multiphaseEulerFoam: nucleationModels: Moved velocityGroup member to base class
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-08-12 10:26:23 +01:00
b9123328fb typeIOobject: Template typed form of IOobject for type-checked object file and header reading
used to check the existence of and open an object file, read and check the
header without constructing the object.

'typeIOobject' operates in an equivalent and consistent manner to 'regIOobject'
but the type information is provided by the template argument rather than via
virtual functions for which the derived object would need to be constructed,
which is the case for 'regIOobject'.

'typeIOobject' replaces the previous separate functions 'typeHeaderOk' and
'typeFilePath' with a single consistent interface.
2021-08-12 10:12:03 +01:00
4f969432ad VoFTurbulenceDamping: New fvModel to apply turbulence damping at the VoF interface
Provided for use with mixture turbulence models in interFoam and
compressibleInterFoam.

Class
    Foam::fv::VoFTurbulenceDamping

Description
    Free-surface 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
    VoFTurbulenceDamping
    {
        type    VoFTurbulenceDamping;

        libs    ("libVoFTurbulenceDamping.so");

        // Interface turbulence damping length scale
        // This is a required input as described in section 3.3 of the paper
        delta   1e-4;

        // phase   water; // Optional phase name
    }
    \endverbatim
2021-07-30 17:25:36 +01:00
65ef2cf331 physicalProperties: Standardised incompressible and compressible solver fluid properties
to provide a single consistent code and user interface to the specification of
physical properties in both single-phase and multi-phase solvers.  This redesign
simplifies usage and reduces code duplication in run-time selectable solver
options such as 'functionObjects' and 'fvModels'.

* physicalProperties
  Single abstract base-class for all fluid and solid physical property classes.

  Physical properties for a single fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties' dictionary.

  Physical properties for a phase fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties.<phase>' dictionary.

  This replaces the previous inconsistent naming convention of
  'transportProperties' for incompressible solvers and
  'thermophysicalProperties' for compressible solvers.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the
  'physicalProperties' dictionary does not exist.

* phaseProperties
  All multi-phase solvers (VoF and Euler-Euler) now read the list of phases and
  interfacial models and coefficients from the
  'constant/<region>/phaseProperties' dictionary.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the 'phaseProperties'
  dictionary does not exist.  For incompressible VoF solvers the
  'transportProperties' is automatically upgraded to 'phaseProperties' and the
  two 'physicalProperties.<phase>' dictionary for the phase properties.

* viscosity
  Abstract base-class (interface) for all fluids.

  Having a single interface for the viscosity of all types of fluids facilitated
  a substantial simplification of the 'momentumTransport' library, avoiding the
  need for a layer of templating and providing total consistency between
  incompressible/compressible and single-phase/multi-phase laminar, RAS and LES
  momentum transport models.  This allows the generalised Newtonian viscosity
  models to be used in the same form within laminar as well as RAS and LES
  momentum transport closures in any solver.  Strain-rate dependent viscosity
  modelling is particularly useful with low-Reynolds number turbulence closures
  for non-Newtonian fluids where the effect of bulk shear near the walls on the
  viscosity is a dominant effect.  Within this framework it would also be
  possible to implement generalised Newtonian models dependent on turbulent as
  well as mean strain-rate if suitable model formulations are available.

* visosityModel
  Run-time selectable Newtonian viscosity model for incompressible fluids
  providing the 'viscosity' interface for 'momentumTransport' models.

  Currently a 'constant' Newtonian viscosity model is provided but the structure
  supports more complex functions of time, space and fields registered to the
  region database.

  Strain-rate dependent non-Newtonian viscosity models have been removed from
  this level and handled in a more general way within the 'momentumTransport'
  library, see section 'viscosity' above.

  The 'constant' viscosity model is selected in the 'physicalProperties'
  dictionary by

      viscosityModel  constant;

  which is equivalent to the previous entry in the 'transportProperties'
  dictionary

      transportModel  Newtonian;

  but backward-compatibility is provided for both the keyword and model
  type.

* thermophysicalModels
  To avoid propagating the unnecessary constructors from 'dictionary' into the
  new 'physicalProperties' abstract base-class this entire structure has been
  removed from the 'thermophysicalModels' library.  The only use for this
  constructor was in 'thermalBaffle' which now reads the 'physicalProperties'
  dictionary from the baffle region directory which is far simpler and more
  consistent and significantly reduces the amount of constructor code in the
  'thermophysicalModels' library.

* compressibleInterFoam
  The creation of the 'viscosity' interface for the 'momentumTransport' models
  allows the complex 'twoPhaseMixtureThermo' derived from 'rhoThermo' to be
  replaced with the much simpler 'compressibleTwoPhaseMixture' derived from the
  'viscosity' interface, avoiding the myriad of unused thermodynamic functions
  required by 'rhoThermo' to be defined for the mixture.

  Same for 'compressibleMultiphaseMixture' in 'compressibleMultiphaseInterFoam'.

This is a significant improvement in code and input consistency, simplifying
maintenance and further development as well as enhancing usability.

Henry G. Weller
CFD Direct Ltd.
2021-07-30 17:19:54 +01:00
a6c59e00b2 multiphaseEulerFoam: Renamed CoulaloglouTavlaridesCoalescence to CoulaloglouTavlarides
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-07-23 16:20:31 +01:00
e2e88c3058 Function1s::Table: Added access functions
to enable tables to be constructed from the components of existing tables with
value transformations.
2021-07-19 14:16:08 +01:00
7801f04dff dimensionSets: Added dimFlux (volumetric flux) and dimMassFlux (mass flux) 2021-06-22 17:32:31 +01:00
f4a65fbada sampling: Renamed and moved classes from fileFormats
The writer class has been renamed setWriter in order to clarify its
usage. The coordSet and setWriter classes have been moved into the
sampling library, as this fits their usage.
2021-06-18 13:57:11 +01:00
464ad80e35 fvPatchFields: Reordered constructor definitions to match declarations 2021-06-17 10:19:05 +01:00
7b7fa5a9af compressibleMultiphaseInterFoam: Added test for contact angle in both phases in interface pair
to ensure that the contact angle specification is used irrespective of which
phase it is specified in.  An error is reported if both phases of the interface
pair have a contact angle specification as the specifications might be
inconsistent.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3688
2021-06-15 10:14:21 +01:00
de76426d86 multiphaseInterFoam: Added test for contact angle in both phases in interface pair
to ensure that the contact angle specification is used irrespective of which
phase it is specified in.  An error is reported if both phases of the interface
pair have a contact angle specification as the specifications might be
inconsistent.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3688
2021-06-14 10:42:16 +01:00
6c0087d005 multiphaseEulerFoam: Updated the internal energy pressure work term
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    "div\(alphaPhi.*,p\)" -> "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)"

and all the tutorials have been updated accordingly.
2021-06-11 19:36:33 +01:00
90831fbb55 Compressible and reacting flow solvers: Changed the internal energy pressure work for consistency with enthalpy
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    div(phiv,p) -> div(phi,(p|rho))

and all the tutorials have been updated accordingly.
2021-06-11 11:34:38 +01:00
881bbfa591 chtMultiRegionFoam: Added optional hydrostatic initialisation of pressure
Class
    Foam::hydrostaticInitialisation

Description
    Optional hydrostatic initialisation of p_rgh and p by solving for and
    caching the hydrostatic ph_rgh and updating the density such that

        p = ph_rgh + rho*gh + pRef

    This initialisation process is applied at the beginning of the run (not on
    restart) if the \c hydrostaticInitialisation switch is set true in
    fvSolution/PIMPLE or fvSolution/SIMPLE.  The calculation is iterative if the
    density is a function of pressure and an optional number of iterations \c
    nHydrostaticCorrectors may be specified which defaults to 5.
2021-06-11 11:33:31 +01:00
012df9d699 chtMultiRegionFoam: Added optional hydrostatic initialisation of pressure
Class
    Foam::hydrostaticInitialisation

Description
    Optional hydrostatic initialisation of p_rgh and p by solving for and
    caching the hydrostatic ph_rgh and updating the density such that

        p = ph_rgh + rho*gh + pRef

    This initialisation process is applied at the beginning of the run (not on
    restart) if the \c hydrostaticInitialisation switch is set true in
    fvSolution/PIMPLE or fvSolution/SIMPLE.  The calculation is iterative if the
    density is a function of pressure and an optional number of iterations \c
    nHydrostaticCorrectors may be specified which defaults to 5.
2021-06-11 11:31:19 +01:00
bc844c383c multiphaseEulerFoam: populationBalance: Store coalescence and breakup pair indexing
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-08 09:03:33 +01:00
3f9435fb18 multiphaseEulerFoam: populationBalance: Revised algebraic operations
Field algebra has been optimised by careful ordering to minimise the
number of expensive operations; e.g., changing a/b/c to a/(b*c) in order
to minimise the number of divisions.

Some minor consistency improvements have also been made throughout
population balance.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-08 08:55:17 +01:00
8fec877d5b multiphaseEulerFoam: populationBalance: Simplifed drift term implementation
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-04 10:51:38 +01:00
1a3ae93fb3 multiphaseEulerFoam: Ensure mass transfer rates stay registered 2021-06-03 16:57:11 +01:00
6c21d5d8ef Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-06-01 19:13:02 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
9e2a05b4cc multiphaseEulerFoam: Added interface composition population balance system
A phase system has been added that combines interface composition phase
change modelling and population balance modelling. It can be selected in
constant/phaseProperties using the following setting:

    type    interfaceCompositionPhaseChangePopulationBalanceMultiphaseSystem;

In order to facilitate the operation of population balance models with
mass transfers generated by the interface composition system, the full
interfacial mass transfer rate is now being stored, as well as the
linearised specie transfers. This means the mass transfer rates
associated with the interface composition mechanism can be looked up and
utilised by sub models.

Based on a patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-06-01 15:54:29 +01:00
789bdc02c3 fluidThermo::hydrostaticInitialisation: Generalised hydrostatic initialisation of pressure
for buoyant solvers buoyantPimpleFoam, buoyantSimpleFoam and
buoyantReactingFoam:

Class
    Foam::hydrostaticInitialisation

Description
    Optional hydrostatic initialisation of p_rgh and p by solving for and
    caching the hydrostatic ph_rgh and updating the density such that

        p = ph_rgh + rho*gh + pRef

    This initialisation process is applied at the beginning of the run (not on
    restart) if the \c hydrostaticInitialisation switch is set true in
    fvSolution/PIMPLE or fvSolution/SIMPLE.  The calculation is iterative if the
    density is a function of pressure and an optional number of iterations \c
    nHydrostaticCorrectors may be specified which defaults to 5.
2021-06-01 11:57:55 +01:00
a997ddae5f buoyantReactingFoam: Added optional hydrostatic initialisation and replaced fireFoam
The fireFoam solver has solver has been replaced by the more general
buoyantReactingFoam solver, which supports buoyant compressible reacting flow
coupled to multiple run-time-selectable lagrangian clouds and surface film
modelling and optional hydrostatic initialisation of the pressure and p_rgh.

Hydrostatic initialisation of the pressure fields is useful for large fires in
open domains where the stability of the initial flow is dominated by the initial
pressure distribution in the domain and at the boundaries.  The optional
hydrostaticInitialization switch in fvSolution/PIMPLE with
nHydrostaticCorrectors enables hydrostatic initialisation, e.g.

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors  1;
    nCorrectors       2;
    nNonOrthogonalCorrectors 0;

    hydrostaticInitialization yes;
    nHydrostaticCorrectors 5;
}

and the resulting ph_rgh field can be used with the prghTotalHydrostaticPressure
p_rgh boundary condition to apply this hydrostatic pressure distribution at the
boundaries throughout the simulation.

See the following cases for examples transferred from fireFoam:

    $FOAM_TUTORIALS/combustion/buoyantReactingFoam/RAS
2021-05-31 15:05:19 +01:00
49ce8f6507 fvModels: Added new clouds and surfaceFilm fvModels to replace specialised solvers
With the new fvModels framework it is now possible to implement complex models
and wrappers around existing complex models which can then be optionally
selected in any general solver which provides compatible fields and
thermophysical properties.  This simplifies code development and maintenance by
significantly reducing complex code duplication and also provide the opportunity
of running these models in other solvers without the need for code duplication
and alteration.

The immediate advantage of this development is the replacement of the
specialised Lagrangian solvers with their general counterparts:

reactingParticleFoam        -> reactingFoam
reactingParcelFoam          -> reactingFoam
sprayFoam                   -> reactingFoam
simpleReactingParticleFoam  -> reactingFoam
buoyantReactingParticleFoam -> buoyantReactingFoam

For example to run a reactingParticleFoam case in reactingFoam add the following
entries in constant/fvModels:

buoyancyForce
{
    type        buoyancyForce;
}

clouds
{
    type    clouds;
    libs    ("liblagrangianParcel.so");
}

which add the acceleration due to gravity needed by Lagrangian clouds and the
clouds themselves.

See the following cases for examples converted from reactingParticleFoam:

    $FOAM_TUTORIALS/combustion/reactingFoam/Lagrangian

and to run a buoyantReactingParticleFoam case in buoyantReactingFoam add the
following entry constant/fvModels:

clouds
{
    type    clouds;
    libs    ("liblagrangianParcel.so");
}

to add support for Lagrangian clouds and/or

surfaceFilm
{
    type    surfaceFilm;
    libs    ("libsurfaceFilmModels.so");
}

to add support for surface film.  The buoyancyForce fvModel is not required in
this case as the buoyantReactingFoam solver has built-in support for buoyancy
utilising the p_rgh formulation to provide better numerical handling for this
force for strongly buoyancy-driven flows.

See the following cases for examples converted from buoyantReactingParticleFoam:

    $FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian

All the tutorial cases for the redundant solvers have been updated and converted
into their new equivalents and redirection scripts replace these solvers to
provide users with prompts on which solvers have been replaced by which and
information on how to upgrade their cases.

To support this change and allow all previous Lagrangian tutorials to run as
before the special Lagrangian solver fvSolution/PIMPLE control
solvePrimaryRegion has been replaced by the more general and useful controls:

    models          : Enable the fvModels
    thermophysics   : Enable thermophysics (energy and optional composition)
    flow            : Enable flow (pressure/velocity system)

which also replace the fvSolution/PIMPLE control frozenFlow present in some
solvers.  These three controls can be used in various combinations to allow for
example only the fvModels to be evaluated, e.g. in

$FOAM_TUTORIALS/combustion/buoyantReactingFoam/Lagrangian/rivuletPanel

PIMPLE
{
    models          yes;
    thermophysics   no;
    flow            no;
    .
    .
    .

so that only the film is solved.  Or during the start-up of a case it might be
beneficial to run the pressure-velocity system for a while without updating
temperature which can be achieved by switching-off thermophysics.  Also the
behaviour of the previous frozenFlow switch can be reproduced by switching flow
off with the other two switches on, allowing for example reactions, temperature
and composition update without flow.
2021-05-31 10:45:16 +01:00
2a38355945 compressibleInterFoam: Minor improvements to the VoFClouds and VoFSurfaceFilm fvModels 2021-05-26 08:45:14 +01:00
4064161331 dynamicLibrary::compileTemplate: Standardised naming convention for the dynamic compilation template files
which now all have Template.H or Template.C appended to differentiate them from
standard OpenFOAM library files.
2021-05-20 10:52:57 +01:00
276e4452d7 compressibleInterFoam::pEqn: Add fvModels contribution to the continuity correction after phase-fraction filtering
The phase-fraction filtering of the compressibility terms is present to avoid
spurious phase-change due to numerical noise.  The fvModels contribution may
cause physical phase-change due to cavitation, boiling, transfer from film or
VoF even where none of the phase is present and hence must be added after the
compressibility filtering.
2021-05-13 16:17:44 +01:00
707fb6d849 compressibleInterFoam: Added the Lagrangian fvModel VoFClouds
With VoFClouds and VoFSurfaceFilm compressibleInterFoam supports Lagrangian
clouds which can impinge on walls forming a film which in turn can transfer to
the VoF when the film is thick enough to resolve.  The new tutorial case

tutorials/multiphase/compressibleInterFoam/laminar/cylinder

is provided to demonstrate this functionality.

Direct transfer of droplets to the VoF phase is not yet supported but will be
added later.
2021-05-13 10:33:56 +01:00
5c8dc9c2f1 lagrangian: Simplified and rationalised SLGThermo pending a more general and extensible replacement
The reduced SLGThermo has been renamed parcelThermo to better represent the
purpose.

parcelThermo is not created and stored in the cloud that requires it rather than
requiring it to be created in the solver createFields and passed to the cloud on
construction.
2021-05-12 14:17:45 +01:00
643fbbd1d5 compressibleInterFoam: Created run-time loadable library for VoFSurfaceFilm
Now the VoFSurfaceFilm library is optionally loaded at run-time for cases that
require surface film by adding the optional "libs" entry in controlDict:

libs            ("libVoFSurfaceFilm.so");

See tutorials/multiphase/compressibleInterFoam/laminar/plateFilm
2021-05-10 13:49:18 +01:00
ef0dced356 compressibleInterFoam: Created run-time loadable library for VoFSurfaceFilm
Now the VoFSurfaceFilm library is optionally loaded at run-time for cases that
require surface film by adding the optional "libs" entry in controlDict:

libs            ("libVoFSurfaceFilm.so");

See tutorials/multiphase/compressibleInterFoam/laminar/plateFilm
2021-05-10 13:45:56 +01:00
e8ff92cd67 CorrectPhi: Added pressureReference argument to set the reference cell
so that the same reference cell is used for pcorr and p or p_rgh to improve
consistency between flux and flux correction.
2021-04-30 21:07:15 +01:00
9c7328c097 thermophysicalModels: Improved compilation error message generated for unsupported combination of properties and mixing
in particular for equations of state which do not support coefficient mixing
required by equilibrium constant evaluation in reactions.

Also improved the set of pre-compiled combinations of properties and mixing
rules.
2021-04-29 18:48:15 +01:00
dd06d98c16 multiphaseEulerFoam: Renamed Laakkonen et al models
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-04-28 16:52:06 +01:00
ab7d010a9a fvConstraints: Added limitPressure which replaces pressureControl.limit
To provide more flexibility, extensibility, run-time modifiability and
consistency the handling of optional pressure limits has been moved from
pressureControl (settings in system/fvSolution) to the new limitPressure
fvConstraint (settings in system/fvConstraints).

All tutorials have been updated which provides guidance when upgrading cases but
also helpful error messages are generated for cases using the old settings
providing specific details as to how the case should be updated, e.g. for the
tutorials/compressible/rhoSimpleFoam/squareBend case which has the pressure
limit specification:

SIMPLE
{
...
    pMinFactor      0.1;
    pMaxFactor      2;
...

generates the error message

--> FOAM FATAL IO ERROR:
Pressure limits should now be specified in fvConstraints:

limitp
{
    type       limitPressure;

    minFactor  0.1;
    maxFactor  2;
}

file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/tutorials/compressible/rhoSimpleFoam/squareBend/system/fvSolution/SIMPLE from line 41 to line 54.
2021-04-27 10:25:28 +01:00
974712b2bd thermophysicalModels: Removed seldom used or unused instantiations
Now that dynamic compilation of thermo and chemistry is available it is no
longer necessary or useful to instantiate vast numbers of thermo combinations
within the standard OpenFOAM libraries.  This reduces compile time, library size
and simplifies maintenance.
2021-04-21 21:22:52 +01:00
735c169a25 Corrected documentation for Doxygen
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-04-19 14:34:10 +01:00
ed5341f7f2 multiphaseEulerFoam: InterfaceCompositionPhaseChangePhaseSystem: Fixed sign
Resolves bug report https://bugs.openfoam.org/view.php?id=3664
2021-04-15 11:57:25 +01:00
b6114a79ee Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-04-15 10:46:13 +01:00
3de28f8736 interFoam,compressibleInterFoam,multiphaseEulerFoam: Ensure divU is registered for mapping
divU is cached before mesh-motion and mapped post-motion to drive the optional pcorr flux
update to ensure the fluxes are conservative following mesh motion and change.
2021-04-15 10:44:04 +01:00
000876bbc6 multiphaseEulerFoam: Pressure implicit thermal mass transfer
The phase system now have the ability to specify the derivative of mass
transfer rates w.r.t. pressure. This permits implicit handling of
pressure-coupled mass transfer processes.

This implicit handling has been applied to the mass transfers that are
modelled by the thermal phase system. This should result in significant
stability improvements. The implicit handling can be toggled on or off
by means of a "pressureImplicit" switch in constant/phaseProperties. It
is on by default.

Patch contributed by Juho Peltola, VTT.
2021-04-14 16:28:27 +01:00
bf340f02e3 twoPhaseMixtureThermo: Corrected Alpha2 constructor
Resolves bug-report https://bugs.openfoam.org/view.php?id=3662
2021-04-14 11:35:48 +01:00
4f6ea81d0c multiphaseEulerFoam: LaakkonenAlopaeusAittamaa: Updated to a more recent reference
The former implementation of the daughterSizeDistributionModel based on
Laakkonen et al. (2006) had the issue of not conserving the total
particle number and volume properly, except when the coefficient C4 is
set to a value of 2. The issue is solved by following the work of
Laakkonen et al. (2007).

The default coefficients in both the breakupModel and the
daughterSizeDistributionModel were updated as well according to the
suggestions of the authors.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2021-04-13 15:07:15 +01:00
65d28880fa multiphaseEulerFoam: daughterSizeDistributionModels: Removed particleNumber parameter
The current implementation of the uniform daughterSizeDistribution model
is not general enough to support uniform breakup into multiple fragments
while conserving both the total particle number and volume, except for
binary breakup (which was the default setting).

The model has therefore been renamed to uniformBinary, i.e. resulting in
two fragments.

It is currently used for verification purposes only. If the need for a
more general form arises, then that will require additional development.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
and VTT Technical Research Centre of Finland Ltd.
2021-04-13 14:51:57 +01:00