Commit Graph

6377 Commits

Author SHA1 Message Date
c0ce311444 Renamed constAnIsoSolidTransport -> constAnisoSolidTransport for consistency with standard OpenFOAM naming convention
and the new constAnisoSolidThermo class.
2022-11-28 17:53:24 +00:00
5c296cbc8e constAnisoSolidThermo: New solid thermophysical properties class support anisotropic thermal conductivity
Description
    Uniform or non-uniform constant anisotropic solid thermodynamic properties

    Each physical property can specified as either \c uniform in which case the
    value entry is read, \c zonal in which case the value entry and zone list
    are read or \c file in which case the field file in read from the constant
    directory.  The thermal conductivity \c Kappa is anisotropic and read as a
    diagonal tensor or diagonal tensor field provided in the form of a vector
    or vector field.

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

        rho
        {
            type        uniform;
            value       8940;
        }

        Cv
        {
            type        uniform;
            value       385;
        }

        Kappa
        {
            type        uniform;
            value       (380 100 100);
        }
    \endverbatim

    Example of zonal constant solid properties specification where Kappa is
    different in different zones:
    \verbatim
        thermoType          constSolidThermo;

        rho
        {
            type        uniform;
            value       8940;
        }

        Cv
        {
            type        uniform;
            value       385;
        }

        Kappa
        {
            type        zonal;
            value       (380 380 380);

            zones
            {
                heater      (560 560 560);
                insulation  (10  100 100);
            }
        }
    \endverbatim

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

        rho
        {
            type        file;
        }

        Cv
        {
            type        file;
        }

        Kappa
        {
            type        file;
        }
    \endverbatim
    where each of the field files are read from the constant directory.
2022-11-28 17:52:09 +00:00
a25f99dba3 constSolidThermo: Added support for properties to be specified per-zone
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, \c zonal in which case the value entry and zone list
    are 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 zonal constant solid properties specification where kappa is
    different in different zones:
    \verbatim
        thermoType          constSolidThermo;

        rho
        {
            type        uniform;
            value       8940;
        }

        Cv
        {
            type        uniform;
            value       385;
        }

        kappa
        {
            type        zonal;
            value       380;

            zones
            {
                heater      560;
                insulation  100;
            }
        }
    \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-11-28 17:50:34 +00:00
47fb7e4709 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-28 08:46:28 +00:00
3aea199ebe multiphaseEuler::IATEsources::IATEturbulentBreakUp: Corrected turbulent Weber number and source expression
Resolves bug-reports:
https://bugs.openfoam.org/view.php?id=3936
https://bugs.openfoam.org/view.php?id=3935
2022-11-28 08:44:56 +00:00
089778b878 Guides: corrections to 4.9.2 Macro expansion 2022-11-26 18:13:21 +00:00
ca97e77adb Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-25 22:12:12 +00:00
96cf91b5bb chemistryModel: Updated for clang 2022-11-25 22:11:58 +00:00
f69b9fa4a7 Lagrangian: CloudFunctionObjects: Flux functions, and improved handling of face/patch hooks
Three functions for generating fluxes of the Lagrangian parcels have
been added. These are 'numberFlux', 'volumeFlux' and 'massFlux'. They
require only the type specifying; no further controls are needed. If it
is desired only to generate and register the field, and not write it,
then a 'write no;' setting can be applied.

For example, in constant/cloudProperties:

    cloudFunctions
    {
        massFlux1
        {
            type        massFlux; // numberFlux, volumeFlux, or massFlux
            write       no;
        }
    }

The 'postFace' hook is now called at the start of a tracking step, if
the particle is on a face. Execution is therefore reliably *after* an
interaction with a face. There is a new 'preFace' hook which is called
at the end of tracking; i.e., *before* an interaction with a face. The
'postPatch' hook is unchanged, but it is triggered more carefully so
that it does actually execute *after* the patch interaction.

