Commit Graph

6332 Commits

Author SHA1 Message Date
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
08ccbdcad6 coupledTemperatureFvPatchScalarField: Corrected handling of the kappa tmp field 2022-11-16 15:44:42 +00:00
affc88e7bf noSlipFvPatchVectorField: Added mesh-motion correction to ensure continuity
Class
    Foam::noSlipFvPatchVectorField

Description
    This boundary condition fixes the velocity to zero at walls and assumes
    the walls are stationary.

    For stationary walls with sliding vertices, e.g. engine liners, the normal
    component of the velocity is set from the wall face-flux to ensure
    continuity.

Usage
    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            noSlip;
    }
    \endverbatim
2022-11-16 12:27:07 +00:00
a7d40a4fe5 coupledMultiphaseTemperatureFvPatchScalarField: New BC for multiphase CHT cases
Class
    Foam::coupledMultiphaseTemperatureFvPatchScalarField

Description
    Mixed boundary condition for the phase temperature of a phase in an
    Euler-Euler multiphase simulation, to be used for heat-transfer with another
    region in a CHT case.  Optional thin wall material layer resistances can be
    specified through thicknessLayers and kappaLayers entries.

See also
    Foam::coupledTemperatureFvPatchScalarField

The new tutorial case tutorials/modules/CHT/multiphaseCoolingCylinder2D is a
variant of the coolingCylinder2D case in which a 10% oil droplets in water
mixture flows over and cools a hot cylinder.  The case in run with the
foamMultiRun multi-solver executor.
2022-11-15 16:56:56 +00:00
5c0265beb5 tutorials/modules/CHT: Removed unused kappa entries 2022-11-14 13:55:56 +00:00
41931e264c flowRateInletVelocityFvPatchVectorField: Map y_ in mapping constructor if ptf.y_ is set
Avoids recalculating y_ in the reset function for mesh-to-mesh mapping.
2022-11-14 09:40:36 +00:00
74f4f14f6c flowRateInletVelocityFvPatchVectorField: Added setWallDist call in reset function
to reset the wallDist following mesh-to-mesh mapping.
2022-11-13 17:09:59 +00:00
ef9566259a MRFslipFvPatchVectorField: New MRF/SRF boundary condition for slip-walls
Class
    Foam::MRFslipFvPatchVectorField

Description
    Rotating wall-velocity condition to be used for a slip-wall rotating with
    the moving frame in an MRF (multi-reference frame) or SRF (single reference
    frame) case.

    SRF cases are simply MRF cases with a single MRF zone which covers the
    entire domain.

Usage
    Example of the boundary condition specification for an SRF case or MRF
    case with a single zone:
    \verbatim
    <patchName>
    {
        type            MRFslip;
    }
    \endverbatim
    or if the case has several MRF zones the particular zone this patch is in
    must be named explicitly, e.g.:
    \verbatim
    <patchName>
    {
        type            MRFslip;
        MRFZoneName     rotor;
    }

See also
    Foam::MRFPatchField
    Foam::MRFZone
2022-11-12 16:39:32 +00:00
12422f2944 solvers::multiphaseEuler: Updated fixedMultiPhaseHeatFlux -> fixedMultiphaseHeatFlux 2022-11-11 16:15:16 +00:00
f3e4ba553a solvers::multiphaseEuler::multiphaseThermophysicalTransportModels: new library for thermophysical transport models and BCs
The thermophysical boundary conditions have be moved from the
multiphaseCompressibleMomentumTransportModels library into the new
multiphaseThermophysicalTransportModels library.
2022-11-11 14:25:09 +00:00
4cc5f8e964 decomposePar: Fix distribution of uniform data in collated cases 2022-11-11 11:10:46 +00:00
01b4bf55ef multiphaseEuler: Improved mass transfer linearisation w.r.t pressure
Mass transfer rates are now updated following a change in the pressure
if the mass transfer modelling provides a pressure coefficient. This
means that pimple correctors can be used to improve the behaviour of
mass transfer processes that coupled closely to the pressure field.
2022-11-11 09:24:06 +00:00
f088d89127 pplications/solvers::*CourantNo: Removed unnecessary nInternalFaces() test
Resolves bug-report https://bugs.openfoam.org/view.php?id=3929
2022-11-10 14:49:50 +00:00
e1c0207695 solvers::compressibleVoF,compressibleVoF::correctCoNum(): Removed unnecessary nInternalFaces() test
Resolves bug-report https://bugs.openfoam.org/view.php?id=3929
2022-11-10 14:30:21 +00:00
745e4ff80d bash_completion: Updated 2022-11-09 17:01:49 +00:00
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
0203618a91 patchToPatch: Improve robustness of non-intersection methods
The nearest, matching and inverseDistance methods are now based on a
shared "nearby" method. This method creates, for each face, a local
stencil of opposing faces for which the bounding spheres overlap. This
has proven far more robust on cases with both conformal and
non-conformal interfaces.
2022-11-09 11:18:46 +00:00
97a00ff520 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-08 16:30:56 +00:00
6d74f70637 fvMeshTopoChangers::refiner: Added changedSinceWrite_
which is set true if the mesh refinement changed since the last time the
refinement history was written so that it can be written only at the following
write time.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3928
2022-11-08 16:27:18 +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
4bdfeea66d solvers::multiphaseEuler: Updated for clang 2022-11-06 22:00:45 +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
94152725a8 fvMesh: added move constructor and disallowed construction
This support efficient return of fvMesh from functions which generate region
meshes without allowing risky copy construction.
2022-11-06 17:16:25 +00:00
1258c02558 tutorials/modules/multicomponentFluid/aachenBomb: Reverted to Euler ddtScheme 2022-11-05 22:28:23 +00:00
d26e0f8c6b solidThermophysicalTransportModels::anisotropic: Added optional boundaryAligned switch
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.

    If the coordinate transformed kappa does not align exactly with the boundary
    because the patch face orientations do not conform to the coordinate system
    exactly it may be beneficial for convergence and accuracy to enforce
    alignment at the boundary by setting the optional \c boundaryAligned to
    true.

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

    \verbatim
    model anisotropic;

    // Force aligned handling of kappa irrespective
    // of the calculated patch alignment factors.
    boundaryAligned true;

    // 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
