Commit Graph

5024 Commits

Author SHA1 Message Date
441ff53e2d multiphaseEulerFoam: Added moving-mesh support for both cell- and face-momentum algorithms
Mesh-motion with or without topology change or AMI is now supported in
multiphaseEulerFoam for both cell- and face-momentum algorithms.

The new tutorial case mixerVesselAMI2D is provided which is the AMI version of
the 4-phase MRF mixerVessel2D case.  It is setup with the cell-momentum
algorithm but also runs fine with the face-momentum algorithm although the
results are noticeably less accurate, particularly when the case is run
single-phase and compared directly with those from pimpleFoam.

Further testing is in progress.

I2D/constant/thermophysicalProperties.water
2021-02-01 11:06:25 +00:00
d35103fe22 caseDicts/postProcessing: Removed duplicate preconfiguration 20210130 2021-01-28 09:41:49 +00:00
eadbf9a840 compressibleInterFoam::Allwmake: Added twoPhaseChange 2021-01-27 08:34:04 +00:00
89ab9286c6 compressibleInterFoam: Added support for phase-change and cavitation
The new compressible form of the twoPhaseChange library including cavitation
models Kunz, Merkle and SchnerrSauer provides compressibleInterFoam with
optional phase change functionality specified in the optional
constant/phaseChangeProperties dictionary, e.g.

    phaseChangeModel SchnerrSauer;

    pSat            2300;   // Saturation pressure
2021-01-26 11:42:14 +00:00
79e43a20fd Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-26 11:36:04 +00:00
46bf7a267f dictionary: Provide the parent dictionary to indirectly included dictionaries
to ensure IO settings are inherited.
2021-01-26 11:34:48 +00:00
2caad45a9b functionObjects/setTimeStep: Compatibility with 'adjustableRunTime'
setTimeStep is now compatible with a 'writeControl adjustableRunTime;'
setting in the systemControlDict. If 'adjustableRunTime' is selected
then the time-step values set by this function object will not be
exactly as specified, but write intervals will be matched exactly.

All function object time adjustment is now done during the execute
methods, so the specific setTimeStep hooks have been removed.
2021-01-26 08:12:21 +00:00
ac56655601 caseDicts/postProcessing: Added preconfiguration for time function object 2021-01-26 08:12:21 +00:00
3ca14ebe58 functionObjects: Fixes to restart and run-time modification behaviour
All function objects now re-read as a result of run-time modifications
to the system/controlDict.

Function objects that write log files (via the logFiles class) will now
generate a new postProcessing/<funcName>/<time> directory as a result of
either restart or run-time modification. Log files will therefore never
be overwritten by restart or run-time modification, except for when a
case is restarted at the same time as a previous execution (e.g.,
repeated runs at the start time).
2021-01-26 08:12:21 +00:00
4e301e9227 src/twoPhaseModels: Checked and updated for clang 2021-01-25 10:58:13 +00:00
e901e84eb2 heheuPsiThermo: Corrected psiu, psib, muu and mub
Resolves bug-report https://bugs.openfoam.org/view.php?id=3617
2021-01-25 10:57:59 +00:00
c2f4c6191d interFoam: Added support for phase-change with cavitation models
The phase-change functionality in interPhaseChangeFoam has been generalised and
moved into the run-time selectable twoPhaseChange library included into
interFoam providing optional phase-change.  The three cavitation models provided
in interPhaseChangeFoam are now included in the twoPhaseChange library and the
two interPhaseChangeFoam cavitation tutorials updated for interFoam.

interPhaseChangeFoam has been replaced by a user redirection script which prints
the following message:

The interPhaseChangeFoam solver has solver has been replaced by the more general
interFoam solver, which now supports phase-change using the new twoPhaseChange
models library.

To run with with phase-change create a constant/phaseChangeProperties dictionary
containing the phase-change model specification, e.g.

    phaseChangeModel SchnerrSauer;

    pSat            2300;   // Saturation pressure

See the following cases for an example converted from interPhaseChangeFoam:

    $FOAM_TUTORIALS/multiphase/interFoam/laminar/cavitatingBullet
    $FOAM_TUTORIALS/multiphase/interFoam/RAS/propeller
