Commit Graph

1749 Commits

Author SHA1 Message Date
Henry Weller
85c79d8398 fvOptions: New buoyancyForce and buoyancyEnergy
Provides run-time selection of buoyancy sources for compressible solvers

Replaces the built-in buoyancy sources in XiFoam, reactingFoam and
rhoReactingFoam.

e.g. in constant/fvOptions specify

momentumSource
{
    type            buoyancyForce;

    buoyancyForceCoeffs
    {
        fieldNames      (U);
    }
}

and optionally specify the buoyancy energy source in the enthalpy
equation:

energySource
{
    type            buoyancyEnergy;

    buoyancyEnergyCoeffs
    {
        fieldNames      (h);
    }
}

or internal energy equation

energySource
{
    type            buoyancyEnergy;

    buoyancyEnergyCoeffs
    {
        fieldNames      (e);
    }
}
2015-11-23 09:29:10 +00:00
Henry Weller
62945ab1ea chemFoam: Remove unused turbulence model 2015-11-21 18:30:35 +00:00
Henry Weller
341b5b832b reactingEulerFoam/interfacialCompositionModels/saturationModels/Antoine: Corrected Tsat expression
Patch provided by Daniel Jasinski
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1893
2015-11-21 10:41:46 +00:00
Henry Weller
d968ee30e1 TurbulenceModels: Improved instantiation of single-phase models in solvers
Simplifies lookup of RAS or LES models
2015-11-18 21:10:03 +00:00
Henry Weller
3050ff925a rhoReactingFoam: Updated to use the latest UEqn.H from reactingFoam 2015-11-18 21:09:10 +00:00
Henry Weller
91261b3047 reactingFoam: Added support for PIMPLE-consistent and pressure relaxation
Pressure relaxation is useful with LTS to damp acoustic waves
2015-11-18 09:34:16 +00:00
Henry Weller
9be1bc411c reactingEulerFoam: Updated phase-change support
Patches provided by Juho Peltola
2015-11-15 16:57:52 +00:00
Henry Weller
17fdf51000 reactingEulerFoam/interfacialModels/wallDampingModels: Added interpolatedWallDamping abstract base-class
To simplify linear, sine and cosine wall-damping implementation
2015-11-15 13:32:19 +00:00
Henry Weller
7197f68670 reactingEulerFoam/interfacialModels/wallDampingModels: Added cosine and sine damping functions 2015-11-14 21:25:09 +00:00
Henry Weller
6a59811e09 reactingEulerFoam/interfacialModels/liftModels: wallDampedLift
New lift model supporting near-wall damping using the new
wallDampingModels.

e.g.

lift
(
    (air in water)
    {
        type            wallDamped;
        lift
        {
            type            constantCoefficient;
            Cl              0.5;
        }
        wallDamping
        {
            type            linear;
            Cd              0.5;
        }
    }
);

in which a linear near-wall damping function min(y/(Cd*d), 1) is applied to the constant
coefficient lift model.  Additional wall-damping functions will be added.
2015-11-14 19:31:41 +00:00
Henry Weller
6fe856136d reactingTwoPhaseEulerFoam, reactingMultiphaseEulerFoam: Added nEnergyCorrectors
to allow iteration over the energy equations to improve stability for phase-change.
Additionally if nEnergyCorrectors is set to 0 the energy equations are
not solved which may be beneficial during the startup of some cases.
2015-11-13 22:06:52 +00:00
Henry Weller
e2ef006b91 applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 17:53:31 +00:00
Henry Weller
78d7482e5b SolverPerformance: Complete the integration of the templated SolverPerformance<Type>
Now solvers return solver performance information for all components
with backward compatibility provided by the "max" function which created
the scalar solverPerformance from the maximum component residuals from
the SolverPerformance<Type>.

The residuals functionObject has been upgraded to support
SolverPerformance<Type> so that now the initial residuals for all
(valid) components are tabulated, e.g. for the cavity tutorial case the
residuals for p, Ux and Uy are listed vs time.

