Commit Graph

5076 Commits

Author SHA1 Message Date
a24e8e463a fvOptions::damping: Replaced the unused cellSetOption base-class with option
Resolves the bug-report https://bugs.openfoam.org/view.php?id=3631
2021-02-17 15:16:25 +00:00
f4a7dad25b fvOptions::buoyancyEnergy,radiation: Corrected documentation
See https://bugs.openfoam.org/view.php?id=3631
2021-02-17 12:39:11 +00:00
6c3b0a46c0 functionObjects::forces: Added support for phase filtering
Usage
    \table
        Property     | Description             | Required    | Default value
        type         | Type name: forces       | yes         |
        log          | Write force data to standard output | no | no
        patches      | Patches included in the forces calculation | yes |
        p            | Pressure field name     | no          | p
        U            | Velocity field name     | no          | U
        rho          | Density field name (see below) | no   | rho
        phase        | Phase name for phase-fraction  | no   |
        CofR         | Centre of rotation (see below) | no   |
        directForceDensity | Force density supplied directly (see below)|no|no
        fD           | Name of force density field (see below) | no | fD
    \endtable

with the optional 'phase' entry the corresponding phase-fraction is used to
filter the surfaces forces for that phase.
2021-02-16 15:10:09 +00:00
a221c29a19 isoSurface: Changed default filtering to "partial"
The "full" filtering option has been found not to be sufficiently
robust. It erroneously removes entire contiguous sections of the
iso-surface in a number of situations. Full filtering can still be
enabled by specifying "filtering full;" in the relevant dictionary.
2021-02-16 12:19:05 +00:00
fa21918cb5 tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D: Changed rotor U BC
to fixedValue to provide velocity distribution on the rotor for post-processing.
2021-02-15 15:13:10 +00:00
a646067973 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-02-13 19:00:29 +00:00
766eb61f7b viscosityModels::BirdCarreau: Simplified the specification of the optional 'a' parameter 2021-02-13 18:59:46 +00:00
f5eace92b9 caseDicts/annotated/topoSetDict: Added examples of new sources 2021-02-12 17:28:32 +00:00
1440b668f1 topoSet: Added patchDistanceToCell cell source
This source choses cells below a certain distance to a patch or a set of
multiple patches:

Example Usage in system/topoSetDict:

    actions
    (
        {
            name    c0;
            type    cellSet;
            action  new;
            source  patchDistanceToCell;
            sourceInfo
            {
                patch ".*Wall";
                distance 0.1;
            }
        }
    );

Example usage in system/setFieldsDict:

    defaultFieldValues
    (
        volScalarFieldValue alpha.water 0
    );

    regions
    (
        patchDistanceToCell
        {
            patches (".*Wall" atmosphere);
            distance 0.1;
            fieldValues
            (
                volScalarFieldValue alpha.water 1
            );
        }
    );
2021-02-12 15:31:05 +00:00
583d97d145 Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2021-02-12 15:12:27 +00:00
6b29786f36 mixerVesselAMI: delete buried README file 2021-02-12 15:12:10 +00:00
6b469e278c containerDischarge2D: Tutorial with liquid discharge from the container. 2021-02-12 14:08:37 +00:00
d57401c5af multiphaseEulerFoam: Corrected header documentation of PrinceBlanch coalescence model
The paper of Prince and Blanch (1996) contains an error in equation (2),
which computes the collision cross-sectional area and should be using
the bubble diameter rather than the radius. This error also extends to
equation (8) where the coefficient is wrong by a factor of 4. The
current code is correct, but the documentation was still referring to
the wrong coefficient.

Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-02-12 11:05:29 +00:00
f56539d8de porosityModel: Rationalised and simplified the interface
interRegionExplicitPorositySource: Removed the unnecessary and inappropriate
bidirectional mapping of data between the regions sharing the porous media.  Now
the drag is calculated on the same mesh as the flow and filtered according to
the fraction of the cells containing porosity.

To complete this work a small change will be made to the mesh-mapping functions.
2021-02-12 10:12:05 +00:00
0f04dd04c6 DenseDragForce: Corrected lookup type
Resolves bug report https://bugs.openfoam.org/view.php?id=3626
2021-02-12 09:36:16 +00:00
0e8391b35a solvers: Support outer correctors with frozenFlow setting
reactingFoam and multiphaseEulerFoam can now both be run with the
frozenFlow switch and multiple outer correctors. This makes their
behaviour consistent with the frozenFlow implementation in
chtMultiRegionFoam.
2021-02-12 09:04:11 +00:00
4d8aef07ef fvOptionList: Renamed addedToFields -> addSupFields 2021-02-12 08:38:29 +00:00
2dcc5452a6 multiphaseEulerFoam: Corrected indentation 2021-02-11 17:02:25 +00:00
27b92bb2f6 multiphaseEulerFoam/.../diameterModels: Removed caching
The previous changes to reactions mean that caching the surface area
density field is no longer necessary. The diameter models have had their
caching functionality removed, which has simplified both the
implementation and the user interface.
2021-02-11 16:47:22 +00:00
3f64e27f46 multiphaseEulerFoam: Added phaseSurfaceArrhenius reaction
A modified Arrhenius reaction rate given by:

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

