Commit Graph

4022 Commits

Author SHA1 Message Date
888d362bfa Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-16 15:39:36 +01:00
63ec196ea3 token: Added isAnyString and anyStringToken
to conveniently handle the cases where the particular string type does not
matter, e.g. the string equality comparison in the ifeqEntry dictionary function
entry.
2019-08-16 15:38:05 +01:00
4c34cb13ee entry: Removed legacy code 2019-08-16 15:37:31 +01:00
49023e6c57 dictionary: Added special treatment for naming of dictionaries with a null parent 2019-08-16 15:36:55 +01:00
d7d41de406 includeEntry: resolved issue with dictionaries which do not start with a FoamFile entry 2019-08-16 15:24:16 +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
91e00b40b4 verbatimString: New string type to handle the code blocks in codeStream
without the need to handle the VERBATIMSTRING token type explicitly everywhere
in the IO sub-system.  Having a specific type is more consistent with the design
and operation of token and much easier to maintain and extend.
2019-08-16 11:35:46 +01:00
ca758706ae Initial work on rationalising the handling of verbatim strings
Also first step to remove the use of the contrived and incomplete write(token)
functions which are currently needed to handle the string multiple meaning.
2019-08-15 20:44:20 +01:00
31cc91634d keyType: Now derived from variable to directly support that type 2019-08-15 15:25:54 +01:00
011b15ba0a Corrected typo 2019-08-15 15:25:07 +01:00
e3f3b4c3ec PopulationBalancePhaseSystem.C: Corrected file mode 2019-08-15 14:14:06 +01:00
681f01e11a fileFormats: Added -lOpenFOAM to avoid global construction order problem 2019-08-15 14:11:56 +01:00
2693870e79 Corrected typos 2019-08-15 14:11:43 +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
19999767f3 tutorials/combustion/reactingFoam/RAS/SandiaD_LTS: Corrected controlDict 2019-08-15 08:59:30 +01:00
de177e9f07 global.Cver: Reorganised static construction for IOobject.C and regIOobject.C 2019-08-15 08:58:47 +01:00
ab9dd9cb65 specieCoeffs: Reinstated the error message for species which are not defined in the table 2019-08-14 11:54:22 +01:00
615d5dd2b0 dictionary: Disable wildcards for variables 2019-08-14 11:25:35 +01:00
5055147ae3 IOobject.C -> global.Cver: to avoid construction order problem with foamFile 2019-08-13 16:20:55 +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
8d00f37425 tutorials: reactingEulerFoam: wallBoiling*: Corrected name of zero wall distance 2019-08-13 10:41:38 +01:00
6ecd5b24ed tutorials: reactingMultiphaseEulerFoam: Removed unnecessary Allclean script 2019-08-13 10:41:38 +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
af2baeb6d1 reactingEulerFoam: New wall boiling tutorials
All reactingEulerFoam wall boiling tutorials have been replaced with
cases that are more representative of real applications.

The wall boiling tutorials for reactingTwoPhaseEulerFoam are:

    RAS/wallBoiling:
        Axi-symmetric wall boiling case with constant bubble diameter

    RAS/wallBoilingPolyDisperse:
        As wallBoiling, but with a homogenous class method population
        balance for modelling the bubble diameters

    RAS/wallBoilingIATE:
        As wallBoiling, but with an interfacial area transport equation
        for modelling the bubble diameters

The wall boiling tutorials for reactingMultiphaseEulerFoam are:

    RAS/wallBoilingPolydisperseTwoGroups:
        As wallBoiling, but with an inhomogenous class method population
        balance for modelling the bubble diameters

Patch contributed by Juho Peltola, VTT.
2019-08-12 10:56:36 +01:00
67c5e37002 tutorials/combustion/chemFoam/gri: Removed spurious thermo file
Resolves bug-report https://bugs.openfoam.org/view.php?id=3327
2019-08-12 10:29:49 +01:00
2469e5576f functionObjectList: Expanded documentation of the readFunctionObject function 2019-08-11 00:51:41 +01:00
81f9320119 functionObject: Improved incorrect and incomplete argument error messages
Both the functionObject call context (the command line for postProcess, and the
controlDict path for run-time post-precessing) and the configuration file
context where the arguments are substituted are now printed in the error
message, e.g.

    postProcess -func 'patchAverage(name=inlet, ields=(p U))'

