Commit Graph

799 Commits

Author SHA1 Message Date
c8e35a2f67 drivaerFastback: example case of automotive aerodynamics 2021-02-18 19:43:45 +00:00
0e13649996 surfaceFeatures: Consistent plane specification for subsetting
Specifying a plane with which to subset feature edges is now done using
the same dictionary syntax used elsewhere in OpenFOAM. For example, in
system/surfaceFeaturesDict:

    subsetFeatures
    {
        // Include only edges that intersect the plane
        plane
        {
            planeType       pointAndNormal;
            point           (0 0 0);
            normal          (1 0 0);
        }

        ...
    }
2021-02-18 09:09:53 +00:00
de8042ee6a tutorials/resources/blockMesh/sloshingTank3D: Reformatting. 2021-02-17 16:23:57 +00:00
bed0454b2d tutorials/resources/blockMesh/sloshingTank2D: Reformatting. 2021-02-17 16:21:42 +00:00
306d44a04b tutorials/resources/blockMesh/titaniaSynthesis: Reformatting. 2021-02-17 16:15:31 +00:00
be0ee0f464 tutorials/multiphase/interFoam/RAS/planingHullW3: Removed unused scheme 2021-02-17 15:18:36 +00:00
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
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
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
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
94e5094f04 mixerVessel2D blockMeshDict reformatting 2021-02-10 18:24:10 +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
4bfe7d48c9 tutorials: Prevent "unconfirmed completion" in test loop 2021-02-09 21:19:40 +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
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
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
441ff53e2d multiphaseEulerFoam: Added moving-mesh support for both cell- and face-momentum algorithms
Mesh-motion with or without topology change or AMI is now supported in
multiphaseEulerFoam for both cell- and face-momentum algorithms.

The new tutorial case mixerVesselAMI2D is provided which is the AMI version of
the 4-phase MRF mixerVessel2D case.  It is setup with the cell-momentum
algorithm but also runs fine with the face-momentum algorithm although the
results are noticeably less accurate, particularly when the case is run
single-phase and compared directly with those from pimpleFoam.

Further testing is in progress.

I2D/constant/thermophysicalProperties.water
2021-02-01 11:06:25 +00:00
c2f4c6191d interFoam: Added support for phase-change with cavitation models
The phase-change functionality in interPhaseChangeFoam has been generalised and
moved into the run-time selectable twoPhaseChange library included into
interFoam providing optional phase-change.  The three cavitation models provided
in interPhaseChangeFoam are now included in the twoPhaseChange library and the
two interPhaseChangeFoam cavitation tutorials updated for interFoam.

interPhaseChangeFoam has been replaced by a user redirection script which prints
the following message:

The interPhaseChangeFoam solver has solver has been replaced by the more general
interFoam solver, which now supports phase-change using the new twoPhaseChange
models library.

To run with with phase-change create a constant/phaseChangeProperties dictionary
containing the phase-change model specification, e.g.

    phaseChangeModel SchnerrSauer;

    pSat            2300;   // Saturation pressure

See the following cases for an example converted from interPhaseChangeFoam:

    $FOAM_TUTORIALS/multiphase/interFoam/laminar/cavitatingBullet
    $FOAM_TUTORIALS/multiphase/interFoam/RAS/propeller
2021-01-24 23:35:17 +00:00
199e53fd0d dynamicMotionSolverFvMesh: Removed unsupported motion solver keywords
A dynamicMotionSolverFvMesh must now use a "motionSolver" or
"motionSolvers" entry to select the underlying motion solver. For
example, in constant/dynamicMeshDict:

    dynamicFvMesh   dynamicMotionSolverFvMesh;
    motionSolverLibs ("librigidBodyMeshMotion.so");
    motionSolver    rigidBodyMotion;
    ...

Previously the motion solver could also be specified with the keyword
"solver", but this resulted in a name clash with rigid body solvers
which are frequently specified in the same scope. For this reason, the
"solver" and "solvers" entries have been removed.
2021-01-14 08:33:57 +00:00
9e947d1644 topoSet: Renamed point entries for cylinder sources
End points of topoSet cylinder sources should now be specified as
"point1" and "point2", which is consistent with other parts of the code.

