Commit Graph

1330 Commits

Author SHA1 Message Date
02fc637645 coupledPolyPatch: Separated ordering from transformation controls
which will allow the transformation calculation functionality to be moved into
cyclic patches.
2019-12-31 20:24:52 +00:00
03207b1538 Coupled patch transformations: Removed the hideous and unphysical non-uniform transformation support
The implementation of the optional non-uniform transformations in coupled
patches was based on transform property lists which could be either length 0 for
no transformation, 1 for uniform transformation or n-faces for non-uniform
transformation.  This complexity was maintenance nightmare but kept to support
the hack in the original film implementation to partially work around the
conservation error.  Now that film has been re-implemented in fully mass
conservative form this unphysical non-uniform transformation support is no
longer needed and the coupled patch transformations have been completely
refactored to be simpler and more rational with single values for the
transformation properties and boolians to indicate which transformations are
needed.
2019-12-25 11:26:30 +00:00
8ce46619b6 TurbulenceModels/.../kOmegaSSTSato: Made multiphase
The kOmegaSSTSata model can now be used in multiphase cases, provided
that there is a single, well defined continuous phase. As previously,
the continuous phase is the phase for which the model is selected (i.e.,
in the constant/turbulenceProperties.<continuous-phase-name>
dictionary).

By default, now, all other moving phases are considered to be dispersed
bubble phases, and the effect of all of them is summed to calculate the
overall bubble induced turbulence.

This behaviour can be overridden by means of a "dispersedPhases" entry,
which takes a list of the phases to be considered dispersed by the
model.

Patch contributed by Timo Niemi, VTT.
2019-12-20 15:15:12 +00:00
89023d2f5d reacting*EulerFoam: Improved order of thermo/reaction/specie-fraction corrections
The correction of thermodynamics, reactions, and the enforcement of the
specie fraction sum are now done in the same sequence as other reacting
solvers.

Patch contributed by Juho Peltola, VTT.
2019-12-20 14:11:05 +00:00
a9ddd758e8 chtMultiRegionFoam: Added support for cases without fluid or solid regions
Resolves bug-report https://bugs.openfoam.org/view.php?id=3413
2019-12-19 14:23:35 +00:00
b44cad0118 reacting*EulerFoam/.../functionObjects/phaseForces: Sign correction 2019-12-16 11:17:06 +00:00
0ad918f659 surfaceFilmModels: Rewritten in mass conservative form
All of the film transport equations are now formulated with respect to the film
volume fraction in the region cell layer rather than the film thickness which
ensures mass conservation of the film even as it flows over curved surfaces and
around corners.  (In the previous formulation the conservation error could be as
large as 15% for a film flowing around a corner.)

The film Courant number is now formulated in terms of the film cell volumetric
flux which avoids the stabilised division by the film thickness and provides a
more reliable estimate for time-step evaluation.  As a consequence the film
solution is substantially more robust even though the time-step is now
significantly higher.  For film flow dominated problem the simulations now runs
10-30x faster.

The inconsistent extended PISO controls have been replaced by the standard
PIMPLE control system used in all other flow solvers, providing consistent
input, a flexible structure and easier maintenance.

The momentum corrector has been re-formulated to be consistent with the momentum
predictor so the optional PIMPLE outer-corrector loop converges which it did not
previously.

nonuniformTransformCyclic patches and corresponding fields are no longer needed
and have been removed which paves the way for a future rationalisation of the
handling of cyclic transformations in OpenFOAM to improve robustness, usability
and maintainability.

Film sources have been simplified to avoid the need for fictitious boundary
conditions, in particular mappedFixedPushedInternalValueFvPatchField which has
been removed.

Film variables previously appended with an "f" for "film" rather than "face"
have been renamed without the unnecessary and confusing "f" as they are
localised to the film region and hence already directly associated with it.

All film tutorials have been updated to test and demonstrate the developments
and improvements listed above.

Henry G. Weller
CFD Direct Ltd.
2019-12-12 10:34:08 +00:00
1fb7d6e023 solidDisplacementFoam: Updated solver to use the temperature field stored in solidDisplacementThermo 2019-12-09 18:25:03 +00:00
309df896ad reacting*EulerFoam/.../BlendedInterfacialModel: Fixed typo
Corrected call to model2In1 in one of the evaluate methods

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-12-06 09:42:55 +00:00
5eaf74c3a4 dictionary scalar lookup: simplified syntax using the type templated lookup function
Replaced
    readScalar(dict.lookup("name"))
