Commit Graph

6309 Commits

Author SHA1 Message Date
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
d7501da34c ThermophysicalTransportModels: Removed alphaEff(patchi)
Boundary conditions should use kappaEff with Cp or Cpv as appropriate
2022-11-01 11:03:07 +00:00
65b7f62857 fieldAverage: Made restart work with mesh topology change and NCC 2022-11-01 10:42:14 +00:00
6e4f192281 snappyHexMesh: Fixed bug in merging of boundary faces 2022-11-01 10:42:14 +00:00
5bdc95055d decomposePar: Fixed bug in decomposition of face sets 2022-11-01 10:42:14 +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
095f4b03f1 checkMesh: Added writing of NCC coverage
If checkMesh is executed with the -allGeometry option, then surface
files containing the NCC coverage will now be written out. Coverage is
the ratio between coupled area magnitude and total area magnitude. This
is useful for locating parts of the boundary mesh that are in error.
Errors (such as folds and pinches) typically manifest as a coverage
value that deviates significantly from a value of one.

This is comparable to the writing of AMI patches's weight sums, which
also used to occur when the -allGeometry option was selected.
2022-11-01 10:42:13 +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;
}
20221031
2022-10-31 12:37:53 +00:00
f2cd716dec fvmLaplacian: Added laplacianCorrection functions and updated all thermal transport implementations
Now that thermal transport is implemented as an energy implicit correction on an
explicit temperature gradient formulation it is more efficient if the implicit
correction contains only the implicit terms of the matrix and not the explicit
non-orthogonal or anisotropic correction terms which are cancelled anyway when
the evaluation of the matrix for the current state is subtracted.  The new
fvm::laplacianCorrection functions provide a convenient mechanism to efficiently
evaluate only the implicit correction to the laplacian and is now used in all
the thermophysicalTransportModels.
2022-10-30 06:34:26 +00:00
0661fbb433 basicThermo, heThermo: Simplified by removing alphahe
Now that kappa, Cp and Cv fields are cached and Cpv returns either the Cp or Cv
field reference depending on the energy solved and thermal transport is now
fundamentally based on temperature rather energy gradients it is no longer
necessary or useful to provide an abstract function returning alphahe.
2022-10-30 06:29:06 +00:00
2835a5423b rhoThermo: Standardised the renaming of rho -> rhoThermo:rho using the typedName function
This renaming only occurs for single-phase compressible solvers instantiating a
rhoThermo, e.g. for liquids, and usually the rhoThermo:rho is not looked-up by
sub-models or boundary conditions and if needed is better obtained from the
thermo package directly.
2022-10-28 12:16:26 +01: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
6b2748887a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-27 11:59:39 +01:00
5fd17d3292 setFields: Added time options -constant, -latestTime, -noZero, -time
in particular to support setting constant property fields in the constant
directory.

Usage: setFields [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -latestTime       select the latest time
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <time>      specify a single time value to select
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage
2022-10-27 11:57:41 +01:00
704b65f8de triangle, tetrahedron: Consolidate circumCircle/Sphere functions 2022-10-27 08:52:14 +01:00
df178284fd constSolidThermo: Corrected field file reading option 2022-10-27 03:00:23 +01:00
3152df4299 Resolved problems with Clang compilation 2022-10-26 17:36:24 +01:00
1e399aac05 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2022-10-26 16:32:18 +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
bd414b822e tetrahedron: Removed unused code 2022-10-26 16:09:37 +01:00
f9d607f270 fvMeshStitcher: Prevent "not found" error when launching old cases 2022-10-25 15:46:29 +01:00