Commit Graph

2277 Commits

Author SHA1 Message Date
4acddc6ab0 solidThermo: Add rhoThermo interface
The old fluid-specific rhoThermo has been split into a non-fluid
specific part which is still called rhoThermo, and a fluid-specific part
called rhoFluidThermo. The rhoThermo interface has been added to the
solidThermo model. This permits models and solvers that access the
density to operate on both solid and fluid thermophysical models.
2023-07-27 09:20:43 +01:00
3c542d664b thermophysicalModels: Primitive mixture classes
Mixture classes (e.g., pureMixtrure, coefficientMulticomponentMixture),
now have no fvMesh or volScalarField dependence. They operate on
primitive values only. All the fvMesh-dependent functionality has been
moved into the base thermodynamic classes. The 'composition()' access
function has been removed from multi-component thermo models. Functions
that were once provided by composition base classes such as
basicSpecieMixture and basicCombustionMixture are now implemented
directly in the relevant multi-component thermo base class.
2023-07-27 08:39:58 +01:00
66188fac7a XiFluid, PDRFoam: Updated so that coefficients can be specified without dimensions
All associated combustion tutorials have been simplified using this functionality.
2023-07-26 14:44:10 +01:00
a9a75605cb Test-Function1: Minor clean-up 2023-07-26 12:35:59 +01:00
6655627b0d Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-07-26 12:35:42 +01:00
c772291a9c engineCompRatio: Added support for specifying the combustion chamber cellSet/Zone
Application
    engineCompRatio

Description
    Calculate the compression ratio of the engine combustion chamber

    If the combustion chamber is not the entire mesh a \c cellSet or
    \c cellZone name of the cells in the combustion chamber can be provided.

Usage
    \b engineCompRatio [OPTION]

      - \par -cellSet \<name\>
        Specify the cellSet name of the combustion chamber

      - \par -cellZone zoneName
        Specify the cellZone name of the combustion chamber
2023-07-24 10:08:07 +01:00
6d36c53788 snappyHexMeshConfig: added '-firstLayerThickness' and '-layerExpansionRatio' options 2023-07-21 17:55:22 +01:00
55e5b17d92 snappyHexMeshConfig: clean surfaces to improve closedness test 2023-07-20 18:08:47 +01:00
d194e63820 controlDict::maxDeltaT: Changed to user-time for consistency with other time controls 2023-07-20 17:24:00 +01:00
2779442d2a functionObjects::fluidMaxDeltaT: New functionObject to set the maximum Courant number and time-step
at Function1s of time.

Underlying this new functionObject is a generalisation of the handling of the
maximum time-step in the modular solvers to allow complex user-specification of
the maximum time-step used in a simulation, not just the time-dependency
provided by fluidMaxDeltaT but functions of anything in the simulation by
creating a specialised functionObject in which the maxDeltaT function is
defined.

The chemical and combustion time-scale functionObjects adjustTimeStepToChemistry
and adjustTimeStepToCombustion have been updated and simplified using the above
mechanism.
2023-07-20 14:37:18 +01:00
634b8d1cee incompressibleDenseParticleFluid: Included the phase-fraction in the momentum source
fvModels().source(alphac, Uc)
2023-07-20 10:01:53 +01:00
a71bbe5c6f snappyHexMeshConfig: write out a meshQualityDict file 2023-07-19 11:43:26 +01:00
afdaf49b4f snappyHexMeshConfig: use implicitFeatures by default
and make '-explicitFeatures' the option to use explicitFeatures. When implicitFeatures
is used, a surfaceFeaturesDict file is not written out to the system directory
2023-07-19 11:38:19 +01:00
31679117a4 snappyHexMeshConfig: write addLayersControls sub-dictionary always 2023-07-19 11:31:05 +01:00
cf06107c8b dnsFoam: replaced by the incompressibleFluid solver module with the OUForce fvModel
The bin/dnsFoam redirection script is provided to help users update dnsFoam
cases.
2023-07-16 19:50:57 +01:00
f0ee706fb0 fv::OUForce: New random Ornstein-Uhlenbeck) process force fvModel
Description
    Calculates and applies the random OU (Ornstein-Uhlenbeck) process force to
    the momentum equation for direct numerical simulation of boxes of isotropic
    turbulence.

    The energy spectrum is calculated and written at write-times which is
    particularly useful to test and compare LES SGS models.

Note
    This random OU process force uses a FFT to generate the force field which
    is not currently parallelised.  Also the mesh the FFT is applied to must
    be isotropic and have a power of 2 cells in each direction.

Usage
    Example usage:
    \verbatim
    OUForce
    {
        type    OUForce;

        libs    ("librandomProcesses.so");

        sigma   0.090295;
        alpha   0.81532;
        kUpper  10;
        kLower  7;
    }
    \endverbatim