The previous keywords, "p1" and "p2" have been retained for backwards
compatibility but may be removed in future.
2021-01-14 08:33:57 +00:00
dabceadd13 tutorials/multiphase/interFoam/RAS/waterChannel: Removed ".*" from BCs to avoid confusion 2021-01-11 20:23:03 +00:00
12afa0966a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-08 13:19:26 +00:00
d43375f648 tutorials: Updated air mass-fraction composition 2021-01-08 13:18:56 +00:00
bda07488f0 volumetricFlowRateTriSurface: Corrected pre-configuration, and added an example
A volumetric flow rate through a tri-surface can now be obtained using
the volumetricFlowRateTriSurface preconfigured function object, using
the following entry in system/controlDict:

    fuctions
    {
        #includeFunc "volumetricFlowRateTriSurface(name=surface.stl)"
    }

Where "surface.stl" is a tri-surface file in the constant/triSurface
directory. An example of this has been added to the
incompressible/pimpleFoam/RAS/impeller tutorial case.

Note that when possible, it is preferable to use the flowRatePatch or
flowRateFaceZone functions, as these make direct use of the flux and
therefore report a value that is exactly that computed by the solver.
volumetricFlowRateTriSurface, by contrast, does interpolation of the
velocity field which introduces error.

In addition, a minor fix has been made to the underlying
surfaceFieldValue function object so that it does not need a zone/set
name when values on a searchable surface are requested.
2021-01-08 12:03:25 +00:00
d6477085d7 coolingCylinder2D: reverted change to initial U 2021-01-06 11:08:32 +00:00
a4d1b58e82 coolingCylinder2D: Flow initialization update. 2021-01-05 13:20:52 +00:00
92bad8dcdb Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-24 11:14:48 +00:00
501f3de7b5 functionObjects::cylindricalFunctionObject: New functionObject to transform velocity into cylindrical polar coordinates
Description
    Transforms the specified velocity field into a
    cylindrical polar coordinate system or back to Cartesian.

    Example of function object specification to convert the velocity field U
    into cylindrical polar coordinates before averaging and returning the
    average to Cartesian coordinates:
    \verbatim
    cartesianToCylindrical
    {
        type        cylindrical;
        libs        ("libfieldFunctionObjects.so");

        origin      (0 0 0);
        axis        (0 0 1);

        field       U;

        writeControl    outputTime;
        writeInterval   1;
    }

    #includeFunc fieldAverage(cylindrical(U))

    cylindricalToCartesian
    {
        type        cylindrical;
        libs        ("libfieldFunctionObjects.so");

        origin      (0 0 0);
        axis        (0 0 1);

        field       cylindrical(U)Mean;
        toCartesian true;
        result      UMean;

        writeControl    outputTime;
        writeInterval   1;
    }
    \endverbatim
    This is particularly useful for cases with rotating regions, e.g. mixer
    vessels with AMI.

See tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D
2020-12-24 11:13:15 +00:00
a0bad5772e multiphaseEulerFoam: Removed unused granular temperature fields
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2020-12-22 21:06:32 +00:00
3b4ea79e67 coolingCylinder2D: New conjugate heat transfer example of a solid cylinder cooled by water.
This tutorial demonstrates multi-region meshing using blockMesh and
solves transient heat transfer to steady-state.
2020-12-17 15:47:37 +00:00
87db97d020 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-12-17 10:42:08 +00:00
984830768d radiation: Changes thermal solvers to select radiation via fvOptions
This simplifies and standardises the handling of radiation in all solvers which
include an energy equation, all of which now support radiation via the
'radiation' fvOption which is selected in the constant/fvOption or
constant/<region>/fvOption file:

radiation
{
    type    radiation;
    libs    ("libradiationModels.so");
}