with
    dict.lookup<scalar>("name")
2019-11-27 14:56:32 +00:00
d987648ef4 dictionary label lookup: simplified syntax using the type templated lookup function
Replaced
    readLabel(dict.lookup("name"))
with
    dict.lookup<label>("name)
2019-11-27 11:38:59 +00:00
4cf747f1b0 phaseForces: Simplified loop structure 2019-11-20 15:47:36 +00:00
6ad711057b reactingEulerFoam/.../coalescenceModels/PrinceBlanch: Added laminar shear contribution
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-11-19 14:30:08 +00:00
08ea2465c1 phaseForces: Additional check for existence of the sub-moodel
This fix ensures that the function still operates even if models only
exist on some interfaces.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2019-11-19 14:06:14 +00:00
c1edb022b0 foamDictionary: Disabled functionEntry expansion by default
functionEntry expansion is enabled for dictionary expansion with the -expand
option.  The disableFunctionEntries option is no longer needed and has been removed.
2019-11-19 11:42:33 +00:00
cebc401534 reacting*EulerFoam: populationBalanceModel: Improvements to updates of mass transfer rate and sources
The update of mass transfer rates in the population balance system is
now done at the same time as other source terms. This benefits
synchronisation of the mass transfer rate and the source terms and
prevents the system converging to an incorrect state.

Patch contributed by VTT Technical Research Centre of Finland Ltd and
Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2019-11-14 11:13:19 +00:00
b22545b931 DPMFoam: Changed the cloud source splitting to handle symmetric semi-implicit sources consistently
Resolves bug-report https://bugs.openfoam.org/view.php?id=3385
2019-11-13 17:15:12 +00:00
16d810c5fe ideasUnvToFoam: added region option
This allows mesh conversion of several UNV files into region meshes of a
multi-region case.

Patch contributed by Tobias Holzmann
2019-11-12 09:28:51 +00:00
da429d77f5 reactingTwoPhaseEulerFoam: Significantly improved handling of the particle pressure
In order to improve stability and robustness of fluidised bed cases the
semi-implicit treatment of the particle pressure (pPrime) is now applied within
the time-step sub-cycling along with the phase differential flux update.  This
allows the simulations to be performed reliably at a significantly increased
maximum Courant number (up to 5 for some cases) without introducing
chequerboarding patterns in regions of low particle phase fraction which
occurred with the previous algorithm.

The fluidisedBed tutorial has been updated to be more representative of real
bubbling bed cases and to demonstrate the new pPrime functionality.

Developed in collaboration with Timo Niemi, VTT.
2019-11-11 14:41:35 +00:00
c1820f19d3 postProcessing::noise: Improved robustness of the uniform time-step check 2019-10-31 14:48:31 +00:00
640027e73a solidDisplacementFoam: Updated thermophysical property handling to use solidDisplacementThermo
derived from solidThermo.  This allows the standard heat transfer boundary
conditions, for example externalWallHeatFluxTemperature, to be used with
solidDisplacementFoam and also significantly simplifies the code.

Additionally solidDisplacementFoam and solidEquilibriumDisplacementFoam have
been updated to handle spatially varying physical properties in a conservative
manner both for the stress and heat transfer.  This means that the stress field
sigma is now dynamic rather than kinematic as it was previously.  For uniform
property fields the behaviour of the solvers is the same as it was before this
update.
2019-10-30 15:17:34 +00:00
ba6b55e388 reactingEulerFoam: Improving implicit pPrime handling in the alpha equation and adding support for multiphase
This changes improves the update of the pPrime contribution from the particle
interaction pressure in the optional phase fraction corrector loop in
reactingTwoPhaseEulerFoam particularly for fluidized bed simulations with a hard
packing limit.

Multiphase support is also added for the optional implicit treatment of
turbulent dispersion in the phase fraction equations which will also be
applicable to particle packing when multiphase handing of kinetic theory is
added.
2019-10-28 18:34:43 +00:00
d7ccef0641 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-10-25 16:41:36 +01:00
d97db565c4 thermophysicalModels: Removed the unnecessary pressure argument to patch and cellSet property evaluation functions
The pressure provided to the patch and cellSet property evaluation functions is
always that stored by the thermodynamics package as is the composition which is
provided internally; given that these functions are used in boundary conditions
to estimate changes in heat flux corresponding to changes in temperature only
there is no need for another pressure to be provided.  In order that the
pressure and composition treatment are consistent and to maintain that during
future rationalisation of the handling of composition it makes sense to remove
this unnecessary pressure argument.
2019-10-25 16:33:47 +01:00
ba49dfa991 Reactions: Removed "Reaction" from the end of the reaction names
This part of the name is unnecessary, as it is clear from context that
the name refers to a reaction. The selector has been made backwards
compatible so that old names will still read successfuly.
2019-10-25 10:37:13 +01:00
57393fffc2 reacting*EulerFoam: Corrections to phase diffusivities
Corrected the turbulent dispersion contributions to the phase
diffusivities in the multiphase case.
2019-10-24 16:56:49 +01:00
7ab73932cf Function1: Generalisation and removal of unused code
Function1 has been generalised in order to provide functionality
previously provided by some near-duplicate pieces of code.

The interpolationTable and tableReader classes have been removed and
their usage cases replaced by Function1. The interfaces to Function1,
Table and TableFile has been improved for the purpose of using it
internally; i.e., without user input.

Some boundary conditions, fvOptions and function objects which
previously used interpolationTable or other low-level interpolation
classes directly have been changed to use Function1 instead. These
changes may not be backwards compatible. See header documentation for
details.

In addition, the timeVaryingUniformFixedValue boundary condition has
been removed as its functionality is duplicated entirely by
uniformFixedValuePointPatchField.
2019-10-23 13:13:53 +01:00
64da7a2cc9 reacting*EulerFoam/.../turbulentDispersionModels: Corrected for multiphase case
In two phases, the turbulent dispersion force is modelled for a phase
pair as follows:

    F12 = D12*grad(alpha1)

Where D12 is the turbulent dispersion coefficient between phases 1 and
2. This force is calculated equivalently whichever phase is chosen to be
phase 1 because the volume fractions are related by alpha1 = 1 - alpha2.
This means that F12 == - F21; i.e., the force in one phase equals the
reaction in the other.

In multiple phases, however, a force calculated in this way is no longer
consistent between phases, because the relationship between the volume
fractions no longer applies. The following form has been chosen instead.

    F12 = D12*grad(alpha1/(alpha1 + alpha2))

I.e., rather than using the gradient of a phase directly, we use the
gradient of the phase within the two-phase sub-system associated with
the pair.

This reduces to the two-phase case above, and the models available in
the literature that are explicitly formulated for multiple phases can
also be expressed in this form.

Based on a patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden -
Rossendorf (HZDR) and VTT Technical Research Centre of Finland Ltd.
2019-10-22 11:38:09 +01:00
dcf4d0c505 Function1: Implemented integral evaluations
Integral evaluations have been implemented for all the ramp function1-s,
as well as the sine and square wave. Bounds handling has also been added
to the integration of table-type functions.

In addition, the sine wave "t0" paramater has been renamed "start" for
consistency with the ramp functions.
2019-10-22 08:31:29 +01:00
ef04eed403 reactingEulerFoam::interfacialModels: Removed unnecessary clutter from field expressions 2019-10-21 15:47:10 +01:00
8e2402a08c reactingEulerFoam::heatTransferModels::Gunn: New heat transfer model for fluidized bed simulations
Description
    Gunn (1978) correlation for fixed and fluidized beds with Re < 10^5
    and continuous phase fraction between 0.35 and 1.

    Reference:
    \verbatim
        Gunn, D. J. (1978).
        Transfer of heat or mass to particles in fixed and fluidised beds.
        International Journal of Heat and Mass Transfer, 21(4), 467-476.
    \endverbatim

Based on code contributed by Alberto Passalacqua
2019-10-21 15:45:13 +01:00
4e6695e32d Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=3372
2019-10-18 11:57:11 +01:00
81fca4c43a Corrected typos in comments
found using cspell.

Patch contributed by Timo Niemi, VTT.
2019-10-18 11:46:20 +01:00
3fbd9a9328 reactingEulerFoam: Improved implicitPhasePressure handing to update within the phase-fraction corrector loop
This provides more robust and stable handling of phase packing in particle beds.
2019-10-17 12:32:03 +01:00
2b0c5028a4 Corrected typos in comments and in name of solidEquilibriumEnergySource fvOption
Patch contributed by Timo Niemi, VTT.
Resolves bug report https://bugs.openfoam.org/view.php?id=3369
2019-10-14 09:21:43 +01:00
19fd11d418 mhdFoam: Corrected description
Resolves bug-report https://bugs.openfoam.org/view.php?id=3367
2019-10-10 17:17:50 +01:00
96f10fa31a reacting*EulerFoam: Various consistency improvements
Mass transfer rates now have a more comprehensive naming convention.
"dmdt" means a bulk/mixture transfer, whilst "dmidt" is for a
specie-specific transfer. "dmdt" implies a transfer into a phase, whilst
"dmdtf" means a transfer across an interface. Tables or lists of
transfers are denoted by pluralising the name with the suffix "s"; e.g.,
"dmdtfs". All registered mass transfer rate fields have names which
include the name of the sub-model or phase system which generated them.

The phaseTransfer models have been changed so that the mixture and the
specie-specific mass transfers are independent. This simplifies the
naming convention required for registering the resulting mass transfers
and reduces the amount of logic necessary in the phase system.

The inheritance pattern of the alphat wall functions has been altered so
that the code and parameters relating to phase change are reused, and so
that the base (the Jayatilleke wall function) more closely resembles the
library implementation. This should make it easier to remove it when the
library function is generalised enough to use it directly.

The phaseSystem::zero*Field construction functions have been removed as
their behaviour regarding registration was not clear, and in most
instances of their usage the GeometriField<...>::New methods are
similarly convenient.
2019-10-10 09:31:40 +01:00
7381f45d03 reacting*EulerFoam: PhaseTransferPhaseSystem: Added non uniform specie transfer support
This change extends phaseTransferModel and PhaseTransferPhaseSystem to
allow non-uniform specie transfer between phases.

A reactionDriven phaseTransfer model is added which represents change of
selected species from one phase to another due to a reaction occurring
within one of the phases.

Following the change, the reactionDriven nucleation models and the
phaseChange drift models in populationBalanceModel have been updated to
use the new functionality in PhaseTransferPhaseSystem. The
PopulationBalancePhaseSystem has been simplified significantly as a
result.

The functionality is demonstrated by a tutorial case simulating the
vapour phase synthesis of titania by titanium tetrachloride oxidation
where both nucleation and surface reactions models are active at the
same time.

Patch contributed by VTT Technical Research Centre of Finland Ltd and
Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2019-10-09 16:53:35 +01:00
8df44abac7 diameterModels: Added surface area per unit volume and storing fields
Surface area per unit volume is now available in the diameter models.

Storing the diameter and/or surface area per unit volume fields can now
be activated for any model by means of "storeD" and "storeA"
switches. If the underlying model already stores the field then the
switch is ignored.

Based on a patch contributed by VTT Technical Research Centre of Finland Ltd and
Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2019-10-09 16:53:35 +01:00
35dbd2f947 reactingParcelFoam and chtMultiRegionFoam: Always solve the density equation
A clause preventing solution of the density equation has been removed
from reactingParcelFoam and chtMultiRegionFoam, so that they are nore
consistent with other compressible solvers. In general, the density
equation is solved before the pimple loop is entered to make sure that
the flux and the density derivative are consistent during the first
pimple iteration.
2019-10-09 14:15:22 +01:00
ebc46492ca reactingFoam, rhoPorousSimpleFoam, chtMultiRegionFoam, reactingParcelFoam, sprayFoam: Updated the handling of HbyA
Changed the interpolation of HbyA from

    fvc::flux(rho*HbyA)

to

    fvc::interpolate(rho)*fvc::flux(HbyA)

for consistency with the latest compressible p-U algorithm in rhoPimpleFoam.

For most cases this change does not affect the results but test on highly
compressible, transonic and supersonic cases have shown a small but clear
benefit in the new form.
2019-10-02 14:31:06 +01:00
54f379f668 Changed species' diffusivity to alphaEff
All multi-specie solvers function on the assumption that the
mass-diffusivities of the different species are the same. A consequence
of this is that the diffusivities of energy and mass must be the same,
otherwise mass diffusivity results in unphysical temperature
fluctuations. This change enforces this requirement across all
multi-species solvers.

For the same reason, the turbulent Schmidt number has been removed from
the multi-component phase model in reactingEulerFoam. In order to obey
physical constraints this Schmidt number had to be exactly the same as
the Prandtl number. This condition is now enforced by the solver, rather
than relying on the input being correct.
2019-09-30 16:32:39 +01:00
474962ffcc reacting*EulerFoam: Pair-storage and specification of interface composition models
Interface composition models are now specified in
constant/phaseProperties like so:

   interfaceComposition.gas
   (
        (gas and water)
        {
            // ...
        }
        (gas and oil)
        {
            // ...
        }
   );
   interfaceComposition.water
   (
        (water and gas)
        {
            // ...
        }
        // ...
   );
   // ...

I.e., the models associated with diffusive transfer within a phase
"<phase>" are specified in the list "interfaceComposition.<phase>".
Within the list, models are specified in unordered phase pairs
corresponding to the interface.

This replaces a system where models were specified in a single
interfaceComposition list, with the ordered pair entry "(<phase1> in
<phase2>)" meaning transfer within phase1 at the interface with phase2.
This ordered pair syntax is otherwise used for distinguishing between
continuous and dispersed phases. This dual meaning was considered
counter-intuitive. The new entries also more closely resemble the
associated two-resistance heat and mass transfer model specifications.
2019-09-23 09:13:14 +01:00
396c552949 reacting*EulerFoam: Renamed massTransfer models diffusiveMassTransfer
There are now many types of mass transfer, so massTransfer is now too
generic a term for what these models do. These models generate a
diffusivity which when multiplied by a concentration difference results
in mass transfer, hence the new name.

