Commit Graph

4656 Commits

Author SHA1 Message Date
c4e9f79a97 momentumTransportModel: Corrected readModelDict backward-compatibility function
adds support for reading constant/momentumTransport if present otherwise
constant/turbulenceProperties in read.
2020-04-16 17:00:20 +01:00
46f5de875d omegaWallFunctionFvPatchScalarField: Removed misleading documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=3485
2020-04-16 16:49:45 +01:00
9fabb9b002 paraview: Upgrade to 5.8.0
PVReaders now support compilation against ParaView version 5.7.0 and
greater. All references to ParaView versions less than 4.0.0 have been
removed.

Based on a patch contributed by CFD Support
2020-04-16 13:45:37 +01:00
ff22c54957 CompressibleMomentumTransportModel, PhaseCompressibleMomentumTransportModel: Generalised the access to the thermo model
This allowed as significant simplification of the phaseModel in
reactingEulerFoam.
2020-04-16 13:16:12 +01:00
1a1381d093 freestreamVelocity BC: changed to use patchInternalField for valueFraction calculation
to prevent the valueFraction "locking" to 1 when a velocity points exactly normal and inwards to the face
2020-04-16 12:49:06 +01:00
e1dedc10d3 foamCloneCase: improved messaging when additional file does not exist 2020-04-16 12:45:33 +01:00
0405176670 reactingEulerFoam: Added divq and divj function to generalise the thermal and specie transport
These function map to the corresponding functions in the
PhaseThermophysicalTransportModel to allow run-time selection and extensibility
of the phase thermophysical transport.
2020-04-15 18:48:42 +01:00
f7ec6855c7 tutorials/.../biconic25-55Run35: Corrected patch types 2020-04-15 15:18:10 +01:00
d3fed1155a wallHeatFlux: Output values only on the patches specified
Resolves bug report https://bugs.openfoam.org/view.php?id=3481
2020-04-15 15:06:29 +01:00
5a80034f93 ThermophysicalTransportModels: Corrected the handling of the phase-fraction for multi-phase simulations 2020-04-15 11:44:35 +01:00
b4cf4042d1 ThermophysicalTransportModels: Added j and divj functions for specie mass-fraction transport
Provides an abstraction of specie transport to support run-times selectable and
extensible multi-component thermal and specie laminar and turbulent transport.
2020-04-15 11:24:11 +01:00
3d3f61ac36 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-15 11:22:28 +01:00
7c402dde4e Removed redundant library link statements 2020-04-15 11:17:16 +01:00
e3cd634104 paraview: More corrections to library paths 2020-04-15 09:47:24 +01:00
4f1beb3830 flowRateInletVelocity: Added alpha option for use with interstitial velocities 2020-04-15 09:47:24 +01:00
365282af5b Added missing wmake target 2020-04-15 09:39:34 +01:00
48a3622bcc Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-14 21:15:24 +01:00
de66b1be68 MomentumTransportModels: Update of the TurbulenceModels library for all flow types
providing the shear-stress term in the momentum equation for incompressible and
compressible Newtonian, non-Newtonian and visco-elastic laminar flow as well as
Reynolds averaged and large-eddy simulation of turbulent flow.

The general deviatoric shear-stress term provided by the MomentumTransportModels
library is named divDevTau for compressible flow and divDevSigma (sigma =
tau/rho) for incompressible flow, the spherical part of the shear-stress is
assumed to be either included in the pressure or handled separately.  The
corresponding stress function sigma is also provided which in the case of
Reynolds stress closure returns the effective Reynolds stress (including the
laminar contribution) or for other Reynolds averaged or large-eddy turbulence
closures returns the modelled Reynolds stress or sub-grid stress respectively.
For visco-elastic flow the sigma function returns the effective total stress
including the visco-elastic and Newtonian contributions.

For thermal flow the heat-flux generated by thermal diffusion is now handled by
the separate ThermophysicalTransportModels library allowing independent run-time
selection of the heat-flux model.

During the development of the MomentumTransportModels library significant effort
has been put into rationalising the components and supporting libraries,
removing redundant code, updating names to provide a more logical, consistent
and extensible interface and aid further development and maintenance.  All
solvers and tutorials have been updated correspondingly and backward
compatibility of the input dictionaries provided.

