Commit Graph

7140 Commits

Author SHA1 Message Date
ab71ac6c1f tutorials/modules/multiRegion/film: Corrected location entries 2023-05-05 12:15:21 +01:00
26f93274fb multiphaseEuler: Remove duplicate writing of partitioningModel for liquidPhase in boiling BC
Patch contributed by Timo Niemi, VTT.
2023-05-04 16:25:19 +01:00
1fe47ea346 tutorials: wallBoiling: Corrected blockMeshDict 2023-05-04 13:17:16 +01:00
4b91dc790f foamToC: Added -listAllLibs option
Now the -allLibs option loads all the libraries without listing them to reduce
the amount of output when it is not needed and the new -listAllLibs option loads
all the libraries and lists them as they are loaded which may be useful to find
libraries which do not load due to duplicate entries for example.
2023-05-04 10:54:12 +01:00
ef42ba6db3 etc/caseDicts/annotated/extrudeToRegionMeshDict: Added documentation for 'intrude' 2023-05-02 20:35:59 +01:00
f6cd566b91 tutorials: Removed old surfaceFilm tutorial cases
Replaced by new versions updated for the new film solver module located in the
tutorials/modules/multiRegion/film directory.
2023-05-02 18:43:38 +01:00
f850266cdf extrudeToRegionMesh: Added 'intrude' option
With the new film implementation the single cell layer film region is extruded
into (overlapping with) the primary/fluid region which can now be generated with
extrudeToRegionMesh using the new 'intrude' option, e.g. for the
tutorials/modules/multiRegion/film/splashPanel case the extrudeToRegionMeshDict
contains:

region          film;

patches         (film);

extrudeModel    linearNormal;

intrude         yes;

adaptMesh       no;

patchTypes      (mappedExtrudedWall);
patchNames      (film);

regionPatchTypes   (filmWall);
regionPatchNames   (wall);

regionOppositePatchTypes    (mappedFilmSurface);
regionOppositePatchNames    (surface);

nLayers         1;

expansionRatio  1;

linearNormalCoeffs
{
    thickness       0.002;
}
2023-05-02 17:22:03 +01:00
f0421f0823 tutorials/modules/multiRegion/film/splashPanel: Updated tutorial
based on tutorials/modules/multicomponentFluid/splashPanel to demonstrate
droplet->flim splashing using the Bai model.
2023-05-02 10:38:11 +01:00
fd4f862cc0 parcelSurfaceFilmModels: By default read the surfaceFilmProperties dictionary 2023-04-30 20:25:20 +01:00
28305bbb2b tutorials/modules/multiRegion/film/cylinder: New Lagrangian->film tutorial case
equivalent to the tutorials/modules/multicomponentFluid/cylinder except that a
70deg contact-angle is applied to the film on the wall.
2023-04-30 18:49:00 +01:00
e3ca69060c tutorials/modules/multiRegion/film/cylinderVoF: Minor updates 2023-04-30 17:16:51 +01:00
3aa0f9e6bd film::thermophysicalPredictor: Removed temporary diagnostic messages 2023-04-30 17:16:23 +01:00
7b95a0d31c tutorials/modules/multiRegion/film/cylinderVoF/Allrun: Added runApplication 2023-04-30 17:03:01 +01:00
a2ad716761 isothermalFilm/fvModels/filmCloudTransfer: New models to transfer Lagrangian parcels to film
The parcel transfer occurs from the cloudFilmTransfer surfaceFilmModel specified
in the <fluid> region constant/<fluid>/cloudProperties dictionary:

.
.
.
libs        ("libfilmCloudTransfer.so");
.
.
.
    surfaceFilmModel cloudFilmTransfer;

and the film filmCloudTransfer specified in the <film> region
constant/<film>/fvModels dictionary:

.
.
.
    filmCloudTransfer
    {
        type    filmCloudTransfer;

        libs    ("libfilmCloudTransfer.so");
    }