Currently the residualControl option of pimpleControl and simpleControl
is supported in backward compatibility mode (only the maximum component
residual is considered) but in the future this will be upgraded to
support convergence control for the components individually.

This development started from patches provided by Bruno Santos, See
http://www.openfoam.org/mantisbt/view.php?id=1824
2015-11-10 08:50:11 +00:00
Henry Weller
5459e8cdf5 reactingEulerFoam: Moved dilatation from AnisothermalPhaseModel to MovingPhaseModel
to support phase volume fraction changes due to pressure
2015-11-06 15:35:50 +00:00
Henry Weller
56eb675679 reactingEulerFoam/phaseSystems/phasePair/orderedPhasePair: Correct lookup of the aspectRatio
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1899
2015-11-05 19:53:43 +00:00
Henry Weller
9221cd3cbd compressibleInterFoam, multiphaseMixtureThermo: Corrected laminar mixture kinematic viscosity 2015-11-05 16:08:30 +00:00
Henry Weller
42fb1b9e8e Updated notImplemented -> NotImplemented
The new NotImplemented macro uses __PRETTY_FUNCTION__ for GNU compatible
compilers otherwise __func__ to provide the function name string.
2015-11-01 10:26:37 +00:00
Henry Weller
c6fe72c6ad buoyantBoussinesqSimpleFoam: Add support for radiative heat-transfer consistent with buoyantBoussinesqPimpleFoam
Patch provided by Daniel Jasinski: http://www.openfoam.org/mantisbt/view.php?id=1856
2015-10-30 13:58:17 +00:00
Henry Weller
3d1f1267e5 reactingEulerFoam: Add polynomial saturation model
Provided by Juho Peltola
2015-10-29 22:42:42 +00:00
Henry Weller
93911ab950 Removed spurious log file 2015-10-27 16:26:51 +00:00
Henry Weller
37ba9605f1 chtMultiRegionFoam: Correct file permissions on solveSolid.H 2015-10-26 15:47:14 +00:00
Henry Weller
0741dc5b34 reactingEulerFoam: Updated handling of thermal diffusivity to support Prandtl number and thermal wall-functions 2015-10-22 22:44:59 +01:00
Henry Weller
11f35cc720 reactingTwoPhaseEulerFoam: Remove the build-in write of Ur
Ur can be generated using a functionObject or in the post-processor
2015-10-19 14:01:51 +01:00
Henry Weller
dae6a80f50 boundaryFoam: Remove unsupported 'parallel' option
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1868
2015-10-17 20:20:28 +01:00
Henry Weller
94f952ab04 reactingMultiphaseEulerFoam: Completed LTS support in multuphaseSystem 2015-10-05 22:42:12 +01:00
Henry Weller
9577ad2d23 reactingMultiphaseEulerFoam, multiphaseEulerFoam: Correct flux averaging for sub-cycling 2015-10-05 17:43:33 +01:00
Henry Weller
25040ad08a reactingTwoPhaseEulerFoam: Update cell-based UEqn
to use the transport matrix construction in MovingPhaseModel
2015-10-05 16:22:04 +01:00
Henry Weller
027909c737 dimensionedType: rationalize lookupOrDefault and lookupOrAddToDict
Now consistent with constructors.
2015-10-01 17:29:29 +01:00
Henry Weller
c8135cee57 reactingEulerFoam: Further improvements to the handling of mass-transfer
between incompressible and compressible phases
2015-09-25 19:00:07 +01:00
Henry Weller
c5955e4af4 reactingEulerFoam: Support compressibility and mass-transfer independently
Now combinations of incompressible, compressible phases with or without
mass-transfer are supported efficiently.
2015-09-25 17:54:55 +01:00
Henry Weller
6a3d9e9d82 reactingTwoPhaseEulerFoam: alphatFixedDmdtWallBoilingWallFunction: new BC to test wall boiling 2015-09-25 17:52:51 +01:00
Henry Weller
29cea780e1 reactingMultiphaseEulerFoam: Optimize the handling of optional forces 2015-09-18 18:55:21 +01:00
Henry Weller
1979194f36 reactingMultiphaseEulerFoam: Added support for turbulent dispersion 2015-09-17 22:55:08 +01:00
Henry Weller
3c71648ed5 reactingMultiphaseEulerFoam: Created local reference to the list of phases to avoid clutter 2015-09-17 09:48:30 +01:00
Henry Weller
1c203d4116 Renamed reactingEulerFoam phaseSystemTemplates.H -> phaseSystemTemplates.C
This file contains definitions rather than declarations
2015-09-17 09:47:27 +01:00
Henry Weller
6672e64327 reactingEulerFoam: Updated phase loops 2015-09-17 09:19:03 +01:00
Henry Weller
0859c15eb2 reactingMultiphaseEulerFoam: Removed debugging option 2015-09-16 22:22:37 +01:00
Henry Weller
c31789c34c reactingEulerFoam: Use PtrListDictionary for list/table of phases
This makes looping over the phases much simpler which maintaining
support for phase-name lookup.
2015-09-16 21:29:09 +01:00
Henry Weller
8d21b380ef Renamed phiAlpha -P alphaPhi for consistency with Euler-Euler solvers 2015-09-11 17:52:43 +01:00
Henry Weller
85b27f674f reactingMultiphaseEulerFoam: New Euler-Euler multiphase solver
Supporting any number of phases with heat and mass transfer, phase-change and reactions
2015-09-11 15:33:12 +01:00
Henry Weller
dd3f68b1fa reactingEulerFoam: Rationalize the phaseSystem base-class 2015-09-04 17:01:31 +01:00
Henry Weller
7405f7552e chtMultiRegionFoam: Updated temperature diagnostics
Patch provided by Daniel Jasinski
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=1843
2015-09-02 15:30:20 +01:00
Henry Weller
0c926959b4 reactingEulerFoam: Correct handling of phaseName in ReactingPhaseModel 2015-08-29 00:02:15 +01:00
Henry Weller
ffedbafee1 reactingEulerFoam/phaseSystem: Create an ordered container for phaseModels
The previous method using a HashTable required a separate ordered list
of names which is hard to work with and maintain.
2015-08-28 18:40:22 +01:00
Henry Weller
6f6c2ab024 twoPhaseEulerFoam: Added support for alphat and thermal wall-functions 2015-08-26 18:06:43 +01:00
Henry Weller
fb11bcc874 TurbulenceModels/compressible: Added correctEnergyTransport() function
to allow the turbulent energy transport properties to be updated for
every energy solution if required.