Henry G. Weller
CFD Direct Ltd.
2020-04-14 20:44:22 +01:00
a4efd0ed55 paraview: Corrected library paths 2020-04-14 12:18:06 +01:00
d9103613a9 bin/tools: Added version number comparison script
This script allows version numbers to be compared. It is called in the
following way:

    foamVersionCompare <version-1> <comparison> <version-2>

The <comparison> argument can be one of; eq (equal-to), lt (less-than),
gt (greater-than), le (less-than-or-equal-to), or ge
(greater-than-or-equal-to). The script returns a successful exit code if
the comparison evaluates as true.

Example usage:

    if $WM_PROJECT_DIR/bin/tools/foamVersionCompare 5.4.3 gt 5.5.1
    then
        echo "5.4.3 IS greater than 5.5.1"
    else
        echo "5.4.3 is NOT greater than 5.5.1"
    fi
20200414
2020-04-14 09:24:55 +01:00
ba0fe79c5f tutorials/.../DTCHull: Simplified and unified mesh setups
This also restores the upstream refinement in the wave case so that the
waves now correctly propagate to the hull
2020-04-14 08:25:26 +01:00
08e686eb18 TurbulenceModels: Refactored to transfer all heat and specie transport to the new ThermophysicalTransportModels library
This provides an extensible and run-time selectable framework to support complex
energy and specie transport models, in particular multi-component diffusion.
Currently only the Fourier for laminar and eddyDiffusivity for RAS and LES
turbulent flows are provided but the interface is general and the set of models
will be expanded in the near future.
2020-04-12 10:35:52 +01:00
0207f85191 fvOptions/.../semiImplicitSource: Construct functions on read 2020-04-11 11:43:30 +01:00
413429e214 tutorials/.../DTCHull: Changed the atmospheric boundary condition to prghEntrainmentPressure
This has removed all the noise/checkerboarding from the vicinity of the
atmospheric boundary.
2020-04-11 11:43:30 +01:00
25b34809c7 ThermophysicalTransportModels: New library to handle the transport of energy and species
The simplistic energy transport support in compressibleTurbulenceModels has been
abstracted and separated into the new ThermophysicalTransportModels library in
order to provide a more general interface to support complex energy and specie
transport models, in particular multi-component diffusion.  Currently only the
Fourier for laminar and eddyDiffusivity for RAS and LES turbulent flows are
provided but the interface is general and the set of models will be expanded in
the near future.

The ThermalDiffusivity and EddyDiffusivity modelling layers remain in
compressibleTurbulenceModels but will be removed shortly and the alphat boundary
conditions will be moved to ThermophysicalTransportModels.
2020-04-10 18:18:51 +01:00
7f5144312e Renamed turbulenceProperties -> momentumTransport
Following the generalisation of the TurbulenceModels library to support
non-Newtonian laminar flow including visco-elasticity and extensible to other
form of non-Newtonian behaviour the name TurbulenceModels is misleading and does
not properly represent how general the OpenFOAM solvers now are.  The
TurbulenceModels now provides an interface to momentum transport modelling in
general and the plan is to rename it MomentumTransportModels and in preparation
for this the turbulenceProperties dictionary has been renamed momentumTransport
to properly reflect its new more general purpose.

The old turbulenceProperties name is supported for backward-compatibility.
2020-04-10 17:17:37 +01:00
b9c7428619 functionObjectList::wordAndDictionary: Added null constructor for pre-7 gcc versions
Resolves bug-report https://bugs.openfoam.org/view.php?id=3479
2020-04-10 16:08:04 +01:00
876845d0f4 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-10 09:30:12 +01:00
53ac3f223a reactingEulerFoam::phaseCompressibleTurbulenceModels: Added missing clone functions
Patch contributed by Timo Niemi, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=3478
2020-04-10 09:28:57 +01:00
3f13de8369 Corrected typos
Patch contributed by Timo Niemi, VTT.
2020-04-10 09:26:54 +01:00
ce0cd2fdbd fanPressure, fanPressureJump: Improvements to implementation consistency 2020-04-08 14:38:56 +01:00
6c887be284 Added entrainmentPressure and prghEntrainmentPressure conditions
These provide pressure boundary conditions suitable for use on
boundaries where the flow may reverse or on which the inlet or outlet
state is not known or well defined. The condition takes the following
form:

    p = p0 + 0.5*Un*mag(Un)

