Commit Graph

3281 Commits

Author SHA1 Message Date
f068c0935a reactingEulerFoam: dragModels: Typo in AttouFerschneider constructor
This change made the trickleBed case not exhibit the instability, so the
parameters have been modified a bit to keep the flow field non-trivial.
2018-04-05 15:11:10 +01:00
c3f30630e4 compressibleInterFoam::TEqn: De-reference the dimensioned internal field of the sources
Minor change to make it simpler to change the set of sources.
2018-04-04 22:05:19 +01:00
a0399d619d fixedMeanOutletInletFvPatchField: New outlet/inlet boundary condition which fixes the outlet mean
Description
    This boundary condition extrapolates field to the patch using the near-cell
    values and adjusts the distribution to match the specified, optionally
    time-varying, mean value.  This extrapolated field is applied as a
    fixedValue for outflow faces but zeroGradient is applied to inflow faces.

    This boundary condition can be applied to pressure when inletOutlet is
    applied to the velocity so that a zeroGradient condition is applied to the
    pressure at inflow faces where the velocity is specified to avoid an
    unphysical over-specification of the set of boundary conditions.

Usage
    \table
        Property     | Description             | Required    | Default value
        meanValue    | mean value Function1    | yes         |
        phi          | Flux field name         | no          | phi
    \endtable

    Example of the boundary condition specification:
    \verbatim
    <patchName>
    {
        type            fixedMeanOutletInlet;
        meanValue       1.0;
    }
    \endverbatim

See also
    Foam::fixedMeanFvPatchField
    Foam::outletInletFvPatchField
    Foam::Function1Types
2018-04-04 22:04:25 +01:00
7143bbcc1d uniformDensityHydrostaticPressureFvPatchScalarField: pRefPoint now optional
If pRefPoint is not specified hRef is used.  This provides compatibility with
the original prghUniformDensityHydrostaticPressureFvPatchScalarField BC.
2018-04-04 16:44:22 +01:00
49cf7f8d19 uniformDensityHydrostaticPressureFvPatchScalarField: Removed optional "true" argument 2018-04-04 13:37:53 +01:00
c9c9fce4ee Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-04-04 13:11:37 +01:00
53e9706f7e uniformDensityHydrostaticPressureFvPatchScalarField: Require value entry for post-processing 2018-04-04 13:10:28 +01:00
633968dec6 phaseSystem: Corrected spelling 2018-04-03 10:29:02 +01:00
b17c0e3fa1 PrghPressureFvPatchScalarField: New base class used to create p_rgh variants of pressure BCs
The prghPressureFvPatchScalarField, prghTotalPressureFvPatchScalarField and
prghUniformDensityHydrostaticPressure p_rgh boundary conditions are now derived
from the corresponding pressure boundary conditions using the
PrghPressureFvPatchScalarField template.
2018-03-31 21:47:58 +01:00
03d65dc6c3 tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_simpleFoam/0/omega: Corrected field name
Resolves bug-report https://bugs.openfoam.org/view.php?id=2894
2018-03-31 16:20:57 +01:00
c840d39f37 tutorials/compressible/rhoCentralFoam/biconic25-55Run35: moved grid256.dat into const 2018-03-29 19:53:29 +01:00
262ed2cd33 reactingEulerFoam/phaseSystems/populationBalanceModel: Rationalization of function names and documentation
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
2018-03-29 17:40:45 +01:00
ec9ca0229b reactingEulerFoam: Added Coulaloglou and Tavlarides (1977) coalescence model
Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
2018-03-29 17:40:08 +01:00
3c643bf2f8 Corrected typos in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2891
2018-03-27 21:10:11 +01:00
50239102e6 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-03-27 21:09:26 +01:00
01d6aed0e1 Corrected typos in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2891
2018-03-27 21:08:37 +01:00
a4956cb2c5 reactingEulerFoam: Registered blended models
Blended models are now registered and can be looked up in the same way
as regular interfacial models via the phaseSystem::lookupSubModel
method. For example, to access the blended drag model, the following
code could be used:

    const BlendedInterfacialModel<dragModel>& drag =
        fluid.lookupSubModel<BlendedInterfacialModel<dragModel>>
        (
            phasePair(gas, liquid)
        );