For an example of cloud->film->VoF transfer see the
tutorials/modules/multiRegion/film/cylinder tutorial case.

Note that parcel transfer from film to Lagrangian cloud is not yet supported,
this will be added soon.
2023-04-30 10:19:25 +01:00
4c68b4bf5b multiphaseEuler/interfacialModels/dragModels/Ergun: Reverted handling of the continuous phase-fraction
back to the form in the original multiphaseEulerFoam, i.e. using the dispersed
phase-fraction directly rather than 1 - continuous phase fraction.
2023-04-29 21:42:34 +01:00
8f3d044b6a filmToVoFTransfer: Updated to lookup VoFtoFilmTransfer from any position in the fvModels 2023-04-26 21:01:30 +01:00
25b99e15c1 tutorials/modules/multiRegion/film: Removed unnecessary Allclean scripts 2023-04-26 21:00:44 +01:00
67ff5da438 ThermoSurfaceFilm: Rationalised names 2023-04-26 14:22:37 +01:00
6666400d17 tutorials/modules/compressibleVoF/plateFilm: Superseded by tutorials/modules/multiRegion/film/VoFToFilm 2023-04-26 12:48:34 +01:00
9733e8e36c parcelSurfaceFilmModels: Relocated ThermoSurfaceFilm from lagrangian 2023-04-26 11:51:44 +01:00
f676f14e1d lagrangian: Refactored to remove direct dependency on surfaceFilm
The lagrangian<->surfaceFilm interface is now in the new
src/parcelSurfaceFilmModels library.
2023-04-26 11:36:45 +01:00
c35eca32ca test/multiphase/multiphaseEuler/populationBalance: Simplified specification of fvSchemes
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2023-04-25 11:24:53 +01:00
f38fd3e314 solvers::twoPhaseSolver: new base-class for twoPhaseVoFSolver and incompressibleDriftFlux
to separate the interface treatment between VoF and drift-flux and avoid code
duplication.
2023-04-24 21:13:04 +01:00
d558e49336 incompressibleDriftFlux: Override the surfaceTensionForce functions
so that the surface tension force is not evaluated or applied as it is
inappropriate for drift-flux modelling of suspensions.
2023-04-23 15:56:53 +01:00
b22cbbcf21 alphaContactAngleFvPatchScalarField -> contactAngleFvPatchScalarField: to avoid duplicate name
The two-phase VoF alphaContactAngleFvPatchScalarField class has been renamed
contactAngleFvPatchScalarField to avoid a name clash with the multiphaseEuler
version of alphaContactAngleFvPatchScalarField so that both VoF and
multiphaseEuler solver modules may be used in different regions of a
foamMultiRun simulation.
2023-04-22 12:12:16 +01:00
91bf882b43 applications/solvers/modules/Allwmake: Updated for incompressibleDriftFlux 2023-04-22 10:54:17 +01:00
3a3a844173 solvers: Removed the deprecated -list.* options, superseded by the more general foamToC
foamToC: New run-time selection table of contents printing and interrogation utility

The new solver modules cannot provide the equivalent functionality of the -list
options available in the solver applications so foamToC has been developed as a
better, more general and flexible alternative, providing a means to print any or
all run-time selection tables in any or all libraries and search the tables for
any particular entries and print which library files the corresponding tables
are in, e.g.

foamToC -solver fluid -table fvPatchScalarField

Contents of table fvPatchScalarField, base type fvPatchField:
    advective                               libfiniteVolume.so
    calculated                              libfiniteVolume.so
    codedFixedValue                         libfiniteVolume.so
    codedMixed                              libfiniteVolume.so
    compressible::alphatJayatillekeWallFunctionlibthermophysicalTransportModels.so
    compressible::alphatWallFunction        libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<eConstSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::thermalBaffle1D<ePowerSolidThermoPhysics>libthermophysicalTransportModels.so
    compressible::turbulentTemperatureCoupledBaffleMixedlibthermophysicalTransportModels.so
    compressible::turbulentTemperatureRadCoupledMixedlibthermophysicalTransportModels.so
    .
    .
    .

