Commit Graph

1751 Commits

Author SHA1 Message Date
Henry Weller
730f89dc9d Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required 2016-03-22 17:46:52 +00:00
Henry Weller
cb65ba71d7 Made all template declarations consistent using 'class' rather than 'typename' 2016-03-22 15:02:55 +00:00
Henry Weller
665f5243b1 reactingEulerFoam: Moved fluid.correctThermo() into energy corrector loop
to update the interfacial temperature.
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2029
2016-03-17 08:05:08 +00:00
Henry Weller
01cdde52b9 driftFluxFoam/relativeVelocityModels/general/general:: Corrected construction of residualAlpha 2016-03-15 20:33:06 +00:00
Henry Weller
e57874859a Updated Doxygen documentation and files
Contributed by Bruno Santos
Resolves patch report http://www.openfoam.org/mantisbt/view.php?id=2023

Update online documentation http://openfoam.github.io/Documentation-dev/html/
2016-03-14 11:00:24 +00:00
Henry Weller
e5045949f6 JohnsonJacksonParticle*FvPatchScalarField.C: Corrected null-construction initialization
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=2022
2016-03-08 14:13:05 +00:00
Henry Weller
8a93701ef2 simpleFoam, SRFSimpleFoam: Added momentumPredictor option 2016-03-07 15:27:01 +00:00
Henry Weller
0f5059927c reactingTwoPhaseEulerFoam: Corrected mass exchange terms in the face-momentum equation
Thanks to Juho Peltola for the patch
2016-03-06 19:02:43 +00:00
Henry Weller
7ba41e0095 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
Henry Weller
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
Henry Weller
cd852be3da OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
2016-02-26 17:31:28 +00:00
Henry Weller
37c1c04487 reactingTwoPhaseEulerFoam/Make/options: Removed temporary debug option 2016-02-24 14:05:20 +00:00
Henry Weller
c02bf70ea7 tmp: Improved reference count checks to provide better error diagnostics
in case of tmp misuse.

Simplified tmp reuse pattern in field algebra to use tmp copy and
assignment rather than the complex delayed call to 'ptr()'.

Removed support for unused non-const 'REF' storage of non-tmp objects due to C++
limitation in constructor overloading: if both tmp(T&) and tmp(const T&)
constructors are provided resolution is ambiguous.

The turbulence libraries have been upgraded and '-DCONST_TMP' option
specified in the 'options' file to switch to the new 'tmp' behavior.
2016-02-24 12:47:36 +00:00
Henry Weller
15b7e87da7 tmp: Updated to store and preserve the const-ness of the reference to a constant object
This change requires that the de-reference operator '()' returns a
const-reference to the object stored irrespective of the const-ness of
object stored and the new member function 'ref()' is provided to return
an non-const reference to stored object which throws a fatal error if the
stored object is const.

In order to smooth the transition to this new safer 'tmp' the now
deprecated and unsafe non-const de-reference operator '()' is still
provided by default but may be switched-off with the compilation switch
'CONST_TMP'.

The main OpenFOAM library has already been upgraded and '-DCONST_TMP'
option specified in the 'options' file to switch to the new 'tmp'
behavior.  The rest of OpenFOAM-dev will be upgraded over the following
few weeks.

Henry G. Weller
CFD Direct
2016-02-22 16:23:21 +00:00
Henry Weller
99a10ecea6 Boundary conditions: Added extrapolatedCalculatedFvPatchField
To be used instead of zeroGradientFvPatchField for temporary fields for
which zero-gradient extrapolation is use to evaluate the boundary field
but avoiding fields derived from temporary field using field algebra
inheriting the zeroGradient boundary condition by the reuse of the
temporary field storage.

zeroGradientFvPatchField should not be used as the default patch field
for any temporary fields and should be avoided for non-temporary fields
except where it is clearly appropriate;
extrapolatedCalculatedFvPatchField and calculatedFvPatchField are
generally more suitable defaults depending on the manner in which the
boundary values are specified or evaluated.

The entire OpenFOAM-dev code-base has been updated following the above
recommendations.

