Commit Graph

7186 Commits

Author SHA1 Message Date
f0380a5cae meshTools/cellQuality: Removed unused quality calculations 2023-10-19 10:19:30 +01:00
d34fc474d0 surfMesh/Make/files: minor simplification 2023-10-18 17:38:52 +01:00
dc3df9ff4b sampling: Calls to writeOBJ superseded by OBJstream::write 2023-10-18 17:37:27 +01:00
58f5d5ed5f checkMesh::checkTopology: Moved the allGeometry specific output into checkGeometry 2023-10-18 14:55:49 +01:00
c0da2a5eff waveModels: New irregular wave model
This model builds up phase fraction and velocity fields from multiple
first-order waves, sampled from a selectable wave spectrum.

Usage:

    Property  | Description                   | Required? | Default
    ----------+-------------------------------+-----------+-------------
    depth     | The water depth [m]           | no        | great
    spectrum  | The wave spectrum             | yes       |
    n         | The number of times to sample | yes       |
              | the spectrum                  |           |
    span      | The fractional range across   | no        | (0.01 0.99)
              | which to sample the spectrum  |           |
    setFormat | The format with which to plot | no        | none
              | the spectrum                  |           |

Example specification in constant/waveProperties:

    waves
    (
        irregular
        {
            spectrum    PiersonMoskowitz; // or JONSWAP

            PiersonMoskowitzCoeffs
            {
                U19_5       15;
            }

            JONSWAPCoeffs
            {
                U10         10;
                F           200e3;
            }

            n           16;
            span        (0.01 0.99);
        }
    );
2023-10-18 14:35:35 +01:00
7ffe72fd34 checkMesh: Updated to use the new meshCheck namespace functions 2023-10-18 14:25:35 +01:00
5472ce5327 primitiveMeshCheck: Moved the primitiveMesh check function into the meshCheck namespace 2023-10-18 14:08:55 +01:00
f602206d69 primitiveMeshCheck, polyMeshCheck: Combined into a single meshCheck namespace 2023-10-18 12:50:46 +01:00
46f829761a Renamed namespace polyMeshCheck -> meshCheck
This namespace is to be used for both primitiveMesh, polyMesh and fvMesh
checking functions.
2023-10-18 12:39:04 +01:00
2fae9768ef checkMesh::checkGeometry: Updated for changes to polyMeshCheck 2023-10-18 12:13:53 +01:00
c857c4f641 polyMesh: Moved check member functions into polyMeshCheck 2023-10-18 12:09:27 +01:00
df94b08579 primitiveMesh: Removed unused virtual function 2023-10-18 12:09:02 +01:00
aaeb6e5f3d src/sampling/sampledSet/writers: Add nl at end of raw, csv and gplt files 2023-10-18 10:11:23 +01:00
95110422a2 multiphaseEuler: Only request pressure from moving phases 2023-10-16 19:42:57 +01:00
6dc6d3d089 phaseSystem::correctKinematics:: Ensure pressure is requested only for moving phase
The pressure field is not available from stationary solid phases.
2023-10-16 19:41:39 +01:00
d3c2a16d0e solidThermo: Override the dpdt function to return false
The pressure time derivative is not required by solid thermo
2023-10-16 19:39:42 +01:00
1845584e09 multiphaseEuler::facePressureCorrector: Request velocity from the first moving phase 2023-10-16 19:38:30 +01:00
e0bdf2405e fvModels: Remove 'Source' from names
The fact that these names create sources in their associated transport
equations is clear in context, so the name does not need to contain
'Source'.

Having 'Source' in the name is a historic convention that dates back to
when fvModels and fvConstraints were combined in a single fvOptions
interface. In this interface, disambiguation between sources and
constraints was necessary.

The full set of name changes is as follows:

                   accelerationSource -> acceleration
                  actuationDiskSource -> actuationDisk
     effectivenessHeatExchangerSource -> effectivenessHeatExchanger
               explicitPorositySource -> porosityForce
            radialActuationDiskSource -> radialActuationDisk
                      rotorDiskSource -> rotorDisk
             sixDoFAccelerationSource -> sixDoFAcceleration
         solidEquilibriumEnergySource -> solidThermalEquilibrium
          solidificationMeltingSource -> solidificationMelting
                 volumeFractionSource -> volumeBlockage
    interRegionExplicitPorositySource -> interRegionPorosityForce
       VoFSolidificationMeltingSource -> VoFSolidificationMelting

