Commit Graph

193 Commits

Author SHA1 Message Date
9302074836 createPatch: Simplification and removed unused dictionaries
The 'pointSync' setting in createPatchDict is now optional and defaults
to false. This setting is very rarely used. A number of unused
'createPatchDict' files have also been removed and obsolete information
has been removed from the annotated example dictionaries.
2022-05-20 14:04:17 +01:00
58444464aa initialConditions: Corrected header
Resolves bug-report https://bugs.openfoam.org/view.php?id=3831
2022-04-29 12:29:05 +01:00
19b3b2e563 tutorials: reverseBurner: Ignite with temperature constraint
This method of igniting is easier to control than a heat-source based
method. A suitable temperature at which the reaction will take is
typically fairly easy to estimate, whilst determining a heat source
value which achieves the same effect is difficult and is often requires
trial and error.

The new fractional control of value constraints has permitted the use of
fixedTemperatureConstraint in this way; both because it allows for
ramping and for limiting the duration over which the constraint is
applied.
2022-03-23 13:03:42 +00:00
bbaba1a645 topoSetDict: Corrected/updated formatting
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2022-03-14 13:49:07 +00:00
373c4993a8 externalWallHeatFluxTemperature: Removed "mode"
Heat power (Q), heat flux (q) and heat transfer coefficient (h)
can now all be specified simultaneously. Their effects will be summed
into a single heat transfer rate. The "mode" keyword is no longer
required.
2022-03-08 10:19:47 +00:00
e7aaae76ac tutorials: reverseBurner: Fix warnings about wedge geometry 2022-03-08 09:16:51 +00:00
99cfbd818f blockMesh: Added warning to set defaultPatch appropriately for snappyHexMesh and 2D cases
The defaultPatch type currently defaults to empty which is appropriate for 1D
and 2D cases but not when creating the initial blockMesh for snappyHexMesh as
the presence of empty patches triggers the inappropriate application of 2D point
constraint corrections following snapping and morphing.  To avoid this hidden
problem a warning is now generated from blockMesh when the defaultPatch is not
explicitly set for cases which generate a default patch, i.e. for which the
boundary is not entirely defined.  e.g.

.
.
.
Creating block mesh topology

--> FOAM FATAL IO ERROR:
The 'defaultPatch' type must be specified for the 'defaultFaces' patch, e.g. for snappyHexMesh

    defaultPatch
    {
        name default; // optional
        type patch;
    }

or for 2D meshes

    defaultPatch
    {
        name frontAndBack; // optional
        type empty;
    }
.
.
.

All the tutorials have been update to include the defaultPatch specification as
appropriate.
2022-02-24 21:35:09 +00:00
d40ecd78eb buoyantFoam: Merged buoyantSimpleFoam and buoyantPimpleFoam
Solver for steady or transient buoyant, turbulent flow of compressible fluids
for ventilation and heat-transfer, with optional mesh motion and mesh topology
changes.  Created by merging buoyantSimpleFoam and buoyantPimpleFoam to provide
a more general solver and simplify maintenance.
2022-02-18 12:20:54 +00:00
46895490c7 Compressible solver pEqn.H: Standardised the treatment of density
In rhoPimpleFoam, rhoSimpleFoam, buoyantPimpleFoam and buoyantSimpleFoam the
density prediction step at the start of pEqn.H is now consistent between these
solvers and the other compressible solvers.  If the density is relaxed in the
corrector it is now also relaxed following the predictor which improves
consistency, stability and convergence.
2022-02-18 10:33:40 +00:00
fd3cfe4364 tutorials::buoyantCavity::createGraphs: Updated for new sample file format 2022-02-17 09:33:28 +00:00
5df9ec5b1e tutorials/heatTransfer/buoyantSimpleFoam: Updated solver settings to improve convergence
Also changed from internal energy to enthalpy which is preferable for
steady-state simulations.
2022-02-06 11:44:07 +00:00
8bb48df87f flowRateInletVelocityFvPatchVectorField: Added optional profile entry to specify the velocity profile
The unreliable extrapolateProfile option has been replaced by the more flexible
and reliable profile option which allows the velocity profile to be specified as
a Function1 of the normalised distance to the wall.  To simplify the
specification of the most common velocity profiles the new laminarBL (quadratic
profile) and turbulentBL (1/7th power law) Function1s are provided.