The tutorials/incompressibleFluid/boxTurb16 tutorial case is an updated version
of the original tutorials/legacy/incompressible/dnsFoam/boxTurb16 case,
demonstrating the use of the OUForce fvModel with the incompressibleFluid solver
module to replicate the behaviour of the legacy dnsFoam solver application.
2023-07-16 19:36:03 +01:00
795d408dce extrudeMesh, splitMeshRegions: Removed the redundant writing of dummy fvSchemes and fvSolution files 2023-07-15 21:56:07 +01:00
6fce005097 multiphaseExternalTemperatureFvPatchScalarField: New multiphase version of externalTemperatureFvPatchScalarField
for the multiphaseEuler solver module, replacing the more specific
uniformFixedMultiphaseHeatFluxFvPatchScalarField as it provide equivalent
functionality if the heat-flux q is specified.

multiphaseExternalTemperatureFvPatchScalarField is derived from the refactored
and generalised externalTemperatureFvPatchScalarField, overriding the
getKappa member function to provide the multiphase equivalents of kappa and
other heat transfer properties.  All controls for
multiphaseExternalTemperatureFvPatchScalarField are the same as for
externalTemperatureFvPatchScalarField:

Class
    Foam::externalTemperatureFvPatchScalarField

Description
    This boundary condition applies a heat flux condition to temperature
    on an external wall. Heat flux can be specified in the following ways:

      - Fixed power: requires \c Q
      - Fixed heat flux: requires \c q
      - Fixed heat transfer coefficient: requires \c h and \c Ta

    where:
    \vartable
        Q  | Power Function1 of time [W]
        q  | Heat flux Function1 of time [W/m^2]
        h  | Heat transfer coefficient Function1 of time [W/m^2/K]
        Ta | Ambient temperature Function1 of time [K]
    \endvartable

    Only one of \c Q or \c q may be specified, if \c h and \c Ta are also
    specified the corresponding heat-flux is added.

    If the heat transfer coefficient \c h is specified an optional thin thermal
    layer resistances can also be specified through thicknessLayers and
    kappaLayers entries.

    The patch thermal conductivity \c kappa is obtained from the region
    thermophysicalTransportModel so that this boundary condition can be applied
    directly to either fluid or solid regions.

Usage
    \table
    Property     | Description                 | Required | Default value
    Q            | Power [W]                   | no       |
    q            | Heat flux [W/m^2]           | no       |
    h            | Heat transfer coefficient [W/m^2/K] | no |
    Ta           | Ambient temperature [K]     | if h is given  |
    thicknessLayers | Layer thicknesses [m]    | no |
    kappaLayers  | Layer thermal conductivities [W/m/K] | no |
    relaxation   | Relaxation for the wall temperature | no | 1
    emissivity   | Surface emissivity for radiative flux to ambient | no | 0
    qr           | Name of the radiative field | no | none
    qrRelaxation | Relaxation factor for radiative field | no | 1
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            externalTemperature;

        Ta              constant 300.0;
        h               uniform 10.0;
        thicknessLayers (0.1 0.2 0.3 0.4);
        kappaLayers     (1 2 3 4);

        value           $internalField;
    }
    \endverbatim

See also
    Foam::mixedFvPatchScalarField
    Foam::Function1
2023-07-15 21:50:14 +01:00
75106dcb62 uniformFixedMultiphaseHeatFluxFvPatchScalarField: Added fixesValue() returning false
so that the energy-> temperature conversion in *heThermo updates the wall
temperature.
2023-07-15 17:42:03 +01:00
472025d35b Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-dev 2023-07-13 16:20:36 +01:00
50017eeb80 snappyHexMeshConfig: removed resizing of bounds specified with '-bounds' option 2023-07-13 16:20:24 +01:00
6e64865cfd snappyHexMeshConfig: Fix for Gcc 5.4, and spelling corrections 2023-07-13 16:20:05 +01:00
c4fbbd440b snappyHexMeshConfig: fixed '-defaultPatch' option and spelling errors 2023-07-13 16:18:47 +01:00
75f0a86384 createMeshNoClear.H: Removed unnecessary header 2023-07-12 16:33:15 +01:00
ca99917425 mappedValueFvPatchField: Removed base class
The mappedValueFvPatchField boundary condition is special in that it can
construct its own mapping information if none is provided by the
underlying patch. This means different fields can be mapped between the
same patches with different mapping strategies. It is quite flexible,
and is often used for recyling properties between boundaries in order to
fully develop their profiles. It provides the ability to set the mean
and similar in order to facilitate this sort of usage.

