Commit Graph

1070 Commits

Author SHA1 Message Date
7976bf30b5 solvers: twoLiquidMixingFoam: Removed
Simulating the mixing of two miscible liquids is possible my considering
them as different species of a multicomponent fluid. This approach also
supports an arbitrary number of liquids. The twoLiquidMixingFoam solver
has therefore been removed and its tutorials converted to use the
multicomponentFluid solver module.
2022-11-09 16:48:09 +00:00
aa21d36278 alphatWallBoilingWallFunction: Usability improvements
Bubble waiting time ratio has been made a user adjustable parameter, and
the names of the fields reported by the wallBoilingProperties function
have been rationalised.
2022-11-08 10:32:31 +00:00
9a4bcbf7f4 tutorials: filter: Removed
This tutorial's purpose was to demonstrate rebound off an internal
cyclic patch, and thereby "filter" the particles out of the downstream
sections of the geometry. The case does not correctly do this. The patch
interaction handling is incomplete and does not support overriding
cyclic boundary conditions in this way. This tutorial has therefore been
removed pending funding to improve the patch interaction modelling.

Resolves bug report https://bugs.openfoam.org/view.php?id=3923
2022-11-08 09:42:50 +00:00
731b741b51 solvers::isothermalFluid: Added support for backward time scheme with topology change
Now cases with mesh refinement/unrefinement can be run with the 2nd-order
backward time scheme.  However this is for static meshes only, 2nd-order in time
with topology change AND mesh-motion is not currently supported.
2022-11-06 19:04:06 +00:00
1258c02558 tutorials/modules/multicomponentFluid/aachenBomb: Reverted to Euler ddtScheme 2022-11-05 22:28:23 +00:00
c766abc662 tutorials/modules/multiphaseEuler: Updated wallBoiling tutorials
These tutorials now make make use of the phaseTurbulenceStabilisation
fvModel and the wallBoilingProperties functionObject.

Patch contributed by Juho Peltola, VTT.
2022-11-03 19:27:05 +00:00
488ffd9fd1 Deleted multiphaseEulerFoam: Replaced by the multiphaseEuler solver module 2022-11-03 15:01:38 +00:00
cec0359871 solvers::multiphaseEuler: New solver module for Euler-Euler multiphase simulations
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces multiphaseEulerFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/multiphaseEuler.

Class
    Foam::solvers::multiphaseEuler

Description
    Solver module for a system of any number of compressible fluid phases with a
    common pressure, but otherwise separate properties. The type of phase model
    is run time selectable and can optionally represent multiple species and
    in-phase reactions. The phase system is also run time selectable and can
    optionally represent different types of momentum, heat and mass transfer.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

SourceFiles
    multiphaseEuler.C

See also
    Foam::solvers::compressibleVoF
    Foam::solvers::fluidSolver
    Foam::solvers::incompressibleFluid
2022-11-03 14:49:56 +00:00
495f4ba54c tutorials: mixerVessel: Use standard meshing settings
No advantage was found in the specific snappyHexMesh settings previously
specified for this case. This case now uses settings from the standard
snappyHexMesh.cfg file.

The rotating region has also been modified to align better with the
original block mesh. For sliding interface problems this is important in
order to reliably get good conformance to the cylinder edges.
2022-11-01 10:42:14 +00:00
82f4a4fb51 tutorials/multiphase: Updated fvSchemes utilising commit 1c2f614b6c 2022-10-31 17:11:12 +00:00
1c2f614b6c fvSchemes: Added optional group/phase extension filtering
After direct and regular expression matching the scheme name is now filtered to
remove and group/phase extensions in the name and matched again with the schemes
dictionary.

This significantly simplifies the specification of schemes in multiphase
simulations, instead of the rather messy regular expressions the new method
allows schemes to be specified without the group/phase name extension and the
scheme is then used for all groups/phases.  For example in the bubbleColumn
tutorials the schemes can now be specified thus:

