Commit Graph

1420 Commits

Author SHA1 Message Date
a9e35875b1 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-09-05 15:43:52 +01:00
bf3e8f7e4b reactingEulerFoam: Added support for generalizedNewtonian laminar flow
in which the following non-Newtonian models are currently supported:

    BirdCarreau
    Casson
    CrossPowerLaw
    HerschelBulkley
    powerLaw
    strainRateFunction
2019-09-05 15:31:20 +01:00
686ea2623c reactingEulerFoam: Un-templated interface composition models
The recent field-evaluation additions to basicSpecieMixture means that
the interface composition models no longer need knowledge of the
thermodynamic type in order to do efficient evaluation of individual
specie properties, so templating on the thermodynamics is unnecessary.
This greatly simplifies the implementation.
2019-09-05 09:21:16 +01:00
4817971e13 rPolynomial: New equation of state for liquids and solids
Description
    Reciprocal polynomial equation of state for liquids and solids

    \f[
        1/\rho = C_0 + C_1 T + C_2 T^2 - C_3 p - C_4 p T
    \f]

    This polynomial for the reciprocal of the density provides a much better fit
    than the equivalent polynomial for the density and has the advantage that it
    support coefficient mixing to support liquid and solid mixtures in an
    efficient manner.

Usage
    \table
        Property     | Description
        C            | Density polynomial coefficients
    \endtable

    Example of the specification of the equation of state for pure water:
    \verbatim
    equationOfState
    {
        C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16);
    }
    \endverbatim
    Note: This fit is based on the small amount of data which is freely
    available for the range 20-65degC and 1-100bar.

This equation of state is a much better fit for water and other liquids than
perfectFluid and in general polynomials for the reciprocal of the density
converge much faster than polynomials of the density.  Currently rPolynomial is
quadratic in the temperature and linear in the pressure which is sufficient for
modest ranges of pressure typically encountered in CFD but could be extended to
higher order in pressure and/temperature if necessary.  The other huge advantage
in formulating the equation of state in terms of the reciprocal of the density
is that coefficient mixing is simple.

Given these advantages over the perfectFluid equation of state the libraries and
tutorial cases have all been updated to us rPolynomial rather than perfectFluid
for liquids and water in particular.
2019-08-31 11:57:17 +01:00
979cad1a6b reactingEulerFoam: wallDampingModel: Added documentation
Patch contributed by Juho Peltola, VTT.
2019-08-27 14:23:07 +01:00
f536328544 pimpleControl: Enabled residualControls in all pimple solvers
Resolves bug report https://bugs.openfoam.org/view.php?id=3336
2019-08-27 13:52:52 +01:00
7d6b7a78d7 reactingEulerFoam::dragModels::Ergun: Changed pair_.continuous().residualAlpha() to pair_.dispersed().residualAlpha()
Resolves request https://bugs.openfoam.org/view.php?id=3339#c10699
2019-08-26 17:39:43 +01:00
43566c7f40 particleTracks, steadyParticleTracks: Write the tracks into the <case>/VTK directory
when running serial or parallel as the tracks are reconstructed automatically.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3333
2019-08-22 22:29:23 +01:00
54509a7968 mixtureAdiabaticFlameT: Add conversion of volume fraction to mass fractions 2019-08-22 18:54:42 +01:00
f77c9e4861 reactingEulerFoam: alphatWallBoilingWallFunction: Updated documentation and stabilised a division
Patch contributed by Juho Peltola, VTT.
2019-08-20 16:35:11 +01:00
c61a66fc00 fluent.*ToFoam: Added support for ';' in schemes expressions
Resolves feature request https://bugs.openfoam.org/view.php?id=3330
2019-08-19 11:06:54 +01:00
7350f07582 foamDictionary: improved checking for FoamFile 2019-08-19 09:20:05 +01:00
409548cbcc Moved the dictionary keyword type keyType into the dictionary directory
and removed the need for the direct dependency of Ostream on keyType which is
not a primitive IO type and relates specifically to dictionary and not all IO.
2019-08-17 20:22:30 +01:00
0b6346c721 keyType: Added proper type handling and formalised construction from the string types
Rationalised IO of keyType so the internal structure is not duplicated in
if-else structures in dictionary::entry.
2019-08-17 10:57:22 +01:00
c8f4487a07 Removed unused private data members 2019-08-16 17:56:59 +01:00
888d362bfa Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-16 15:39:36 +01:00
3f7c575816 foamDictionary: Avoid expanding the first entry when checking for FoamFile 2019-08-16 15:23:37 +01:00
1a54b2ecfc lagrangian: distributionModels: Cumulative general distribution
The general distribution has been extended to accept cumulative
distribution data, by means of a "cumulative" switch. The calculation of
the mean value has also been corrected for this distribution, and
additional header documentation and parameter checking has been added.

