Commit Graph

730 Commits

Author SHA1 Message Date
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
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
3431c1d21e Updated unit expressions in documentation to new standardised form 2019-07-08 16:05:33 +01:00
5dbbac7c86 Solvers: standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-20 13:53:03 +01:00
96b69f6f88 Standardised and rationalised the way in which units are written in function documentation 2019-06-20 10:54:14 +01:00
213319ae30 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-19 15:01:35 +01:00
8e9f692aa4 Standardised the class declaration section comments to correspond to the foamNewSource template 2019-06-13 21:26:33 +01:00
aaed26965f nutWallFunction: Added a nutw static function to return the nutWallFunction patchField for a given patch 2019-06-02 13:10:34 +01:00
1e2550b6cd Rationalised wall function implementation to avoid complex and inconsistent coefficients
All wall functions now operate collaboratively, obtaining the Cmu, kappa and E
coefficients and yPlusLam from the nutWallFunction base class.  Now these
optional inputs need only be specified in the nut boundary condition with the k,
epsilon, omega, v2 and f wall functions obtaining these values from there.  This
is much simpler to specify and avoids inconsistencies in the operation of the
wall functions for the different turbulence fields.

The code has also been rationalised and simplified avoiding unnecessary code
and duplication.
2019-05-31 19:40:32 +01:00
fc4d7b92c3 Corrected documentation comment for disabled copy constructors 2019-05-29 15:58:42 +01:00
9140984cf4 Added "= delete" to disabled bitwise copy constructors and assignment operators
Currently these deleted function declarations are still in the private section
of the class declarations but will be moved by hand to the public section over
time as this is too complex to automate reliably.
2019-05-28 15:26:45 +01:00
3ecef91e72 Standardised copy constructor documentation comment 2019-05-27 22:34:32 +01:00
0a3b7a7932 Comment spelling corrections from codespell 2019-05-26 10:56:36 +01:00
30bea84fac C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
Replaced all uses of complex Xfer class with C++11 "move" constructors and
assignment operators.  Removed the now redundant Xfer class.

This substantial changes improves consistency between OpenFOAM and the C++11 STL
containers and algorithms, reduces memory allocation and copy overhead when
returning containers from functions and simplifies maintenance of the core
libraries significantly.
2019-05-25 17:40:39 +01:00
0889ff91c7 graphField: Moved graphs directory into postProcessing 2019-05-20 10:43:36 +01:00
5203a84a0f PatchFields: Improved documentation of the autoMap and rmap functions 2019-05-03 21:53:13 +01:00
4b57ee554e Renamed FieldMapper -> fieldMapper: it is an abstract base class for field mapping, not templated 2019-05-03 08:58:13 +01:00
687d56fbf1 Field: Moved FieldMapper mapping functions to FieldMapper and made virtual
This allows easier extension and specialisation of field mapping.
2019-05-02 15:43:32 +01:00
66c81f2e3d IATEsources::randomCoalescence: Protect source from unboundedness in kappai 2019-04-26 10:43:58 +01:00
4cb2466f28 reactingEulerFoam: Reorganised continuity error update to avoid fluid properties being recalculated unnecessarily
in particular avoiding IATE being solved a second time after the energy
solution.
2019-04-25 19:49:53 +01:00
752d764d9c Luo.H: removed stray character in Description 2019-04-05 13:35:57 +01:00
2dd53c898a turbulenceModels/laminar/Giesekus: Giesekus model for visco-elasticity
Implementation of the Giesekus model for visco-elasticity, derived from the new
generalised form of the Maxwell model which now support additional sources.

    Giesekus, H., 1982.
    A simple constitutive equation for polymer fluids based on the
    concept of deformation-dependent tensional mobility.
    J. Non-Newton. Fluid. 11, 69–109.