2022-11-05 19:39:40 +00:00
f22e6f0fb8 solidThermophysicalTransportModels: Improved error messages
when solidThermophysicalTransportModels::isotropic is selected for an
anisotropic solidThermo.
2022-11-05 17:39:38 +00:00
3d7b110a15 solvers::multiphaseEuler: Updated and tested LTS support 2022-11-04 16:08:24 +00:00
ef84772312 applications/solvers/modules/fluid/multiphaseEuler/Make: Redundant, deleted 2022-11-04 10:46:37 +00:00
2180ed5c6c multiphaseEuler/functionObjects/Make/options: Removed duplicate entry
Resolves bug-report https://bugs.openfoam.org/view.php?id=3926
2022-11-04 10:12:51 +00:00
13002d8e1b bin/multiphaseEulerFoam: Corrected redirection message 2022-11-04 10:02:33 +00:00
c5a2f486b5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-03 21:00:29 +00:00
b1dea63437 setDeltaT: Rationalised and standardised for both modular and standard solvers 2022-11-03 20:59:43 +00:00
91cb658293 wallBoilingProperties: Added preconfiguration 2022-11-03 19:35:22 +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
0da49126b4 multiphaseEuler: Function to extract wall boiling model properties
This function looks up wall boiling wall functions and collects and
writes out the following data:

  - Bubble departure diameter
  - Bubble departure frequency
  - Nucleation site density
  - Effective liquid fraction at the wall
  - Quenching heat flux
  - Evaporative heat flux

Example of function object specification:

    \verbatim
    writeWallBoilingProperties
    {
        type            wallBoilingProperties;
        functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
        writeControl    writeTime;
        phase           liquid;
    }
    \endverbatim

Patch contributed by Juho Peltola, VTT.
2022-11-03 19:27:01 +00:00
ee4f05411d functionObjects::fieldAverage: Print warning if used with foamPostProcess
Field averaging can only be performed during the run as the averaging is
performed every time-step.

Resolves bug-report https://bugs.openfoam.org/view.php?id=3922
2022-11-03 15:54:50 +00:00
488ffd9fd1 Deleted multiphaseEulerFoam: Replaced by the multiphaseEuler solver module 2022-11-03 15:01:38 +00:00
392b1fd911 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-03 14:58:20 +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
1a7da6391e fvcDdt: Added missing one-field overloads 2022-11-03 14:05:12 +00:00
82847ebbaf plane: Raise errors only during dictionary construction
This change prevents fatal errors occurring during programmatic
construction of a plane object. If an invalid plane is constructed then
this can be tested for using a new plane::valid() method.

Errors are still generated from dictionary construction as before, and
they have been improved to better identify where in the file the
erroneous specification is.

This change fixes some issues associated with meshToMesh mapping. The
cell overlap calculation now detects and skips over degenerate
tetrahedra. Previously, it was generating errors as it tried to
construct planes from the faces of these degenerate tetrahedra.
2022-11-03 11:55:39 +00:00
879f852b80 multiphaseEulerFoam: Use Cp instead of Cpv in for calculation of Prandtl number 2022-11-01 16:21:41 +00:00
e6c59650de fluidThermo: Moved psi_ and mu_ from rhoThermo and psiThermo into fluidThermo
to avoid unnecessary code duplication
2022-11-01 14:14:37 +00:00
63feb9ad33 fluidThermophysicalTransportModel: Removed alphaEff from the public interface
alphaEff is now an internal field used only for the implicit energy correction
term, kappaEff, q and divq are the general and rational interface to thermal
transport.

XiFoam and PDRFoam now explicitly instantiate a unityLewisEddyDiffusivity
fluidThermophysicalTransportModel as the the unity Lewis number approximation is
hard-coded into the formulation of the energy/composition system.
2022-11-01 12:43:25 +00:00
7d045de80a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-11-01 11:04:12 +00:00