Commit Graph

449 Commits

Author SHA1 Message Date
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
f46fad4343 blockMesh tutorials: set deltaT to 1 2018-03-12 09:40:17 +00:00
4331b98735 omegaWallFunction: Change blending from geometric mean to wall distance Reynolds number based
Replaced the ad hoc geometric mean blending with the more physical wall distance
Reynolds number blending function.

Additionally the part of the production term active for y+ < 11.6 has been
reinstated.
2018-03-10 23:46:32 +00:00
ba84383e26 reactingEulerFoam: Multiphase partial elimination and re-organisation
Partial elimination has been implemented for the multiphase Euler-Euler
solver. This does a linear solution of the drag system when calculating
flux and velocity corrections after the solution of the pressure
equation. This can improve the behaviour of the solution in the event
that the drag coupling is high. It is controlled by means of a
"partialElimination" switch within the PIMPLE control dictionary in
fvSolution.

A re-organisation has also been done in order to remove the exposure of
the sub-modelling from the top-level solver. Rather than looping the
drag, virtual mass, lift, etc..., models directly, the solver now calls
a set of phase-system methods which group the different force terms.
These new methods are documented in MomentumTransferPhaseSystem.H. Many
other accessors have been removed as a consequence of this grouping.

A bug was also fixed whereby the face-based algorithm was not
transferring the momentum associated with a given interfacial mass
transfer.
2018-03-08 12:41:14 +00:00
1073607cb0 Corrected spelling and typo's in comments
Resolves bug report https://bugs.openfoam.org/view.php?id=2845
2018-03-05 20:14:28 +00:00
4677d8f12f bin/tools/CleanFunctions: Added cleanVoFCase function
to automate the removal of derivative fields written to the 0 directory,
currently alphas and T.<phase>
2018-02-28 13:53:29 +00:00
984c4a2b51 runTools: getApplication utilises foamDictionary
This change means that getApplication still works if we have a
controlDict.orig, rather than a controlDict. This allows us to simplify
the scripting of tutorials in which the controlDict is modified.
2018-02-28 10:20:45 +00:00
0059f3c1db aerofoilNACA0012 tutorial for rhoSimpleFoam and rhoPimpleFoam
The tutorial demonstrates generation of a C-grid mesh using blockMesh
The geometry is provided by a surface mesh (OBJ file) of the NACA0012 aerofoil
The case is setup with a freestream flow speed of Ma=0.72

Thanks to Kai Bastos at Duke University for the geometry and helpful input.
2018-02-23 17:07:26 +00:00
fde4c4f43b tutorials: Fixes relating to initialisation
Some tutorials have had Allrun scripts added in order to run setFields,
which was previously omitted. Others have had nonuniform field files in
the 0 directory replaced by uniform files with .orig extensions.
2018-02-23 14:06:04 +00:00
fb15be492c freestreamPressure, freestreamVelocity: New blended boundary conditions for the freestream
These BCs blend between typical inflow and outflow conditions based on the
velocity orientation.

airFoil2D tutorial updated to demonstrate these new BCs.
2018-02-23 12:23:06 +00:00
c7a5f740d8 renumberMesh: Added -noFields option to avoid renumbering the fields when not necessary 2018-02-18 21:34:11 +00:00
2761c69e0e Corrected propeller tutorials 2018-02-17 23:11:43 +00:00
d8954d4370 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-16 23:10:09 +00:00
5c152e2eb4 tutorials/incompressible/pimpleFoam/RAS/propeller: Updated scripts 2018-02-16 12:17:10 +00:00
1d38ceb900 tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-15 22:59:56 +00:00
9221dd0d0f tutorials: Removed 0.orig directories in favor of <field>.orig
The new automated <field>.orig reading has made 0.orig directories and
associated scripting redundant.
2018-02-15 20:14:27 +00:00
df6e2da2dd OpenFOAM field reading: Automated the handling of <field>.orig files
Now if a <field> file does not exist first the compressed <field>.gz file is
searched for and if that also does not exist the <field>.orig file is searched
for.