Here, "fluid" is the phase system, and "gas" and "liquid" are the phase
models between which the blended drag model applies.
2018-03-27 13:15:43 +01:00
5a4d25429d tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle: Updated porosity coefficients
The implementation of the porousBafflePressure BC was incorrect in OpenFOAM-2.4
and earlier and corrected during the turbulence modeling rewrite for
OpenFOAM-3.0.  This update introduced the density scaling required for the
definition of pressure in interFoam which requires the porosity coefficients to
be reduced.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2890
2018-03-27 11:26:01 +01:00
a59781b9e7 dragModels: Added AttouFerschneider model for trickle beds
Also added tutorial case demonstrating usage. Note that the new drag
models are symmetric and should be used without any blending.

This work was supported by Georg Skillas and Zhen Li, at Evonik
2018-03-26 16:36:20 +01:00
00a6c847c9 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-03-26 16:03:46 +01:00
80cf711937 stringOps::inplaceExpand: Use scientific rather than fixed format for scalar values
Resolves bug-report https://bugs.openfoam.org/view.php?id=2889
2018-03-26 16:00:33 +01:00
d9be8b47f7 StationaryPhaseModel: Header documentation 2018-03-26 10:29:14 +01:00
828254ab34 functionObjects::forceCoeffs: normalize liftDir, dragDir and pitchAxis
It may be convenient to specify these directions un-normalized so it is
necessary to normalize them before they are used to calculate the force
coefficients.
2018-03-25 22:20:02 +01:00
9b40325e69 Corrected typo in comment: "the the" -> "the" 2018-03-25 12:15:07 +01:00
be54fa9bb2 Corrected typo in comment: "the the" -> "the" 2018-03-25 12:14:35 +01:00
8a9bbb9a73 Corrected typos in comment: "the the" -> "the" 2018-03-25 12:09:00 +01:00
5d4c8f5d5f fvMeshDistribute: uses topological rather than geometric point merging
Patch contributed by Mattijs Janssens
2018-03-23 17:02:18 +00:00
a59351c64f test: Refactored transposing of plot data into function bin/tools/RunFunctions::transposeFile()
which simplifies the reactingEulerFoam populationBalance test cases.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR)
2018-03-23 14:24:50 +00:00
ef885b407c reactingEulerFoam: Corrected blending in tutorials
Sub-model blending should be set such that the sum of all the blending
coefficients equals one. If there are three models specified for a phase
pair (e.g., (air in water), (water in air) and (air and water)), then
the sum-to-one constraint is guaranteed by the blending functions.
Frequently, however, the symmetric model ((air and water) in this
example) is omitted. In that case, the blending coefficients should be
selected so that the sum of just the two non-symmetric coefficients
equal one.

In the case of linear blending, this means setting the minimum partially
continuous alpha to one-minus the fully continuous value of the opposite
phase. For example:

   blending
   {
       default
       {
           type            linear;
           minFullyContinuousAlpha.air 0.7;
           minPartlyContinuousAlpha.air 0.3;
           minFullyContinuousAlpha.water 0.7;
           minPartlyContinuousAlpha.water 0.3;
       }
   }

The reactingTwoPhaseEulerFoam and reactingMultiPhaseEulerFoam tutorials
have been modified to adhere to this principle.
2018-03-23 09:38:17 +00:00
e352828514 reactingMultiphaseEulerFoam: Stationary phase
Two new phase models have been added as selectable options for
reactingMultiphaseEulerFoam; pureStationaryPhaseModel and
pureStationaryIsothermalPhaseModel. These phases do not store a
velocity and their phase fractions remain constant throughout the
simulation. They are intended for use in modelling static particle beds
and other forms of porous media by means of the existing Euler-Euler
transfer models (drag, heat transfer, etc...).

Note that this functionality has not been extended to
reactingTwoPhaseEulerFoam, or the non-reacting *EulerFoam solvers.

Additional maintenance work has been carried out on the phase model
and phase system structure. The system can now loop over subsets of
phases with specific functionality (moving, multi-component, etc...) in
order to avoid testing for the existence of equations or variables in
the top level solver. The mass transfer handling and it's effect on
per-phase source terms has been refactored to reduce duplication. Const
and non-const access to phase properties has been formalised by renaming
non-const accessors with a "Ref" suffix, which is consistent with other
recent developments to classes including tmp and GeometricField, among
others. More sub-modelling details have been made private in order to
reduce the size of interfaces and improve abstraction.

This work was supported by Zhen Li, at Evonik
2018-03-23 09:08:52 +00:00
f2cc03bf8d MULES: Non-uniform limiting and additional form of limit sum
MULES and CMULES have been extended so that the limits can be supplied
as fields. These arguments are templated so that zeroField, oneField or
UniformField<scalar> can be used in place of a scalar value with no
additional overhead. The flux argument has been removed from the
unlimited CMULES correct functions in order to make this templating
possible.