This implementation is instantiated for incompressible, compressible and VoF
two-phase flow.
2019-03-28 22:10:59 +00:00
e1e3e2a333 pimpleFoam: Added LTS capability for demonstration and testing
For most steady cases simpleFoam is likely to converge faster than pimpleFoam
with LTS but this capability may be useful for testing meshes, BCs etc. for more
complex solver for which SIMPLE is not stable and LTS is provided instead.
2019-03-28 11:54:55 +00:00
9bf34679bd buoyantBoussinesq[SP]impleFoam: replaced by the more general buoyant[SP]impleFoam solvers
With the selection of the Boussinesq equation of state the general buoyancy
solvers buoyantSimpleFoam and buoyantPimpleFoam can be used instead of the
specialised Boussinesq solvers avoiding the need for special implementation of
thermal and pressure boundary conditions and providing support for radiation and
fvOptions which would not have been feasible or practical in the Boussinesq
solvers.

Other incompressible equations of state are also supported; for most gaseous
problems the incompressiblePerfectGas equation of state is likely to be more
accurate than the Boussinesq equation of state.

The buoyantBoussinesq[SP]impleFoam tutorials have been updated and moved to the
corresponding buoyant[SP]impleFoam directories.
2019-03-26 21:42:14 +00:00
aaf4a0bfcc multiphase VoF solvers: Ensure the nHatf surfaceField in interfaceProperties is updated following mesh change 2019-03-19 20:13:40 +00:00
52225b96ab CorrectPhi: Added switch to control evaluation of U boundary conditions
This switch should be on for phi-correction within the time loop, where
the correction simply serves to keep the phi-field up to date before the
U-equation is solved. It should be off for initialisation
phi-correction, as the necessary data to update the conditions may not
yet exist.

Resolves bug report https://bugs.openfoam.org/view.php?id=3198
2019-03-18 16:02:25 +00:00
d41166187a writeEntry: Rationalised for consistency, ease of use and maintainability
The writeEntry form is now defined and used consistently throughout OpenFOAM
making it easier to use and extend, particularly to support binary IO of complex
dictionary entries.
2019-03-14 20:54:10 +00:00
c56f2a2e15 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-02-18 12:29:06 +00:00
d2bddb8cca pressureControl: Added p.correctBoundaryConditions() after the pressure limiting
to ensure boundary consistency.
2019-02-18 12:26:52 +00:00
111cdf3a65 solutionControl: Renaming and improved final logic
The sub-loops of the solution control are now named more consistently,
with ambiguously named methods such as finalIter replaced with ones
like finalPimpleIter, so that it is clear which loop they represent.

In addition, the final logic has been improved so that it restores state
after a sub-iteration, and so that sub-iterations can be used on their
own without an outer iteration in effect. Previously, if the
non-orthogonal loop were used outside of a pimple/piso iteration, the
final iteration would not execute with final settings.
2019-02-15 16:55:11 +00:00
e9f3811218 chtMultiRegionFoam,reactingParcelFoam: Improved pressure and density limiting 2019-02-15 10:28:15 +00:00
f9cb8e21d9 rhoPimpleFoam: Improved pressure and density limiting 2019-02-15 08:30:32 +00:00
fbb7b5dfaf solidDisplacementFoam/Make/options: Added -I option for dependency checking 2019-02-14 12:10:29 +00:00
c59c82ac0e radiationModels: Relocation, namespace changes, and fixed Qdot access
The radiation modelling library has been moved out of
thermophysicalProperties into the top-level source directory. Radiation
is a process, not a property, and belongs alongside turbulence,
combustion, etc...

The namespaces used within the radiation library have been made
consistent with the rest of the code. Selectable sub-models are in
namespaces named after their base classes. Some models have been
renamed remove the base type from the suffix, as this is unnecessary.
These renames are:

    Old name:                       New name:

    binaryAbsorptionEmission        binary
    cloudAbsorptionEmission         cloud
    constantAbsorptionEmission      constant
    greyMeanAbsorptionEmission      greyMean/greyMeanCombustion
    greyMeanSolidAbsorptionEmission greyMeanSolid
    wideBandAbsorptionEmission      wideBand/wideBandCombustion

    cloudScatter                    cloud
    constantScatter                 constant

    mixtureFractionSoot             mixtureFraction