This simplifies case setup and run scripts as now setField for example can read
the <field>.orig file directly and generate the <field> file from it which is
then read by the solver.  Additionally the cleanCase function used by
foamCleanCase and the Allclean scripts automatically removed <field> files if
there is a corresponding <field>.orig file.  So now there is no need for the
Allrun scripts to copy <field>.orig files into <field> or for the Allclean
scripts to explicitly remove them.
2018-02-14 17:42:14 +00:00
fe1fade8cb Corrected spelling in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2844
2018-02-13 20:39:56 +00:00
0248dd81e3 Corrected comments: inbetween -> in between 2018-02-13 16:38:41 +00:00
719d567a62 chtMultiRegionFoam: Added heatedDuct tutorial
This is a CHT case which uses snappyHexMesh. It is a tutorial, in the
traditional sense, in that it has been designed for training purposes.
It does not rely on changeDictionary, surface utilities, or extensive
scripting.

This work was supported by Colin Moughton, at Strix
2018-02-12 14:33:08 +00:00
2b76b83343 solutionControl: Made simple and pimple name convention consistent 2018-02-08 11:22:46 +00:00
283f8b7dc8 chtMultiRegionFoam: SIMPLE operation and transonic switch
Multi-region PIMPLE controls have been applied to the chtMultiRegionFoam
solver, and a transonic option has been implemented.

The new PIMPLE controls let the solver operate SIMPLE mode. The
utilisation of library solution and convergence control functionality
has significantly reduced the amount of code in the solver. The
chtMultiRegionSimpleFoam solver has also been made obsolete, and has
therefore been removed.

A few changes will be necessary to convert an existing
chtMultiRegionSimpleFoam case to chtMultiRegionFoam. All the SIMPLE
sub-dictionaries in the system/<regions>/fvSolution will need to be
renamed PIMPLE. The system/fvSolution file will also need an empty
PIMPLE sub-dictionary. In addition, additional "<variable>Final" solver
and relaxation entries will be needed. For a steady case, adding a
wildcard ending, ".*", to the variable names should be sufficient.

Solution parameters appropriate for a steady case are shown below:

    solvers
    {
        "p_rgh.*"
        {
            solver           GAMG;
            tolerance        1e-7;
            relTol           0.01;
            smoother         DIC;
            maxIter          10;
        }

        "(U|h|e|k|epsilon).*"
        {
            solver           PBiCGStab;
            preconditioner   DILU;
            tolerance        1e-7;
            relTol           0.1;
        }
    }

    PIMPLE
    {
        // ...
    }

    relaxationFactors
    {
        fields
        {
            "p_rgh.*"       0.7;
        }
        equations
        {
            "U.*"           0.5;
            "(h|e).*"       0.3;
            "(k|epsilon).*" 0.2;
        }
    }

This work was supported by Fabian Buelow, at Evonik
Tobias Holzmann provided cases for testing the convergence controls
2018-02-01 19:13:48 +00:00
4c8122783a solutionControl: Multi-region and PIMPLE time-loop control
The solution controls have been rewritten for use in multi-region
solvers, and PIMPLE fluid/solid solution controls have been implemented
within this framework.

PIMPLE also now has time-loop convergence control which can be used to
end the simulation once a certain initial residual is reached. This
allows a PIMPLE solver to run with equivalent convergence control to a
SIMPLE solver. Corrector loop convergence control is still available,
and can be used at the same time as the time-loop control.

The "residualControl" sub-dictionary of PIMPLE contains the residual
values required on the first solve of a time-step for the simulation to
end. This behaviour is the same as SIMPLE. The
"outerCorrectorResidualControl" sub-dictionary contains the tolerances
required for the corrector loop to exit. An example specification with
both types of control active is shown below.

PIMPLE
{
    // ...

    residualControl
    {
        p               1e-3;
        U               1e-4;
        "(k|epsilon|omega)" 1e-3;
    }

    outerCorrectorResidualControl
    {
        U
        {
            tolerance       1e-4;
            relTol          0.1;
        }
        "(k|epsilon|omega)"
        {
            tolerance       1e-3;
            relTol          0.1;
        }
    }
}

