Commit Graph

6267 Commits

Author SHA1 Message Date
5fd17d3292 setFields: Added time options -constant, -latestTime, -noZero, -time
in particular to support setting constant property fields in the constant
directory.

Usage: setFields [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -latestTime       select the latest time
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <time>      specify a single time value to select
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage
2022-10-27 11:57:41 +01:00
df178284fd constSolidThermo: Corrected field file reading option 2022-10-27 03:00:23 +01:00
3152df4299 Resolved problems with Clang compilation 2022-10-26 17:36:24 +01:00
1e399aac05 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-26 16:32:18 +01:00
f05bcb541c solidDisplacementFoam: Updated to solve for the solid temperature in energy conservative form
consistent with the solid solver module and solidThermo.
2022-10-26 16:31:25 +01:00
714e13a970 constSolidThermo: New solidThermo supporting uniform and non-uniform constant property specification
Description
    Uniform or non-uniform constant solid thermodynamic properties

    Each physical property can specified as either \c uniform in which case the
    value entry is read or \c file in which case the field file in read
    from the constant directory.

Usage
    Example of uniform constant solid properties specification:
    \verbatim
        thermoType          constSolidThermo;

        rho
        {
            type        uniform;
            value       8940;
        }

        Cv
        {
            type        uniform;
            value       385;
        }

        kappa
        {
            type        uniform;
            value       380;
        }
    \endverbatim

    Example of non-uniform constant solid properties specification:
    \verbatim
        thermoType          constSolidThermo;

        rho
        {
            type        file;
        }

        Cv
        {
            type        file;
        }

        kappa
        {
            type        file;
        }
    \endverbatim
    where each of the field files are read from the constant directory.
2022-10-26 16:29:45 +01:00
bd414b822e tetrahedron: Removed unused code 2022-10-26 16:09:37 +01:00
f9d607f270 fvMeshStitcher: Prevent "not found" error when launching old cases 2022-10-25 15:46:29 +01:00
28658b94a6 solidThermophysicalTransportModels::anisotropic: Added patch name to Kappa alignment message 2022-10-25 08:46:42 +01:00
25bdd58284 solidThermophysicalTransportModels::anisotropic: Added better diagnostics for Kappa alignment 2022-10-24 20:38:27 +01:00
59e6d57a17 solidThermophysicalTransportModel::anisotropic: Corrected test for Kappa patch alignment 2022-10-24 20:25:41 +01:00
01d2c6ec52 solidThermophysicalTransportModel::anisotropic: Added heat-flux correction qCorr
to handle the wall heat-flux generated by the tangential components of the
temperature gradient when the thermal conductivity tensor Kappa does not align
with the boundary.  This is an uncommon situation but for cases where it is
important it must be handled correctly; previously this term was ignored.

For efficiency the temperature gradient field is automatically cached so that it
is not evaluated for every patch for which Kappa is not aligned with the
boundary, and the correction is evaluated and applied only for those patches.

The heat-flux correction qCorr is used in the coupled and external heat-flux
boundary conditions coupledTemperature and externalTemperature.
2022-10-24 19:01:52 +01:00
d551993e89 integratedNonUniformTable1: Corrected offsets
Resolves bug-report https://bugs.openfoam.org/view.php?id=3915
2022-10-24 10:09:29 +01:00
e8325bbcec combustionModels::EDC: Corrected handling of limits in the v2016 variant
Resolves bug-report https://bugs.openfoam.org/view.php?id=3905
2022-10-23 10:13:04 +01:00
5af5413542 thermophysicalTransportModel: New abstract base-class for all thermophysical transport
the new fluidThermophysicalTransportModel and solidThermophysicalTransportModel
are derived from thermophysicalTransportModel providing a consistent and unified
interface for heat transport within and between regions.  Coupled and external
heat-transfer boundary conditions can now be written independent of the
thermophysical properties or transport modelling of the regions providing
greater flexibility, simpler code and reduces the maintenance overhead.
2022-10-23 04:13:52 +01:00
3521ab03a2 ThermophysicalTransportModels: Reorganisation to support a new abstract base-class fluidThermophysicalTransportModel
The previous fluidThermophysicalTransportModel typedef has been renamed
fluidThermoThermophysicalTransportModel as it is instantiated on fluidThermo,
freeing the name fluidThermophysicalTransportModel for the new base-class.
2022-10-21 19:45:26 +01:00
1f06731e37 patchKappa: Moved the currently limited handling of anisotropic patch kappa into solidThermophysicalTransportModels 2022-10-21 15:14:48 +01:00
9cabc5aa2f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-21 12:10:08 +01:00
8d33ad6dda mixedFvPatchField: Added optional 'valuesRequired' argument to the dictionary constructor
so that derived classes can call the dictionary constructor without reading the
refValue, refGradient or valueFraction entries.  This ensures that the
fvPatchField dictionary constructor is called, setting optional entries like
'libs' as required.
2022-10-21 12:07:50 +01:00
2f709bf22b gradSchemes: leastSquares: Fix bug preventing use with NCC 2022-10-21 11:05:41 +01:00
091cba730d fixedGradientFvPatchField: Fixed mapping bug
Resolves bug report https://bugs.openfoam.org/view.php?id=3917
2022-10-21 10:20:40 +01:00
a7155a7e0a decomposePar, reconstructPar: Catch decomposition of overridden cyclics
Patch fields on cyclic patches which have overridden the cyclic
constraint using a "patchType cyclic;" setting cannot be decomposed.
OpenFOAM does not have processor variants of jumpCyclic,
porousBafflePressure, etc... Using these conditions in a decomposed case
requires the cyclic to be constrained to a single processor.

This change catches this problem in decomposePar and reconstructPar and
raises a fatal error, rather than continuing and silently converting
these overridden boundary conditions to a standard processorCyclic patch
field.

Resolves bug report https://bugs.openfoam.org/view.php?id=3916
2022-10-21 09:17:14 +01:00
b1de509a77 fvModels: surfaceFilms: Support for multiple films
The surfaceFilm fvModel has been renamed surfaceFilms, and can now have
a number of independent film models specified.

For example, the hotBoxes tutorial could be modified to have separate
film regions for the boxes and for the floor. In which case, the names
of the separate films would need specifying as shown below.

    surfaceFilms
    {
        type    surfaceFilms;
        surfaceFilms (boxesFilm floorFilm); // <-- new entry
        libs    ("libsurfaceFilmModels.so");
    }

The old fvModel name, surfaceFilm, has been maintained for backwards
compatibility.

The Lagrangian surface film model now also requires the coupled
surfaceFilms to be specified when there is not just a single
default-named film. For example, in constant/cloudProperties:

    subModels
    {
        surfaceFilmModel thermoSurfaceFilm;

        thermoSurfaceFilmCoeffs
        {
            surfaceFilms    (boxesFilm floorFilm); // <-- new entry
            interactionType splashBai;
            deltaWet        0.0005;
            Adry            2630;
            Awet            1320;
            Cf              0.6;
        }

        ...
    }
2022-10-20 19:26:48 +01:00
22d2b7be26 fvPatchField: Added support for optional libs entry
allowing libraries containing and supporting special boundary conditions to be
loaded at run-time.
2022-10-20 18:29:05 +01:00
fd2e8f1f4d solvers/modules/fluid/isothermalFluid/correctPressure: Corrected transonic option for moving meshes
This change resolves a mass-conservation issue caused by the handling of
absolute and relative fluxes in the construction of the transonic pressure
equation.
2022-10-20 13:14:56 +01:00
64455c60f5 tutorials/modules/CHT/shellAndTubeHeatExchanger: Load the libcoupledThermophysicalTransportModels library
to ensure the thermal coupled boundary conditions are loaded before the solid
solver module.
2022-10-20 10:23:34 +01:00
cdaaa61987 solidThermophysicalTransportModel: new thermophysical transport model for solids
to handle isotropic and anisotropic is a consistent, general and extensible
manner, replacing the horrible hacks which were in solidThermo.

This is entirely consistent with thermophysicalTransportModel for fluids and
provides the q() and divq() for the solid energy conservation equations.  The
transport model and properties are specified in the optional
thermophysicalTransport dictionary, the default model being isotropic if this
dictionary file is not present, thus providing complete backward-compatibility
for the common isotropic cases.

Anisotropic thermal conductivity is now handled in a much more general manner by
the anisotropic model:

Class
    Foam::solidThermophysicalTransportModels::anisotropic

Description
    Solid thermophysical transport model for anisotropic thermal conductivity

    The anisotropic thermal conductivity field is evaluated from the solid
    material anisotropic kappa specified in the physicalProperties dictionary
    transformed into the global coordinate system using default
    coordinate system and optionally additional coordinate systems specified
    per-zone in the thermophysicalProperties dictionary.

Usage
    Example of the anisotropic thermal conductivity specification in
    thermophysicalProperties with two zone-based coordinate systems in
    addition to the default:

    \verbatim
    model anisotropic;

    // Default coordinate system
    coordinateSystem
    {
        type        cartesian;
        origin      (0 0 0);
        coordinateRotation
        {
            type        cylindrical;
            e3          (1 0 0);
        }
    }

    // Optional zone coordinate systems
    zones
    {
        coil1
        {
            type        cartesian;
            origin      (0.1 0.2 0.7);
            coordinateRotation
            {
                type        cylindrical;
                e3          (0.5 0.866 0);
            }
        }

        coil2
        {
            type        cartesian;
            origin      (0.4 0.5 1);
            coordinateRotation
            {
                type        cylindrical;
                e3          (0.866 0.5 0);
            }
        }
    }
    \endverbatim

This development required substantial rationalisation of solidThermo,
coordinateSystems and updates to the solid solver module, solidDisplacementFoam,
the wallHeatFlux functionObject, thermalBaffle and all coupled thermal boundary
conditions.
2022-10-19 16:45:00 +01:00
cc868b677f Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-19 09:46:06 +01:00
3370818e80 tutorials/multiphase/interFoam/laminar/forcedUpstreamWave: Added forcing debug switch
to enable writing of the isotropicDamping:forceCoeff isotropicDamping:scale
waveForcing:forceCoeff waveForcing:scale diagnostic fields to check the damping
and forcing distributions.
2022-10-19 09:44:15 +01:00
4b4c124f97 SurfaceFilmModel: Corrected initialisation of cached film data
Resolves bug report https://bugs.openfoam.org/view.php?id=3912

Patch contributed by Timo Niemi, VTT.
2022-10-18 21:19:18 +01:00
d01b37a949 functionObjectList: Added error message for functionObject configuration file name not specified
token: Changed parseError to use cerr rather than FatalIOError so that it can
report errors when reading debug switches from the case controlDict at start-up.
2022-10-18 21:13:45 +01:00
f8bcaeb588 mappedPatchBase: Bug fix to parallel reverse mapping 2022-10-18 16:55:51 +01:00
cd7405e30a extrudeToRegionMesh: Fixed issues associated with extruding from baffles 2022-10-18 16:13:35 +01:00
4c6a469a5a mappedPatchBase: Added user control of matchTolerance
The tolerance used for geometric checking and transformation calculation
between mapped patches can now be set per patch by the user. A
"matchTolerance" setting can be specified in the mapped patches'
dictionaries in the "polyMesh/boundary" file. The default remains 1e-4.

This is exactly the same control as is used for cyclic patches.

The error message that is generated when the geometric check fails has
also been improved to provide better information and more explicit
instruction as to how to resolve the problem.
2022-10-18 13:41:11 +01:00
03b0619ee1 lagrangian: Support meshToMesh mapping
Lagrangian is now compatible with the meshToMesh topology changer. If a
cloud is being simulated and this topology changer is active, then the
cloud data will be automatically mapped between the specified sequence
of meshes in the same way as the finite volume data. This works both for
serial and parallel simulations.

In addition, mapFieldsPar now also supports mapping of Lagrangian data
when run in parallel.
2022-10-18 12:06:54 +01:00
9e9ab2204c remote: Centralised class to replace patchToPatch::procFace 2022-10-18 12:06:54 +01:00
bad5bd0bbe solidificationMeltingSource: Removed '|' -> 'or' in documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3913
2022-10-18 11:54:12 +01:00
512e5dddd1 mappedValue: Fix typos in documentation of mapped patch fields
Resolves bug report https://bugs.openfoam.org/view.php?id=3914

Patch contributed by Timo Niemi, VTT.
2022-10-18 08:19:04 +01:00
0a4aecb6ef PatchCollisionDensity: Made compatible with nonConformalCoupled
This is a basic fix to account for changes in the structure of
non-conformal patches. It does not fix the issue that the cloud
functions do not have any mesh change hooks and do not, therefore,
support mesh changes in general. Compatibility with topology change,
mesh mapping and distribution would require substantial additional work.
2022-10-16 09:20:36 +01:00
a8cb237f75 tutorials: WatersKing: Fixed compilation error 2022-10-16 09:20:19 +01:00
3bde146b47 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-13 12:13:48 +01:00
2972d16653 setTimeStepFunctionObject, setWriteIntervalFunctionObject: Convert from user-time to real-time
so that the specification of time-step and write-interval are in user-time,
consistent with the controlDict.

Class
    Foam::functionObjects::setTimeStepFunctionObject

Description
    Updates the time step as a Function1 of time.

    If the case is running with userTime specified in controlDict then the
    time-step values returned by the Function1 are assumed to be in user-time
    rather than real-time.

Class
    Foam::functionObjects::setWriteIntervalFunctionObject

Description
    Updates the writeInterval as a Function1 of time.

    If the case is running with userTime specified in controlDict then the write
    interval values returned by the Function1 are assumed to be in user-time
    rather than real-time.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3904
2022-10-13 12:11:09 +01:00
5b11f5a833 functionObjects: Standardised file paths for functions applied to regions
Function objects now write to the following path when applied to a
non-default region of a multi-region case:

    postProcessing/<regionName>/<functionName>/<time>/

Previously the order of <regionName> and <functionName> was not
consistent between the various function objects.

Resolves bug report https://bugs.openfoam.org/view.php?id=3907
2022-10-13 11:28:26 +01:00
2fc1f0b138 thermalBaffleFvPatchScalarField: Updated with the coupledTemperatureFvPatchScalarField base class 2022-10-12 22:49:08 +01:00
356ac6b9ba Removed redundant files 2022-10-12 21:26:17 +01:00
5c01fef155 Rationalised thermal boundary condition class names and simplified user input
Renamed classes:

    turbulentTemperatureCoupledBaffleMixedFvPatchScalarField ->
        coupledTemperatureFvPatchScalarField

    externalWallHeatFluxTemperatureFvPatchScalarField ->
        externalTemperatureFvPatchScalarField

Radiation heat-flux support in turbulentTemperatureRadCoupledMixed transferred
to coupledTemperatureFvPatchScalarField and turbulentTemperatureRadCoupledMixed removed.

Renamed boundary condition type names in T field files:

    compressible::turbulentTemperatureCoupledBaffleMixed -> coupledTemperature

    compressible::turbulentTemperatureRadCoupledMixed -> coupledTemperature

    compressible::externalWallHeatFluxTemperature -> externalTemperature

Backward-compatibility is provided for all three of the above BC specifications
so existing cases will run as before but we recommend migrating to the new
simpler names.
2022-10-12 21:17:25 +01:00
a4ca75045c nonConformalCoupled: Support second order time schemes
Resolves bug report https://bugs.openfoam.org/view.php?id=3902
2022-10-12 11:36:45 +01:00
8976585b76 waveSurfacePressureFvPatchScalarField: Updated to operate with p_rgh
so that it can now be used with either the isothermalFluid or fluid solver
modules, thus supporting non-uniform fluid properties, compressibility and
thermal effect.  This development makes the special potentialFreeSurfaceFoam
solver redundant as both the isothermalFluid and fluid solver modules are more
general and has been removed and replaced with a user redirection script.

The tutorials/multiphase/potentialFreeSurfaceFoam cases have been updated to run
with the isothermalFluid solver module:

    tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox
    tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox

which demonstrate how to upgrade potentialFreeSurfaceFoam cases to
isothermalFluid.
2022-10-11 21:58:36 +01:00
45fe16d325 interpolatingSolidBodyMotionSolver: Removed temporary diagnostic messages
Resolves bug-report https://bugs.openfoam.org/view.php?id=3903
2022-10-11 21:16:56 +01:00
778ea7bf89 waveSurfacePressureFvPatchScalarField: Moved zeta field construction from potentialFreeSurfaceFoam
The zeta field is cached on the database thus simplifying potentialFreeSurfaceFoam.
2022-10-11 15:43:38 +01:00