This change is not backwards compatible. Cases running the interface
composition system will need "massTransfer" entries renamed to
"diffusiveMassTransfer".
2019-09-23 08:43:29 +01:00
9cbc90110d reacting*EulerFoam: phaseSystem: Renamed massTransfer method specieTransfer 2019-09-19 17:02:23 +01:00
975784d062 BlendedInterfacialModel: Removed unused methods 2019-09-19 17:02:23 +01:00
a9de972d7a reacting*EulerFoam: phaseSystem: Removed dmdt(pair) method
Mass transfer for a pair is now no longer available at the top level.
The solver should never need to know mass transfer rates individually;
the dmdts method (which returns all mass transfers simultaneously)
should be sufficient.

In addition the construction of zero-valued fields and addition of
fields into lists and tables within the phase system has been
simplified and code duplication removed.
2019-09-19 17:02:23 +01:00
66ad375c1d reacting*EulerFoam: Corrected pressure equation for incompressible variable-density phases
The density time-derivative terms should always appear in the pressure
equation except when the phase is isochoric (i.e., the equation of state
is constant density) and the phase is pure (as species fraction changes
can also generate changes in density, even for an isochoric equation of
state). The logic in the pressure equations of reactingTwoPhaseEulerFoam
and reactingMultphaseEulerFoam has been changed to fulfil this
requirement.