Note that existing PIMPLE "residualControl" entries will need to be
renamed "outerCorrectorResidualControl".

Application within a solver has also changed slightly. In order to have
convergence control for the time loop as a whole, the
solutionControl::loop(Time&) method (or the equivalent run method) must
be used; i.e.,

    while (simple.loop(runTime))
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        // solve ...
    }

or,

    while (pimple.run(runTime))
    {
        // pre-time-increment operations ...

        runTime ++;
        Info<< "Time = " << runTime.timeName() << nl << endl;

        // solve ...
    }
2018-02-01 16:44:07 +00:00
fc2b2d0c05 OpenFOAM: Rationalized the naming of scalar limits
In early versions of OpenFOAM the scalar limits were simple macro replacements and the
names were capitalized to indicate this.  The scalar limits are now static
constants which is a huge improvement on the use of macros and for consistency
the names have been changed to camel-case to indicate this and improve
readability of the code:

    GREAT -> great
    ROOTGREAT -> rootGreat
    VGREAT -> vGreat
    ROOTVGREAT -> rootVGreat
    SMALL -> small
    ROOTSMALL -> rootSmall
    VSMALL -> vSmall
    ROOTVSMALL -> rootVSmall

The original capitalized are still currently supported but their use is
deprecated.
2018-01-25 09:46:37 +00:00
2c882ab4a7 tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingPolyDisperse: Added execute permission to scripts 2018-01-24 22:06:48 +00:00
6e143e5ab0 reactingEulerFoam: Added wall-boiling and phase change capability to populationBalance functionality
Introduced thermalPhaseChangePopulationBalanceTwo- and MultiphaseSystem as
user-selectable phaseSystems which are the first to actually use multiple mass
transfer mechanisms enabled by

commit d3a237f560.

The functionality is demonstrated using the reactingTwoPhaseEulerFoam
wallBoilingPolydisperse tutorial.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2018-01-24 14:57:14 +00:00
d2175f8fe0 fvOptions: verticalDamping: Added spatial ramping
The onset of vertical damping can now be graduated over a distance. The
user specifies an origin and a direction along which the graduation
occurs, and a ramping function to specify the form of the graduation. An
example specification for the fvOption is:

    verticalDamping1
    {
        type            verticalDamping;

        selectionMode   all;

        origin          (1200 0 0);
        direction       (1 0 0);
        ramp
        {
            type        halfCosineRamp;
            start       0;
            duration    600;
        }

        lambda          [0 0 -1 0 0 0 0] 1; // Damping coefficient

        timeStart       0;
        duration        1e6;
    }

If the origin, direction or ramp entries are omitted then the fvOption
functions as before; applying the damping to the entire volume or the
specified cell set.

This work was supported by Jan Kaufmann and Jan Oberhagemann at DNV GL.
2018-01-09 08:47:37 +00:00
da787200a6 ddtScheme::fvcDdtPhiCoeff: Improved formulation providing better stability/accuracy balance
Resolves problem with pressure "staggering" when running with a very Courant
number.
2018-01-08 21:35:00 +00:00
8b44230384 MRF tutorials: Change rotor velocity boundary condition to fixedValue
Using the noSlip boundary condition for rotating wall in an MRF region
interferes with post-processing by resetting the wall velocity to 0 rather than
preserving the value set by the MRF zone.
2018-01-05 15:13:46 +00:00
9f54506fbf reactingEulerFoam: improvements to population balance modeling
Removed possibility for the user to specify a driftRate in the constantDrift
model which is independent of a fvOptions mass source. The driftRate must be
calculated from/be consistent with the mass source in order to yield a particle
number conserving result.

Made calculation of the over-all Sauter mean diameter of an entire population
balance conditional on more than one velocityGroup being present. This diameter
field is for post-processing purposes only and would be redundant in case of one
velocityGroup being used.