In addition to the new profile option the flow rate can now be specified as a
meanVelocity, volumetricFlowRate or massFlowRate, all of which are Function1s of
time.

The following tutorials have been updated to use the laminarBL profile:
    multiphase/multiphaseEulerFoam/laminar/titaniaSynthesis
    multiphase/multiphaseEulerFoam/laminar/titaniaSynthesisSurface

The following tutorials have been updated to use the turbulentBL profile:
    combustion/reactingFoam/Lagrangian/verticalChannel
    combustion/reactingFoam/Lagrangian/verticalChannelLTS
    combustion/reactingFoam/Lagrangian/verticalChannelSteady
    compressible/rhoPimpleFoam/RAS/angledDuct
    compressible/rhoPimpleFoam/RAS/angledDuctLTS
    compressible/rhoPimpleFoam/RAS/squareBendLiq
    compressible/rhoPorousSimpleFoam/angledDuctImplicit
    compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff
    compressible/rhoSimpleFoam/squareBend
    compressible/rhoSimpleFoam/squareBendLiq
    heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger
    heatTransfer/chtMultiRegionFoam/shellAndTubeHeatExchanger
    incompressible/porousSimpleFoam/angledDuctImplicit
    incompressible/porousSimpleFoam/straightDuctImplicit
    multiphase/interFoam/RAS/angledDuct

Class
    Foam::flowRateInletVelocityFvPatchVectorField

Description
    Velocity inlet boundary condition creating a velocity field with
    optionally specified profile normal to the patch adjusted to match the
    specified mass flow rate, volumetric flow rate or mean velocity.

    For a mass-based flux:
    - the flow rate should be provided in kg/s
    - if \c rho is "none" the flow rate is in m3/s
    - otherwise \c rho should correspond to the name of the density field
    - if the density field cannot be found in the database, the user must
      specify the inlet density using the \c rhoInlet entry

    For a volumetric-based flux:
    - the flow rate is in m3/s

Usage
    \table
        Property     | Description             | Required    | Default value
        massFlowRate | Mass flow rate [kg/s]   | no          |
        volumetricFlowRate | Volumetric flow rate [m^3/s]| no |
        meanVelocity | Mean velocity [m/s]| no |
        profile      | Velocity profile        | no          |
        rho          | Density field name      | no          | rho
        rhoInlet     | Inlet density           | no          |
        alpha        | Volume fraction field name | no       |
    \endtable

    Example of the boundary condition specification for a volumetric flow rate:
    \verbatim
    <patchName>
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  0.2;
        profile             laminarBL;
    }
    \endverbatim

    Example of the boundary condition specification for a mass flow rate:
     \verbatim
    <patchName>
    {
        type                flowRateInletVelocity;
        massFlowRate        0.2;
        profile             turbulentBL;
        rho                 rho;
        rhoInlet            1.0;
    }
    \endverbatim

    Example of the boundary condition specification for a volumetric flow rate:
    \verbatim
    <patchName>
    {
        type                flowRateInletVelocity;
        meanVelocity        5;
        profile             turbulentBL;
    }
    \endverbatim

    The \c volumetricFlowRate, \c massFlowRate or \c meanVelocity entries are
    \c Function1 of time, see Foam::Function1s.

    The \c profile entry is a \c Function1 of the normalised distance to the
    wall.  Any suitable Foam::Function1s can be used including
    Foam::Function1s::codedFunction1 but Foam::Function1s::laminarBL and
    Foam::Function1s::turbulentBL have been created specifically for this
    purpose and are likely to be appropriate for most cases.

Note
    - \c rhoInlet is required for the case of a mass flow rate, where the
      density field is not available at start-up
    - The value is positive into the domain (as an inlet)
    - May not work correctly for transonic inlets
    - Strange behaviour with potentialFoam since the U equation is not solved

See also
    Foam::fixedValueFvPatchField
    Foam::Function1s::laminarBL
    Foam::Function1s::turbulentBL
    Foam::Function1s
    Foam::flowRateOutletVelocityFvPatchVectorField
