Commit Graph

178 Commits

Author SHA1 Message Date
8e453f3874 AttouFerschneider: Correction to cube-root of volume fraction ratio 2018-04-13 14:04:49 +01:00
b9d7740e1f reactingEulerFoam: Update and instantiate interface composition models
The nonRandomTwoLiquid and Roult interface composition models have been
instantiated (and updated so that they compile), and a fuller set of
multi-component liquids and multi-component and reacting gases have been
used.

The selection name of the saturated and nonRandomTwoLiquid models have
also been changed to remove the capitalisation from the first letter, as
is consistent with other sub-models that are not proper nouns.
2018-04-09 09:58:00 +01:00
85a9e17dd5 reactingEulerFoam: Added phase transfer structure
An additional layer has been added into the phase system hierarchy which
facilitates the application of phase transfer modelling. These are
models which exchange mass between phases without the thermal coupling
that would be required to represent phase change. They can be thought of
as representation changes; e.g., between two phases representing
different droplet sizes of the same physical fluid.

To facilitate this, the heat transfer phase systems have been modified
and renamed and now both support mass transfer. The two sided version
is only required for derivations which support phase change.

The following changes to case settings have been made:

- The simplest instantiated phase systems have been renamed to
basicTwoPhaseSystem and basicMultiphaseSystem. The
heatAndMomentumTransfer*System entries in constant/phaseProperties files
will need updating accordingly.

- A phaseTransfer sub-model entry will be required in the
constant/phaseProperties file. This can be an empty list.

- The massTransfer switch in thermal phase change cases has been renamed
phaseTransfer, so as not to be confused with the mass transfer models
used by interface composition cases.

This work was supported by Georg Skillas and Zhen Li, at Evonik
2018-04-05 15:11:39 +01:00
f068c0935a reactingEulerFoam: dragModels: Typo in AttouFerschneider constructor
This change made the trickleBed case not exhibit the instability, so the
parameters have been modified a bit to keep the flow field non-trivial.
2018-04-05 15:11:10 +01:00
262ed2cd33 reactingEulerFoam/phaseSystems/populationBalanceModel: Rationalization of function names and documentation
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
2018-03-29 17:40:45 +01:00
50239102e6 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-03-27 21:09:26 +01:00
5a4d25429d tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle: Updated porosity coefficients
The implementation of the porousBafflePressure BC was incorrect in OpenFOAM-2.4
and earlier and corrected during the turbulence modeling rewrite for
OpenFOAM-3.0.  This update introduced the density scaling required for the
definition of pressure in interFoam which requires the porosity coefficients to
be reduced.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2890
2018-03-27 11:26:01 +01:00
a59781b9e7 dragModels: Added AttouFerschneider model for trickle beds
Also added tutorial case demonstrating usage. Note that the new drag
models are symmetric and should be used without any blending.

This work was supported by Georg Skillas and Zhen Li, at Evonik
2018-03-26 16:36:20 +01:00
ef885b407c reactingEulerFoam: Corrected blending in tutorials
Sub-model blending should be set such that the sum of all the blending
coefficients equals one. If there are three models specified for a phase
pair (e.g., (air in water), (water in air) and (air and water)), then
the sum-to-one constraint is guaranteed by the blending functions.
Frequently, however, the symmetric model ((air and water) in this
example) is omitted. In that case, the blending coefficients should be
selected so that the sum of just the two non-symmetric coefficients
equal one.

In the case of linear blending, this means setting the minimum partially
continuous alpha to one-minus the fully continuous value of the opposite
phase. For example:

   blending
   {
       default
       {
           type            linear;
           minFullyContinuousAlpha.air 0.7;
           minPartlyContinuousAlpha.air 0.3;
           minFullyContinuousAlpha.water 0.7;
           minPartlyContinuousAlpha.water 0.3;
       }
   }

The reactingTwoPhaseEulerFoam and reactingMultiPhaseEulerFoam tutorials
have been modified to adhere to this principle.
2018-03-23 09:38:17 +00:00
e352828514 reactingMultiphaseEulerFoam: Stationary phase
Two new phase models have been added as selectable options for
reactingMultiphaseEulerFoam; pureStationaryPhaseModel and
pureStationaryIsothermalPhaseModel. These phases do not store a
velocity and their phase fractions remain constant throughout the
simulation. They are intended for use in modelling static particle beds
and other forms of porous media by means of the existing Euler-Euler
transfer models (drag, heat transfer, etc...).

Note that this functionality has not been extended to
reactingTwoPhaseEulerFoam, or the non-reacting *EulerFoam solvers.