In addition, the distribution models now all print some basic
information (min, max and mean) into the log file to help in checking
that the specification is correct.

Patch contributed by Timo Niemi, VTT.
2019-08-16 11:42:38 +01:00
e3f3b4c3ec PopulationBalancePhaseSystem.C: Corrected file mode 2019-08-15 14:14:06 +01:00
3192d64875 dictionary: Rationalised the handling of dictionary variable
by introducing a new specialised type, variable, derived from word with
additional valid characters.  This avoids some complex type-juggling in the
parser and keyType in which string was used to represent either a string or a
variable.
2019-08-15 09:16:45 +01:00
ba7f87fe76 solidChemistryModel: Removed pending a rewrite based on the latest StandardChemistryModel
solidChemistryModel is not implemented in a general way but specialised to form
the basis of the highly specific pyrolysis mode.  The handling of reactions is
hard-coded for forward reactions only, the Jacobian was present but incomplete
so any ODE solvers requiring the Jacobian would either fail, diverge or produce
incorrect results.  It is not clear if many or any parts of the
solidChemistryModel are correct, in particular there is no handling for the
solid surface area per unit volume.  After a lot of refactoring work it has
become clear that solidChemistryModel needs a complete rewrite and can benefit
from all the recent development work done on the now more general
StandardChemistryModel.
2019-08-13 15:44:39 +01:00
cfbb389fd3 reactingEulerFoam: populationBalanceModel: Added fractal shape modelling support
This change adds representation of the shape of a dispersed phase. A
layer has been added to model the relationship between the
characteristic volume of a sizeGroup and its physical diameter.
Previously this relationship was represented by a constant form factor.

Currently, two shape models are available:

  - spherical

  - fractal (for modelling fractal agglomerates)

The latter introduces the average surface area to volume ratio, kappa,
of the entities in a size group as a secondary field-dependent internal
variable to the population balance equation, which makes the population
balance approach "quasi-"bivariate. From kappa and a constant mass
fractal dimension, a collisional diameter can be derived which affects
the coagulation rates computed by the following models:

  - ballisticCollisions

  - brownianCollisions

  - DahnekeInterpolation

  - turbulentShear

The fractal shape modelling also takes into account the effect of sintering
of primary particles on the surface area of the aggregate.

Further additions/changes:

  - Time scale filtering for handling large drag and heat transfer
    coefficients occurring for particles in the nanometre range

  - Aerosol drag model based on Stokes drag with a Knudsen number based
    correction (Cunningham correction)

  - Reaction driven nucleation

  - A complete redesign of the sizeDistribution functionObject

The functionality is demonstrated by a tutorial case simulating the
vapour phase synthesis of titania by titanium tetrachloride oxidation.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden -
Rossendorf (HZDR) and VTT Technical Research Centre of Finland Ltd.
2019-08-13 10:40:25 +01:00
b2b3bd677f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-12 15:47:24 +01:00
5c937c2ec3 DPMFoam, MPPICFoam: Added fvOptions 2019-08-12 15:46:52 +01:00
f3e4668e1a reactingEulerFoam: wallDampingModels: Additional control parameters
Added two new user parameters to wallDampingModels which allow
additional control over damping to zero in the near vicinity of the
walls.