Where a is the phase surface area per unit volume. The name of the phase is
specified by the user.

Example usage:

    oxidationAtSurface
    {
        type        irreversiblePhaseSurfaceArrhenius;

        reaction    "O2^0 + TiCl4 = TiO2_s + 2Cl2";

        A           4.9e1; // The pre-exponential factor is in units
                           // equal to that in the usual volumetric
                           // reaction rate **divided by length**, as
                           // the Arrhenius expression is taken to give
                           // rate per unit area, not per unit volume
        beta        0.0;
        Ta          8993;

        phase       particles;
    }

This reaction has been applied to the titaniaSynthesisSurface tutorial,
which avoids the need for explicit caching of the surface area density
field.
2021-02-11 16:37:58 +00:00
d024c066e2 chemistry: Added preEvaluate and postEvaluate hooks to reactions 2021-02-11 15:21:22 +00:00
6c1adf6fc2 tmp: Added move assignment operator
This provides the same behaviour as the assign operator, but with
certain checks removed as they do not apply when the source tmp is an
rvalue and will therefore not be retained after the assignment
operation. It is also consistent with and complimentary to the behaviour
of the move constructor.
2021-02-11 15:21:22 +00:00
94e5094f04 mixerVessel2D blockMeshDict reformatting 2021-02-10 18:24:10 +00:00
5a775bf101 fvOptions: Renamed addedToFields -> addSupFields, addsToField -> addsSupToField 2021-02-10 17:01:12 +00:00
9457a9d21a rotor2D: Removed blockMeshDict.m4 and replaced by blockMeshDict dictionary.
Vertices generated using run time compilation functionality.
2021-02-10 16:50:46 +00:00
dcc3f336bd mixerVessel2D: Removed blockMeshDict.m4 and replaced by mixerVessel2D dictionary.
Vertices generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/mixerVessel2D
2021-02-10 16:45:48 +00:00
7b19245b1e tutorials/.../wallBoiling: Use tabulated properties and add validation
Patch contributed by Juho Peltola, VTT.
2021-02-10 12:51:39 +00:00
6b4b81b838 etc/thermoData: Added tabulated properties for refrigerant R12 2021-02-10 12:44:34 +00:00
4bfe7d48c9 tutorials: Prevent "unconfirmed completion" in test loop 2021-02-09 21:19:40 +00:00
76b8baa701 thermophysicalFunctions/APIdiffCoef: Prevent Clang warning 2021-02-09 21:18:12 +00:00
aa4151d649 Function1: Added squarePulse
This function gives a value of one during a user-specified duration, and
zero at all other times. It is useful for defining the time range in
which an injection or ignition heat source or similar operates.

Example usage, scaling a value:

    <name>
    {
        type        scale;
        scale       squarePulse;
        start       0;
        duration    1;
        value       100;
    }

This function has been utilised in a number of tutorial fvOption
configurations to provide a specific window in which the fvOption is
applied. This was previously achieved by "timeStart" and "duration"
controls hard coded into the fvOptions themselves.
2021-02-09 20:02:21 +00:00
e7f746652b fvOptions: Use macros for looping over primitive types 2021-02-09 20:02:21 +00:00
69e98dc28d fvOptions: Added massSource option
This fvOption applies a mass source to the continuity equation and to
all field equations.

Example usage:

    massSource
    {
        type            massSource;

        selectionMode   cellSet;
        cellSet         massSource;

        massFlowRate    1e-4;

        fieldValues
        {
            U               (10 0 0);
            T               350;
            k               0.375;
            epsilon         14.855;
        }
    }

Values should be provided for all solved for fields. Warnings will be
issued if values are not provided for fields for which transport equations
are solved. Warnings will also be issued if values are provided for fields
which are not solved for.
2021-02-09 20:02:14 +00:00
07f5080f2e fvOptions: Remove type restrictions and rewrite of field-name handling
A number of fvOptions that apply to a user-derined field can now
automatically work what primitive type they apply to. These options can
apply to any field type, and in some cases even multiple fields of
differing type. Example usage of the options to which this change
applies are shown below:

    codedSource1
    {
        type            codedSource;
        name            codedSource1;

        field           h;

        ...
    }

    fixedValueConstraint1
    {
        type            fixedValueConstraint;

        fieldValues
        {
            R           (1 0 0 1 0 1);
            epsilon     150;
        }

        ...
    }

    phaseLimitStabilization11
    {
        type            phaseLimitStabilization;

        field           sigma.liquid;

        ...
    }