Additional maintenance work has been carried out on the phase model
and phase system structure. The system can now loop over subsets of
phases with specific functionality (moving, multi-component, etc...) in
order to avoid testing for the existence of equations or variables in
the top level solver. The mass transfer handling and it's effect on
per-phase source terms has been refactored to reduce duplication. Const
and non-const access to phase properties has been formalised by renaming
non-const accessors with a "Ref" suffix, which is consistent with other
recent developments to classes including tmp and GeometricField, among
others. More sub-modelling details have been made private in order to
reduce the size of interfaces and improve abstraction.

This work was supported by Zhen Li, at Evonik
2018-03-23 09:08:52 +00:00
b6b146058d test: New directory for model tests and validation
The initial set of cases in the test directory are aimed at testing the
reactingEulerFoam populationBalance functionality.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR) and VTT Technical Research Centre of Finland Ltd.
Integrated with the "tutorials" functionality by CFD Direct Ltd.
2018-03-22 16:42:11 +00:00
ba84383e26 reactingEulerFoam: Multiphase partial elimination and re-organisation
Partial elimination has been implemented for the multiphase Euler-Euler
solver. This does a linear solution of the drag system when calculating
flux and velocity corrections after the solution of the pressure
equation. This can improve the behaviour of the solution in the event
that the drag coupling is high. It is controlled by means of a
"partialElimination" switch within the PIMPLE control dictionary in
fvSolution.

A re-organisation has also been done in order to remove the exposure of
the sub-modelling from the top-level solver. Rather than looping the
drag, virtual mass, lift, etc..., models directly, the solver now calls
a set of phase-system methods which group the different force terms.
These new methods are documented in MomentumTransferPhaseSystem.H. Many
other accessors have been removed as a consequence of this grouping.

A bug was also fixed whereby the face-based algorithm was not
transferring the momentum associated with a given interfacial mass
transfer.
2018-03-08 12:41:14 +00:00
1073607cb0 Corrected spelling and typo's in comments
Resolves bug report https://bugs.openfoam.org/view.php?id=2845
2018-03-05 20:14:28 +00:00
4677d8f12f bin/tools/CleanFunctions: Added cleanVoFCase function
to automate the removal of derivative fields written to the 0 directory,
currently alphas and T.<phase>
2018-02-28 13:53:29 +00:00
984c4a2b51 runTools: getApplication utilises foamDictionary
This change means that getApplication still works if we have a
controlDict.orig, rather than a controlDict. This allows us to simplify
the scripting of tutorials in which the controlDict is modified.
2018-02-28 10:20:45 +00:00
fde4c4f43b tutorials: Fixes relating to initialisation
Some tutorials have had Allrun scripts added in order to run setFields,
which was previously omitted. Others have had nonuniform field files in
the 0 directory replaced by uniform files with .orig extensions.
2018-02-23 14:06:04 +00:00
c7a5f740d8 renumberMesh: Added -noFields option to avoid renumbering the fields when not necessary 2018-02-18 21:34:11 +00:00
2761c69e0e Corrected propeller tutorials 2018-02-17 23:11:43 +00:00
d8954d4370 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-16 23:10:09 +00:00
9221dd0d0f tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-15 20:14:27 +00:00
df6e2da2dd OpenFOAM field reading: Automated the handling of <field>.orig files
Now if a <field> file does not exist first the compressed <field>.gz file is
searched for and if that also does not exist the <field>.orig file is searched
for.

This simplifies case setup and run scripts as now setField for example can read
the <field>.orig file directly and generate the <field> file from it which is
then read by the solver.  Additionally the cleanCase function used by
foamCleanCase and the Allclean scripts automatically removed <field> files if
there is a corresponding <field>.orig file.  So now there is no need for the
Allrun scripts to copy <field>.orig files into <field> or for the Allclean
scripts to explicitly remove them.
2018-02-14 17:42:14 +00:00
0248dd81e3 Corrected comments: inbetween -> in between 2018-02-13 16:38:41 +00:00
2c882ab4a7 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse: Added execute permission to scripts 2018-01-24 22:06:48 +00:00
6e143e5ab0 reactingEulerFoam: Added wall-boiling and phase change capability to populationBalance functionality
Introduced thermalPhaseChangePopulationBalanceTwo- and MultiphaseSystem as
user-selectable phaseSystems which are the first to actually use multiple mass
transfer mechanisms enabled by

commit d3a237f560.