The old names are still available for backwards compatibility.
2023-10-13 09:53:32 +01:00
16ecc4fe08 fvConstraints: Remove 'Constraint' from constraint names
The fact that these names refer to constraints is clear in context, so
the name does not need to contain 'Constraint'.

Having 'Constraint' in the name is a historic convention that dates back
to when fvConstraints and fvModels were combined in a single fvOptions
interface. In this interface, disambiguation between sources and
constraints was necessary.

This change has been applied to the 'fixedValue' and 'fixedTemperature'
constraints, which were formerly named 'fixedValueConstraint' and
'fixedTemperatureConstraint', respectively.

The old names are still available for backwards compatibility.
2023-10-13 09:53:32 +01:00
ad3d25dc30 multiphaseEuler::IsothermalSolidPhaseModel: New phase model for isothermal stationary solid phases
IsothermalSolidPhaseModel does not update energy and density from pressure
whereas IsothermalPhaseModel does to allow compressible fluid phases to change
volume due to pressure changes.
2023-10-12 16:24:31 +01:00
2f018f4156 coefficientMassTransfer: Added prototype fvModel for mass transfer
This simple model generates a mass transfer between two phases
calculated from the following expression:

    \dot{m}/V = C \alpha \grad \alpha

Where:

    \dot{m}/V | mass transfer rate per unit volume
    C         | coefficient
    \alpha    | volume fraction of the source phase

Example usage:

    coefficientMassTransfer
    {
        type            coefficientMassTransfer;

        phases          (liquid vapour);

        C               [kg/m^2/s] 0.1;
    }

This model may be of use in simple situations, but it is primarily
designed to serve as a prototype for more complex and physical
mechanisms of mass transfer between phases.
2023-10-12 11:32:49 +01:00
171101d1e5 fvModels: Specify source property values in field files
When an fvModel source introduces fluid into a simulation it should also
create a corresponding source term for all properties transported into
the domain by that injection. The source is, effectively, an alternative
form of inlet boundary, on which all transported properties need an
inlet value specified.

These values are now specified in the property field files. The
following is an example of a 0/U file in which the velocity of fluid
introduced by a fvModel source called "injection1" is set to a fixed
value of (-1 0 0):

    dimensions      [0 1 -1 0 0 0 0];

    internalField   uniform (0 0 0);

    boundaryField
    {
        #includeEtc "caseDicts/setConstraintTypes"

        wall
        {
            type            noSlip;
        }

        atmosphere
        {
            type            pressureInletOutletVelocity;
            value           $internalField;
        }
    }

    // *** NEW ***
    sources
    {
        injection1
        {
            type            uniformFixedValue;
            uniformValue    (-1 0 0);
        }
    }

And the following entry in the 0/k file specifies the turbulent kinetic
energy introduced as a fraction of the mean flow kinetic energy:

    sources
    {
        injection1
        {
            type            turbulentIntensityKineticEnergy;
            intensity       0.05;
        }
    }

The specification is directly analogous to boundary conditions. The
conditions are run-time selectable and can be concisely implemented.
They can access each other and be inter-dependent (e.g., the above,
where turbulent kinetic energy depends on velocity). The syntax keeps
field data localised and makes the source model (e.g., massSource,
volumeSource, ...) specification independent from what other models and
fields are present in the simulation. The 'fieldValues' entry previously
required by source models is now no longer required.

If source values need specifying and no source condition has been
supplied in the relevant field file then an error will be generated.
This error is similar to that generated for missing boundary conditions.
This replaces the behaviour where sources such as these would introduce
a value of zero, either silently or with a warning. This is now
considered unacceptable. Zero might be a tolerable default for certain
fields (U, k), but is wholly inappropriate for others (T, epsilon, rho).

This change additionally makes it possible to inject fluid into a
multicomponent solver with a specified temperature. Previously, it was
not possible to do this as there was no means of evaluating the energy
of fluid with the injected composition.
2023-10-12 11:24:27 +01:00
5e03874bbb multiphaseEuler: Updated to us the new phaseSolidThermophysicalTransportModel class
for thermophysical transport within stationary solid phases.  This provides a
consistent interface to heat transport within solids for single and now
multiphase solvers so that for example the wallHeatFlux functionObject can now
be used with multiphaseEuler, see tutorials/multiphaseEuler/boilingBed.
Also this development supports anisotropic thermal conductivity within the
stationary solid regions which was not possible previously.

