Commit Graph

592 Commits

Author SHA1 Message Date
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
a5560ad05a solutionControl: Replace solveFlow control with frozenFlow
The old "solveFlow" keyword in sprayFoam and chtMultiRegionFoam is still
available for backwards compatibility
2018-02-21 10:34:36 +00:00
019c2c08dc Corrected spelling in comments
Resolves bug-report https://bugs.openfoam.org/view.php?id=2844
2018-02-13 22:17:53 +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
1d38e1c214 compressibleInterFoam: Improved pressure work term
Avoids accumulation of pressure work error caused by the continuity error which
is corrected-out during the PIMPLE loop.
2018-02-12 16:56:20 +00:00
5bff8d9dd1 IATE: Corrected dilatation source 2018-02-12 11:48:00 +00:00
b01118c806 MRF: Remove ddtCorr from MRF regions 2018-02-10 22:46:17 +00:00
2b76b83343 solutionControl: Made simple and pimple name convention consistent 2018-02-08 11:22:46 +00:00
852726c25f compressibleInterDyMFoam: Improved conservation for morphing mesh cases
Resolves bug-report https://bugs.openfoam.org/view.php?id=2824
2018-02-07 15:36:51 +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
d82cc36c5a OpenFOAM: Added support for extended precision scalar
OpenFOAM can now be compiled with single, double or long double scalars by
setting the WM_PRECISION_OPTION environment variable to either SP, DP or LP
respectively.

On most 64bit systems long double is stored as 128bit but computed in the
floating point hardware to 80bit.  Due to the increased storage compared to
double precision cache and memory access is significantly more time consuming
causing a slow-down of floating point intensive operations by a factor of 2 to
3.
2018-01-29 15:03:13 +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
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
504761e6c0 reactingEulerFoam: Improved documentation
Patch contributed by Institute of Fluid Dynamics,
Helmholtz-Zentrum Dresden - Rossendorf (HZDR)
2018-01-22 17:19:55 +00:00
799861f557 reactingTwoPhaseEulerFoam: Added ddtCorr to virtual mass time derivative
This removes a class of flux-velocity decoupling ("staggering") relating to the
interaction between the virtual mass, lift and turbulent dispersion forces.
2018-01-19 14:33:12 +00:00
600b75b75a chemFoam: Limit the initial time-step to that specified in controlDict 2018-01-11 10:42:15 +00:00
139523c17e Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2018-01-08 21:39:44 +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
9a35ce69a3 Time: Added running method to check running state without side effects
chtMultiRegionSimpleFoam needs to check whether or not the simulation is
at the end. To facilitate this, a Time::running method has been added.
The Time::run method was being used for this purpose, but this lead to
function objects being executed multiple times.

This resolves bug report https://bugs.openfoam.org/view.php?id=2804
2018-01-08 09:20:28 +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
79207b6147 reactingEulerFoam: improvements to population balance modeling
allow renormalization of sizeGroup volume fractions for restarts involving
initial conditions with a slight degree of unboundedness

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2018-01-04 17:20:28 +00:00
7fb371eb03 reactingEulerFoam::phasePair: Added const_iterator
which provides access to the current phase and the corresponding other phase for
each of the phases in the pair.  This allows some simplification of the phase
pair loops in several sub-models and avoids the need for pointer swaps.
2018-01-04 15:17:56 +00:00
868d01a70a reactingEulerFoam::HeatTransferPhaseSystem: Corrected new dmdt function
Patch contributed by Juho Peltola, VTT.
2018-01-03 12:07:16 +00:00
1e08de9b73 reactingEulerFoam: Simplified model expressions to make them more readable 2018-01-01 23:54:08 +00:00
739a0aa631 HrenyaSinclairViscosity: Simplified expression 2018-01-01 23:30:03 +00:00
26b20eb399 reactingEulerFoam: Added space after commas 2018-01-01 22:21:57 +00:00
cbe1e6e3b7 reactingEulerFoam::PhaseSystems: Updated phase pair "loops" 2018-01-01 22:12:13 +00:00
6a93b33e68 reactingEulerFoam: Corrected copyright dates of new files for populationBalance functionality
Patch contributed by HZDR
2018-01-01 20:15:22 +00:00
87c507d8c8 reactingMultiphaseEulerFoam: Updated using new pair "loop" structure 2018-01-01 16:58:42 +00:00
a9cb40b55b reactingEulerFoam::phasePair: Provide more convenient method to "loop" over pair
Checking a pair contains a particular phase and adding a contribution from the
"other" phase can now be written:

            if (pair.contains(phase))
            {
                const phaseModel& otherPhase = pair.other(phase);

                phiHbyAs[phasei] +=
                    fvc::interpolate(rAUs[phasei]*K)
                   *MRF.absolute(otherPhase.phi());

                HbyAs[phasei] += rAUs[phasei]*K*otherPhase.U();
            }