foamToC -solver fluid -search compressible::alphatWallFunction
compressible::alphatWallFunction is in tables
    fvPatchField
        fvPatchScalarField                      libthermophysicalTransportModels.so

and the very useful -allLibs option allows ALL libraries to be searched to find
in which table and which library file a particular model in in for example:

foamToC -allLibs -search phaseTurbulenceStabilisation
Loading libraries:
    libtwoPhaseSurfaceTension.so
    libcv2DMesh.so
    libODE.so
    .
    .
    .
phaseTurbulenceStabilisation is in tables
    fvModel                                 libmultiphaseEulerFoamFvModels.so

Application
    foamToC

Description
    Run-time selection table of contents printing and interrogation.

    The run-time selection tables are populated by the optionally specified
    solver class and any additional libraries listed in the \c -libs option or
    all libraries using the \c -allLibs option.  Once populated the tables can
    be searched and printed by a range of options listed below.  Table entries
    are printed with the corresponding library they are in to aid selection
    and the addition of \c libs entries to ensure availability to the solver.

Usage
    \b foamToC [OPTION]
      - \par -solver \<name\>
        Specify the solver class

      - \par -libs '(\"lib1.so\" ... \"libN.so\")'
        Specify the additional libraries to load

      - \par -allLibs
        Load all libraries

      - \par switches,
        List all available debug, info and optimisation switches

      - \par all,
        List the contents of all the run-time selection tables

      - \par tables
        List the run-time selection table names (this is the default action)

      - \par table \<name\>
        List the contents of the specified table or the list sub-tables

      - \par search \<name\>
        Search for and list the tables containing the given entry

      - \par scalarBCs,
        List scalar field boundary conditions (fvPatchField<scalar>)

      - \par vectorBCs,
        List vector field boundary conditions (fvPatchField<vector>)

      - \par functionObjects,
        List functionObjects

      - \par fvModels,
        List fvModels

      - \par fvConstraints,
        List fvConstraints

    Example usage:
      - Print the list of scalar boundary conditions (fvPatchField<scalar>)
        provided by the \c fluid solver without additional libraries:
        \verbatim
            foamToC -solver fluid -scalarBCs
        \endverbatim

      - Print the list of RAS momentum transport models provided by the
        \c fluid solver:
        \verbatim
            foamToC -solver fluid -table RAScompressibleMomentumTransportModel
        \endverbatim

      - Print the list of functionObjects provided by the
        \c multicomponentFluid solver with the libfieldFunctionObjects.so
        library:
        \verbatim
            foamToC -solver multicomponentFluid \
                -libs '("libfieldFunctionObjects.so")' -functionObjects
        \endverbatim

      - Print a complete list of all run-time selection tables:
        \verbatim
            foamToC -allLibs -tables
            or
            foamToC -allLibs
        \endverbatim

      - Print a complete list of all entries in all run-time selection tables:
        \verbatim
            foamToC -allLibs -all
        \endverbatim
2023-04-22 09:39:14 +01:00
b949c295ba solvers::incompressibleDriftFlux: New solver module for two-phase flow with drift-flux
executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations.  Replaces driftFluxFoam and all the corresponding
tutorials have been updated and moved to
tutorials/modules/incompressibleDriftFlux.

Class
    Foam::solvers::incompressibleDriftFlux

Description
    Solver module for 2 incompressible fluids using the mixture approach with
    the drift-flux approximation for relative motion of the phases, 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 with mixture transport modelling in which a
    single laminar, RAS or LES model is selected to model the momentum stress.

    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
    incompressibleDriftFlux.C

See also
    Foam::solvers::VoFSolver
    Foam::solvers::twoPhaseVoFSolver
    Foam::solvers::compressibleVoF