generates the message

--> FOAM FATAL IO ERROR:
Essential value for keyword 'fields' not set in function entry
    patchAverage(name=inlet, ields=(p U))
    in command line postProcess -func patchAverage(name=inlet, ields=(p U))
    Placeholder value is <field_names>

file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage from line 13 to line 17.

and with the following in controlDict

functions
{
    #includeFunc patchAverage(name=inlet, ields=(p U))
}

generates the message

--> FOAM FATAL IO ERROR:
Essential value for keyword 'fields' not set in function entry
     patchAverage(name=inlet, ields=(p U))
    in file /home/dm2/henry/OpenFOAM/OpenFOAM-dev/tutorials/incompressible/pimpleFoam/RAS/pitzDaily/system/controlDict at line 55
    Placeholder value is <field_names>

file: /home/dm2/henry/OpenFOAM/OpenFOAM-dev/etc/caseDicts/postProcessing/surfaceFieldValue/patchAverage from line 13 to line 17.
2019-08-10 19:16:25 +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
45fc365c4d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-08-09 16:57:16 +01:00
52cb55a27c reactingEulerFoam::dragModels::segregated: Corrected ReI 2019-08-09 16:56:17 +01:00
db109ba802 MPPICCloud: Added error indicating incompatibility of sub-models with moving meshes
MPPIC requires significant extension for damping and packing modelling
to work on moving meshes. At present the predictor-corrector process
used by these models does not maintain a consistent time-state relative
to a moving mesh. The cloud needs to enact the correction track from the
original starting point, rather than from the end of the non-corrected
track. This will require additional tracking or storage and
communication steps.

Resolves bug report https://bugs.openfoam.org/view.php?id=3318
2019-08-09 15:04:17 +01:00
61f9131389 functionObject: Improved handling of #includeFunc arguments
adding support for argument substitution into sub-dictionaries for
e.g. pressureDifferencePatch, white space before, in and after the argument list
and continuation lines, for example:

functions
{
    #includeFunc flowRatePatch(name=inlet)
    #includeFunc flowRatePatch ( name = outlet )

    #includeFunc pressureDifferencePatch \
    (                   \
        patch1 = inlet, \
        patch2 = outlet \
    )

    #includeFunc yPlus
    #includeFunc  residuals
}
2019-08-09 12:40:00 +01:00
f65f1d6883 regIOobjectRead: Corrected handling of dictionary files declared as type dictionary 2019-08-08 20:59:19 +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
670776693c temperatureCoupledBase: Rationalised the handling of kappa
kappa is now obtained from the fluidThermo for laminar regions, the turbulence
model for turbulent regions and the solidThermo for solid regions.  The "lookup"
option previously supported allowed for energy-temperature inconsistent and
incorrect specification of kappa and was not used.  Without this incorrect
option there is now no need to specify a kappaMethod thus significantly
simplifying the use boundary conditions derived from temperatureCoupledBase.
2019-08-07 21:47:51 +01:00
53999c4374 energyRegionCoupledFvPatchScalarField: Unused and incorrect, removed 2019-08-07 21:47:00 +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
962b5d36f3 foamGet: does not include files for OpenFOAM versions <ver>,
in ~/.OpenFOAM/<ver>, other than the version being sourced (used)
2019-08-06 14:46:52 +01:00
45bdc71319 chemistryModel: Added support for constructing reactions with access to the region database (objectRegistry)
Added new reaction rate fluxLimitedLangmuirHinshelwoodReactionRate which is a
variant of the standard LangmuirHinshelwoodReactionRate but with a surface flux
limiter dependent on the surface area per unit volume Av which can be supplied
either as a uniform value or a field name which is looked-up from the region
database (objectRegistry).

Description
    Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces
    including the optional flux limiter of Waletzko and Schmidt.

    References:
    \verbatim
        Hinshelwood, C.N. (1940).
        The Kinetics of Chemical Change.
        Oxford Clarendon Press

        Waletzko, N., & Schmidt, L. D. (1988).
        Modeling catalytic gauze reactors: HCN synthesis.
        AIChE journal, 34(7), 1146-1156.
    \endverbatim
2019-08-06 11:22:11 +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