Commit Graph

6242 Commits

Author SHA1 Message Date
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
fee658b024 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-11 14:17:16 +01:00
7797363da0 Revert "inputSyntaxEntry: Moved inputSyntaxEntry::typeName definition to entryIO.C"
This reverts commit 56023e97fb.
2022-10-11 12:37:38 +01:00
10732965cc flowRateInletVelocity: Prevent crash during reconstruct 2022-10-11 10:37:08 +01:00
ebb02bc894 globalMeshData: Fix issue with global edge orientations on un-split baffles
Resolves bug report https://bugs.openfoam.org/view.php?id=3896
2022-10-11 09:28:38 +01:00
30eb5e28e6 fvMesh: Generalised the handing of old-time fields during mesh motion and topology change
Topology change occurs before the time-increment and hence the oldest time
field (old-time in the case of 1st order time schemes, old-old-time in the case
of 2nd-order time schemes) is not actually needed as it is replaced by the
current time-field after time-increment so there is no purpose to mapping this
field.  However, it is necessary to keep track of the existence of the
oldest-time field to ensure the correct number of old-time fields are cached for
the time-scheme.  This development allows fvMesh to delete the redundant
oldest-time fields in such a manner that GeometricField can reinstate them
correctly after time-increment which is more efficient and more reliable than
attempting to map them and done previously.

Additionally fvMesh movement, which occurs after time-increment, now ensure all
old-time fields are up-to-date before NCC stitcher mapping so that both fields
and their old-time values are mapped consistently.  This removes the need for
old-time field caching calls in MapGeometricFields, fvMeshAdder and
fvMeshStitcher, thus simplifying the code and improving maintainability.
2022-10-10 14:43:07 +01:00
b8ccebb5f4 bin/tools/CleanFunctions: Removes cellToRegion and cellToRegion.gz
Resolves feature request https://bugs.openfoam.org/view.php?id=3901
2022-10-10 14:39:00 +01:00
03b17d695b writeObjectsBase: Added static Switch logFalse for default initialisation of log
avoiding erroneously setting the log Switch reference to false when logging is
not required.
2022-10-09 22:07:55 +01:00
56023e97fb inputSyntaxEntry: Moved inputSyntaxEntry::typeName definition to entryIO.C
This may avoid static member construction order problems with some compilers as
entryIO uses inputSyntaxEntry::typeName.
2022-10-09 22:04:24 +01:00
475e7494be chemkinToFoam: Added -precision option
to allow the write precision to be increased if necessary, the default is 10.
2022-10-08 20:20:33 +01:00
af7e7cb97e meshToMesh: Minor renaming. Squash into actual changes. 2022-10-07 12:27:58 +01:00
387690b0f5 patchToPatch: Compact local target information 2022-10-07 12:27:58 +01:00
c8e451f67e Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-07 11:39:23 +01:00
1a3e2ab68d tutorials/multiphase/multiphaseEulerFoam/laminar/damBreak4phase: Removed unnecessary file
Resolves bug-report https://bugs.openfoam.org/view.php?id=3897
2022-10-07 11:38:45 +01:00
15cf3a2545 interRegionModel: Clean up of use of meshToMesh interpolate methods 2022-10-06 12:48:05 +01:00
5563dd1120 patchToPatch::inverseDistance: Fix for co-directional patches 2022-10-06 12:48:05 +01:00
84315c98c9 meshToMeshMethod: General rationalisation
The mesh-to-mesh methods have been reorganised so that
cell-volume-weight specific functionality is not implemented in the base
method class. Normalisation has been delegated to the methods so that it
can be performed in a method-appropriate way. The public and protected
interface of the methods has been minimised and unused code has been
removed.
2022-10-06 12:48:00 +01:00
b77defca72 FvFaceCellWave: Fix for Gcc-9.2
Resolves bug report https://bugs.openfoam.org/view.php?id=3895
2022-10-06 09:13:43 +01:00
aad9885699 tutorials/multiphase/interFoam/laminar/forcedUpstreamWave: Replaces the forcedWave tutorial
and demonstrates the wave being generated in a region adjacent to the outlet and
propagating upstream towards the inlet where it is damped by a damping region
and mesh expansion.
2022-10-05 15:39:46 +01:00
70bcb2bc7a fvModels::waveForcing: Added a continuity correction to momentum equation
to compensate for phase-change generated by the phase-fraction forcing.  This
removes spurious velocity generated around the wave.
2022-10-05 15:38:29 +01:00
73892ab5f7 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-04 15:23:31 +01:00
d0746fb84a Function1::exponentialSqrRamp: New ramp function
Description
    Exponential square ramp function starting from 0 and increasing to 1 from \c
    start over the \c duration and remaining at 1 thereafter:

    \f[
        value(t) = (e^(((t - start)/duration)^2) - 1)/(e - 1)
    \f]
2022-10-04 15:22:46 +01:00
5806f9c192 ops: Removed weighted ops
These were previously used for constructing interpolation results across
AMI couplings. They are no longer needed, following the removal of AMI.
2022-10-04 10:58:40 +01:00
833be45875 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-04 09:31:40 +01:00
5c09a84508 tutorials/modules/multicomponentFluid/counterFlowFlame.*: Renamed thermo.compressibleGasGRI thermo
to avoid further confusion concerning the origin of the thermo and transport
data which is not that supplied with the GRI mechanism as the these simple test
cases is to demonstrate the integration of a complex mechanism with or without
TDAC and ISAT, not complex transport modelling.
2022-10-04 09:29:07 +01:00
2fec74888d Revert "tutorials/modules/multicomponentFluid/counterFlow.*: Updated thermophysical properties for GRI 3.0 mechanism"
The proposed change does not change the mixing rules and the default coefficient mixing approach does not
provide mixed properties consistent with the GRI specification.  The purpose of these simple test cases
is to demonstrate the integration of a complex mechanism with or without TDAC and ISAT, not complex transport modelling.

A new tutorial is required to demonstrate the GRI 3.0 mechanism with complex transport properties.

This reverts commit 53f3bc6fdd.
2022-10-04 09:17:01 +01:00