Some absorption-emission models have been split into versions which do
and don't use the heat release rate. The version that does has been
given the post-fix "Combustion" and has been moved into the
combustionModels library. This removes the dependence on a registered
Qdot field, and makes the models compatible with the recent removal of
that field from the combustion solvers.
2019-02-11 08:38:56 +00:00
b3003ab5be solidDisplacementFoam::readThermalProperties: Cache "k" for thermal BCs 2019-02-08 17:07:57 +00:00
97095d2b2a solidDisplacementFoam: Cache the "C" field so that it can be used in thermal BCs 2019-02-08 15:14:39 +00:00
e407f7dcb7 sprayFoam: Reinstated runTime write call 2019-02-07 14:39:21 +00:00
2395769513 reactingEulerFoam: Use dimensioned<Type>::lookupOrDefault
The advantage of using this constructor for user-input dimensioned model
parameters is that it handles a variety of input; from just the value to
the full name-dimensions-value set. As more is specified, more is
checked.

Some other minor formatting improvements to the reactingEulerFoam
sub-modeling libraries have also been made.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-02-05 09:19:01 +00:00
756d10c37c reactingEulerFoam: sizeDistribution: Naming conventions
The keyword which selects how the subset over which the function
operates is generated has been renamed to "selectionMode", to make it
more consistent with other parts of the OpenFOAM (e.g., fvOptions). It
can still take the value "all" or "cellZone". A cell zone is now
specified with a "cellZone", again for consistency.

Error messaging has also been overhauled.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-02-04 09:18:36 +00:00
860a40d237 reactingEulerFoam: populationBalanceModel: Added breakup and coalescence models
Added the breakup and coalescence models of Lehr et al. (2002), and the
coalescence model of Luo (1993).

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-02-04 09:18:36 +00:00
f6bac37fc9 reactingEulerFoam: populationBalanceModel: Fix to drift term
Prior to this commit, the drift term implementation was invalid for a
ratio x_{i+1}/x_i >= 2 between the characteristic volumes of two
subsequent size groups.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-02-04 09:18:36 +00:00
b4a22214a1 populationBalanceModel::binaryBreakupModels::LuoSvendsen: New breakup model
References:
        Luo, H., & Svendsen, H. F. (1996).
        Theoretical model for drop and bubble breakup in turbulent dispersions.
        AIChE Journal, 42(5), 1225-1233.
        Eq. 27, p. 1229.

        Bannari, R., Kerdouss, F., Selma, B., Bannari, A., & Proulx, P. (2008).
        Three-dimensional mathematical modeling of dispersed two-phase flow
        using class method of population balance in bubble columns.
        Computers & chemical engineering, 32(12), 3224-3237.
        Eq. 49, p. 3230.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2019-02-02 20:17:45 +00:00
67cfa3f257 reactingMultiphaseEulerFoam::multiphaseSystem: Applied the new generalised subCycle
which now handles lists of fields.  This avoids problems with the interaction
between sub-cycling and outer-iteration.
2019-02-01 14:08:49 +00:00
e5532ff568 Changed writeKeyword to the new simpler writeEntry form where appropriate 2019-01-29 22:32:42 +00:00
8b4f866b51 timeVaryingMappedFixedValueFvPatchField: Refactored so the underlying mapping function can be used in other BCs
The new patch field mapping class timeVaryingMappedFvPatchField has been
factored out of the timeVaryingMappedFixedValueFvPatchField BC so that it can be
used to map data onto fields stored within other BCs.

In the process the writeEntryIfDifferent function had to be moved from
fvPatchField to dictionary so that it can still be used in the
timeVaryingMappedFvPatchField class and it made good sense to create the
non-conditional variant writeEntry to simplify the patch field write functions.
This rationalisation has been propagated all other patch fields.
2019-01-29 10:09:38 +00:00
5e2f17a9af populationBalanceModel: phaseChange: Improvements
A number of improvements have been made to the population balance phase
change drift model.

- The model now checks the ordering of the phase pairs and changes the
sign of the drift rate accordingly.

- The phase change mass flux and weights are calculated for each
velocity group, so the drift rate and phase change mass flux should be
consistent for each velocity group.

- By default the phase change mass flux is distributed between the size
groups based on the interfacial area of each group. For backward
compatibility number weighting can be enabled with a new
"numberWeighted" option.

The model now requires the user to provide a list of phase pairs in the
usual parenthesised form, rather than using the name. For example:

    phaseChange
    {
        pairs ((gas and liquid));
    }

Patch contributed by Juho Peltola, VTT.
2019-01-28 16:47:34 +00:00