The functionality is demonstrated using the reactingTwoPhaseEulerFoam
wallBoilingPolydisperse tutorial.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2018-01-24 14:57:14 +00:00
d2175f8fe0 fvOptions: verticalDamping: Added spatial ramping
The onset of vertical damping can now be graduated over a distance. The
user specifies an origin and a direction along which the graduation
occurs, and a ramping function to specify the form of the graduation. An
example specification for the fvOption is:

    verticalDamping1
    {
        type            verticalDamping;

        selectionMode   all;

        origin          (1200 0 0);
        direction       (1 0 0);
        ramp
        {
            type        halfCosineRamp;
            start       0;
            duration    600;
        }

        lambda          [0 0 -1 0 0 0 0] 1; // Damping coefficient

        timeStart       0;
        duration        1e6;
    }

If the origin, direction or ramp entries are omitted then the fvOption
functions as before; applying the damping to the entire volume or the
specified cell set.

This work was supported by Jan Kaufmann and Jan Oberhagemann at DNV GL.
2018-01-09 08:47:37 +00:00
8b44230384 MRF tutorials: Change rotor velocity boundary condition to fixedValue
Using the noSlip boundary condition for rotating wall in an MRF region
interferes with post-processing by resetting the wall velocity to 0 rather than
preserving the value set by the MRF zone.
2018-01-05 15:13:46 +00:00
9f54506fbf reactingEulerFoam: improvements to population balance modeling
Removed possibility for the user to specify a driftRate in the constantDrift
model which is independent of a fvOptions mass source. The driftRate must be
calculated from/be consistent with the mass source in order to yield a particle
number conserving result.

Made calculation of the over-all Sauter mean diameter of an entire population
balance conditional on more than one velocityGroup being present. This diameter
field is for post-processing purposes only and would be redundant in case of one
velocityGroup being used.

Solution control is extended to allow for solution of the population balance
equation at the last PIMPLE loop only, using an optional switch. This can be
beneficial in terms of simulation time as well as coupling between the
population balance based diameter calculation and the rest of the equation
system.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2018-01-04 17:23:00 +00:00
f578347934 tutorials: Corrected headers 2017-12-31 20:15:10 +00:00
57fa56ae7b tutorials/multiphase/reacting.*EulerFoam Allrun Allclean: Corrected file permissions 2017-12-31 20:09:10 +00:00
3e577d8515 reactingEulerFoam: Added population balance modeling capability
This patch enables the reactingEulerFoam solvers to simulate polydisperse flow
situations, i.e. flows where the disperse phase is subject to a size
distribution.

The newly added populationBalanceModel class solves the integro-partial
differential population balance equation (PBE) by means of a class method, also
called discrete or sectional method. This approach is based on discretizing the
PBE over its internal coordinate, the particle volume. This yields a set of
transport equations for the number concentration of particles in classes with a
different representative size. These are coupled through their source-terms and
solved in a segregated manner. The implementation is done in a way, that the
total particle number and mass is preserved for coalescence, breakup and drift
(i.e. isothermal growth or phase change) processes, irrespective of the chosen
discretization over the internal coordinate.

A population balance can be split over multiple velocity (temperature) fields,
using the capability of reactingMultiphaseEulerFoam to solve for n momentum
(energy) equations. To a certain degree, this takes into account the dependency
of heat- and momentum transfer on the disperse phase diameter. It is also possible
to define multiple population balances, e.g. bubbles and droplets simultaneously.

The functionality can be switched on by choosing the appropriate phaseSystem
type, e.g. populationBalanceMultiphaseSystem and the newly added diameterModel
class called velocityGroup. To illustrate the use of the functionality, a
bubbleColumnPolydisperse tutorial was added for reactingTwoPhaseEulerFoam and
reactingMultiphaseEulerFoam.

Furthermore, a reactingEulerFoam-specific functionObject called sizeDistribution
was added to allow post-Processing of the size distribution, e.g. to obtain the
number density function in a specific region.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2017-12-31 19:59:47 +00:00
d3a237f560 reactingEulerFoam: Multiphase thermal phase change and support for multiple mass transfer mechanisms
- Thermal phase change and wall boiling functionality has been generalized to
  support two- and multi- phase simulations.
- Thermal phase change now also allows purePhaseModel, which simplifies case setup.
- The phaseSystem templates have been restructured in preparation of multiple
  simultaneous mass transfer mechanisms. For example, combination of thermal phase
  and inhomogeneous population balance models.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2017-12-31 19:50:22 +00:00