An additional form of limit sum has also been added to MULES. This
limits the flux sum by ofsetting in proportion to the phase fraction,
rather than by reducing the magnitude of the fluxes with the same sign
as the imbalance. The new procedure makes it possible to limit the flux
sum in the presence of constraints without encountering a divide by
zero.
2018-03-22 16:55:36 +00:00
ea86dc2cf4 LduMatrix: Sum-diag operations for diagonal matrices 2018-03-22 16:55:36 +00:00
9cf51b0363 fvOptions: Added method for querying application to a field 2018-03-22 16:55:36 +00:00
b6b146058d test: New directory for model tests and validation
The initial set of cases in the test directory are aimed at testing the
reactingEulerFoam populationBalance functionality.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum
Dresden - Rossendorf (HZDR) and VTT Technical Research Centre of Finland Ltd.
Integrated with the "tutorials" functionality by CFD Direct Ltd.
2018-03-22 16:42:11 +00:00
de9d27cace foamJob: Added support for the new processorsNNN collated IO directory naming
Resolves bug report https://bugs.openfoam.org/view.php?id=2884
2018-03-22 11:35:30 +00:00
58b7c01dbd fvPatchFields: Corrected documentation
Resolves bug-report https://bugs.openfoam.org/view.php?id=2885
2018-03-22 11:09:42 +00:00
c677ba1185 wideBandAbsorptionEmission: Corrected errors
Resolves bug-reports
https://bugs.openfoam.org/view.php?id=2881
https://bugs.openfoam.org/view.php?id=2882

Patches contributed by Kevin Nordin-Bates
2018-03-21 18:03:29 +00:00
a4de83a425 Improvements to the fileHandler and collated IO
Improvements to existing functionality
--------------------------------------
  - MPI is initialised without thread support if it is not needed e.g. uncollated
  - Use native c++11 threading; avoids problem with static destruction order.
  - etc/cellModels now only read if needed.
  - etc/controlDict can now be read from the environment variable FOAM_CONTROLDICT
  - Uniform files (e.g. '0/uniform/time') are now read only once on the master only
    (with the masterUncollated or collated file handlers)
  - collated format writes to 'processorsNNN' instead of 'processors'.  The file
    format is unchanged.
  - Thread buffer and file buffer size are no longer limited to 2Gb.

The global controlDict file contains parameters for file handling.  Under some
circumstances, e.g. running in parallel on a system without NFS, the user may
need to set some parameters, e.g. fileHandler, before the global controlDict
file is read from file.  To support this, OpenFOAM now allows the global
controlDict to be read as a string set to the FOAM_CONTROLDICT environment
variable.

The FOAM_CONTROLDICT environment variable can be set to the content the global
controlDict file, e.g. from a sh/bash shell:

    export FOAM_CONTROLDICT=$(foamDictionary $FOAM_ETC/controlDict)

FOAM_CONTROLDICT can then be passed to mpirun using the -x option, e.g.:

    mpirun -np 2 -x FOAM_CONTROLDICT simpleFoam -parallel

Note that while this avoids the need for NFS to read the OpenFOAM configuration
the executable still needs to load shared libraries which must either be copied
locally or available via NFS or equivalent.

New: Multiple IO ranks
----------------------
The masterUncollated and collated fileHandlers can now use multiple ranks for
writing e.g.:

    mpirun -np 6 simpleFoam -parallel -ioRanks '(0 3)'

In this example ranks 0 ('processor0') and 3 ('processor3') now handle all the
I/O.  Rank 0 handles 0,1,2 and rank 3 handles 3,4,5.  The set of IO ranks should always
include 0 as first element and be sorted in increasing order.

The collated fileHandler uses the directory naming processorsNNN_XXX-YYY where
NNN is the total number of processors and XXX and YYY are first and last
processor in the rank, e.g. in above example the directories would be

    processors6_0-2
    processors6_3-5

and each of the collated files in these contains data of the local ranks
only. The same naming also applies when e.g. running decomposePar:

decomposePar -fileHandler collated -ioRanks '(0 3)'

New: Distributed data
---------------------

The individual root directories can be placed on different hosts with different
paths if necessary.  In the current framework it is necessary to specify the
root per slave process but this has been simplified with the option of specifying
the root per host with the -hostRoots command line option:

    mpirun -np 6 simpleFoam -parallel -ioRanks '(0 3)' \
        -hostRoots '("machineA" "/tmp/" "machineB" "/tmp")'