Solution control is extended to allow for solution of the population balance
equation at the last PIMPLE loop only, using an optional switch. This can be
beneficial in terms of simulation time as well as coupling between the
population balance based diameter calculation and the rest of the equation
system.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2018-01-04 17:23:00 +00:00
f578347934 tutorials: Corrected headers 2017-12-31 20:15:10 +00:00
57fa56ae7b tutorials/multiphase/reacting.*EulerFoam Allrun Allclean: Corrected file permissions 2017-12-31 20:09:10 +00:00
3e577d8515 reactingEulerFoam: Added population balance modeling capability
This patch enables the reactingEulerFoam solvers to simulate polydisperse flow
situations, i.e. flows where the disperse phase is subject to a size
distribution.

The newly added populationBalanceModel class solves the integro-partial
differential population balance equation (PBE) by means of a class method, also
called discrete or sectional method. This approach is based on discretizing the
PBE over its internal coordinate, the particle volume. This yields a set of
transport equations for the number concentration of particles in classes with a
different representative size. These are coupled through their source-terms and
solved in a segregated manner. The implementation is done in a way, that the
total particle number and mass is preserved for coalescence, breakup and drift
(i.e. isothermal growth or phase change) processes, irrespective of the chosen
discretization over the internal coordinate.

A population balance can be split over multiple velocity (temperature) fields,
using the capability of reactingMultiphaseEulerFoam to solve for n momentum
(energy) equations. To a certain degree, this takes into account the dependency
of heat- and momentum transfer on the disperse phase diameter. It is also possible
to define multiple population balances, e.g. bubbles and droplets simultaneously.

The functionality can be switched on by choosing the appropriate phaseSystem
type, e.g. populationBalanceMultiphaseSystem and the newly added diameterModel
class called velocityGroup. To illustrate the use of the functionality, a
bubbleColumnPolydisperse tutorial was added for reactingTwoPhaseEulerFoam and
reactingMultiphaseEulerFoam.

Furthermore, a reactingEulerFoam-specific functionObject called sizeDistribution
was added to allow post-Processing of the size distribution, e.g. to obtain the
number density function in a specific region.

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2017-12-31 19:59:47 +00:00
d3a237f560 reactingEulerFoam: Multiphase thermal phase change and support for multiple mass transfer mechanisms
- Thermal phase change and wall boiling functionality has been generalized to
  support two- and multi- phase simulations.
- Thermal phase change now also allows purePhaseModel, which simplifies case setup.
- The phaseSystem templates have been restructured in preparation of multiple
  simultaneous mass transfer mechanisms. For example, combination of thermal phase
  and inhomogeneous population balance models.

Patch contributed by VTT Technical Research Centre of Finland Ltd and Institute
of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR).
2017-12-31 19:50:22 +00:00
233d8dea12 reactionThermo: Select singleComponentMixture as pureMixture
A pureMixture can now be specified in a reacting solver. This further
enhances compatibility between non-reacting and reacting solvers.

To achieve this, mixtures now have a typeName function of the same form
as the lower thermodyanmic models. In addition, to avoid name clashes,
the reacting thermo make macros have been split into those that create
entries on multiple selection tables, and those that just add to the
reaction thermo table.
2017-12-18 08:39:28 +00:00
18f4d60690 chtMultiRegionFoam: Added reverseBurner tutorial
This tutorial demonstrates chtMultiRegionFoam's combustion capability
2017-12-18 08:39:28 +00:00
7c237a59d0 chtMultiRegionFoam: Added support for reactions
chtMultiRegionFoam now supports reaction/combustion modelling in fluid
regions in the same way as reactingFoam.
2017-12-18 08:39:04 +00:00
d2d99bb7a5 tutorials: blockMesh: Added missing face projections to pipe tutorial 2017-12-14 12:59:15 +00:00
15a2e7f6e9 combustionModel, chemistryModel: Simplified model selection
Updated all tutorials to the new format
2017-12-11 15:20:47 +00:00
61cab84fa6 combustionModel, chemistryModel: Simplified model selection
The combustion and chemistry model selection has been simplified so
that the user does not have to specify the form of the thermodynamics.