divSchemes
{
    default                     none;

    div(phi,alpha)              Gauss vanLeer;
    div(phir,alpha,alpha)       Gauss vanLeer;

    div(alphaRhoPhi,U)          Gauss limitedLinearV 1;
    div(phi,U)                  Gauss limitedLinearV 1;

    div(alphaRhoPhi,e)          Gauss limitedLinear 1;
    div(alphaRhoPhi,K)          Gauss limitedLinear 1;
    div(alphaRhoPhi,(p|rho))    Gauss limitedLinear 1;

    div((((alpha*rho)*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

rather than using complex regular expressions as done previously:

divSchemes
{
    default                         none;

    div(phi,alpha.air)              Gauss vanLeer;
    div(phi,alpha.water)            Gauss vanLeer;
    div(phir,alpha.water,alpha.air) Gauss vanLeer;
    div(phir,alpha.air,alpha.water) Gauss vanLeer;

    "div\(alphaRhoPhi.*,U.*\)"      Gauss limitedLinearV 1;
    "div\(phi.*,U.*\)"              Gauss limitedLinearV 1;

    "div\(alphaRhoPhi.*,(h|e).*\)"  Gauss limitedLinear 1;
    "div\(alphaRhoPhi.*,K.*\)"      Gauss limitedLinear 1;
    "div\(alphaRhoPhi.*,\(p\|rho.*\)\)" Gauss limitedLinear 1;
    "div\(alphaRhoPhi.*,\(p\|rho.*\)\)" Gauss limitedLinear 1;

    "div\(\(\(\(alpha.*\*rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear;
}
2022-10-31 12:37:53 +00:00
4bd90bc969 rhoThermo: Renamed thermo:rho -> rho
The thermodynamic density field is now named "rho" by default and only renamed
"thermo:rho" by solvers that create and maintain a separate continuity density
field which is named "rho".  This change significantly simplifies and
standardises the specification of schemes and boundary conditions requiring
density as it is now always named "rho" or "rho.<phase>" unless under some very
unusual circumstances the thermodynamic rather than continuity density is
required for a solver maintaining both.

The advantage of this change is particularly noticeable for multiphase
simulations in which each phase has its own density now named "rho.<phase>"
rather than "thermo:rho.<phase>" as separate phase continuity density fields are
not required so for multiphaseEulerFoam the scheme specification:

    "div\(alphaRhoPhi.*,\(p\|thermo:rho.*\)\)" Gauss limitedLinear 1;

is now written:

    "div\(alphaRhoPhi.*,\(p\|rho.*\)\)" Gauss limitedLinear 1;
2022-10-28 02:19:13 +01:00
87a0b8a515 basicThermo: Renamed thermo:psi -> psi, thermo:mu -> mu and thermo:kappa -> kappa
The basic thermophysical properties are now considered fundamental and complex
models like kineticTheoryModel using these names for some other purpose must
disambiguate using typedName to prepend the model name to the field name.

This change standardises, rationalises and simplifies the specification of
fvSchemes and boundary conditions.

thermo:rho will also be renamed rho in a subsequent commit to complete this
rationalisation.
2022-10-27 20:27:56 +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
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
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
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
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
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
a8cb237f75 tutorials: WatersKing: Fixed compilation error 2022-10-16 09:20:19 +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
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
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
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
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
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
562925476b fvModels::waveForcing: New fvModel to generate VoF surface by region forcing
With waveForcing waves can be generated with a domain by applying forcing to
both the phase-fraction and velocity fields rather than requiring that the waves
are introduced at an inlet.  This provides much greater flexibility as waves can
be generated in any direction relative to the mean flow, obliquely or even
against the flow.  isotropicDamping or verticalDamping can be used in
conjunction with waveForcing to damp the waves before they reach an outlet,
alternatively waveForcing can be used in regions surrounding a hull for example
to maintain far-field waves everywhere.

The tutorials/multiphase/interFoam/laminar/forcedWave tutorial case is provided
to demonstrate the waveForcing fvModel as an alternative to the wave inlet
boundary conditions used in the tutorials/multiphase/interFoam/laminar/wave
case.

Class
    Foam::fv::waveForcing

Description
    This fvModel applies forcing to the liquid phase-fraction field and all
    components of the vector field to relax the fields towards those
    calculated from the current wave distribution.

    The forcing force coefficient \f$\lambda\f$ should be set based on the
    desired level of forcing and the residence time the waves through the
    forcing zone.  For example, if waves moving at 2 [m/s] are travelling
    through a forcing zone 8 [m] in length, then the residence time is 4 [s]. If
    it is deemed necessary to force for 5 time-scales, then \f$\lambda\f$ should
    be set to equal 5/(4 [s]) = 1.2 [1/s].

Usage
    Example usage:
    \verbatim
    waveForcing1
    {
        type            waveForcing;

        libs            ("libwaves.so");

        liquidPhase     water;

        // Define the line along which to apply the graduation
        origin          (600 0 0);
        direction       (-1 0 0);

        // // Or, define multiple lines
        // origins         ((600 0 0) (600 -300 0) (600 300 0));
        // directions      ((-1 0 0) (0 1 0) (0 -1 0));

        scale
        {
            type        halfCosineRamp;
            start       0;
            duration    300;
        }

        lambda          0.5; // Forcing coefficient
    }
    \endverbatim
2022-10-03 20:30:02 +01:00
9dc91eb479 compressibleVoF: Replaced twoPhaseChangeModel with the VoFCavitation fvModel
Replacing the specific twoPhaseChangeModel with a consistent and general fvModel
interface will support not just cavitation using the new compressible
VoFCavitation fvModel but also other phase-change and interface manipulation
models in the future and is easier to use for case-specific and other user
customisation.

Class
    Foam::fv::compressible::VoFCavitation

Description
    Cavitation fvModel

Usage
    Example usage:
    \verbatim
    VoFCavitation
    {
        type    VoFCavitation;

        libs    ("libcompressibleVoFCavitation.so");

        model   SchnerrSauer;

        KunzCoeffs
        {
            pSat    2300;   // Saturation pressure

            UInf    20.0;
            tInf    0.005; // L = 0.1 m
            Cc      1000;
            Cv      1000;
        }

        MerkleCoeffs
        {
            pSat    2300;   // Saturation pressure

            UInf    20.0;
            tInf    0.005;  // L = 0.1 m
            Cc      80;
            Cv      1e-03;
        }

        SchnerrSauerCoeffs
        {
            pSat    2300;   // Saturation pressure

            n       1.6e+13;
            dNuc    2.0e-06;
            Cc      1;
            Cv      1;
        }
    }
    \endverbatim

The cavitating ballValve tutorial has been updated to use the new VoFCavitation
fvModel.
2022-09-28 13:02:47 +01:00
d3df91a5eb interFoam: Replaced twoPhaseChangeModel with the VoFCavitation fvModel
Replacing the specific twoPhaseChangeModel with a consistent and general fvModel
interface will support not just cavitation using the new VoFCavitation fvModel
but also other phase-change and interface manipulation models in the future and
is easier to use for case-specific and other user customisation.
2022-09-27 19:28:11 +01:00
53f3bc6fdd tutorials/modules/multicomponentFluid/counterFlow.*: Updated thermophysical properties for GRI 3.0 mechanism
Patch contributed by Ilya Morev, VTT.
2022-09-22 16:14:52 +01:00
f4ac5f8748 AMIInterpolation, cyclicAMI: Removed
AMIInterpolation and cyclicAMI have been superseded by patchToPatch and
nonConformalCoupled, respectively.

The motivation behind this change is explained in the following article:

    https://cfd.direct/openfoam/free-software/non-conformal-coupling/

Information about how to convert a case which uses cyclicAMI to
nonConformalCoupled can be found here:

    https://cfd.direct/openfoam/free-software/using-non-conformal-coupling/
2022-09-22 10:05:41 +01:00
aa25763e14 tutorials: Cleanup of mapFields usage
Unused mapFieldsDict files have been deleted, and the throttle3D
now maps from the corresponding 2D case if results are available.
2022-09-22 10:04:02 +01:00
6cf099fd40 lagrangian: Mesh change hooks and usability improvements
The clouds fvModel and all the clouds it creates now contain a full set
of mesh change hooks. Some of these ultimately result in
"NotImplemented" errors, but this is an area under active development
and support may be added in the near future.

In addition, the list of cloud names is now specified from within the
fvModel, using a "clouds" entry. If this entry is omitted then a single
cloud named "cloud" is assumed as before. An example fvModel
specification for multiple clouds might be as follows:

    clouds
    {
        type    clouds;

        libs    ("liblagrangianParcel.so" "liblagrangianParcelTurbulence.so");

        clouds  (coalCloud limestoneCloud); // <-- New entry. Replaces
                                            //     the constant/clouds
                                            //     file.
    }

Lagrangian solvers that construct clouds explicitly now do so via a new
"parcelClouds" mesh object. This ensures that they, too, are correctly
modified as a result of mesh changes.

Neither mechanism now permits no clouds. If there is not a "clouds"
entry (clouds fvModel), or a constant/clouds file (lagrangian solvers),
and there is not a constant/cloudProperties file for the default cloud,
then an error will be generated. Previously the code executed the solver
with no clouds. Intentional usage of the fvModel or lagrangian solvers
without clouds is considered highly unlikely.
2022-09-21 14:07:05 +01:00
68d7dd92d0 tutorials/mesh: Removed unused files 2022-09-16 08:17:21 +01:00
a1e0b1efa9 tutorials/compressible/rhoCentralFoam/movingCone: Set farFieldMoving patch to fixed velocity
to improve the mesh motion.
2022-09-15 21:01:44 +01:00
f8bb763b29 tutorials/modules/incompressibleFluid/movingCone: Corrected mesh and improved motion 2022-09-15 18:48:24 +01:00
c5f1480994 typeInfo: Changed typedName to use the type() virtual function
so that the name of the most derived class is used when constructing named
fields within the model.
2022-09-15 18:13:19 +01:00
fb8e61fbc6 tutorials/modules/incompressibleFluid/motorBike/motorBike/Allclean: Removed redundant cp 2022-09-15 11:59:04 +01:00
2c15cce459 tutorials/mesh/snappyHexMesh: Updated links 2022-09-15 11:58:47 +01:00
020ec8b14d incompressibleFluid: Completed the update of tutorial and template cases
to use the incompressibleFluid solver module rather than simpleFoam, pimpleFoam
or pisoFoam.
2022-09-15 10:58:28 +01:00
8d229041dd mappedPatchBase: Separated into mapped and mappedInternal
The mappedPatchBase has been separated into a type which maps from
another patch (still called mappedPatchBase) and one that maps from
internal cell values (mappedInternalPatchBase). This prevents the user
needing to specify settings for mapping procedures that are not being
used, and potentially don't even make sense given the context in which
they are being applied. It also removes a lot of fragile logic and error
states in the mapping engine and its derivatives regarding the mode of
operation. Mapping from any face in the boundary is no longer supported.

Most region-coupling mapping patches are generated automatically by
utilities like splitMeshRegions and extrudeToRegionMesh. Cases which
create region-coupling mapped patches in this way will likely require no
modification.

Explicitly user-specified mapping will need modifying, however. For
example, where an inlet boundary is mapped to a downstream position in
order to evolve a developed profile. Or if a multi-region simulation is
constructed manually, without using one of the region-generating
utilities.

The available mapped patch types are now as follows:

  - mapped: Maps values from one patch to another. Typically used for
    inlets and outlets; to map values from an outlet patch to an inlet
    patch in order to evolve a developed inlet profile, or to permit
    flow between regions. Example specification in blockMesh:

        inlet
        {
            type    mapped;
            neighbourRegion region0;  // Optional. Defaults to the same
                                      // region as the patch.
            neighbourPatch outlet;
            faces   ( ... );
        }

    Note that any transformation between the patches is now determined
    automatically. Alternatively, it can be explicitly specified using
    the same syntax as for cyclic patches. The "offset" and "distance"
    keywords are no longer used.

  - mappedWall: As mapped, but treated as a wall for the purposes of
    modelling (wall distance). No transformation. Typically used for
    thermally coupling different regions. Usually created automatically
    by meshing utilities. Example:

        fluid_to_solid
        {
            type    mappedWall;
            neighbourRegion solid;
            neighbourPatch solid_to_fluid;
            method  intersection;     // The patchToPatch method. See
                                      // below.
            faces   ( ... );
        }

  - mappedExtrudedWall: As mapped wall, but with corrections to account
    for the thickness of an extruded mesh. Used for region coupling
    involving film and thermal baffle models. Almost always generated
    automatically by extrudeToRegionMesh (so no example given).

  - mappedInternal: Map values from internal cells to a patch. Typically
    used for inlets; to map values from internal cells to the inlet in
    order to evolve a developed inlet profile. Example:

        inlet
        {
            type    mappedInternal;
            distance 0.05;            // Normal distance from the patch
                                      // from which to map cell values
            //offset  (0.05 0 0);     // Offset from the patch from
                                      // which to map cell values
            faces   ( ... );
        }

    Note that an "offsetMode" entry is no longer necessary. The mode
    will be inferred from the presence of the distance or offset
    entries. If both are provided, then offsetMode will also be required
    to choose which setting applies.

The mapped, mappedWall and mappedExtrudedWall patches now permit
specification of a "method". This selects a patchToPatch object and
therefore determines how values are transferred or interpolated between
the patches. Valid options are:

  - nearest: Copy the value from the nearest face in the neighbouring
    patch.

  - matching: As nearest, but with checking to make sure that the
    mapping is one-to-one. This is appropriate for patches that are
    identically meshed.

  - inverseDistance: Inverse distance weighting from a small stencil of
    nearby faces in the neighbouring patch.

  - intersection: Weighting based on the overlapping areas with faces in
    the neighbouring patch. Equivalent to the previous AMI-based mapping
    mode.

If a method is not specfied, then the pre-existing approach will apply.
This should be equivalent to the "nearest" method (though in most such
cases, "matching" is probably more appropriate). This fallback may be
removed in the future once the patchToPatch methods have been proven
robust.

The important mapped boundary conditions are now as follows:

  - mappedValue: Maps values from one patch to another, and optionally
    modify the mapped values to recover a specified average. Example:

        inlet
        {
            type    mappedValue;
            field   U;                // Optional. Defaults to the same
                                      // as this field.
            average (10 0 0);         // The presence of this entry now
                                      // enables setting of the average,
                                      // so "setAverage" is not needed
            value   uniform 0.1;
        }

  - mappedInternalValue: Map values from cells to a patch, and
    optionally specify the average as in mappedValue. Example:

        inlet
        {
            type    mappedValue;
            field   k;                // Optional. Defaults to the same
                                      // as this field.
            interpolationScheme cell;
            value   uniform 0.1;
        }

  - mappedFlowRateVelocity: Maps the flow rate from one patch to
    another, and use this to set a patch-normal velocity. Example:

        inlet
        {
            type    mappedFlowRate;
            value   uniform (0 0 0);
        }

Of these, mappedValue and mappedInternalValue can override the
underlying mapped patch's settings by additionally specifying mapping
information (i.e., the neighbourPatch, offset, etc... settings usually
supplied for the patch). This also means these boundary condtions can be
applied to non-mapped patches. This functionality used to be provided
with a separate "mappedField" boundary condition, which has been removed
as it is no longer necessary.

Other mapped boundary conditions are either extremely niche (e.g.,
mappedVelocityFlux), are always automatically generated (e.g.,
mappedValueAndPatchInternalValue), or their usage has not changed (e.g.,
compressible::turbulentTemperatureCoupledBaffleMixed and
compressible::turbulentTemperatureRadCoupledMixed). Use foamInfo to
obtain further details about these conditions.
2022-09-09 10:03:58 +01:00
dc557e16d4 tutorials: hotRoomComfort: Restored bounded schemes for work term 2022-09-08 16:21:08 +01:00
f771192d5c solvers::compressibleVoF: New solver module for compressible two-phase flow with VoF
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces compressibleInterFoam and all the
corresponding tutorials have been updated and moved to
tutorials/modules/compressibleVoF.

Class
    Foam::solvers::compressibleVoF

Description
    Solver module for for 2 compressible, non-isothermal immiscible fluids
    using a VOF (volume of fluid) phase-fraction based interface capturing
    approach, with optional mesh motion and mesh topology changes including
    adaptive re-meshing.

    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved.

    Either mixture or two-phase transport modelling may be selected.  In the
    mixture approach a single laminar, RAS or LES model is selected to model the
    momentum stress.  In the Euler-Euler two-phase approach separate laminar,
    RAS or LES selected models are selected for each of the phases.

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian
    particles, surface film etc. and constraining or limiting the solution.

SourceFiles
    compressibleVoF.C

See also
    Foam::solvers::fluidSolver
2022-09-01 17:51:18 +01:00
b07feb9858 extrudeToRegionMesh: Added option to extrude patches
This greatly simplifies most setups in which it is a patch (or patches)
of the original mesh which are extruded. It prevents the need for a
topoSet configuration to convert the patch into a zone or set.
2022-08-30 11:20:12 +01:00
3f33f3815e tutorials: CHT version of circuitBoardCooling
This is a better way of doing 3D thermal baffles. It does not require a
special region model and is consistent with multi-region handling in
other parts of OpenFOAM.
2022-08-26 14:43:47 +01:00