2022-01-24 19:10:39 +00:00
cc96abda03 basicThermo: Cache thermal conductivity kappa rather than thermal diffusivity alpha
Now that Cp and Cv are cached it is more convenient and consistent and slightly
more efficient to cache thermal conductivity kappa rather than thermal
diffusivity alpha which is not a fundamental property, the appropriate form
depending on the energy solved for.  kappa is converted into the appropriate
thermal diffusivity for the energy form solved for by dividing by the
corresponding cached heat capacity when required, which is efficient.
2022-01-10 20:19:00 +00:00
f97f6326f0 Decomposition/redistribution: Separated choice of mesh decomposition and redistribution methods
When snappyHexMesh is run in parallel it re-balances the mesh during refinement
and layer addition by redistribution which requires a decomposition method
that operates in parallel, e.g. hierachical or ptscotch.  decomposePar uses a
decomposition method which operates in serial e.g. hierachical but NOT
ptscotch.  In order to run decomposePar followed by snappyHexMesh in parallel it
has been necessary to change the method specified in decomposeParDict but now
this is avoided by separately specifying the decomposition and distribution
methods, e.g. in the incompressible/simpleFoam/motorBike case:

numberOfSubdomains  6;

decomposer      hierarchical;
distributor     ptscotch;

hierarchicalCoeffs
{
    n               (3 2 1);
    order           xyz;
}

The distributor entry is also used for run-time mesh redistribution, e.g. in the
multiphase/interFoam/RAS/floatingObject case re-distribution for load-balancing
is enabled in constant/dynamicMeshDict:

distributor
{
    type            distributor;

    libs            ("libfvMeshDistributors.so");

    redistributionInterval  10;
}

which uses the distributor specified in system/decomposeParDict:

distributor     hierarchical;

This rationalisation provides the structure for development of mesh
redistribution and load-balancing.
2021-12-15 22:12:00 +00:00
7dfb7146ea tutorials::blockMeshDict: Removed redundant mergePatchPairs and edges entries 2021-12-08 13:02:40 +00:00
167ad7442c snappyHexMesh: Renamed locationInMesh -> insidePoint
for consistency with the regionToCell topo set source and splitMeshRegions and
provides more logical extension to the multiple and outside point variants insidePoints,
outsidePoint and outsidePoints.
2021-09-28 16:40:44 +01:00
5fa7c72d95 tutorials::circuitBoardCooling: Updated 1DTemperatureMasterBafflePatches 2021-09-23 17:39:35 +01:00
1ca8ff74a9 solidThermo: Added support for run-time compilation
This required standardisation of the mapping between the class and selection
names of the solid transport models:

constIso -> constIsoSolid
exponential -> exponentialSolid
polynomial -> polynomialSolid
2021-09-22 14:39:18 +01:00
d1ebcad3ca tutorials/combustion: Added Sutherland coefficients for all methane combustion species 2021-08-16 17:34:27 +01:00
a3e21c6bce tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling: Simplified directory structure 2021-07-31 22:05:42 +01:00
65ef2cf331 physicalProperties: Standardised incompressible and compressible solver fluid properties
to provide a single consistent code and user interface to the specification of
physical properties in both single-phase and multi-phase solvers.  This redesign
simplifies usage and reduces code duplication in run-time selectable solver
options such as 'functionObjects' and 'fvModels'.

* physicalProperties
  Single abstract base-class for all fluid and solid physical property classes.

  Physical properties for a single fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties' dictionary.

  Physical properties for a phase fluid or solid within a region are now read
  from the 'constant/<region>/physicalProperties.<phase>' dictionary.

  This replaces the previous inconsistent naming convention of
  'transportProperties' for incompressible solvers and
  'thermophysicalProperties' for compressible solvers.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the
  'physicalProperties' dictionary does not exist.

* phaseProperties
  All multi-phase solvers (VoF and Euler-Euler) now read the list of phases and
  interfacial models and coefficients from the
  'constant/<region>/phaseProperties' dictionary.

  Backward-compatibility is provided by the solvers reading
  'thermophysicalProperties' or 'transportProperties' if the 'phaseProperties'
  dictionary does not exist.  For incompressible VoF solvers the
  'transportProperties' is automatically upgraded to 'phaseProperties' and the
  two 'physicalProperties.<phase>' dictionary for the phase properties.