2021-01-24 23:35:17 +00:00
1adc1806df functionObjects::logFiles: Removed the writing of additional '_0' or '_<time>' files on restart
Given that logFiles now writes the log files into postProcessing/<func
name>/<time> it is no longer useful to add '_<time>' to the log file name in the
case that the file already exists without this extension.
2021-01-21 12:06:46 +00:00
a2eda110f8 foamyHexMesh: Removed unused merge distance 2021-01-19 14:38:49 +00:00
187f69de13 ListOps: Renumbering of nested lists 2021-01-19 13:40:27 +00:00
d7fd626e41 multiphaseEulerFoam: Added minimum diameter limit to KochFriedlander sintering model
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2021-01-15 15:25:18 +00:00
fe3910de34 surfaceFilmModels::kinematicSingleLayer: Updated rho -> thermo:rho 2021-01-14 15:56:39 +00:00
b5fd577934 ISstream::getLine: continuation lines are now optional 2021-01-14 12:33:15 +00:00
58ae03c9eb Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-14 10:53:54 +00:00
c6f69e7987 Function1/2: Updated the writing of Function1/2 entries within Function1/2s
Resolves bug-report https://bugs.openfoam.org/view.php?id=3613
2021-01-14 10:52:55 +00:00
33f2057e27 tests/fvMeshTools/cavity: Updated options passes to reconstructParMesh 2021-01-14 10:27:36 +00:00
4b8147c8ab multiphaseEulerFoam: Added error if mass transfer is specified for a stationary phase 2021-01-14 10:25:29 +00:00
407a90c065 mirrorMesh: Updated plane entries in annotated case dictionary 2021-01-14 08:33:57 +00:00
199e53fd0d dynamicMotionSolverFvMesh: Removed unsupported motion solver keywords
A dynamicMotionSolverFvMesh must now use a "motionSolver" or
"motionSolvers" entry to select the underlying motion solver. For
example, in constant/dynamicMeshDict:

    dynamicFvMesh   dynamicMotionSolverFvMesh;
    motionSolverLibs ("librigidBodyMeshMotion.so");
    motionSolver    rigidBodyMotion;
    ...

Previously the motion solver could also be specified with the keyword
"solver", but this resulted in a name clash with rigid body solvers
which are frequently specified in the same scope. For this reason, the
"solver" and "solvers" entries have been removed.
2021-01-14 08:33:57 +00:00
9e947d1644 topoSet: Renamed point entries for cylinder sources
End points of topoSet cylinder sources should now be specified as
"point1" and "point2", which is consistent with other parts of the code.

The previous keywords, "p1" and "p2" have been retained for backwards
compatibility but may be removed in future.
2021-01-14 08:33:57 +00:00
f1086e51e5 Converting conditional lookups to new dictionary::*BackwardsCompatibility methods 2021-01-14 08:33:57 +00:00
6566e6659e dictionary: Added backwards compatability lookup methods
These allows for dictionary lookups which fall back to a different,
older keyword. Both lookup and lookup-or-default methods are provided;
lookupBackwardsCompatible and lookupOrDefaultBackwardsCompatible,
respectively.

A list of keywords are provided to these methods. The first is taken to
be the current preferred name of the entry, and subsequent elements are
considered to relate to older syntax. These keywords are tried in turn.
If nothing are found then any errors or messages printed relate to the
first keyword in the list.

This centralises backwards compatability logic and allows for current
backwards compatibility settings to be conveniently searched for.
2021-01-14 08:33:57 +00:00
b3605515ae ThermophysicalTransportModels::FickianFourier,FickianEddyDiffusivity: Added support for mixing binary diffusion coefficents
Setting the 'mixtureDiffusionCoefficients' true the mass diffusion coefficient
functions with respect to the mixture 'Dm' are used directly but if set false
the binary mass diffusion coefficient functions 'D' are evaluated and mixed to
provide the mass diffusion with respect to the mixture, e.g.

Usage
    \verbatim
    laminar
    {
        model           FickianFourier;

        mixtureDiffusionCoefficients yes;

        Dm // [m^2/s]
        {
            O2 1e-2;
            O3 5e-2;
            N2 1e-2;
        }

        DT // [kg/m/s] Optional
        {
            O2 1e-2;
            O3 5e-2;
            N2 1e-2;
        }
    }
    \endverbatim

    or if binary mass diffusion coefficient functions are available they can be
    mixed to form the mass diffusion coefficients w.r.t. the mixture:

    \verbatim
    laminar
    {
        model           FickianFourier;

        mixtureDiffusionCoefficients no;

        D // [m^2/s]
        {
            O2-O2 1e-2;
            O3-O3 5e-2;
            N2-N2 1e-2;
            O3-O2 5e-2;
            O3-N2 5e-2;
            O2-N2 1e-2;
        }

        DT // [kg/m/s] Optional
        {
            O2 1e-2;
            O3 5e-2;
            N2 1e-2;
        }
    }
    \endverbatim