The hostRoots option is followed by a list of machine name + root directory, the
machine name can contain regular expressions.

New: hostCollated
-----------------

The new hostCollated fileHandler automatically sets the 'ioRanks' according to
the host name with the lowest rank e.g. to run simpleFoam on 6 processors with
ranks 0-2 on machineA and ranks 3-5 on machineB with the machines specified in
the hostfile:

    mpirun -np 6 --hostfile hostfile simpleFoam -parallel -fileHandler hostCollated

This is equivalent to

    mpirun -np 6 --hostfile hostfile simpleFoam -parallel -fileHandler collated -ioRanks '(0 3)'

This example will write directories:

    processors6_0-2/
    processors6_3-5/

A typical example would use distributed data e.g. no two nodes, machineA and
machineB, each with three processes:

    decomposePar -fileHandler collated -case cavity

    # Copy case (constant/*, system/*, processors6/) to master:
    rsync -a cavity machineA:/tmp/

    # Create root on slave:
    ssh machineB mkdir -p /tmp/cavity

    # Run
    mpirun --hostfile hostfile icoFoam \
        -case /tmp/cavity -parallel -fileHandler hostCollated \
        -hostRoots '("machineA" "/tmp" "machineB" "/tmp")'

Contributed by Mattijs Janssens
2018-03-21 12:42:22 +00:00
84dd9a5047 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-03-20 22:29:57 +00:00
a5d6778281 atmosphericModels: Added Lopes da Costa porosity and turbulence models
Specialized variants of the power law porosity and k epsilon turbulence models
developed to simulate atmospheric flow over forested and non-forested complex
terrain.

Class
    Foam::powerLawLopesdaCosta

Description
    Variant of the power law porosity model with spatially varying
    drag coefficient

    given by:

        \f[
            S = -\rho C_d \Sigma |U|^{(C_1 - 1)} U
        \f]

    where
    \vartable
        \Sigma | Porosity surface area per unit volume
        C_d    | Model linear coefficient
        C_1    | Model exponent coefficient
    \endvartable

    Reference:
    \verbatim
        Costa, J. C. P. L. D. (2007).
        Atmospheric flow over forested and non-forested complex terrain.
    \endverbatim

Class
    Foam::RASModels::kEpsilonLopesdaCosta

Description
    Variant of the standard k-epsilon turbulence model with additional source
    terms to handle the changes in turbulence in porous regions represented by
    the powerLawLopesdaCosta porosity model.

    Reference:
    \verbatim
        Costa, J. C. P. L. D. (2007).
        Atmospheric flow over forested and non-forested complex terrain.
    \endverbatim

    The default model coefficients are
    \verbatim
        kEpsilonLopesdaCostaCoeffs
        {
            Cmu         0.09;
            C1          1.44;
            C2          1.92;
            sigmak      1.0;
            sigmaEps    1.3;
        }
    \endverbatim

Tutorial case to follow.
2018-03-20 22:26:07 +00:00
26f2ce9c9e reactingMultiphaseEulerFoam: Bug fix to divergence handling 2018-03-20 08:46:49 +00:00
ea00c1a4c5 uniformDensityHydrostaticPressureFvPatchScalarField.H: Corrected typo 2018-03-18 14:25:17 +00:00
ea4fbd5e83 src/atmosphericModels: New library containing models specific to atmospheric flows
Converted the atmBoundaryLayerInlet boundary conditions to inletOutlet to handle
changes in inflow orientation without the need for re-meshing.
2018-03-18 14:08:20 +00:00
4b40886496 MRFZone: Filter-out excluded patches from ddtCorr 2018-03-16 17:14:27 +00:00
0fd3db427f functionObjects::forces: Construct nu without need to specify name and dimensions
Resolved patch request https://bugs.openfoam.org/view.php?id=2880
2018-03-15 00:44:33 +00:00
81947c8085 particle: Optimisation by inlining key methods
Resolves bug report https://bugs.openfoam.org/view.php?id=2871
2018-03-13 08:25:20 +00:00
be604abcb9 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-03-12 14:11:04 +00:00
85c1c8b94f PengRobinsonGas: Corrected construction order in constructor not currently used
Resolves bug report https://bugs.openfoam.org/view.php?id=2874
2018-03-12 14:09:17 +00:00
dce56828e7 reactingMultiphaseEulerFoam: Prevent dereference of non-existent drag fields 2018-03-12 12:18:07 +00:00
f46fad4343 blockMesh tutorials: set deltaT to 1 2018-03-12 09:40:17 +00:00