The tutorials/multiphaseEuler/bed and tutorials/multiphaseEuler/boilingBed
tutorial cases have been updated for phaseSolidThermophysicalTransportModel by
changing the thermo type in physicalProperties.solid to heSolidThermo.  This
change will need to be made to all multiphaseEuler cases involving stationary
phases.
2023-10-11 14:53:09 +01:00
b03fead509 fvModels: radialActuationDiskSource: Removed unused templates file 2023-10-10 10:34:39 +01:00
22d038c178 cylindricalInletVelocityFvPatchVectorField: Updated documentation 2023-10-06 11:28:58 +01:00
755a3db81f cylindricalInletVelocityFvPatchVectorField: Added support for specifying either rpm or omega
Class
    Foam::cylindricalInletVelocityFvPatchVectorField

Description
    This boundary condition describes an inlet vector boundary condition in
    cylindrical co-ordinates given a central axis, central point, rpm, axial
    and radial velocity.

Usage
    \table
        Property     | Description             | Required    | Default value
        axis         | axis of rotation        | yes         |
        origin       | origin of rotation      | yes         |
        axialVelocity | axial velocity profile [m/s] | yes    |
        radialVelocity | radial velocity profile [m/s] | yes  |
        omega        | angular velocity of the frame [rad/s] | no |
        rpm          | angular velocity of the frame [rpm]   | no |
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            cylindricalInletVelocity;
        axis            (0 0 1);
        origin          (0 0 0);
        axialVelocity   constant 30;
        radialVelocity  constant -10;
        rpm             constant 100;
    }
    \endverbatim

    Note:
        The \c axialVelocity, \c radialVelocity and \c omega or \c rpm entries
        are Function1 types, able to describe time varying functions.  The
        example above gives the usage for supplying constant values.
2023-10-06 11:27:20 +01:00
0951029513 modules/twoPhaseSolver: Include divU into MULES corrector
This improves convergence in situations with substantial source-based
divergence, such as injections and phase changes.
2023-10-06 11:21:14 +01:00
084bd015f1 modules::shockFluid: Clear temporary fluxed if NCC interfaces are updated
Resolves bug-report https://bugs.openfoam.org/view.php?id=4020
2023-10-05 12:37:41 +01:00
8b2e6b9758 tutorials/multiphaseEuler: Added boilingBed tutorial
This tutorial serves as an example of a boiling transfer between two
phases, which occurs on the surface of a third stationary phase. See
commit 32edc48d for details of this modelling and its specification.

Patch contributed by Juho Peltola, VTT.
2023-09-28 16:06:30 +01:00
9181a699f2 fvModels: Added volumeSource model
This fvModel applies a volume source to the continuity equation and to
all field equations. It can be applied to incompressible solvers, such
as incompressibleFluid and incompressibleVoF. For compressible solvers,
use the massSource model instead.

If the volumetric flow rate is positive then user-supplied fixed
property values are introduced to the field equations. If the volumetric
flow rate is negative then properties are removed at their current
value.

Example usage:

    volumeSource
    {
        type            volumeSource;

        select          cellSet;
        cellSet         volumeSource;

        volumetricFlowRate 1e-4;

        fieldValues
        {
            U               (10 0 0);
            k               0.375;
            epsilon         14.855;
        }
    }

If the volumetric flow rate is positive then values should be provided
for all solved for fields. Warnings will be issued if values are not
provided for fields for which transport equations are solved. Warnings
will also be issued if values are provided for fields which are not
solved for.
2023-09-28 09:04:36 +01:00
a5ea0b41f1 fvModels: Improved interface for mass/volume sources
The interface for fvModels has been modified to improve its application
to "proxy" equations. That is, equations that are not straightforward
statements of conservation laws in OpenFOAM's usual convention.

A standard conservation law typically takes the following form:

    fvMatrix<scalar> psiEqn
    (
        fvm::ddt(alpha, rho, psi)
      + <fluxes>
     ==
        <sources>
    );

A proxy equation, on the other hand, may be a derivation or
rearrangement of a law like this, and may be linearised in terms of a
different variable.

The pressure equation is the most common example of a proxy equation. It
represents a statement of the conservation of volume or mass, but it is
a rearrangement of the original continuity equation, and it has been
linearised in terms of a different variable; the pressure. Another
example is that in the pre-predictor of a VoF solver the
phase-continuity equation is constructed, but it is linearised in terms
of volume fraction rather than density.

In these situations, fvModels sources are now applied by calling:

    fvModels().sourceProxy(<conserved-fields ...>, <equation-field>)