"zeroWallDist" is a distance from the walls below which the damping
function sets the value of the model to zero.

"zeroInNearWallCells" is a switch which sets the value of the model to
zero in wall adjacent cells, regardless of their actual distance from
the wall.

Patch contributed by Juho Peltola, VTT.
2019-08-12 12:01:06 +01:00
491ee7efcc KocamustafaogullariIshiiDepartureFrequency: Stabilisation
Prevent floating point exception if vapor density is higher than liquid
density

Patch contributed by Juho Peltola, VTT.
2019-08-12 10:56:45 +01:00
808e827d20 twoPhaseEulerFoam::dragModels::segregated: Added 0 phase fraction stabilisation 2019-08-10 16:35:41 +01:00
3dfbbdbfe9 Patch for some misc. typos and inconsistencies
Resolves patch request https://bugs.openfoam.org/view.php?id=3325
Patch contributed by Timo Niemi, VTT.
2019-08-10 16:29:08 +01:00
52cb55a27c reactingEulerFoam::dragModels::segregated: Corrected ReI 2019-08-09 16:56:17 +01:00
33d6d49321 foamDictionary: Simplified the handling of the dictionary file type
Also added the header separator comment for serial operation.
2019-08-08 15:41:44 +01:00
200aefa523 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-08 10:28:30 +01:00
9bbc338b3e foamDictionary: Set the type of the dictionary to that specified in the header 2019-08-08 10:27:51 +01:00
e695dfd597 SpecieMixture: Added volScalarField-type evaluation methods
This provides a virtual layer for which to evaluate properties of
individual species, across the entire domain. This is necessary when
computing the properties of reactions and phase changes, and this
provides a means of doing so without templating the sub-modelling on the
thermodynamics type, or performing an inefficient cell-loop over the
equivalent scalar methods.

Absolute enthalpy functions have also been added into basicThermo and
heThermo. Again, this information is likely to be necessary when
computing thermal aspects of phase changes.

A number of templated generic property calculation methods have also
been implemented in heThermo, and the various specific functions
rewritten in terms of them. This has removed the duplication of the code
associated with constructing the field types.
2019-08-08 09:02:05 +01:00
0dbeb66ba9 foamDictionary: Improved parallel operation
When running in parallel the decomposed dictionary files are read from the
case directory in either un-collated or collated format and changed dictionaries
written in the form specified by the selected fileHandler.

The instance directory of the dictionary file is obtained from the file path
argument, e.g.

    mpirun -np 4 foamDictionary 0.5/U \
        -entry boundaryField.movingWall.value \
        -set "uniform (2 0 0)" -parallel
2019-08-07 16:22:15 +01:00
2bd1913fd2 foamDictionary: Added support for reading files as case IOdictionary in parallel
If the -case option is specified time is created from the case
system/controlDict enabling support for parallel operation, e.g.

mpirun -np 4 \
    foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
    -set "uniform (2 0 0)" \
    -parallel

This will read and modify the 0/U field file from the processor directories even
if it is collated.  To also write the 0/U file in collated format the collated
fileHandler can be specified, e.g.

mpirun -np 4 \
    foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
    -set "uniform (2 0 0)" \
    -fileHandler collated -parallel

This provides functionality for field manipulation equivalent to that provided
by the deprecated changeDictionary utility but in a more flexible and efficient
manner and with the support of fileHandlers for collated parallel operation.
2019-08-06 19:20:51 +01:00
9492ddf039 reactingEulerFoam: Updates to alphatWallBoilingWallFunction
Added support for patchwise evaluation of surface tension to the
phaseSystem.

Filled out submodel interfaces to make it easier to add new models.

Made submodel parameters user modifiable in LemmertChawla model.

Added Kocamustafaogullari-Ishii nucleation site density and departure
frequency models and renamed the existing KocamustafaogullariIshii
departure diameter model to KocamustafaogullariIshiiDepartureDiameter.

Relaxation is now also applied to the quenching heat flux to be
consistent with the evaporative heat flux.