* viscosity
  Abstract base-class (interface) for all fluids.

  Having a single interface for the viscosity of all types of fluids facilitated
  a substantial simplification of the 'momentumTransport' library, avoiding the
  need for a layer of templating and providing total consistency between
  incompressible/compressible and single-phase/multi-phase laminar, RAS and LES
  momentum transport models.  This allows the generalised Newtonian viscosity
  models to be used in the same form within laminar as well as RAS and LES
  momentum transport closures in any solver.  Strain-rate dependent viscosity
  modelling is particularly useful with low-Reynolds number turbulence closures
  for non-Newtonian fluids where the effect of bulk shear near the walls on the
  viscosity is a dominant effect.  Within this framework it would also be
  possible to implement generalised Newtonian models dependent on turbulent as
  well as mean strain-rate if suitable model formulations are available.

* visosityModel
  Run-time selectable Newtonian viscosity model for incompressible fluids
  providing the 'viscosity' interface for 'momentumTransport' models.

  Currently a 'constant' Newtonian viscosity model is provided but the structure
  supports more complex functions of time, space and fields registered to the
  region database.

  Strain-rate dependent non-Newtonian viscosity models have been removed from
  this level and handled in a more general way within the 'momentumTransport'
  library, see section 'viscosity' above.

  The 'constant' viscosity model is selected in the 'physicalProperties'
  dictionary by

      viscosityModel  constant;

  which is equivalent to the previous entry in the 'transportProperties'
  dictionary

      transportModel  Newtonian;

  but backward-compatibility is provided for both the keyword and model
  type.

* thermophysicalModels
  To avoid propagating the unnecessary constructors from 'dictionary' into the
  new 'physicalProperties' abstract base-class this entire structure has been
  removed from the 'thermophysicalModels' library.  The only use for this
  constructor was in 'thermalBaffle' which now reads the 'physicalProperties'
  dictionary from the baffle region directory which is far simpler and more
  consistent and significantly reduces the amount of constructor code in the
  'thermophysicalModels' library.

* compressibleInterFoam
  The creation of the 'viscosity' interface for the 'momentumTransport' models
  allows the complex 'twoPhaseMixtureThermo' derived from 'rhoThermo' to be
  replaced with the much simpler 'compressibleTwoPhaseMixture' derived from the
  'viscosity' interface, avoiding the myriad of unused thermodynamic functions
  required by 'rhoThermo' to be defined for the mixture.

  Same for 'compressibleMultiphaseMixture' in 'compressibleMultiphaseInterFoam'.

This is a significant improvement in code and input consistency, simplifying
maintenance and further development as well as enhancing usability.

Henry G. Weller
CFD Direct Ltd.
2021-07-30 17:19:54 +01:00
6a657c4338 topoSet: Rationalised the name keyword for zones and patches
For a set to zone conversion the name of the zone is now specified with the
'zone' keyword.

For a patch to set conversion the name of the patch is now specified with the
'patch' keyword.

Backward-compatibility is supported for both these changes.

Additionally the file name of a searchableSurface file is specified with the
'file' keyword.  This should be 'surface' but that keyword is currently and
confusingly used for the surface type rather than name and this cannot be
changed conveniently while maintaining backward compatibility.
2021-07-27 15:44:08 +01:00
15a27fee87 topoSet: the sourceInfo sub-dictionary of the topoSetDict actions is now optional
and only needed if there is a name clash between entries in the source
specification and the set specification, e.g. "name":

    {
        name    rotorCells;
        type    cellSet;
        action  new;
        source  zoneToCell;
        sourceInfo
        {
            name    cylinder;
        }
    }
2021-07-27 14:07:37 +01:00
e9733e50ba functionObjects: Renamed streamLine and streamLines to streamlines 2021-07-14 10:35:02 +01:00
98b90398f1 tutorials: Updated for new preconfigurations 2021-07-14 10:35:02 +01:00
6b2dfd218a scripts: Replaced 'cp -r' with the POSIX compliant 'cp -R' 2021-07-06 17:41:08 +01:00
cce3e1b1d0 systemDict: Include region in the default directory for the -dict option
With this change both of the following commands are equivalent:

    topoSet -region air -dict topoSetDict1
    topoSet -region air -dict system/air/topoSetDict1

I.e., if the system/<regionName> path is not specified then it is
assumed.
2021-07-06 08:08:30 +01:00
500f1ee9f4 tutorials reconstructParMesh: Removed redundant -mergeTol option 2021-07-05 22:38:13 +01:00
78977d3259 systemDict: Added support for system as the default directory for the -dict option
With this change both

    blockMesh -dict fineBlockMeshDict
    blockMesh -dict system/fineBlockMeshDict