It is not intended to be used in situations in which patches are
physically connected; region interfaces and similar. These connections
are required to be defined in the underlying patches themselves, as they
relate more fundamentally to the configuration of the mesh rather than
just the boundary conditions of specific fields.

Boundary conditions that map across physical connections (e.g.,
coupledTemperature, mappedFilmPressure, ...) are therefore required to
apply to a mapped patch. The mapping in these situations is a property
of the mesh, not of the boundary condition. If these conditions are
applied to a non-mapped patch then they will fail.

This change formalises the above logic and removes a now unnecessary
base class which was previously being used to share
mappedValueFvPatchField's mapping construction behaviour with other
boundary conditions.

The mappedValueAndPatchInternalValue condition has also been removed, as
this was only previously used in film, and has been replaced by simpler
and more usable options.
2023-07-12 15:27:48 +01:00
c5b7ee0b85 Corrected typos 2023-07-11 16:47:25 +01:00
83465133d6 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-07-11 15:24:56 +01:00
805a7de6d9 dictionary: Removed support for the deprecated "dot" syntax
to simplify maintenance and extension of the current "slash" syntax.
2023-07-11 15:22:44 +01:00
f5485c4609 snappyHexMeshConfig: Fix for Gcc 5.4, and spelling corrections 2023-07-11 12:17:07 +01:00
2b3b820c90 Corrected duplicate word and it's typos 2023-07-11 11:02:47 +01:00
c2552978a3 snappyHexMeshConfig: utility to preconfigure input files for snappyHexMesh,
including blockMeshDict, surfaceFeaturesDict and snappyHexMeshDict, based on the
case surface geometry.

Description
    Preconfigures blockMeshDict, surfaceFeaturesDict and snappyHexMeshDict
    files based on the case surface geometry files.

    Starting from a standard OpenFOAM case, this utility locates surface
    geometry files, e.g. OBJ, STL format, in the constant/geometry directory.
    It writes out the configuration files for mesh generation with
    snappyHexMesh based on assumptions which can be overridden by options on
    the command line.

    The utility processes the surface geometry files, attempting to anticipate
    their intended purpose, trying in particular to recognise whether the
    domain represents an external or internal flow. If there is a surface
    which is closed, and is either single or surrounds all other surfaces,
    then it is assumed that it forms the external boundary of an internal
    flow. This assumption is overridden if the bounds of the background mesh
    are specified using the '-bounds' option and they are more than 50% larger
    than the surface bounds.

    Surfaces which form boundaries of the domain may contain named regions
    that are intended to become patches in the final mesh. Any surface region
    whose name begins with 'inlet' or 'outlet' will become a patch of the same
    name in the final mesh. On an external surface (for an internal flow),
    regions can be identified as inlets and outlets using the '-inletRegions'
    and '-outletRegions' options, respectively. When either option specifies a
    single region, the resulting patch name will be specifically 'inlet' or
    'outlet', respectively. Surfaces which are contained within the domain,
    which do not surround or intersect other surfaces, are assumed by default
    to be wall patches. Any closed surface which surrounds another (but not an
    external surface) is used to form a cellZone within the mesh. Any surface
    can be specifically identified as a cellZone with the '-cellZones' option,
    with the additional '-baffles' and '-rotatingZones' options available to
    assign a surface to a more specific use.

    The background mesh for snappyHexMesh is a single block generated by
    blockMesh, configured using a blockMeshDict file. The block bounds are
    automatically calculated, but can be overridden by the '-bounds'
    option. The number of cells is calculated to produce a fairly small
    prototype mesh. The cell density can be overridden by the '-nCells' option
    or can be scaled up by an integer factor using the '-refineBackground'
    option. When the background mesh is required to form patches in the final
    mesh, e.g. for an external flow, the user can specify the names and types
    of the patches corresponding to the six block faces using options such as
    '-xMinPatch', '-xMaxPatch', etc. The name and type of the default patch,
    formed from block faces which are not configured, can also be specified
    with the '-defaultPatch' option. The utility provides placeholder entries
    for all block faces unless the '-clearBoundary' option is used. A special
    '-cylindricalBackground' option generates a cylindrical background mesh,
    oriented along the z-axis along x = y = 0.

    The snappyHexMesh configuration is generated automatically, applying a set
    of defaults to the main configuration parameters. By default, explicit
    feature capturing is configured, for which a surfaceFeaturesDict file is
    written for the user to generate the features files with the
    surfaceFeatures utility. Implicit feature capturing can alternatively be
    selected with the '-implicitFeatures' option. Refinement levels can be
    controlled with a range of options including: '-refinementLevel' for the
    baseline refinement level; '-refinementSurfaces' for levels on specific
    surfaces; '-refinementRegions' for levels inside specific surfaces;
    '-refinementBoxes' for quick, box-shaped refinement regions specified by
    min and max bounds; '-refinementDists' for distance-based refinement; and
    '-nCellsBetweenLevels' to control the transition between refinement
    levels. A '-layers' option specifies additional layers of cells at wall
    boundaries. The insidePoint parameter is set to '(0 0 0)' by default but
    can be overridden using the '-insidePoint' option.