Henry G. Weller
CFD Direct
2016-02-20 22:44:37 +00:00
Henry Weller
46df3ab456 kineticTheoryModel: Corrected handling of the SuSp term in the Theta equation
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2002
2016-02-19 13:26:41 +00:00
Henry Weller
8b71babfdd interFoam, interMixingFoam, interPhaseChangeFoam: construct rho with calculated BCs
Avoids problems with inherited complex BCs for which the controlling
fields and parameters are not initialized.
2016-02-18 21:26:25 +00:00
Henry Weller
9162fedfc4 chemFoam: use default (empty) BCs for U rather than inheriting from p 2016-02-18 21:18:54 +00:00
Henry Weller
aa81dee52d sprayEngineFoam: Corrected included pEqn.H
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2000
2016-02-18 08:27:21 +00:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
fc2ce73723 Solvers: Added support for extrapolated pressure boundary conditions
The boundary conditions of HbyA are now constrained by the new "constrainHbyA"
function which applies the velocity boundary values for patches for which the
velocity cannot be modified by assignment and pressure extrapolation is
not specified via the new
"fixedFluxExtrapolatedPressureFvPatchScalarField".

The new function "constrainPressure" sets the pressure gradient
appropriately for "fixedFluxPressureFvPatchScalarField" and
"fixedFluxExtrapolatedPressureFvPatchScalarField" boundary conditions to
ensure the evaluated flux corresponds to the known velocity values at
the boundary.

The "fixedFluxPressureFvPatchScalarField" boundary condition operates
exactly as before, ensuring the correct flux at fixed-flux boundaries by
compensating for the body forces (gravity in particular) with the
pressure gradient.

The new "fixedFluxExtrapolatedPressureFvPatchScalarField" boundary
condition may be used for cases with or without body-forces to set the
pressure gradient to compensate not only for the body-force but also the
extrapolated "HbyA" which provides a second-order boundary condition for
pressure.  This is useful for a range a problems including impinging
flow, extrapolated inlet conditions with body-forces or for highly
viscous flows, pressure-induced separation etc.  To test this boundary
condition at walls in the motorBike tutorial case set

    lowerWall
    {
        type            fixedFluxExtrapolatedPressure;
    }

    motorBikeGroup
    {
        type            fixedFluxExtrapolatedPressure;
    }

Currently the new extrapolated pressure boundary condition is supported
for all incompressible and sub-sonic compressible solvers except those
providing implicit and tensorial porosity support.  The approach will be
extended to cover these solvers and options in the future.

Note: the extrapolated pressure boundary condition is experimental and
requires further testing to assess the range of applicability,
stability, accuracy etc.

Henry G. Weller
CFD Direct Ltd.
2016-02-13 17:48:26 +00:00
Henry Weller
566512bc28 driftFluxFoam: Set Udm BCs to type calculated 2016-02-11 08:48:15 +00:00
Henry Weller
3205337e81 scalarTransportFoam: Added support for steady-state solution and all fvOptions
Optional under-relaxation is provided for steady-state solution.
Added missing fvOptions.constrain and fvOptions.correct calls.
2016-01-19 21:20:03 +00:00
Henry Weller
bbb5a8086a reactingEulerFoam/interfacialModels/wallLubricationModels: Apply zero-gradient condition at walls 2016-01-19 15:26:42 +00:00
Henry Weller
8effc018c1 reactingEulerFoam,twoPhaseEulerFoam: Corrected pressure equations for transonic operation
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=1971
2016-01-17 11:02:21 +00:00
Henry Weller
f19f48132e Consistently indent continuation backslashes in macro definitions 2016-01-11 13:00:56 +00:00
Henry Weller
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
Henry Weller
75cf86b769 Correct formatting: "forAll (" -> "forAll("
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1967
2016-01-09 23:10:16 +00:00
Henry Weller
2647d178fa solvers: Change from pure RAS to any turbulence model
Provides support for running laminar.
2015-12-16 10:13:09 +00:00
Henry Weller
4976c6e522 SRFSimpleFoam: Change from pure RAS to any turbulence model
Provides support for running laminar.
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1951
2015-12-15 19:05:08 +00:00
Henry Weller
fc98b1f6dc reactingEulerFoam/interfacialModels/dragModels/TomiyamaKataokaZunSakaguchi: New drag model
Drag model for gas-liquid system of Tomiyama et al.