2023-04-22 09:00:41 +01:00
4ec52a5d41 Updates for Clang 2023-04-21 17:40:48 +01:00
960666672e fvCellSet: Prevent logging when constructing without a dictionary 2023-04-21 08:53:00 +01:00
9dd389aaaa fvModels: massSource, zeroDimensionalMassSource: Split into base classes
This makes construction/reading easier and permits derivations of both
types that provide different implementations of the mass flow rate
2023-04-21 08:22:22 +01:00
9cdd2a3e7a fvConstraints, fvModels: zeroDimensionalFixedPressure
A constraint and a model have been added, both called
zeroDimensionalFixedPressure, that together act to maintain a pressure
constraint in a zero-dimensional case. These must be used
simultaneously. The desired pressure can be specified as a time-varying
Function1.

These replace the pressureConstraintSource, which has been removed.

The new classes operate by obtaining the residual of the complete
pressure equation, and using that to calculate the mass or volume
sources that need adding to the fluid in order to maintain the
constraint. This process is far more convergent than the previous
approach, it does not require the fluid to have a certain thermodynamic
model, and it is generalisable to multiphase.

This functionality requires only minimal specification. The constraint
contains all the settings and should be specified in
system/fvConstraints as follows:

    zeroDimensionalFixedPressure1
    {
        type            zeroDimensionalFixedPressure;

        // Name of the pressure field, default = p
        //p               p;

        // Name of the density field, default = rho
        //rho             rho;

        // Constant pressure value
        pressure        1e5;

        //// Time-varying pressure value
        //pressure
        //{
        //    type            table;
        //    values
        //    (
        //        (0 1e5)
        //        (1 1e5)
        //        (1.1 1.4e5)
        //        (10 1.4e5)
        //    );
        //}
    }

The model is then added to constant/fvModels, and requires no settings:

    zeroDimensionalFixedPressure1
    {
        type            zeroDimensionalFixedPressure;
    }
2023-04-20 10:26:47 +01:00
5c7131288c foamPostProcess: New volAverage and volIntegrate packaged function objects
These additions mean that the volume-weighted average or volume integral
of a field can be conveniently post-processed. This can be done
interactively using foamPostProcess:

    foamPostProcess -func "volAverage(U)"
    foamPostProcess -func "volIntegrate(rho)"

Or at run-time by adding to the functions sub-section of the
controlDict:

    #includeFunc volAverage(U)
    #includeFunc volIntegrate(rho)
2023-04-19 16:54:00 +01:00
99b36f646a fv::zeroDimensionalMassSource: Prevent field copy 2023-04-19 16:54:00 +01:00
060690b6fa driftFluxFoam: Updated in preparation for conversion into a solver module 2023-04-18 16:28:19 +01:00
050c617d3b tutorials/modules/compressibleVoF/throttle/system/fvConstraints: Updated to improve stability 2023-04-18 16:27:31 +01:00
fff991b5bc Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-04-18 09:48:39 +01:00
776ecc9a40 solvers::compressibleVoF: Updated to supersede cavitatingFoam
compressibleVoF supports cavitation fvModels which provide a more physical and
controllable approach to cavitation modelling than the simple homogeneous
equilibrium approximation used in cavitatingFoam.

The tutorials/multiphase/cavitatingFoam/RAS/throttle case has been converted to
tutorials/modules/compressibleVoF/throttle which demonstrates how to update
cases from cavitatingFoam to compressibleVoF.

