Commit Graph

4151 Commits

Author SHA1 Message Date
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
7ec1f0d6a8 bin/sonicFoam: Updated description
Resolves bug-report https://bugs.openfoam.org/view.php?id=3373
20191018
2019-10-17 18:45:53 +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
730d6584f3 radiationModels/fvDOM: Re-formatted header documentation 2019-10-14 09:22:20 +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
8ea55e8f06 functionObjects/.../*FieldValue: Protect against division by zero
Patch contributed by Timo Niemi, VTT.
Resolves bug report https://bugs.openfoam.org/view.php?id=3370
2019-10-14 09:21:27 +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
4f1ee482ec Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-10-10 16:17:17 +01:00
e62ded842f functionObjects::age: Added caching of the age field
to allow post-processing, e.g. sampling, cutting planes, averaging etc.
2019-10-10 16:16:24 +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
8c9e466e66 reactions: Added surfaceArrheniusReactionRate
This is a modified Arrhenius reaction rate where the reaction rate is
multiplied by a surface area per unit volume.

The reaction rate is given by:

    k = (A * T^beta * exp(-Ta/T))*a

Where a is the surface area per unit volume, the name of which is
specified by the user. This enables, for example, the reaction rate to
depend on the surface area concentration of catalyst particles.

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
a2a74cbb79 functionObjects::age: add optinoal diffusion term and convergence control
to enable the calculation of the residence time for a fluid; mainly used in HVAC
analysis. E.g. residence time of air inside a ventilated room, see the new
tutorial roomResidenceTime.

Contributed by Tobias Holzmann
2019-10-08 16:14:38 +01:00
c8ab2a6e0c tutorials: Updated and simplified using the blockMesh defaultPatch entry
Rather than defining patches for all external block faces to provide name and
type use the defaultPatch entry to collect undefined faces into a single named
and typed patch, e.g.

defaultPatch
{
    name walls;
    type wall;
}
2019-10-07 16:49:11 +01:00
6bde8bf544 meshToMesh::directMethod: Corrected formatting 2019-10-07 16:48:30 +01:00
278ba86d7d rigidBodyDynamics::restraints::externalForce: New restraint to apply a time-varying force
Description
    Time-dependent external force restraint using Function1.

Usage
    Example applying a constant force to the floatingObject:
    restraints
    {
        force
        {
            type        externalForce;
            body        floatingObject;
            location    (0 0 0);
            force       (100 0 0);
        }
    }

Based on code contributed by SeongMo Yeon
Resolves contribution request https://bugs.openfoam.org/view.php?id=3358
2019-10-04 16:52:55 +01:00
be0ccd2e38 tutorials/multiphase/interFoam/RAS/floatingObject: Removed temporary force restraint 2019-10-04 16:51:56 +01:00
639a90c645 rigidBodyDynamics::restraints::externalForce: New restraint to apply a time-varying force
Description
    Time-dependent external force restraint using Function1.

Usage
    Example applying a constant force to the floatingObject:
    restraints
    {
        force
        {
            type        externalForce;
            body        floatingObject;
            location    (0 0 0);
            force       (100 0 0);
        }
    }

Based on code contributed by SeongMo Yeon
Resolves contribution request https://bugs.openfoam.org/view.php?id=3358
2019-10-04 16:45:22 +01:00
8756e82afd Function1::reverseRamp: New ramp function which reverses a given ramp function
Description
    A wrapper class to reverse any ramp function such that the result starts
    from 1 decreasing to 0 from \c start over the \c duration and remaining at 0
    thereafter.

    Usage for scaling a vector:
    \verbatim
        <entryName>
        {
            scale
            {
                type        reverseRamp;

                ramp        linearRamp;

                start       0;
                duration    10;
            }

            value
            {
                type        sine;

                frequency   10;
                amplitude   1;
                scale       (1 0.1 0);
                level       (10 1 0);
            }
        }
    \endverbatim

Based on code contributed by SeongMo Yeon
See https://bugs.openfoam.org/view.php?id=3358
2019-10-04 16:03:32 +01:00
d32795f0ed rigidBodyDynamics: Added rigidBodyModelState parameter to the restraints
Provides access to properties of the model and current state for complex and
time-dependent restraints.

Patch contributed by SeongMo Yeon
Resolves contribution https://bugs.openfoam.org/view.php?id=3345#c10787
2019-10-02 14:57:59 +01:00
28a3b34c49 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2019-10-02 14:48:04 +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
c32d7ea592 wmkdep: Removed a file search optimisation which can generate the incorrect path
if there is more than one search directory containing the same file name.
2019-10-02 14:30:04 +01:00
d94a7bf590 tutorials/incompressible/simpleFoam/turbineSiting: Replaced file copying with foamDictionary and .orig 2019-10-01 15:00:55 +01:00
5e09cccd9c topoSet: Corrected output of size of zones and patches in parallel 2019-10-01 14:57:17 +01:00
826c380fa3 tutorials/lagrangian/reactingParcelFoam/splashPanel: Resolved divergence
The side surfaces in this tutorial have been made symmetry planes to
match the corresponding boundaries in the film region, and the top has
had its pressure condition changed to totalPressure. The case now runs
successfully to completion.

Previously the pressure-velocity boundary condition combination on the
non-film patches was incorrect in that in regions of outflow a pressure
value was not being specified. This resulted in divergence.
2019-10-01 13:39:26 +01:00
1bbac95448 objectRegistry: Improvements to caching of temporary objects
Cached temporary objects are now registered from the moment of
construction. This means it is possible to use them before they go out
of scope. Non-cached temporaries are not registered, as before.

The check for the existence of requested cached objects is now done
after function object evaluation. This means that caching can be done on
fields generated by the function objects themselves without generating
warning messages.

The above, however, means that if an object isn't successfully cached
and it's lookup in a function fails, then the warning will not be
generated before the lookup raises an error. This could make diagnosing
the reason for such a failure more difficult. To remedy this the content
of the warning (i.e., the list of objects that are available for
caching) has been added to the lookup error message if the looked up
name is on the caching list. The same level of logged information is
therefore retained in the event of caching and lookup failures.
2019-09-30 16:32:39 +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
f1b975bbb1 rigidBodyDynamics::restraints::linearSpring: Added switch "allowSlack" to allow no restraint when line is shorter than restLength
Based on patch contributed by SeongMo Yeon
Resolved contribution https://bugs.openfoam.org/view.php?id=3352
2019-09-30 14:26:57 +01:00
2ebed5ec71 functionObject: Added executeAtStart
By default most functionObjects now execute and write at the start-time except
those that perform averaging (fieldAverage, dsmcFields) which cannot be executed
until the end of the first time-step.  There is also a new optional
functionObject dictionary entry "executeAtStart" which defaults to true but can
be set false if the execution and results of the functionObject are not required
or appropriate at the start-time.

A result of this change is that time logs of forces, sampling etc. now include a
values for time 0.
2019-09-30 11:03:20 +01:00
6f1c3362a6 cloudInfo: Corrected libcloudFunctionObjects -> liblagrangianFunctionObjects
Resolves bug-report https://bugs.openfoam.org/view.php?id=3356
20190929
2019-09-27 11:40:09 +01:00
24d9974a3d regionToCell: Corrected indexing of neighbour cell selections 2019-09-26 14:00:43 +01:00
46e8d22445 etc/caseDicts/annotated/mirrorMeshDict: Added examples of planeEquation and embeddedPoints
Resolves contribution https://bugs.openfoam.org/view.php?id=3342
Patch provided by Gerhard Holzinger
2019-09-25 13:27:07 +01:00
4feee735a3 functionObjects::log: Added optional switch to disable dimension checking:
Description
    Calculates the natural logarithm of the specified scalar field.

    Performs \f$ln(max(x, a))\f$ where \f$x\f$ is the field and \f$a\f$ an
    optional clip to handle 0 or negative \f$x\f$.  Dimension checking can
    optionally be suspended for this operation if \f$x\f$ is dimensioned.

    Example of function object specification:
    \verbatim
    log1
    {
        type            log;
        libs            ("libfieldFunctionObjects.so");
        field           p;
        clip            1e-3;
        checkDimensions no;
    }
    \endverbatim

    or using \c postProcess
    \verbatim
    postProcess -func 'log(p, clip=1e-3, checkDimensions=no)'
    \endverbatim

Usage
    \table
        Property        | Description               | Required | Default value
        type            | Type name: log            | yes      |
        clip            | Clip value                | no       |
        checkDimensions | Dimension checking switch | no       |
    \endtable
2019-09-24 11:37:38 +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
bfbaddc5e5 test/multiphase/reactingTwoPhaseEulerFoam/interfaceComposition: Added mass and energy conservation plots 2019-09-19 17:01:39 +01:00
b77dacd0b9 tutorials/*/reactingTwoPhaseEulerFoam/laminar/bubbleColumnEvaporatingDissolving: Fixed air properties 2019-09-19 17:01:39 +01:00
ea129bca76 reacting*EulerFoam: MomentumTransferSystem: Corrected turbulent dispersion force handling for multiple phases 2019-09-19 16:38:37 +01:00
210cf4f361 reacting*EulerFoam: phaseSystem: Corrected blended model pair order
Blended models are now constructed with the same phase order as the
corresponding pair stored by the phase system. This should ultimately
prevent some of the sign comparisons that are currently necessary when
applying models.
2019-09-19 16:08:54 +01:00
29e4cc592a constrainHbyA: Added constrainPhiHbyA to constrain the predicted flux directly 2019-09-18 16:37:36 +01:00