In the case of exactly normal inlet velocity, this condition sets the
same pressure as the totalPressure condition. The pressure that is set
increases with increasing outlet velocity and decreases with increasing
inlet velocity. This makes it self-limiting and extremely stable in a
number of configurations which were not easily simulated previously. The
condition also does varies smoothly as the flux reverses, which also
aids stability.

The controls of this boundary condition are exactly the same as for the
totalPressure condition. Note, however, that "p0" is not necessarily the
total pressure any more. It is, in general, a reference pressure.

An example usage is as follows:

    sides
    {
        type    entrainmentPressure;
        p0      100;
    }
2020-04-08 14:31:59 +01:00
2606e4931e Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-08 11:46:57 +01:00
3bd86e85e5 TurbulenceModels: Removed the redundant propertiesName constructor and selector argument 2020-04-08 11:46:24 +01:00
3a83ac7b85 functionObjectList: Removed unused sub-class 2020-04-08 11:04:26 +01:00
81188fefaa functionObjectList: Improved flexibility of field argument parsing
Additional flexibility for handling of field arguments has been extended
to dictionary lists of field settings, as well as word lists of field
names. This means that the following syntax is now supported:

    postProcess -func "fieldAverage(p, U { prime2Mean on; }, T)"

    postProcess -func "fieldAverage(fields=(p U { prime2Mean on; } T))"
2020-04-08 09:03:23 +01:00
b6f91de72c semiImplicitSource: Made operable on multiple different types
The scalarSemiImplicitSource, vectorSemiImplicitSource, etc...,
fvOptions have been replaced by a single semiImplicitSource fvOption.
This allows sources to be specified for multiple fields regardless of
type. For example:

    massSource
    {
        type            semiImplicitSource;

        timeStart       1;
        duration        500;

        selectionMode   points;
        points
        (
            (0.075 0.2 0.05)
        );

        volumeMode      absolute;

        sources
        {
            thermo:rho.steam
            {
                explicit    1.0e-3; // kg/s
                implicit    0;
            }

            U.steam
            {
                explicit    (0 1e-1 0); // kg*m/s^2
                implicit    0;
            }

            h.steam
            {
                explicit    3700; // kg*m^2/s^3
                implicit    0;
            }
        }
    }
2020-04-07 17:02:27 +01:00
ad12d3a8c1 functionObjectList: Improved flexibility of field argument parsing
Function object argument parsing now takes all "field", "fields" and
"objects" arguments and combines them into a single list of
fields/objects that the function should operate on. This means that the
following postProcess executions are now all equivalent and function as
expected:

    postProcess -func "
        flowRatePatch
        (
            name=outlet,
            phi,
            alphaRhoPhi.air,
            alphaRhoPhi.particles
        )"

    postProcess -func "
        flowRatePatch
        (
            name=outlet,
            fields=(phi alphaRhoPhi.air alphaRhoPhi.particles)
        )"

    postProcess -func "
        flowRatePatch
        (
            name=outlet,
            objects=(phi),
            alphaRhoPhi.air,
            field=alphaRhoPhi.particles
        )"

As are the following:

    postProcess -func "mag(U.air)"

    postProcess -func "mag(field=U.air)"
2020-04-07 17:02:27 +01:00
b7b678bceb tutorials: Updated the momentum transport model type selection
renaming the legacy keywords
    RASModel -> model
    LESModel -> model
    laminarModel -> model

which is simpler and clear within the context in which they are specified, e.g.

RAS
{
    model               kOmegaSST;
    turbulence          on;
    printCoeffs         on;
}

rather than

RAS
{
    RASModel            kOmegaSST;
    turbulence          on;
    printCoeffs         on;
}

