Commit Graph

16586 Commits

Author SHA1 Message Date
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
f4ba71ddd0 OpenFOAM libraries: Updated to use the new const-safe tmp 2016-02-26 08:13:59 +00:00
e1405f2260 FieldField, DimensionedField, GeometricField: Simplified tmp reuse and cleanup 2016-02-25 18:29:00 +00:00
85fa6c2649 Field: Simplified tmp reuse and cleanup 2016-02-25 15:07:14 +00:00
dfa89cf8ee tmp: Improved diagnostics in case of inappropriate reuse 2016-02-25 11:48:15 +00:00
acac7d786b tutorials: Added missing 'value' entry for 'calculatedFvPatchField's 2016-02-24 16:21:50 +00:00
271935c1bf calculatedFvPatchField: 'value' entry is now required to avoid problems with non-initialization 2016-02-24 16:01:40 +00:00
65edfca2f9 wallDist: Updated for new 'tmp' 2016-02-24 15:57:17 +00:00
37c1c04487 reactingTwoPhaseEulerFoam/Make/options: Removed temporary debug option 2016-02-24 14:05:20 +00:00
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
5a74397fe4 refineMesh: Added customizable direction fields to multiDirRefinement
Contribution provided by Bruno Santos
Resolves feature request http://www.openfoam.org/mantisbt/view.php?id=2004
2016-02-22 17:06:18 +00:00
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
96b0f62d04 surfaceCoarsen: Changed List<::... to List< ::... for gcc-4.5 2016-02-21 09:03:39 +00:00
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
979e1ee191 tutorials/combustion/reactingFoam: ras -> laminar 2016-02-19 15:13:52 +00:00
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
e12e1b172d tutorials/.*/bubbleColumn: Corrected name of temperature fields
Resolves bug-report http://openfoam.org/mantisbt/view.php?id=2003
2016-02-19 12:19:32 +00:00
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
9162fedfc4 chemFoam: use default (empty) BCs for U rather than inheriting from p 2016-02-18 21:18:54 +00:00
f8aa84e5c1 tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff: Updated for change in U boundary condition update order 2016-02-18 21:15:57 +00:00
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
c6eb7091d6 PengRobinsonGas: Added thermodynamic departure functions 2016-02-17 15:17:52 +00:00
6a5d0b57ca Updated headers 2016-02-17 10:53:57 +00:00
e77938ac02 thermophysicalModels: Added support for thermodynamic departure functions 2016-02-17 10:48:30 +00:00
154fb5012f etc/config.sh/paraview: Reformatted
Patch provided by Bruno Santos
See http://www.openfoam.org/mantisbt/view.php?id=1232
2016-02-16 08:48:02 +00:00
caed25f447 Code templates: Updated headers 2016-02-15 20:53:21 +00:00
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
0196822968 MPPICFoam PackingModels: Implicit: Added limiting to the calculation of the correction flux.
Vastly reduces the scattering and churning behaviour of packed beds.

Development provided by Will Bainbridge <github.com/will-bainbridge>

See also http://www.openfoam.org/mantisbt/view.php?id=1994
2016-02-15 18:00:20 +00:00
d2d007f00e foamRunTutorials: Removed redundant code and simplified 2016-02-15 16:36:58 +00:00
4bb7f08e8c constrainPressure: Updated to use the more efficient patch-based MRF::relative function 2016-02-15 15:53:04 +00:00
618bf48a61 MRFZone: Added patch-based "relative" function 2016-02-15 15:52:33 +00:00
cfa7678ba8 foamRunTutorials: Rationalized support for the "-test" option
RunFunctions: Added "isTest()" argument parsing function
tutorials: Updated Allrun scripts to propagate the "-test" option
tutorials: Removed the lower Alltest scripts and updated the Allrun to
    use the "isTest()" function to handle test-specific operation
2016-02-15 15:49:05 +00:00
3faa7e2284 fixedMeanFvPatchField: Updated reading of "meanValue"
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1995
2016-02-14 20:16:32 +00:00
caf3c353d3 tutorials: Simplified the Allrun and Allclean scripts 2016-02-14 18:32:34 +00:00
9cf419dc22 tutorials/multiphase/interFoam/ras/damBreakPorousBaffle: Use PIMPLE outer correctors to improve stability 2016-02-14 10:44:34 +00:00
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
e405c69c39 tutorials/incompressible/icoFoam: Simplified the handling of the wall BCs in cavityClipped 2016-02-12 18:09:21 +00:00
0315d654d9 tutorials: Add pFinal to PISO settings in icoFoam and mhdFoam tutorials 2016-02-12 15:48:10 +00:00
263864984e OpenFOAM/matrices/solution: Simplify debug messages for consistency 2016-02-12 14:45:53 +00:00
0326cbbd57 etc/config.*/paraview: Set ParaView-5.0.0 as the default for OpenFOAM-dev
to encourage testing and feedback
2016-02-12 14:28:12 +00:00
be0008b39a fvPatchFields: Added "assignable()" attribute
which returns true if the fvPatchField type provides an assignment operator
2016-02-12 14:26:49 +00:00
eef9853a23 valuePointPatchField: Change assignment to use the object's internalField rather than that of the argument
Avoids dependency on the state of the argument pointPatchField the
internalField of which may have been de-allocated
2016-02-12 14:12:05 +00:00
12b30732e1 GeometricField: Added another constructor from tmp<GeometricField>
which supports re-using the internalField storage
2016-02-12 14:11:04 +00:00
6fde55cbd6 tmp: Added assignment to pointer operator to initialize null-tmp to an allocated object
This is a convenient method to set a null-constructed tmp in a
conditional statement.
2016-02-12 14:08:38 +00:00
566512bc28 driftFluxFoam: Set Udm BCs to type calculated 2016-02-11 08:48:15 +00:00
01d8544916 etc/config.sh/paraview: Reset the default ParaView version to 4.4.0 2016-02-10 22:44:19 +00:00
69b59b6586 Renamed PV4Readers -> PVReaders to avoid confusion when compiling the reader for ParaView-5 2016-02-10 21:12:49 +00:00
629508a85a etc/README.org: Added mpi 2016-02-10 20:49:04 +00:00
177d3ecfe7 Update docs 2016-02-10 20:47:51 +00:00
9a7c6287a8 etc/config.*: Separate MPI settings into separate files and upgrade OpenMPI to 10.0.2 2016-02-10 20:46:24 +00:00