2023-07-07 12:32:14 +01:00
e0fddef530 foamDictionary: Corrected documentation formatting for Doxygen 2023-07-06 23:07:31 +01:00
c8061c7928 filmContactAngleFvPatchScalarField: Minor documentation change 2023-07-04 21:48:03 +01:00
835ef31a1d foamDictionary: Moved the dictionary tests/examples to applications/test/dictionary 2023-07-03 13:38:37 +01:00
d5f038493a Make disallowed constructors and assignment operators public 2023-06-30 22:16:37 +01:00
de7121fb7f icoFoam: Updated to use piso.dict() 2023-06-30 18:21:42 +01:00
faf0dd2e35 Ensure delete modifier is applied to disallowed constructors and assignment operators 2023-06-30 17:25:07 +01:00
9fb9a8cc8c lagrangian: Merged parcel and parcelTurbulence libraries
Lagrangian's dependency set is simpler than it used to be. There is no
longer a need to maintain a separate library for models that depend on
the momentum transport modelling.
2023-06-27 15:44:54 +01:00
0657826ab9 Replaced all remaining addTimeOptions.H includes with the more flexible timeSelector 2023-06-23 15:24:06 +01:00
f3df607dde Test-string: Remove dictionary substitution test
The dictionary/table-based expansions provided by stringOps::expand are
now too situation specific for this utility to concisely test with a
single complex string. These expansions are fundamental to the operation
of dictionary and dynamic code and receive good testing coverage in the
tutorial test loop anyway.
2023-06-23 15:15:51 +01:00
0927fd47fa stringOps: Rationalisation of expansions
Specific names have been given for expand functions. Unused functions
have been removed, and functions only used locally have been removed
from the namespace. Documentation has been corrected. Default and
alternative value handling has been removed from code template
expansion.
2023-06-22 11:46:23 +01:00
f49eb3011d applications/.*/decomposeParDict: Removed unused clutter 2023-06-21 15:11:19 +01:00
d0b2fe89e5 applications/test/dictionary: Corrected formatting of example dictionary files 2023-06-21 12:20:38 +01:00
c9bb53e109 ISstream: Corrected parsing of variables 2023-06-20 19:14:47 +01:00
3460364ef2 foamToC: Added -solvers option
which lists the solver modules:

Contents of table solver:
    XiFluid                                 libXiFluid.so
    compressibleMultiphaseVoF               libcompressibleMultiphaseVoF.so
    compressibleVoF                         libcompressibleVoF.so
    film                                    libfilm.so
    fluid                                   libfluid.so
    functions                               libfunctions.so
    incompressibleDenseParticleFluid        libincompressibleDenseParticleFluid.so
    incompressibleDriftFlux                 libincompressibleDriftFlux.so
    incompressibleFluid                     libincompressibleFluid.so
    incompressibleMultiphaseVoF             libincompressibleMultiphaseVoF.so
    incompressibleVoF                       libincompressibleVoF.so
    isothermalFilm                          libisothermalFilm.so
    isothermalFluid                         libisothermalFluid.so
    movingMesh                              libmovingMesh.so
    multicomponentFluid                     libmulticomponentFluid.so
    multiphaseEuler                         libmultiphaseEuler.so
    shockFluid                              libshockFluid.so
    solid                                   libsolid.so
    solidDisplacement                       libsolidDisplacement.so

This is equivalent to

    foamToC -table solver
2023-06-20 13:06:40 +01:00
debd293832 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-06-16 21:36:54 +01:00
ef85d538e9 Changed stabilisation from rootVSmall to small for to avoid FPEs with extended precision 2023-06-16 21:36:05 +01:00
98ac903969 multiphaseEuler: Make energy predictor compatible with stationary phases 2023-06-16 16:23:56 +01:00
04dd989911 Time: Removed graphFormat
setFormat no longer defaults to the value of graphFormat optionally set in
controlDict and must be set in the functionObject dictionary.

boundaryFoam, financialFoam and pdfPlot still require a graphFormat entry in
controlDict but this is now read directly rather than by Time.
2023-06-16 14:51:30 +01:00
561e20036b foamToC: Updated documentation 2023-06-16 13:55:15 +01:00