are supported, if the system/ path is not specified it is assumed
2021-07-02 21:05:47 +01:00
c63c1a90c2 systemDict: Consistent handling of the -dict option
The -dict option is now handled correctly and consistently across all
applications with -dict options. The logic associated with doing so has
been centralised.

If a relative path is given to the -dict option, then it is assumed to
be relative to the case directory. If an absolute path is given, then it
is used without reference to the case directory. In both cases, if the
path is found to be a directory, then the standard dictionary name is
appended to the path.

Resolves bug report http://bugs.openfoam.org/view.php?id=3692
2021-07-02 15:11:06 +01:00
45a0059026 splitBaffles, mergeBaffles: New utilities to replace mergeOrSplitBaffles
splitBaffles identifies baffle faces; i.e., faces on the mesh boundary
which share the exact same set of points as another boundary face. It
then splits the points to convert these faces into completely separate
boundary patches. This functionality was previously provided by calling
mergeOrSplitBaffles with the "-split" option.

mergeBaffles also identifes the duplicate baffle faces, but then merges
them, converting them into a single set of internal faces. This
functionality was previously provided by calling mergeOrSplitBaffles
without the "-split" option.
2021-06-25 10:30:39 +01:00
9c73d4d206 decomposeParDict: The 'delta' entry for geometric decomposition is no option and defaults to 0.001
When using 'simple' or 'hierarchical' decomposition it is useful to slightly rotate a
coordinate-aligned block-mesh to improve the processor boundaries by avoiding
irregular cell distribution at those boundaries.  The degree of slight rotation
is controlled by the 'delta' coefficient and a value of 0.001 is generally
suitable so to avoid unnecessary clutter in 'decomposeParDict' 'delta' now
defaults to this value.
2021-06-24 10:18:20 +01:00
01494463d0 FoamFile: 'version' entry is now optional, defaulting to 2.0
The FOAM file format has not changed from version 2.0 in many years and so there
is no longer a need for the 'version' entry in the FoamFile header to be
required and to reduce unnecessary clutter it is now optional, defaulting to the
current file format 2.0.
2021-06-23 20:50:10 +01:00
a172463bd0 tutorials: added multiregion support to CleanFunctions and
removed redundant foamCleanPolyMesh script
2021-06-22 10:39:14 +01:00
5f64d07ca8 tutorials: remove redirects to /dev/null 2021-06-21 16:44:38 +01:00
ca35389788 snappyHexMesh: 'refinementRegions', 'refinementSurfaces' and 'features' are now optional
entries in 'castellatedMeshControls' in snappyHexMeshDict to remove unnecessary clutter.
2021-06-21 13:30:53 +01:00
90831fbb55 Compressible and reacting flow solvers: Changed the internal energy pressure work for consistency with enthalpy
The pressure work term for total internal energy is div(U p) which can be
discretised is various ways, given a mass flux field phi it seems logical to
implement it in the form div(phi/interpolate(rho), p) but this is not exactly
consistent with the relationship between enthalpy and internal energy (h = e +
p/rho) and the transport of enthalpy, it would be more consistent to implement
it in the form div(phi, p/rho).  A further improvement in consistency can be
gained by using the same convection scheme for this work term and the convection
term div(phi, e) and for reacting solvers this is easily achieved by using the
multi-variate limiter mvConvection provided for energy and specie convection.

This more consistent total internal energy work term has now been implemented in
all the compressible and reacting flow solvers and provides more accurate
solutions when running with internal energy, particularly for variable density
mixing cases with small pressure variation.

For non-reacting compressible solvers this improvement requires a change to the
corresponding divScheme in fvSchemes:

    div(phiv,p) -> div(phi,(p|rho))

and all the tutorials have been updated accordingly.
2021-06-11 11:34:38 +01:00
ee777e4083 Standardise on British spelling: -ize -> -ise
OpenFOAM is predominantly written in Britain with British spelling conventions
so -ise is preferred to -ize.
2021-06-01 19:11:58 +01:00
845d5b16e3 transformPoints: Generalised to apply a sequence of transformations
This makes usage of transformPoints the same as for
surfaceTransformPoints. Transformations are supplied as a string and are
applied in sequence.