15a2e7f6e9 combustionModel, chemistryModel: Simplified model selection
Updated all tutorials to the new format
2017-12-11 15:20:47 +00:00
46704f121b interFoam: Merged dynamic mesh functionality of interDyMFoam into interFoam
and replaced interDyMFoam with a script which reports this change.

The interDyMFoam tutorials have been moved into the interFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-30 23:56:42 +00:00
7d6b1be4b3 pimpleFoam, rhoPimpleFoam, interDyMFoam: Rationalized mesh-motion support
Added support for mesh-motion update within PIMPLE loop in pimpleFoam and rhoPimpleFoam.
2017-11-30 13:07:42 +00:00
4b5a10d167 compressibleInterFoam family: merged two-phase momentum stress modelling from compressibleInterPhaseTransportFoam
The new momentum stress model selector class
compressibleInterPhaseTransportModel is now used to select between the options:

Description
    Transport model selection class for the compressibleInterFoam family of
    solvers.

    By default the standard mixture transport modelling approach is used in
    which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
    constructed for the mixture.  However if the \c simulationType in
    constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
    Euler-Euler two-phase transport modelling approach is used in which separate
    stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
    of the two phases allowing for different modeling for the phases.

Mixture and two-phase momentum stress modelling is now supported in
compressibleInterFoam, compressibleInterDyMFoam and compressibleInterFilmFoam.
The prototype compressibleInterPhaseTransportFoam solver is no longer needed and
has been removed.
2017-11-14 10:03:20 +00:00
e98f0b6ce3 tutorials/multiphase/compressibleInterPhaseTransportFoam/climbingRod: Improved stability
for a wider range of phase initialization.
2017-11-09 15:04:18 +00:00
eea9f8dd86 tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D: Removed
This tutorial is not currently run due to conservation issues with AMI
2017-11-08 10:31:28 +00:00
6c8102bd9a climbingRod tutorial: added case information in README 2017-11-03 17:59:41 +00:00
04b562cd7a climbingRod tutorial: renamed fluid phase -> liquid 2017-11-01 10:00:30 +00:00
6b023ff9ac climbingRod tutorial: adjusted setFields box
so it does not coincide with cell centres
2017-11-01 09:23:26 +00:00
c3c777ee08 climbingRod tutorial: renamed water phase -> fluid 2017-11-01 09:21:37 +00:00
e96e40bb6c compressibleInterPhaseTransportFoam: New variant of compressibleInterFoam supporting separate phase stress models
In this version of compressibleInterFoam separate stress models (laminar,
non-Newtonian, LES or RAS) are instantiated for each of the two phases allowing
for completely different modeling for the phases.

e.g. in the climbingRod tutorial case provided a Newtonian laminar model is
instantiated for the air and a Maxwell non-Newtonian model is instantiated for
the viscoelastic liquid.  To stabilize the Maxwell model in regions where the
liquid phase-fraction is 0 the new symmTensorPhaseLimitStabilization fvOption is
applied.

Other phase stress modeling combinations are also possible, e.g. the air may be
turbulent but the liquid laminar and an RAS or LES model applied to the air
only.  However, to stabilize this combination a suitable fvOption would need to
be applied to the turbulence properties where the air phase-fraction is 0.

Henry G. Weller, Chris Greenshields
CFD Direct Ltd.
2017-10-30 09:36:43 +00:00
f53f52a691 createPatch: writing the cyclic match OBJ files is now optional
The new optional switch 'writeCyclicMatch' can be set to 'true' to enable the writing of
the cyclic match OBJ files; defaults to 'false'.

Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2685
2017-09-09 23:00:27 +01:00
30602652da tutorials/multiphase/interFoam/laminar/wave: Consistency updates 2017-09-08 14:58:18 +01:00
8c5f4b36f8 tutorials: updated triSurface entries to logical format
supported by commit 80e22788e4
2017-07-13 12:47:34 -05:00
e8daaa5c76 compressibleInterFoam: Improved mass conservation
using the continuity error correction formulation developed for
twoPhaseEulerFoam and reactingEulerFoam.
2017-06-22 14:42:36 +01:00
07a7513fae tutorials: interDyMFoam: Added DTCHull case with waves. This case has a
reduced mesh size and simulation time in comparison with the other
DTCHull cases, so the results will not be as accurate.
2017-05-31 10:09:14 +01:00
2aa78c6db3 tutorials: interFoam: Added 2D wave propagation case 2017-05-31 10:09:14 +01:00
130b051b54 tutorials/multiphase/interDyMFoam/RAS/DTCHull: Resolve stability issue caused by improvements to MULES 2017-05-08 22:44:14 +01:00
9801c25788 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00