Where <conserved-fields ...> are (alpha, rho, psi), (rho, psi), just
(psi), or are omitted entirely (for volume continuity), and the
<equation-field> is the field associated with the proxy equation. This
produces a source term identical in value to the following call:

    fvModels().source(<conserved-fields ...>)

It is only the linearisation in terms of <equation-field> that differs
between these two calls.

This change permits much greater flexibility in the handling of mass and
volume sources than the previous name-based system did. All the relevant
fields are available, dimensions can be used in the logic to determine
what sources are being constructed, and sources relating to a given
conservation law all share the same function.

This commit adds the functionality for injection-type sources in the
compressibleVoF solver. A following commit will add a volume source
model for use in incompressible solvers.
2023-09-28 09:04:31 +01:00
bb127a4523 rigidBodyModel: Removed g from the body acceleration 2023-09-27 21:26:05 +01:00
b7e88c09ac fvMeshTopoChangersMeshToMesh: Reset the meshTime from the timeIndex
to avoid round-off errors at start of cyclic or repeat sequences
2023-09-26 18:41:32 +01:00
4b6eade88c tutorials/incompressibleVoF/damBreak: Simplification of variants 2023-09-26 14:03:48 +01:00
da442e8eab multiphaseEuler: Replaced pPrime() with pPrimef()
to provide greater flexibility in the treatment of the face pPrime for particle
phase pressure models.
2023-09-22 16:16:49 +01:00
76afad69ba functionObjects: Updated remaining outputTime -> writeTime 2023-09-22 11:11:55 +01:00
533421f91a multiphaseEuler: Removed redundant files 2023-09-21 13:09:01 +01:00
31203e3ff3 fvMeshTopoChangersMeshToMesh: Use the optional 'local' directory for region 2023-09-20 11:57:26 +01:00
b1d56acb91 tutorials: pitzDailySteadyMapped*: Updated for changes in source case 2023-09-19 14:38:22 +01:00
e23ea3b039 particle: Transfer across NCC-s to the projected location 2023-09-19 11:52:43 +01:00
e5cf0cf4ed Cloud: Accumulate warning messages associated with location failures
Warnings about initialisation of particles with locations outside of the
mesh and about the positional inaccuracy of NCC transfers are now
accumulated and printed once per time-step. This way, the log isn't
obscured by hundreds of such warnings.

Also, the pattern in which warnings are silenced after some arbitrary
number (typically 100) have been issued has been removed. This pattern
means that user viewing the log later in the run may be unaware that a
problem is still present. Accumulated warnings are concise enough that
they do not need to be silenced. They are generated every time-step, and
so remain visible throughout the log.
2023-09-19 10:57:11 +01:00
aaf04f0481 fvMeshTopoChangersMeshToMesh: Updated to support multiple regions
in which the meshToMesh_* directories are located in the constant/<region>
directories.
2023-09-18 15:09:08 +01:00
e7e6d6a3cc tutorials/mesh/refineMesh/sector: Renamed functionObjects for consistency 2023-09-18 11:39:59 +01:00
58cb08d8cd tutorials/incompressibleFluid/pitzDailySteady: Added strainRate coded functionObject
to demonstrate how easy it is to add field post-processing to cases.
2023-09-18 11:38:54 +01:00
597121a4a7 multiphaseEuler: Library reorganisation
This change makes multiphaseEuler more consistent with other modules and
makes its sub-libraries less inter-dependent. Some left-over references
to multiphaseEulerFoam have also been removed.
2023-09-15 14:45:26 +01:00
1ff0bcd81b fvMatrix: Corrected type returned by Su method 2023-09-15 12:02:04 +01:00
0b321e3eea isothermalFilm: Corrected impingement pressure transfer
The previous implementation was dimensionally inconsistent and was
missing a factor of the VbyA field. This change will, in most cases,
reduce the total impingement pressure contribution.
2023-09-15 12:01:57 +01:00
9c3a404533 multiphaseEuler::cellPressureCorrector: Added p_rgh update before PISO loop
to ensure consistency between p_rgh, p and the current phase densities updated
after the phase energy solution.
2023-09-15 08:13:13 +01:00
6c24251a37 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2023-09-14 20:53:36 +01:00
c8a63f2da3 multiphaseEuler::phaseSystemSolve: Corrected handling of dilatation effects
in the presence of stationary phases
2023-09-14 20:52:41 +01:00