The old keywords are supported for backward compatibility.
2020-04-07 13:11:50 +01:00
d98c83e62b TurbulenceModels: Removed the redundant propertiesName constructor and selector argument
The ability to specify the file name of the turbulenceProperties dictionary
during construction was added to support multi-phases but now that the handling
of the phase name extension has been completely rationalised and standardised
this complexity and code clutter is no longer used, needed or appropriate.
2020-04-07 11:07:31 +01:00
57e685b8de reaction::thirdBodyEfficiencies: Improved the error message
from a mismatch in the numbers of efficiencies and species, providing the
context including the reaction name and line in the dictionary file.
20200405
2020-04-03 13:39:18 +01:00
2ff102c5aa Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-03 13:36:16 +01:00
0bcbc8c282 reaction::thirdBodyEfficiencies: Corrected the error message
from a mismatch in the numbers of efficiencies and species.
2020-04-03 13:35:06 +01:00
1414f02299 etc/config.csh/paraview: Corrected setenv syntax 2020-04-02 09:52:27 +01:00
95b5ef4458 fvOptions::SemiImplicitSource: Added support for Function1 specifications of the explicit and implicit sources
This significant improvement is flexibility of SemiImplicitSource required a
generalisation of the source specification syntax and all tutorials have been
updated accordingly.

Description
    Semi-implicit source, described using an input dictionary.  The injection
    rate coefficients are specified as pairs of Su-Sp coefficients, i.e.

        \f[
            S(x) = S_u + S_p x
        \f]

    where
    \vartable
        S(x)    | net source for field 'x'
        S_u     | explicit source contribution
        S_p     | linearised implicit contribution
    \endvartable

    Example tabulated heat source specification for internal energy:
    \verbatim
    volumeMode      absolute; // specific
    sources
    {
        e
        {
            explicit table ((0 0) (1.5 $power));
            implicit 0;
        }
    }
    \endverbatim

    Example coded heat source specification for enthalpy:
    \verbatim
    volumeMode      absolute; // specific
    sources
    {
        h
        {
            explicit
            {
                type coded;
                name heatInjection;
                code
                #{
                    // Power amplitude
                    const scalar powerAmplitude = 1000;

                    // x is the current time
                    return mag(powerAmplitude*sin(x));
                #};
            }
            implicit 0;
        }
    }
    \endverbatim
2020-04-01 18:53:09 +01:00
c1587d5fc6 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2020-04-01 17:04:28 +01:00
4867477252 radiationModels::P1: Ensure qr is read if present for post-processing
Resolves bug-report https://bugs.openfoam.org/view.php?id=3473
2020-04-01 17:03:16 +01:00
04d5e6a72a setToCellZone, setToFaceZone, setToPointZone: More flexible and consistent input
All of these sets will now take either "set" as the input entry, or
"cellSet"/"faceSet"/"pointSet" as appropriate. Previously cell and point
only accepted the "set" keyword whilst face only took "faceSet".
2020-03-31 12:08:39 +01:00
a3c8fc80e6 pre-commit-hook, pre-recieve-hook: Corrected HookFunctions source path 2020-03-31 09:09:10 +01:00
14e7dbdd76 topoSet: Added planeToFaceZone
This is a topoSetSource which selects faces based on the adjacent cell
centres spanning a given plane. The plane is defined by a point and
normal vector.

Additionally, an include entry can be specified. When omitted or set to
"all", then all faces that meet the criteria are included in the set. When
set to "closest", just the faces that belong to the closest contiguous
region to the plane point are included. This latter setting is useful when
defining face zones through channels on which the flow rate is to be
computed, as it keeps the set local to a single channel.

An example usage (in system/topoSetDict) is as follows:

    actions
    (
        {
            name    f0;
            type    faceZoneSet;
            action  new;
            source  planeToFaceZone;
            sourceInfo
            {
                point   (0 0 4);
                normal  (1 0 0.2);
                include closest;
            }
        }
    );

This would then allow the flow rate through the created face zone to be
accurately reported by the following command:

    postProcess -func "flowRateFaceZone(name=f0,field=phi)"
2020-03-26 20:51:59 +00:00