This has resolved a mass-conservation issue with the
waterAndIsopropanolEvaporation case, which uses a multi-component liquid
with a constant-density equation of state.
2019-09-19 17:01:39 +01:00
fc2e2b54da TwoResistanceHeatTransferPhaseSystem: Restored asymmetric stabilisation term
See commit 7e799e9f for details.
2019-09-19 17:01:39 +01:00
df683520c8 reacting*EulerFoam: Corrected mass transfer processes
A number of fixes have been made to the mass transfer implementations in
the phase system hierarchy in order to improve conservation of energy,
and other properties.

From an implementation perspective, each phase system that defines mass
transfer now has also to implement all property transfers that occur as
a result. The base classes no longer generate the transfers
automatically; it is not in general possible to correctly calculate the
property transfer terms from a single accumulated mass transfer rate.

To facilitate this additional burden on the derived layers, a number of
addDmdt? and addDmidt? methods have been added which compute and add
these transfers into the governing equations in a generic manner. In the
case of simple explicit mass transfers, a mass-transferring system need
only pass a table of the transfer rates to these functions in order to
generate the appropriate transfer terms.

The difference between the addDmdt? and addDmidt? methods is that the
former takes a table of bulk transfers across the interfaces, whilst the
latter takes a table-of-tables of individual species transfers.

Updates to PopulationBalancePhaseSystem and
ThermalPhaseChangePhaseSystem were provided by Timo Niemi, and Juho
Peltola, VTT.
2019-09-19 17:01:39 +01:00