This fixes a number of issues associated with interaction with
constraint and coupled patches. It also allows for functions to be
defined that have dependence on the direction (relative to the face
normal) in which a particle-face interaction takes place.
2022-11-25 15:19:57 +00:00
6ccaf643e0 Lagrangian: LocalInteraction: Consistent handling of constraint types
The localInteraction model now no longer requires specification of an
interaction on any constrained patch type (e.g., symmetry, cyclic, ...).
Non-constrained types (patch, wall, ...) require an interaction to be
specified as before and will trigger an error if this is not the case.

In addition, constrained patches can be overridden by providing a
'patchType' specifier, in the same way as would be done to override a
constrained boundary condition for finite volume.

The filter tutorial now correctly demonstrates something unique; i.e.,
particles rebounding from a cyclic. It has therefore been reinstated.

Resolves (properly) bug report https://bugs.openfoam.org/view.php?id=3923
2022-11-25 15:18:36 +00:00
4d7bd7574f dynamicMesh: Removed unused code 2022-11-25 15:12:02 +00:00
6bfa468472 solidThermophysicalTransportModels::anisotropic: Corrected alignment test for parallel operation 2022-11-25 12:47:30 +00:00
386588b544 functionObjects::rigidBodyPoints: New functionObject to track the motion of points on a rigid body
Description
    Writes the position, linear and angular velocities and accelerations of a
    list of points on a body specified in the body local coordinate system.

Usage
    \table
        Property     | Description                  | Required | Default value
        type         | type name: rigidBodyPoints   | yes      |
        angleUnits   | degrees or radians           | no       | radians
        body         | name of the body             | yes      |
        points       | list of points on the body   | yes      |
    \endtable

    Example of function object specification:
    \verbatim
    rigidBodyPoints
    {
        type           rigidBodyPoints;
        libs           ("librigidBodyState.so");

        angleUnits     degrees;

        body           floatingObject;

        points
        (
            point1     (0 0 0)
            point2     (0.1 0.1 0.25)
        );
    }
    \endverbatim
2022-11-24 18:09:37 +00:00
e52c4e52a5 radiationModels::absorptionEmissionModels: Corrected documentation 2022-11-24 18:06:36 +00:00
2d8537759f driftFluxFoam: Added drift velocity to Courant number test
to aid stability in cases where the drift velocity is comparable to the mean
velocity.
2022-11-24 08:43:09 +00:00
f2b837579c Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-23 17:31:35 +00:00
4a0908a7bb singleLayerRegionModel: merged into surfaceFilm 2022-11-23 17:30:42 +00:00
723f522c51 cutPoly: New polyhedral cutting routines and isoSurface algorithm
A set of routines for cutting polyhedra have been added. These can cut
polyhedral cells based on the adjacent point values and an iso-value
which defines the surface. The method operates directly on the
polyhedral cells; it does not decompose them into tetrahedra at any
point. The routines can compute the cut topology as well as integrals of
properties above and below the cut surface.

An iso-surface algorithm has been added based on these polyhedral
cutting routines. It is significantly more robust than the previous
algorithm, and produces compact surfaces equivalent to the previous
algorithm's maximum filtering level. It is also approximately 3 times
faster than the previous algorithm, and 10 times faster when run
repeatedly on the same set of cells (this is because some addressing is
cached and reused).

This algorithm is used by the 'isoSurface', 'distanceSurface' and
'cutPlane' sampled surfaces.

The 'cutPlane' sampled surface is a renaming of 'cuttingPlane' to make
it consistent with the corresponding packaged function. The name
'cuttingPlane' has been retained for backwards compatibility and can
still be used to select a 'cutPlane' surface. The legacy 'plane' surface
has been removed.