Previously to apply to a given type, these options had to be selected
with the name of the type prepended to the option name (e.g., "type
symmTensorPhaseLimitStabilization;") and those that operated on multiple
fields were restricted to those fields being of the same type.

A number of other options have had improvements made to their handling
of user specification of fields. Where possible, the option will now
attempt to work out what field the option applies to automatically. The
following options, therefore, no longer require "field" or "fields"
entries:

    actuationDiskSource
    buoyancyEnergy
    buoyancyForce
    meanVelocityForce
    rotorDiskSource
    volumeFractionSource
    constantHeatTransfer
    function2HeatTransfer
    variableHeatTransfer

Non-standard field names can be overridden in the same way as in
boundary conditions; e.g., the velocity name can be overridden with a "U
<UName>;" entry if it does not have the default name, "U". The name of
the energy field is now always determined from the thermodynamics
model and should always be correct. Some options that can be applied to
an individual phase also support a "phase <phaseName>;" entry;

fvOptions field-name handling has been rewritten to increase its
flexibility and to improve warning messages. The flexibility now allows
for options that apply to all fields, or all fields of a given phase,
rather than being limited to a specific list of field names. Messages
warning about options that have not been applied now always print just
once per time-step.
2021-02-09 16:53:26 +00:00
81ec2012be titaniaSynthesis: Removed blockMeshDict.m4 and replaced by titaniaSynthesis dictionary. 2021-02-09 15:13:33 +00:00
a1e7357823 surfaceFilmModels: Renamed injection -> ejection
The injection models do not inject parcels into the film they specifically eject
parcels from the film and the name "injection" is very confusing and misleading
hence the logical rename injection -> ejection.
2021-02-09 11:49:39 +00:00
e36a9475f9 foamSearch: Updated documentation for "slash" syntax
Resolves bug-report https://bugs.openfoam.org/view.php?id=3625
2021-02-09 09:55:59 +00:00
aa852124e3 ThermophysicalTransportModels: Corrected reference to the pressure field
Resolves bug-report https://bugs.openfoam.org/view.php?id=3624
2021-02-08 19:48:29 +00:00
8917f4b51f src/thermophysicalModels/specie/transport: Removed commented D function
Self-diffusion is not useful enough to implement, the multi-component diffusion
models require at least binary diffusion coefficients.
2021-02-06 21:17:37 +00:00
c5b6e666c2 sloshingTank: Removed blockMeshDict.m4 and replaced by sloshingTank2D and sloshingTank3D dictionary.
Vertices are generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/sloshingTank2D
tutorials/resources/blockMesh/sloshingTank3D
2021-02-05 16:25:49 +00:00
95c98625b5 tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer: Updated eMesh files 2021-02-05 13:23:40 +00:00
35f73c1c17 angledDuct: Removed blockMeshDict.m4 and replaced by angledDuct dictionary.
Vertices are generated using run time compilation functionality.

File duplication avoided by placement in:
tutorials/resources/blockMesh/angledDuct.
2021-02-05 08:53:31 +00:00
66c62e9296 searchableSurface: Renamed geometry directory triSurface -> geometry
Originally the only supported geometry specification were triangulated surfaces,
hence the name of the directory: constant/triSurface, however now that other
surface specifications are supported and provided it is much more logical that
the directory is named accordingly: constant/geometry.  All tutorial and
template cases have been updated.

Note that backward compatibility is provided such that if the constant/geometry
directory does not exist but constant/triSurface does then the geometry files
are read from there.
2021-02-04 13:51:48 +00:00
1e728ad7e3 applications/test: Tested and updated 2021-02-03 12:37:44 +00:00
ed0686ea0c multiphaseEulerFoam: Support for frozen flow switch
multiphaseEulerFoam now supports the "frozenFlow" setting in
system/fvSolution/PIMPLE. With this switch on, the pressure-velocity
system is not solved. Energy and species transport are simulated using
fixed velocity and pressure fields. Non-transport effects on the phase
fraction, such as mass transfer or fvOption sources, are also included.

Note that this setting does not enforce conservation. In general, any
processes that alter the phase fraction have to be set up carefully in
order to avoid generating an inconsistent set of phase fractions.

This switch has been enabled in two zero-dimensional test cases which
are designed to operate at a constant pressure. The "frozenFlow" switch
now enforces this constant pressure directly. Previously the pressure
equation was being solved, but the system was not well posed, and the
cases were failing to run as a result.
2021-02-03 10:24:45 +00:00
15c56bf425 fvcMeshPhi: Store name of tmp flux field before tmp is reused 2021-02-02 23:54:45 +00:00
6c25033b24 multiphaseEulerFoam: Correct fixed-flux BCs to be consistent with the velocity BCs 2021-02-02 20:17:22 +00:00
5df6fe3a58 dictionary: Added includedDictionary helper class to handle the context of included files
for codeStream when reading on master only.
2021-02-02 16:35:05 +00:00
5e824f75dc multiphaseEulerFoam/.../diameterModels: Fixes to caching behaviour 2021-02-02 09:49:58 +00:00
9fde87a5f9 multiphaseEulerFoam::MomentumTransferPhaseSystem: Minor update to MRF handling 2021-02-02 08:59:59 +00:00