Usage
    transformPoints "\<transformations\>" [OPTION]

    Supported transformations:
      - "translate=<translation vector>"
        Translational transformation by given vector
      - "rotate=(<n1 vector> <n2 vector>)"
        Rotational transformation from unit vector n1 to n2
      - "Rx=<angle [deg] about x-axis>"
        Rotational transformation by given angle about x-axis
      - "Ry=<angle [deg] about y-axis>"
        Rotational transformation by given angle about y-axis
      - "Rz=<angle [deg] about z-axis>"
        Rotational transformation by given angle about z-axis
      - "Ra=<axis vector> <angle [deg] about axis>"
        Rotational transformation by given angle about given axis
      - "scale=<x-y-z scaling vector>"
        Anisotropic scaling by the given vector in the x, y, z
        coordinate directions

    Example usage:
        transformPoints \
            "translate=(-0.05 -0.05 0), \
            Rz=45, \
            translate=(0.05 0.05 0)"
2021-05-11 10:06:45 +01:00
4b65112182 tutorials/heatTransfer/chtMultiRegionFoam/coolingSphere: Updated water Prandtl number
and removed unused files.

Resolves patch request https://bugs.openfoam.org/view.php?id=3666
2021-04-27 10:35:14 +01:00
da288597e2 tutorials: Replaced semiImplicitSource with more specific fvModels 2021-03-19 09:43:24 +00:00
8d707b48c6 fvModels: Added heatSource model
This model applies a heat source. It requires either the power, Q, or
the power per unit volume, q, to be specified.

Example usage:

    heatSource
    {
        type            heatSource;

        selectionMode   cellSet;
        cellSet         heater;

        Q               1e6;
    }
2021-03-19 09:43:24 +00:00
4442ce54a5 fvModels: interRegionHeatTransfer: Rationalisation
There is now just one inter-region heat transfer model, and heat
transfer coefficient models are selected as sub-models. This has been
done to permit usage of the heat transfer models in other contexts.

Example usage:

    interRegionHeatTransfer
    {
        type            interRegionHeatTransfer;

        interRegionHeatTransferCoeffs
        {
            nbrRegion       other;

            interpolationMethod cellVolumeWeight;
            master          true;

            semiImplicit    no;

            type            constant;

            AoV             200;
            htc             10;
        }
    }
2021-03-19 09:43:24 +00:00
da3f4cc92e fvModels, fvConstraints: Rational separation of fvOptions between physical modelling and numerical constraints
The new fvModels is a general interface to optional physical models in the
finite volume framework, providing sources to the governing conservation
equations, thus ensuring consistency and conservation.  This structure is used
not only for simple sources and forces but also provides a general run-time
selection interface for more complex models such as radiation and film, in the
future this will be extended to Lagrangian, reaction, combustion etc.  For such
complex models the 'correct()' function is provided to update the state of these
models at the beginning of the PIMPLE loop.

fvModels are specified in the optional constant/fvModels dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The new fvConstraints is a general interface to optional numerical constraints
applied to the matrices of the governing equations after construction and/or to
the resulting field after solution.  This system allows arbitrary changes to
either the matrix or solution to ensure numerical or other constraints and hence
violates consistency with the governing equations and conservation but it often
useful to ensure numerical stability, particularly during the initial start-up
period of a run.  Complex manipulations can be achieved with fvConstraints, for
example 'meanVelocityForce' used to maintain a specified mean velocity in a
cyclic channel by manipulating the momentum matrix and the velocity solution.

fvConstraints are specified in the optional system/fvConstraints dictionary and
backward-compatibility with fvOption is provided by reading the
constant/fvOptions or system/fvOptions dictionary if present.

The separation of fvOptions into fvModels and fvConstraints provides a rational
and consistent separation between physical and numerical models which is easier
to understand and reason about, avoids the confusing issue of location of the
controlling dictionary file, improves maintainability and easier to extend to
handle current and future requirements for optional complex physical models and
numerical constraints.
2021-03-07 22:45:01 +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
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
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
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
d43375f648 tutorials: Updated air mass-fraction composition 2021-01-08 13:18:56 +00:00
d6477085d7 coolingCylinder2D: reverted change to initial U 2021-01-06 11:08:32 +00:00