The 'average' keyword has been removed from specification of these
sampled surfaces as cell-centred values are no longer used in the
generation of or interpolation to an iso-surface. The 'filtering'
keyword has also been removed as it relates to options within the
previous algorithm. Zone support has been reinstated into the
'isoSurface' sampled surface. Interpolation to all these sampled
surfaces has been corrected to exactly match the user-selected
interpolation scheme, and the interpolation procedure no longer
unnecessarily re-generates data that is already available.
2022-11-23 16:56:23 +00:00
9a1eadd35a tutorials: ballValve: Simplified specification of walls surface 2022-11-23 16:56:23 +00:00
111a15a42d singleLayerRegionModel: Moved evolve functions to surfaceFilm 2022-11-23 16:46:57 +00:00
df22313066 Renamed surfaceFilmSubModels -> surfaceFilmModels 2022-11-23 15:28:51 +00:00
d693c17b3d singleLayerRegionModel: renamed regionMesh() -> mesh()
in the context of the region model the mesh is the region mesh and so there is
no need to name the access function with the prefix "region".
2022-11-23 14:52:33 +00:00
052a4803f0 regionModels: Refactored to remove the now redundant regionModel base class 2022-11-23 14:23:12 +00:00
08307ddb0f regionModels/thermalBaffle: Superseded by solvers::solid modular solver
which can be selected and executed in foamMultiRun for complex CHT cases.  This
is a much more general, flexible, extensible and maintainable structure than the
now deprecated regionModels system and associated clutter.
2022-11-23 14:12:59 +00:00
88fb92539a chemistryModel: Use the continuity rather than thermo rho
when calculating the specie transport equation reaction rates for consistency.
This also avoids the need for thermo to provide rho0.
2022-11-23 11:15:58 +00:00
0f70729e0a tutorials/modules/fluid/annularThermalMixer: Updated for change to pressure work term 2022-11-23 08:27:23 +00:00
32626cc45d tutorials: wallBoiling: Fixes to wall boiling properties graphs 2022-11-22 16:23:53 +00:00
619f015bcc alphatWallBoilingWallFunctionFvPatchScalarField: Corrected convergence check in parallel 2022-11-21 11:46:06 +00:00
57379321f8 coupledMultiphaseTemperatureFvPatchScalarField: Added support for kappaLayers 2022-11-21 11:42:57 +00:00
f609b4ebbc coupledTemperatureFvPatchScalarField: Removed temporary diagnostic message 2022-11-21 07:45:37 +00:00
c95d964c4b flowRateInletVelocityFvPatchVectorField: Corrected y mapping
Needed for run-time mesh-to-mesh mapping.
2022-11-20 21:06:22 +00:00
084097bab9 solvers/modules: Updated correctPhi logic so that it is not required following topology change
Now fluxes are updated from the mapped fields following mesh topology change
with or without implicit continuity correction enabled by the optional
correctPhi switch.
2022-11-20 20:22:59 +00:00
691866d782 solvers::isothermalFluid,fluid,multicomponentFluid: Improved the enthalpy pressure-work on moving meshes
also simplified the implementation to improve maintainability
2022-11-19 20:32:27 +00:00
091852f66c coupledMultiphaseTemperatureFvPatchScalarField: Updated for Clang 2022-11-18 16:37:22 +00:00
91c0ccd3e7 pressureInletOutletVelocityFvPatchVectorField: Ordered member functions corresponding to declaration order 2022-11-18 15:20:27 +00:00
35a963d452 coupledTemperatureFvPatchScalarField: Improved IO
Optional entries are now written only when set.
2022-11-18 15:19:25 +00:00
9c5070ff17 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-18 15:19:16 +00:00
d2378ef06e tutorials/modules/CHT/wallBoiling: corrected wall thickness
Patch contributed by Juho Peltola, VTT.
2022-11-18 15:18:09 +00:00
b718817164 multiphaseEuler: interfaceSaturationTemperatureModel: Remove left over debugging message
Resolves bug report https://bugs.openfoam.org/view.php?id=3933
2022-11-18 08:44:58 +00:00
b36d8fca44 solvers::isothermalFluid: Improved the consistency, accuracy and stability of the pressure-work term
for moving mesh cases, in both the internal energy and enthalpy equations
2022-11-17 18:08:59 +00:00
29b82422d7 applications/solvers/modules: Reorganised to match the structure of tutorials/modules
Given that the number of solid solver modules is currently 1 and unlikely to
exceed 3 it is not very useful to maintain solid and fluid sub-directories and
easier to see the correspondence between the solver modules and tutorial cases
without.
2022-11-16 23:28:59 +00:00
9fa8b85056 tutorials: multiphaseEuler: Added hydrofoil tutorial
This serves as an example of cavitation modelling with the
multiphaseEuler module. This case also contains validation of the
pressure profile along the hydrofoil against experimental data.