Added correctEnergyTransport() call to reactingTwoPhaseEulerFoam
2015-08-26 15:37:52 +01:00
Henry Weller
f5dc3eb8a7 reactingTwoPhaseEulerFoam: Moved into reactingEulerFoam
and two-phase functionality separated from multiphase functionality
2015-08-26 12:49:26 +01:00
Henry Weller
86cc19bd8b reactingTwoPhaseEulerFoam: Added support for thermal diffusivity and thermal wall-functions 2015-08-22 18:09:44 +01:00
Henry Weller
988b0fd3e1 ThermalDiffusivity: Refactored to support phase turbulence models 2015-08-20 17:54:51 +01:00
Henry Weller
dbfb7cf250 SchaefferFrictionalStress: Updated with alphaMinFriction
Resolved bug-report http://openfoam.org/mantisbt/view.php?id=1831
2015-08-19 16:30:51 +01:00
Henry Weller
24c7a739ff reactingTwoPhaseEulerFoam: Improved support for boiling/condensation
Includes many contributions from Juho Peltola
2015-08-19 13:45:49 +01:00
Henry Weller
0cf3ae4fda Compressible solver: correct initial Courant-number calculation
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1816
2015-08-07 15:55:46 +01:00
Henry Weller
584fed888d twoPhaseEulerFoam/interfacialModels/dragModels/WenYu: Corrected Re -> Re*alpha_g
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1794
2015-08-04 13:29:11 +01:00
Henry Weller
251526e024 Removed trailing whitespace
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1805
2015-08-01 15:43:05 +01:00
Henry Weller
365f9b0006 dimensioned<Type>: Added constructor from name, dimensions and dictionary
to simplify construction of dimensionedScalar properties and avoid the
duplication of the name string in the constructor call.
2015-07-21 12:57:07 +01:00
Henry Weller
4c21f24a8c Input of dimensionedScalars: update read-construction of dimensionedScalar in applications
so that the specification of the name and dimensions are optional in property dictionaries.