Reference:
    "Drag coefficients of single bubbles under normal and microgravity
     conditions"
    Tomiyama, A., Kataoka, I., Zun, I., Sakaguchi, T.
    JSME International Series B, Fluids and Thermal Engineering,
    Vol. 41, 1998, pp. 472-479

Provided by Alberto Passalacq
2015-12-09 16:51:46 +00:00
Henry Weller
4930a5169a reactingMultiphaseEulerFoam: Correct and test LTS support 2015-12-09 15:39:45 +00:00
Henry Weller
1d893a0bd6 reactingEulerFoam: Move LTS controls maxCo, maxDeltaT and rDeltaTSmoothingCoeff into the PIMPLE sub-dictionary
For consistency with all other solvers supporting the LTS option
2015-12-09 15:38:09 +00:00
Henry Weller
fb871828a5 fvPatchFields, fvsPatchFields, pointPatchFields: specifically declare namespace of functions
It is better to declare the namespace of each function in the C file
rather than "open" the namespace as this may lead to inconsistencies
between the declaration in the H files and definition in the C file.
2015-12-08 22:29:05 +00:00
Henry Weller
17cc8483ef saturationModels/Antoine: Corrected dimensions in Tsat
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1940
2015-12-05 16:12:57 +00:00
Henry Weller
4025d6ebdd reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels: Added support for fvOptions 2015-12-03 16:39:13 +00:00
Henry Weller
a52cae9102 reactingEulerFoam: Lookup fvOptions from the mesh rather than construct a local copy 2015-12-02 15:39:45 +00:00
Henry Weller
736621b945 fvOptions: Reorganized and updated to simplify use in sub-models and maintenance
fvOptions are transferred to the database on construction using
fv::options::New which returns a reference.  The same function can be
use for construction and lookup so that fvOptions are now entirely
demand-driven.

The abstract base-classes for fvOptions now reside in the finiteVolume
library simplifying compilation and linkage.  The concrete
implementations of fvOptions are still in the single monolithic
fvOptions library but in the future this will be separated into smaller
libraries based on application area which may be linked at run-time in
the same manner as functionObjects.
2015-12-02 11:49:52 +00:00
Henry Weller
ba2f46f12a applications: Added fvOptions library to link 2015-12-01 16:09:19 +00:00
Henry Weller
3dfe844d9a applications/solvers: Added call to validate the turbulence model after construction
See also commit 52d83407f3
2015-12-01 10:25:38 +00:00
Henry Weller
90afa6ddb5 adjointShapeOptimizationFoam: Added support for fvOptions 2015-12-01 10:05:44 +00:00
Henry Weller
d7c56992e3 boundaryFoam: Added support for fvOptions 2015-12-01 10:05:22 +00:00
Henry Weller
8995550787 PDRFoam: Added support for fvOptions 2015-12-01 10:04:56 +00:00
Henry Weller
d047107489 chtMultiRegionFoam, chtMultiRegionSimpleFoam, buoyantPimpleFoam, buoyantSimpleFoam: Added support for hRef 2015-11-30 16:29:10 +00:00
Henry Weller
402c8710d9 alphatWallBoilingWallFunctionFvPatchScalarField: Updated to compile SP 2015-11-29 21:40:16 +00:00
Henry Weller
c0ddac32ae turbulenceModels/RAS/kEpsilon/kEpsilon: Added experimental support for fvOptions 2015-11-28 19:07:42 +00:00
Henry Weller
2dbf835485 reactingTwoPhaseEulerFoam: Added thermal wall-functions with support for wall-boiling
Code and tutorial case provided by Juho Peltola
2015-11-27 18:51:23 +00:00
Henry Weller
0a7ce682d2 fixedMultiPhaseHeatFlux: Corrected patch kappaEff evaluation 2015-11-24 11:09:50 +00:00
Henry Weller
c40faa99e6 fixedMultiPhaseHeatFlux: Added optional relaxation 2015-11-23 16:52:18 +00:00
Henry Weller
cb04874671 alphatFixedDmdtWallBoilingWallFunction: Obtain the turbulence model directly from the phase 2015-11-23 14:59:46 +00:00