Improved iteration loop diagnostics. The maximum wall temperature change
on the last iteration is printed out if the maximum number of iterations
(10) is reached.

Patch contributed by Juho Peltola, VTT.
2019-08-05 11:05:28 +01:00
05208f64dc StandardChemistryModel: Separate the reaction system from the mixture thermodynamics
This allows much greater flexibility in the instantiation of reaction system
which may in general depend on fields other than the thermodynamic state.  This
also simplifies mixture thermodynamics removing the need for the reactingMixture
and the instantiation of all the thermodynamic package combinations depending on
it.
2019-08-03 15:11:00 +01:00
509133ecbb ReactionList: Simplified and rationalised
so that it can be used as the container for the reaction system in reactingMixture.
2019-08-03 09:22:43 +01:00
5acfe8b20a reactingMixture: Rationalised the reading of the species thermo and reactions
which are now read directly from the thermophysicalProperties dictionary for
consistency with non-reacting mixture thermodynamics.  The species thermo and
reactions lists can still be in separate files if convenient and included into
the thermophysicalProperties file using the standard dictionary #include.
2019-08-02 22:47:45 +01:00
4baf73b54d reactingMixture: use the foamChemistryReader directly rather than chemistryReader::New
This formalises the flexible and extensible OpenFOAM thermodynamics and reaction
format as the direct input to OpenFOAM solvers.  The CHEMKIN format is still
supported by first converting to the OpenFOAM format using the chemkinToFoam
utility.
2019-08-02 14:47:37 +01:00
b942ba07e0 ractingEulerFoam: populationBalance: Refactored scaling
Refactored the function for scaling the size group volume fractions to
better handle situations in which their sum drifts away from unity.
Scaling is now turned on by default, and can be turned off in the
solution dictionary for the population balance.

Additional revision and renaming of *Polydisperse tutorials

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-07-25 12:27:09 +01:00
696d5f4941 reactingEulerFoam: populationBalance: Clean up of header documentation
Removed unnecessary clutter in header descriptions for models that are
only required for testing purposes.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-07-25 12:12:05 +01:00
7af67fbf3f reactingEulerFoam: Corrected LaakkonenAlopaeusAittamaa daughter size distribution model
This fix also required a generalization of the corresponding base class,
which allows the user to specify the number of daughter particles per
breakup event separately.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-07-25 12:12:05 +01:00
e24f701372 reactingEulerFoam: populationBalance: Corrected treatment of coalescence
Following this commit, a coalescence event leading to a size larger than
that of the last size group is not discarded anymore, but leads to an
accumulation of volume fraction in the last size group.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-07-25 12:12:05 +01:00
d0579252a0 reactingEulerFoam: phaseForces: Corrected calculation of accumulated force
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-07-25 12:12:05 +01:00
53e8458153 foamToVTK: Added support for vol internal fields 2019-07-20 20:16:18 +01:00
853aab18cf foamFormatConvert: Fixed region handling for lagrangian data 2019-07-18 11:37:56 +01:00
0c66eb9f94 finiteVolume: Use the GeometricField::New method to construct temporary fields
Avoids database registration of temporary fields, simplifies the code and
improves maintainability.
2019-07-18 09:32:12 +01:00
67d3a8dc1b paraFoam: Added support to read vol internal fields
This is useful to visualise sources which are created as
volScalarField::Internal, e.g. the turbulence generation term for models like
kEpsilon in which it is named kEpsilon:G.
2019-07-15 22:26:34 +01:00
b7c0646ed9 PVFoamReader: Added support for visualising surfaceFields
To avoid additional clutter in the interface volFields, surfaceFields and
pointFields are now selected from a single fields selection box consistent with
the single directory with guaranteed unique names in which they are stored.

Note that when visualising the "phi" flux fields that these are extensive, the
value depends directly on the face area, so unless the mesh is uniform
interpolated continuous colour plots are not physical or informative.

Based on proposal contributed by Mattijs Janssens
2019-07-15 11:16:35 +01:00