Update tutorials so that the name of the dimensionedScalar property is
no longer duplicated but optional dimensions are still provided and are
checked on read.
2015-07-20 22:52:53 +01:00
Henry Weller
7810d4327c SRFSimpleFoam, SRFPimpleFoam: Use absolute U for the production term in turbulence models
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1788
2015-07-19 19:05:06 +01:00
Henry Weller
91e04d69c1 Resolve various unimportant warning messages from Gcc, Clang and Icpc 2015-07-19 11:31:49 +01:00
Henry Weller
94401af010 Resolved issues with virtual function inheritance and warning from clang
Also removed __GNUC__ conditional compilation statements which are no
longer needed.
2015-07-17 12:11:37 +01:00
Henry Weller
d47a42458f reactingTwoPhaseEulerFoam: Added support for thermally-driven phase-change (boiling)
The interfacial temperature is assumed equal to the saturation
temperature.  Only a single species is considered volatile and the other
species to not affect the mass-transfer.
2015-07-16 14:12:03 +01:00
Henry Weller
0fb6a01280 fluxRequired: Added setFluxRequired function to fvSchemes class
Added calls to setFluxRequired for p, p_rgh etc. in all solvers which
avoids the need to add fluxRequired entries in fvSchemes dictionaries.
2015-07-15 21:57:16 +01:00
Henry Weller
15198a34bd fluxRequired: Added setFluxRequired function to fvSchemes class
Added calls to setFluxRequired for p in all incompressible solvers which
avoids the need to add fluxRequired entries in fvSchemes dictionary.

Will add calls to setFluxRequired to the rest of the solvers.
2015-07-15 15:04:51 +01:00
Henry Weller
0ce5742d6a saturationModels: Added a model for constant pSat and Tsat 2015-07-04 14:48:19 +01:00
Henry Weller
a752d3e588 saturationModels: Added Tsat function
Currently this is implemented only for the Antoine equation, for the
other more complex models an iterative inversion from pressure to
temperature is required.
2015-07-04 14:46:55 +01:00
Henry Weller
7c6e1386f1 reactingTwoPhaseEulerFoam: Completed mass-transfer terms in both forms of momentum equations 2015-07-03 23:18:25 +01:00
Henry Weller
9c9ac368fe reactingTwoPhaseEulerFoam: Replace x*pos(x) with posPart(x) and same for neg 2015-07-03 18:04:34 +01:00
Henry Weller
2ee2a52fff reactingTwoPhaseEulerFoam: Updated wmake files 2015-07-03 17:44:34 +01:00
Henry Weller
243accc6f6 reactingTwoPhaseEulerFoam: Renamed saturationPressureModel -> saturationModel
In preparation for adding the Tsat function
2015-07-03 16:15:09 +01:00
Henry Weller
08682ca3eb Removed temporary Info statement 2015-07-03 15:47:25 +01:00
Henry Weller
a92691b0dd reactingTwoPhaseEulerFoam: Added mass-exchange contribution to the cell-based momentum equations 2015-07-03 15:46:52 +01:00
Henry Weller
b0d107499b reactingTwoPhaseEulerFoam: Changed the handling of the energy transfer
for consistency with the evaluation of the interface temperature.
2015-07-03 15:45:56 +01:00
Henry Weller
68ea75a37c reactingTwoPhaseEulerFoam: Corrected handling of heat-transfer caused by mass-transfer 2015-07-02 22:51:06 +01:00
Henry Weller
be16ebf24f reactingTwoPhaseEulerFoam/pU/pEqn: Added missing dmdt terms 2015-07-02 22:50:44 +01:00
Henry Weller
d0f15d4e3c EEqn: Added rho*(U&g) source term
Generally this term has a VERY small effect on temperature, it is only
important for low-speed buoyancy-dominated flows.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1755