2021-01-13 21:22:49 +00:00
8182a0cff6 ThermophysicalTransportModels::MaxwellStefanFourier: New multi-component thermophysical transport model for laminar flow
Description
    Multi-component Maxwell Stefan generalized Fick's law diffusion coefficients
    and Fourier based temperature gradient heat flux model with optional Soret
    thermal diffusion of species for laminar flow.

    The binary diffusion coefficients are specified as Function2<scalar>s of
    pressure and temperature but independent of composition.

    The heat flux source is implemented as an implicit energy correction to the
    temperature gradient based flux source.  At convergence the energy
    correction is 0.

    References:
    \verbatim
        Taylor, R., & Krishna, R. (1993).
        Multicomponent mass transfer (Vol. 2).
        John Wiley & Sons.

        Merk, H. J. (1959).
        The macroscopic equations for simultaneous heat and mass transfer
        in isotropic, continuous and closed systems.
        Applied Scientific Research,
        Section A, 8(1), 73-99.
    \endverbatim

Usage
    \verbatim
    laminar
    {
        model           MaxwellStefanFourier;

        D // [m^2/s]
        {
            O2_O2 1e-2;
            O3_O3 5e-2;
            N2_N2 1e-2;
            O3_O2 5e-2;
            O3_N2 5e-2;
            O2_N2 1e-2;

            O2 1e-2;
            O3 5e-2;
            N2 1e-2;
        }

        DT // [kg/m/s] Optional
        {
            O2 1e-2;
            O3 5e-2;
            N2 1e-2;
        }
    }
    \endverbatim
2021-01-12 17:57:17 +00:00
2c071b329e rotatingWallVelocity boundary condition: updated Description 2021-01-12 14:49:32 +00:00
bd6c02167b fvOptions: Enabled lookup and evaluation of individual options
This change allows fvOptions to access and evaluate each other. This
means an option can be written that applies a source value proportional
to that in another option.

For example, you might have an fvOption specifying a mass source term in
the rhoEqn. You could now write a corresponding momentum source fvOption
which takes the velocity associated with that mass source as an input.
It would look up the mass source option to get the mass flow rate and
multiply it by the user supplied velocity to get the momentum source.
This prevents the user having to convert from the primitive variable
(e.g., velocity) to the conserved variable (e.g., momentum) when
specifying source terms.

Lookup is provided by means of a new [](const word&) operator on the
fvOptionList, and evaluation is achieved by adding ()(...) operators to
the fvOptions similar to those already available in the fvOptionList.
Example usage is shown below.

    const fv::optionList& fvOptions(fv::options::New(mesh_));
    const fv::option& fvOption = fvOptions[sourceName_]; // <-- Lookup
    tmp<volScalarField> source(fvOption(field) & field); // <-- Evaluation
2021-01-12 10:27:48 +00:00
6326375ad5 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-11 20:23:50 +00:00
dabceadd13 tutorials/multiphase/interFoam/RAS/waterChannel: Removed ".*" from BCs to avoid confusion 2021-01-11 20:23:03 +00:00
b21982d7c1 streamlines: removed angle brackets from placeholders 2021-01-11 18:41:53 +00:00
34cbcd444d surfaceFieldValue: Ouput as correct primitive type
If the surfaceFieldValue function object is used to compute an
area-normal average or integral of a vector quantity, the result will
now be correctly written out as a scalar.

Previously surfaceFieldValue was limited to writing the same type as the
input field. A vector area-normal average or integral therefore had to
be written out as a vector. This was done by setting the x component to
the result, and the y and z components to zero. This was considered to
be counter-intuitive.
2021-01-08 14:39:55 +00:00
476bce93ce foamMonitor: Corrected typo
Resolves bug-report https://bugs.openfoam.org/view.php?id=3610
2021-01-08 13:41:11 +00:00
12afa0966a Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2021-01-08 13:19:26 +00:00
d43375f648 tutorials: Updated air mass-fraction composition 2021-01-08 13:18:56 +00:00
0b21dbf1ec functionObject: Updated documentation
Resolves report https://bugs.openfoam.org/view.php?id=3609
2021-01-08 13:18:02 +00:00
bda07488f0 volumetricFlowRateTriSurface: Corrected pre-configuration, and added an example
A volumetric flow rate through a tri-surface can now be obtained using
the volumetricFlowRateTriSurface preconfigured function object, using
the following entry in system/controlDict:

    fuctions
    {
        #includeFunc "volumetricFlowRateTriSurface(name=surface.stl)"
    }

Where "surface.stl" is a tri-surface file in the constant/triSurface
directory. An example of this has been added to the
incompressible/pimpleFoam/RAS/impeller tutorial case.

Note that when possible, it is preferable to use the flowRatePatch or
flowRateFaceZone functions, as these make direct use of the flux and
therefore report a value that is exactly that computed by the solver.
volumetricFlowRateTriSurface, by contrast, does interpolation of the
velocity field which introduces error.