The radiation model, parameters, settings and sub-models are specified in the
'radiationProperties' file as before.
2020-12-17 10:33:10 +00:00
6379011ee1 tutorials: Removed redundant entry neighbourFieldName from compressible::turbulentTemperatureCoupledBaffleMixed boundary types. 2020-12-16 17:19:08 +00:00
0a053fc5fe extrudeMesh: Added -dict option 2020-12-10 16:31:18 +00:00
828b81f809 coolingSphere, singleFluidCHT: Replaced text manipulations in Allclean with foamDictionary 2020-12-08 12:45:44 +00:00
19b3a5c385 Sub-models, fvOptions: Removed 'active' switch
It is better to not select and instantiate a model, fvOption etc. than to create
it and set it inactive as the creation process requires reading of settings,
parameters, fields etc. with all the associated specification and storage
without being used.  Also the incomplete implementation added a lot of
complexity in the low-level operation of models introducing a significant
maintenance overhead and development overhead for new models.
2020-12-01 18:50:20 +00:00
3838df8eac surfaceFilmModels: Rationalised and standardised the surfaceFilmProperties dictionary
The convoluted separate ".*Coeffs" dictionary form of model coefficient
specification is now deprecated and replaced with the simpler sub-dictionary
form but support is provided for the deprecated form for backward comparability.

e.g.

thermophysicalProperties
{
    type        liquid;

    useReferenceValues  no;
    liquid      H2O;
}

rather than

    filmThermoModel liquid;

    liquidCoeffs
    {
        useReferenceValues no;
        liquid      H2O;
    }

and

forces
{
    thermocapillary;

    distributionContactAngle
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }
}

rather than

    forces
    (
        thermocapillary
        distributionContactAngle
    );

    distributionContactAngleCoeffs
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }

All the tutorial cases containing a surface film have been updated for guidance,
e.g. tutorials/lagrangian/buoyantReactingParticleFoam/hotBoxes/constant/surfaceFilmProperties

surfaceFilmModel thermoSingleLayer;

regionName      wallFilmRegion;

active          true;

thermophysicalProperties
{
    type        liquid;

    useReferenceValues  no;
    liquid      H2O;
}

viscosity
{
    model        liquid;
}

deltaWet    1e-4;
hydrophilic no;

momentumTransport
{
    model       laminar;
    Cf          0.005;
}

forces
{
    thermocapillary;

    distributionContactAngle
    {
        Ccf             0.085;

        distribution
        {
            type            normal;
            normalDistribution
            {
                minValue        50;
                maxValue        100;
                expectation     75;
                variance        100;
            }
        }

        zeroForcePatches ();
    }
}

injection
{
    curvatureSeparation
    {
        definedPatchRadii
        (
            ("(cube[0-9][0-9]_side[0-9]_to_cube[0-9][0-9]_side[0-9])" 0)
        );
    }

    drippingInjection
    {
        cloudName    reactingCloud1;
        deltaStable  0;

        particlesPerParcel 100.0;

        parcelDistribution
        {
            type         RosinRammler;
            RosinRammlerDistribution
            {
                minValue        5e-04;
                maxValue        0.0012;
                d               7.5e-05;
                n               0.5;
            }
        }
    }
}

phaseChange
{
    model           standardPhaseChange;
    Tb              373;
    deltaMin        1e-8;
    L               1.0;
}

upperSurfaceModels
{
    heatTransfer
    {
        model       mappedConvectiveHeatTransfer;
    }
}

lowerSurfaceModels
{
    heatTransfer
    {
        model       constant;
        c0              50;
    }
}
2020-11-30 16:31:44 +00:00
21bb6c549d Function1, Function2: Rationalising, simplifying and standardising writing 2020-11-28 19:50:39 +00:00
4e183e33d4 Function1::Table: simplified and rationalised
TableBase, TableFile and Table now combined into a single simpler Table class
which handle both the reading of embedded and file data using the generalised
TableReader.  The new EmbeddedTableReader handles the embedded data reading
providing the functionality of the original Table class within the same
structure that can read the data from separate files.

The input format defaults to 'embedded' unless the 'file' entry is present and
the Table class is added to the run-time selection table under the name 'table'
and 'tableFile' which provides complete backward comparability.  However it is
advisable to migrate cases to use the new 'table' entry and all tutorial cases
have been updated.
2020-11-16 23:48:47 +00:00
bfedfcde55 dynamicMesh::sixDoFMotion: Generalised replacement for tabulated6DoFMotion
using Function1 and supporting all the standard Function1s including tabulated
and coded.

tutorials/multiphase/interFoam/laminar/sloshingTank3D6DoF updated to use
sixDoFMotion.
2020-11-13 21:12:15 +00:00