See also http://cfd.direct/openfoam/energy-equation/
2015-07-01 10:53:37 +01:00
Henry Weller
1f7b3883ff pimpleFoam: Caching 1/A is no longer necessary 2015-06-30 16:07:42 +01:00
Henry Weller
8b47981d3e pisoFoam: Added MRF and fvOptions support 2015-06-30 15:21:00 +01:00
Henry Weller
aa42c1f906 kOmegaSSTSato: Relocated to src/TurbulenceModels/phaseCompressible/RAS 2015-06-30 13:04:27 +01:00
Henry Weller
fd9d07413a LTS: Simplify the selection of LTS operation 2015-06-29 11:53:20 +01:00
Henry Weller
f92d657ab7 LTS: Formalize the naming of the rDeltaT and rSubDeltaT fields
Now the specification of the LTS time scheme is simply:

ddtSchemes
{
    default         localEuler;
}
2015-06-28 21:41:40 +01:00
Henry Weller
af8185c0a6 reactingParcelFoam, coalChemistryFoam: Added LTS support
Replaces LTSReactingParcelFoam and LTSCoalChemistryFoam

    Select LTS via the ddtScheme:

        ddtSchemes
        {
            default         localEuler rDeltaT;
        }
2015-06-28 11:01:04 +01:00
Henry Weller
01cb591ba5 rhoReactingFoam, rhoReactingBuoyantFoam: Added LTS support
Select LTS via the ddtScheme:

    ddtSchemes
    {
        default         localEuler rDeltaT;
    }
2015-06-27 22:41:00 +01:00
Henry Weller
64e831fea0 reactingFoam: Added run-time selectable LTS support replacing LTSReactingFoam
Select LTS via the ddtScheme:

    ddtSchemes
    {
        default         localEuler rDeltaT;
    }
2015-06-27 22:35:49 +01:00
Henry Weller
4180b6857d rhoPimpleFoam: Added run-time selectable LTS support replacing rhoLTSPimpleFoam
Select LTS via the ddtScheme:

        ddtSchemes
        {
            default         localEuler rDeltaT;
        }
2015-06-27 22:08:43 +01:00
Henry Weller
60cffb2fc3 pimpleFoam family: Added PIMPLEC (PIMPLE-consistent) support
Select using the optional

    consistent true;

setting in the PIMPLE dictionary of fvSolution.

This option is generally only beneficial for cases run in PIMPLE-mode
with a large maximum Courant number.
2015-06-27 18:56:24 +01:00
Henry Weller
8fc3d158ff rhoSimpleFoam: Added "consistent" option to replace rhoSimplecFoam
See tutorials/compressible/rhoSimpleFoam/squareBend

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    rhoMin          0.1;
    rhoMax          1.0;
    transonic       yes;
    consistent      yes;

    residualControl
    {
        p               1e-3;
        U               1e-4;
        e               1e-3;

        // possibly check turbulence fields
        "(k|epsilon|omega)" 1e-3;
    }
}

relaxationFactors
{
    fields
    {
        p               1;
        rho             1;
    }
    equations
    {
        p               1;
        U               0.9;
        e               0.9;
        k               0.9;
        epsilon         0.9;
    }
}
2015-06-27 17:42:59 +01:00
Henry Weller
8cad93c724 rhoPimpleFoam: Added "consistent" option to replace rhoPimplecFoam
e.g. in tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS

PIMPLE
{
    momentumPredictor   yes;
    transonic           no;
    nOuterCorrectors    50;
    nCorrectors         1;
    nNonOrthogonalCorrectors 0;
    consistent          yes;

    rhoMin          0.5;
    rhoMax          2.0;

    residualControl
    {
        "(U|k|epsilon)"
        {
            relTol          0;
            tolerance       0.0001;
        }
    }

    turbOnFinalIterOnly off;
}

relaxationFactors
{
    fields
    {
        "p.*"           0.9;
        "rho.*"         1;
    }
    equations
    {
        "U.*"           0.9;
        "h.*"           0.7;
        "(k|epsilon|omega).*" 0.8;
    }
}
2015-06-27 16:26:51 +01:00
Henry Weller
5c4b7b1640 Rename setrDeltaT to setRDeltaT 2015-06-27 15:33:39 +01:00
Henry Weller
a9fa0db19a Rename setrDeltaT to setRDeltaT 2015-06-27 15:33:04 +01:00
Henry Weller
ca81d01ca8 LTSReactingParcelFoam: Minor improvement 2015-06-27 12:30:10 +01:00
Henry Weller
edcc472535 reactingTwoPhaseEulerFoam: Removed superfluous trSubDeltaT field 2015-06-26 22:05:39 +01:00
Henry Weller
587c93574a LTS, MULES and sub-cycling: Improved the handling of the rSubDeltaT field 2015-06-26 21:58:27 +01:00
Henry Weller
d14e8ed169 interFoam: Change construction order 2015-06-26 18:54:37 +01:00
Henry Weller
1d16db3fa0 reactingTwoPhaseEulerFoam: Added experimental run-time selectable LTS support
Select LTS via the ddtScheme:

    ddtSchemes
    {
        default         localEuler rDeltaT;
    }

The LTS algorithm is currently controlled with the standard settings in
controlDict, e.g.:

    maxCo           0.5;
    maxDeltaT       2e-8;

with the addition of the optional rDeltaT smoothing coefficient:

    rDeltaTSmoothingCoeff 0.02;

which defaults to 0.02.

    ddtSchemes
    {
        default         localEuler rDeltaT;
    }
2015-06-26 18:52:23 +01:00
Henry Weller
e00ae44ad0 interFoam family: Added run-time selectable LTS support
LTS is selected by the ddt scheme e.g. in the
tutorials/multiphase/interFoam/ras/DTCHull case:

ddtSchemes
{
    default         localEuler rDeltaT;
}

LTSInterFoam is no longer needed now that interFoam includes LTS
support.
2015-06-26 18:32:20 +01:00
Henry Weller
bf95b5c286 reactingTwoPhaseEulerFoam: Change the implicit handling of phase-pressure and dispersion
to support any number of phases
2015-06-26 15:15:10 +01:00
Henry Weller
4d6823c3eb reactingTwoPhaseEulerFoam: Minor reorganization 2015-06-25 22:43:22 +01:00
Henry Weller
5d3d40392f reactingTwoPhaseEulerFoam: Add fvOption handling to the continuity error
correction in MovingPhaseModel<BasePhaseModel>::correct()
2015-06-25 22:29:08 +01:00
Henry Weller
e9ecd7ddef twoPhaseEulerFoam, reactingTwoPhaseEulerFoam: Removed duplicate files 2015-06-25 20:27:09 +01:00
Henry Weller
5ebf61eb41 smoluchowskiJumpTFvPatchScalarField: Updated use of basicThermo 2015-06-25 19:28:16 +01:00
Henry Weller
0f8d7e677d reactingTwoPhaseEulerFoam: Construct MRF and fvOptions in phaseSystem 2015-06-25 19:22:47 +01:00