Examples of new combustion and chemistry entries are as follows:

    In constant/combustionProperties:

        combustionModel PaSR;

        combustionModel FSD;

    In constant/chemistryProperties:

        chemistryType
        {
            solver          ode;
            method          TDAC;
        }

All the angle bracket parts of the model names (e.g.,
<psiThermoCombustion,gasHThermoPhysics>) have been removed as well as
the chemistryThermo entry.

The changes are mostly backward compatible. Only support for the
angle bracket form of chemistry solver names has been removed. Warnings
will print if some of the old entries are used, as the parts relating to
thermodynamics are now ignored.
2017-12-11 14:49:21 +00:00
46704f121b interFoam: Merged dynamic mesh functionality of interDyMFoam into interFoam
and replaced interDyMFoam with a script which reports this change.

The interDyMFoam tutorials have been moved into the interFoam directory.

This change is one of a set of developments to merge dynamic mesh functionality
into the standard solvers to improve consistency, usability, flexibility and
maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-30 23:56:42 +00:00
7d6b1be4b3 pimpleFoam, rhoPimpleFoam, interDyMFoam: Rationalized mesh-motion support
Added support for mesh-motion update within PIMPLE loop in pimpleFoam and rhoPimpleFoam.
2017-11-30 13:07:42 +00:00
d63d6ea915 rhePimpleFoam: Merged dynamic mesh functionality of rhoPimpleDyMFoam into rhoPimpleFoam
and replaced rhoPimpleDyMFoam with a script which reports this change.

The rhoPimpleDyMFoam tutorials have been moved into the rhoPimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-23 12:13:37 +00:00
7c2ba70deb Renamed tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleDyMFoam
-> tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam
2017-11-22 21:41:08 +00:00
b9e4111b2c tutorials/incompressible/pimpleFoam: Updated pimpleDyMFoam tutorials to run pimpleFoam 2017-11-22 16:37:45 +00:00
d1fa9b6339 pimpleFoam: Merged dynamic mesh functionality of pimpleDyMFoam into pimpleFoam
and replaced pimpleDyMFoam with a script which reports this change.

The pimpleDyMFoam tutorials have been moved into the pimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.
2017-11-22 16:31:30 +00:00
94666e5a95 tutorials/lagrangian/reactingParcelFoam/hotBoxes: Corrected Allrun-parallel script
Patch contributed by Federico Piscaglia
Resolves bug-report https://bugs.openfoam.org/view.php?id=2757
2017-11-14 20:48:53 +00:00
4b5a10d167 compressibleInterFoam family: merged two-phase momentum stress modelling from compressibleInterPhaseTransportFoam
The new momentum stress model selector class
compressibleInterPhaseTransportModel is now used to select between the options:

Description
    Transport model selection class for the compressibleInterFoam family of
    solvers.

    By default the standard mixture transport modelling approach is used in
    which a single momentum stress model (laminar, non-Newtonian, LES or RAS) is
    constructed for the mixture.  However if the \c simulationType in
    constant/turbulenceProperties is set to \c twoPhaseTransport the alternative
    Euler-Euler two-phase transport modelling approach is used in which separate
    stress models (laminar, non-Newtonian, LES or RAS) are instantiated for each
    of the two phases allowing for different modeling for the phases.

Mixture and two-phase momentum stress modelling is now supported in
compressibleInterFoam, compressibleInterDyMFoam and compressibleInterFilmFoam.
The prototype compressibleInterPhaseTransportFoam solver is no longer needed and
has been removed.
2017-11-14 10:03:20 +00:00
e98f0b6ce3 tutorials/multiphase/compressibleInterPhaseTransportFoam/climbingRod: Improved stability
for a wider range of phase initialization.
2017-11-09 15:04:18 +00:00
eea9f8dd86 tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D: Removed
This tutorial is not currently run due to conservation issues with AMI
2017-11-08 10:31:28 +00:00