A cavitatingFoam script is provided to redirect users to update their cases to
compressibleVoF.
2023-04-18 09:42:32 +01:00
f784c042c5 cellEdgeAddressing: Better documentation of walk algorithm 2023-04-18 08:54:29 +01:00
3736bcf7e0 fvModels: heatTransfer: Multiphase support
This model now takes a 'phase' keyword to specify to which phase of a
multiphase simulation it applies to. In order to transfer heat to
multiple phases, multiple models must be specified.
2023-04-18 08:22:56 +01:00
8a6be43be6 Updated for WM_LABEL_SIZE=64 2023-04-17 20:57:32 +01:00
5bcca1cca9 compressibleVoF,compressibleMultiphaseVoF: Apply fvConstraints to the pressure
Replaces the hard-coded pMin.
2023-04-17 10:32:32 +01:00
1a17ce00c4 fv::bound: New fvConstraint to bound a scalar field where it is below the specified minimum
Class
    Foam::fv::bound

Description
    Bound the specified scalar field where it is below the specified minimum.

    Where the field is unbounded it is set to the maximum of the average of
    the neighbouring cell values and the specified minimum.

Usage
    Example usage:
    \verbatim
    limitp
    {
        type            bound;

        field           p;

        min             100;
    }
    \endverbatim
2023-04-17 10:31:10 +01:00
5fa321880e cellEdgeAddressing: Fix cell-owner calculation for complex polyhedra
The cell-owns-face information is determined by comparing edges of
adjacent faces, starting from a given seed face for which ownership is
known. This calculation walks now the cell in order to be sure that all
faces have had their ownership determined.

Previously the algorithm just iterated over the faces and face-edges.
This spans the entire cell most of the time, but for large polyhedra a
single pass may not propagate the necessary information across the
entire cell. This could be fixed by doing multiple passes until all
faces have been visited, but a walk is likely to be cheaper as it is not
wasting effort iterating over the same faces multiple times.

This change fixes some failures associated with the isoSurface
algorithm. Occasionally, a cut plane or similar could be seen to be
missing one or two faces. These faces were associated with complex
polyhedra on which the cell-owns-face information had been
miscalculated. Surfaces should now be complete and contiguous.
2023-04-14 12:03:51 +01:00
d2d3e8710f compressibleVoF,compressibleMultiphaseVoF: Moved Uf correction outside the PISO loop
for efficiency
2023-04-14 10:18:23 +01:00
5e8d1ff99e createBaffles: Fixed owner/neighbour indexing bug when operating in parallel
Resolves bug report https://bugs.openfoam.org/view.php?id=3970
2023-04-13 17:09:29 +01:00
ad678e1829 OSspecific/POSIX/signals: Improved documentation for sigWriteNow and sigStopAtWriteNow 2023-04-13 16:33:14 +01:00
2bb760e912 etc/caseDicts/postProcessing/control/stopAtTimeStep: Configuration file for functionObjects::stopAtTimeStep
Example:

functions
{
    #includeFunc stopAtTimeStep(minDeltaT=1e-8)
    .
    .
    .
}
2023-04-13 13:28:27 +01:00
4974cc2e1d functionObjects::stopAtTimeStep: New functionObject to stop the run if the time-step becomes too small
This is useful to write results before a case fails due to uncontrollable
automatic time-step reduction, usually caused by unstable pressure-velocity
coupling.

Class
    Foam::functionObjects::stopAtTimeStep

Description
    Stops the run if the time-step drops below the specified value in seconds
    and optionally write results before stopping.

    The following actions are supported:
    - noWriteNow
    - writeNow (default)
    - nextWrite

    Examples of function object specification:
    \verbatim
    stop
    {
        type            stopAtTimeStep;

        libs            ("libutilityFunctionObjects.so");

        minDeltaT       1e-8;
        action          writeNow;
    }
    \endverbatim
    will write the fields and stop if the time-step drops below 1e-8s.

Usage
    \table
        Property  | Description               | Required | Default value
        type      | type name: stopAtTimeStep | yes      |
        minDeltaT | Minimum time-step [s]     | yes      |
        action    | Action executed           | no       | writeNow
    \endtable
2023-04-13 13:01:42 +01:00
ea1e078463 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-04-12 15:36:55 +01:00