In addition, a minor fix has been made to the underlying
surfaceFieldValue function object so that it does not need a zone/set
name when values on a searchable surface are requested.
2021-01-08 12:03:25 +00:00
0539b6335b bash_completion: Updated for new executables and arguments 2021-01-07 16:37:05 +00:00
dd3b495fdc objectFunction1: Prevent multiple definitions of the destructor 2021-01-07 09:14:07 +00:00
9e740b286f reconstructParMesh, fvMeshDistribute: Removed all geometric point merging
Geometric point merging has an inherent chance of failure that occurs
when a mesh contains valid distinct points that are closer together than
the supplied tolerance. It is beneficial to avoid such merging whenever
possible.

reconstructParMesh does not need explicit point merging any more. Points
may be duplicated temporarily when processor meshes are combined which
share points and edges but not faces. Ultimately, however,
reconstructParMesh reconstructs the entire mesh so everything eventually
gets face-connected and all point duplications get resolved.

fvMeshDistribute requires point-merging, as the entire mesh is not
constructed. However, since 5d4c8f5d, this process has been purely
topological and has not relied on any of the geometric merging processes
triggered by utilised code.

As such, all geometric point merging operations and tolerances have been
removed from these two implementations, as well as in lower level code
in faceCoupleInfo and polyMeshAdder. faceCoupleInfo has also had support
for face and edge splits removed as this was not being used. This change
will have improved the robustness of both reconstruction and
redistributuon and has greatly reduced the total amount of code
involved.

The only geometric tolerance-based matching still being performed by
either of these processes is as a result of coupled patch ordering in
fvMeshDistribute. It is possible that this is not necessary either
(though at present coupled patch ordering is certainly needed
elsewhere). This warrants further investigation.
2021-01-06 11:32:54 +00:00
03da1891a7 coupledPolyPatch: Fix to walk ordering
Very occasionally a coupled patch contains two faces that are connected
by an edge, but which are numbered in opposite directions. Such faces
are not actually connected in a manifold sense. They just happen to
share two points. The edge in question should really be duplicated and
both should be considered to be part of the perimeter of the surface.

Walk patch ordering has been fixed so that it does not attempt to cross
edges such as these. This fixes a rare failure in snappyHexMesh.
2021-01-06 11:32:54 +00:00
d6477085d7 coolingCylinder2D: reverted change to initial U 2021-01-06 11:08:32 +00:00
a4d1b58e82 coolingCylinder2D: Flow initialization update. 2021-01-05 13:20:52 +00:00
16e9757bf3 ThermophysicalTransportModels::FickianFourier: New thermophysical transport model for laminar flow
Description
    Multi-component Fickian and Fourier based temperature gradient heat flux
    model laminar flow with optional Soret thermal diffusion of species.

    Currently the diffusion coefficients are constant but temperature and
    pressure dependency will be added.

    The heat flux source is implemented as an implicit energy correction to the
    temperature gradient based flux source.  At convergence the energy
    correction is 0.

Usage
    \verbatim
    laminar
    {
        model           FickianFourier;

        D               (1e-5 2e-5 1e-5); // [m^2/s]
        DT              (1e-5 2e-5 1e-5); // [kg/m/s] Optional
    }
    \endverbatim
2021-01-04 16:10:14 +00:00
a32bf164e1 ThermophysicalTransportModels: Updated construction and reading of coefficients 2021-01-04 13:51:05 +00:00
c1ebcc1a78 Updating conditional statements in Make/files to use environment variables and ifeq and ifneq 2020-12-31 17:38:09 +00:00
9105b80a55 momentumTransportModels::lambdaThixotropic: New momentum transport model for thixotropic liquids
Description
    Thixotropic viscosity momentum transport model based on the evolution of
    the structural parameter \f$ \lambda \f$:

        \f[
            \frac{D\lambda}{Dt} = a(1 - \lambda)^b - c \lambda \dot{\gamma}^d
        \f]

    The viscosity is then calculated using the expression

        \f[
            \nu = \frac{\nu_{\infty}}{{1 - K \lambda}^2}
        \f]

    Where the parameter K is given by:

        \f[
            K = 1 - \sqrt{\frac{\nu_{\infty}}{\nu_{0}}}
        \f]

    Here:
    \vartable
        \lambda         | structural parameter
        a               | model coefficient
        b               | model coefficient
        c               | model coefficient
        d               | model coefficient
        \dot{\gamma}    | stress rate [1/s]
        \nu_{0}         | limiting viscosity when \f$ \lambda = 1 \f$
        \nu_{\infty}    | limiting viscosity when \f$ \lambda = 0 \f$
    \endvartable

    Reference:
    \verbatim
        Barnes H A, 1997.  Thixotropy - a review.  J. Non-Newtonian Fluid
        Mech 70, pp 1-33
    \endverbatim
2020-12-31 11:36:25 +00:00