Based on a case contributed by Petteri Peltonen, VTT.
2022-11-16 21:36:35 +00:00
1df33f58c9 multiphaseEuler: Cavitation phaseTransfer model
This adds cavitation modelling to the multiphaseEuler solver module as a
phaseTransfer model. The underlying cavitation modelling is the same as
for the compressibleVoF module.

An example specification in constant/phaseProperties is shown below:

    phaseTransfer
    {
        gas_liquid
        {
            type        cavitation;

            model       Kunz;

            liquid      water;

            pSat        80000;

            UInf        5.33;
            tInf        0.028142589;
            Cc          100;
            Cv          100;
        }
    }

Based on code contributed by Petteri Peltonen, VTT.
2022-11-16 21:36:13 +00:00
721bf7b41a compressible::cavitationModels: Use temperature dependent saturation pressure model
The cavitation models used by the compressibleVoF module can now have a
temperature-dependent saturation pressure model specified. For example,
in the constant/fvModels file of a compressibleVoF case:

    VoFCavitation
    {
        type    VoFCavitation;

        libs    ("libcompressibleVoFCavitation.so");

        model   SchnerrSauer;

        liquid  water;

        // Constant saturation pressure
        //pSat    2300;

        // Antoine equation for temperature-dependent saturation pressure
        pSat
        {
            type    Antoine;
            A       22;
            B      -3000;
            C      -500;
        }

        n       1.6e+13;
        dNuc    2.0e-06;
        Cc      1;
        Cv      1;
    }
2022-11-16 21:36:13 +00:00
9567bc0d4b cavitationModels: Made insensitive to phase order
The cavitation models used by the interFoam solver and the
compressibleVoF solver module can now be applied regardless of the
ordering of the liquid and vapour phases. A "liquid" keyword is now
required in the model specification in order to control which phase is
considered to be the condensed liquid state. Previously the liquid phase
was assumed to be the first of the two phases.
2022-11-16 21:36:13 +00:00
9b373b2950 multiphaseEuler: Use saturation models from the thermo library
The multiphaseEuler module now uses saturation models from the
centralised thermophysical properties library.

The control of these models is slightly different than for the previous
multiphaseEuler-specific saturation models. Where previously a
"saturationPressure" or "saturationTemperature" sub-dictionary was
employed, now "pSat" and "Tsat" entries are used which can be specified
flexibly in a similar manner to function1-s. See the previous commit for
details.
2022-11-16 21:36:13 +00:00
5e8eb78e28 thermophysicalModels: Added centralised saturation models
These models are intended to provide saturation curves for use in
multiple solvers and sub-models. They can be specified in a similar
manner to function1-s in that value, type or sub-dictionary entries are
all supported. The following specifications for a constant saturation
pressure are all equivalent:

    // Value specified. Creates "constant" model.
    pSat    8000;

    // Type specified. Coefficients provided in the same dictionary.
    pSat    constant;
    value   8000;

    // Type specified. Coefficients provided in a coeffs dictionary.
    pSat    constant;
    pSatCoeffs
    {
        value   8000;
    }

    // Sub-dictionary specification.
    pSat
    {
        type    constant;
        value   8000;
    }
2022-11-16 21:36:05 +00:00
366e38d34a compressibleVoF: Consolidated library functionality 2022-11-16 20:54:40 +00:00
4d900cfae3 tutorials/modules/CHT/wallBoiling: CHT version of the Euler-Euler wall-boiling case
Supersedes and replaces the tutorials/modules/multiphaseEuler/wallBoiling case
as it is more physical and representative of a real case.

Patch contributed by Juho Peltola, VTT.
2022-11-16 18:40:28 +00:00
21983bbbb6 solvers::isothermalFluid: Added support fixedFluxExtrapolatedPressure with the transonic option
For high-speed flow cases benefiting from extrapolated pressure, e.g. IC engine
piston motion the fixedFluxExtrapolatedPressure pressure BC can now be used with
the transonic pressure solution option.
2022-11-16 18:22:09 +00:00