which previously would have been written as a loop over the pair and excluding
self reference:

            const phaseModel* phase1 = &pair.phase1();
            const phaseModel* phase2 = &pair.phase2();

            forAllConstIter(phasePair, pair, iter)
            {
                if (phase1 == &phase)
                {
                    phiHbyAs[phasei] +=
                        fvc::interpolate(rAUs[phasei]*K)
                       *MRF.absolute(phase2->phi());

                    HbyAs[phasei] += rAUs[phasei]*K*phase2->U();
                }

                Swap(phase1, phase2);
            }
2018-01-01 16:06:56 +00:00
8d4726cc73 reactingTwoPhaseEulerFoam::twoPhaseSystem: Updated dmdt function for consistency with reactingMultiphaseEulerFoam::reactingMultiphaseEulerFoam
Patch contributed by Juho Peltola, VTT
2018-01-01 15:37:34 +00:00
e779b244ce reactingEulerFoam: Corrected file permissions 2017-12-31 20:06:17 +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
cb7e1b9035 thermo: Macro renaming
Thermo and reaction thermo macros have been renamed and refactored. If
the name is plural (make???Thermos) then it adds the model to all
selection tables. If not (make???Thermo) then it only adds to the
requested psi or rho table.
2017-12-18 08:39:28 +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
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
ea51d79c0d basicSpecieThermo: Updated solver references to mixture class 2017-12-18 08:28:59 +00:00
43a942c99f reactingMultiphaseEulerFoam: Updated LTS support
for consistency with reactingEulerFoam
2017-12-12 18:13:50 +00:00
986a879bef reactingMultiphaseEulerFoam: Added support for face-based momentum equation formulation
The face-based momentum equation formulation introduced to twoPhaseEulerFoam by
commit 16f03f8a39 has proven particularly valuable
for bubbly flow simulations. The formulation is also available for
reactingTwoPhaseEulerFoam and this patch adds the the same capability to
reactingMultiphaseEulerFoam.

It be switched on by setting the optional faceMomentum entry in the PIMPLE
sub-dictionary in fvSolution:

PIMPLE
{
    nOuterCorrectors 3;
    nCorrectors      1;
    nNonOrthogonalCorrectors 0;
    faceMomentum     yes;
}

Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf
(HZDR) and VTT Technical Research Centre of Finland Ltd.
2017-12-12 13:43:59 +00:00
68afe78b9b combustionModel: Namespace changes
Wrapped combustion model make macros in the Foam namespace and removed
combustion model namespace from the base classes. This fixes a namespace
specialisation bug in gcc 4.8. It is also somewhat less verbose in the
solvers.

This resolves bug report https://bugs.openfoam.org/view.php?id=2787
2017-12-12 10:29:40 +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
862fa9e106 compressibleInterFoam family: Corrected transonic option
Resolves bug-report https://bugs.openfoam.org/view.php?id=2785
2017-12-09 21:03:59 +00:00
c88f7a7891 rhoPimpleFoam: Removed temporary diagnostic message 2017-12-08 12:23:26 +00:00
4cfb2edef1 multiphaseInterFoam: Merged dynamic mesh functionality of multiphaseInterDyMFoam into multiphaseInterFoam
and replaced multiphaseInterDyMFoam with a script which reports this change.

The multiphaseInterDyMFoam tutorials have been moved into the multiphaseInterFoam 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-12-01 15:51:21 +00:00
a830b9b3c1 basicSpecieMixture: Removed duplicated molecular weight mixing
Mixture molecular weight is now evaluated in heThermo like everything
else, relying on the low level specie mixing rules. Units have also been
corrected.
2017-12-01 14:51:37 +00:00
97cbfccb15 chemFoam: Moved chemistry reference into createFieldRefs 2017-12-01 14:43:36 +00:00
bf096ff7f4 interMixingFoam: Added support for mesh-motion and automatic refinement/unrefinement 2017-12-01 14:19:54 +00:00
ab1f6dc846 interMixingFoam, multiphaseInterFoam: Updated for changes to interFoam 2017-12-01 12:55:24 +00:00