Commit Graph

70 Commits

Author SHA1 Message Date
sergio
4bd1bd7522 BUG: Using autoPtr for turbulence in interFoam and interIsoFoam 2020-12-16 15:00:15 -08:00
Sergio Ferraris
3db12bbdef ENH: adding non-uniform rho to incompressible two-phase turbulent models
1) PhaseIncompressibleTurbulenceModel class was changed to use
   uniform alpha and non-uniform rho templates. This fits the need
   of incompressible two phase turbulence models.

2) A new type DPMIncompressibleTurbulenceModel was created for
   non-uniform alpha and uniform rho. It is  used in single phase flows
   in DPM solvers where alpha represents the volumen occupancy.

3) A new type incompressibleRhoTurbulenceModel  was created where
   non-uniform rho is allowed.

4) A new base templated turbulent class for two-phase VOF named
   VoFphaseTurbulentTransportModel was implemented which is created
   templating on PhaseIncompressibleTurbulenceModel and
   incompressibleRhoTurbulenceModel

5) In order to make the chnage to rho based VOF turbulence a help
   class was added incompressibleInterPhaseTransportModel templated
   on the mixing.
2020-12-16 17:57:45 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
5d9e278e92 ENH: consolidate handling of mandatory/optional command arguments
- for some special cases we wish to mark command-line arguments as
  being optional, in order to do our own treatment. For example,
  when an arbitrary number of arguments should be allowed.

  Now tag this situation with argList::noMandatoryArgs().
  The argList::argsMandatory() query can then be used in any further
  logic, including the standard default argument checking.

- with the new default check, can consolidate the special-purpose

      "setRootCaseNonMandatoryArgs.H"

  into the regular

      "setRootCase.H"

- revert to a simple "setRootCase.H" and move all the listing related
  bits to a "setRootCaseLists.H" file. This leaves the information
  available for solvers, or whoever else wishes, without being
  introduced everywhere.

- add include guards and scoping to the listing files and rename to
  something less generic.

     listOptions.H -> setRootCaseListOptions.H
     listOutput.H  -> setRootCaseListOutput.H
2018-12-13 01:45:09 +01:00
Mark Olesen
68ec561df8 STYLE: add usage notes to more utilities and solvers 2018-12-11 15:25:27 +01:00
Mark Olesen
2662042d49 ENH: improve controls for Time (issue #910)
- relocate some standard functionality to TimePaths to allow a lighter
  means of managing time directories without using the entire Time
  mechanism.

- optional enableLibs for Time construction (default is on)
  and a corresponding argList::noLibs() and "-no-libs" option

STYLE:

- mark Time::outputTime() as deprecated MAY-2016

- use pre-increment for runTime, although there is no difference in
  behaviour or performance.
2018-07-02 10:20:01 +02:00
Andrew Heather
b50bbc7ef2 ENH: Added new dry-run options to solvers 2018-01-11 14:23:17 +00:00
Henry Weller
ede4759b80 ENH: 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.

interMixingFoam, multiphaseInterFoam: Updated for changes to interFoam
2017-11-30 23:56:42 +00:00
Henry Weller
798ac98aef BUG: simpleFoam: moved createFvOptions.H into createFields.H for -postProcess option
To unsure fvOptions are instantiated for post-processing createFvOptions.H must
be included in createFields.H rather than in the solver directly.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2733

BUG: porousSimpleFoam: moved createFvOptions.H into createFields.H for -postProcess option

Resolves bug-report https://bugs.openfoam.org/view.php?id=2733

BUG: solvers: Moved fvOption construction into createFields.H for post-processing

This ensures that the fvOptions are constructed for the -postProcessing option
so that functionObjects which process fvOption data operate correctly in this
mode.
2017-10-23 22:20:52 +01:00
Mark Olesen
dd8341f659 ENH: make format of ExecutionTime = ... output configurable (issue #788)
- controlled by the the 'printExecutionFormat' InfoSwitch in
  etc/controlDict

      // Style for "ExecutionTime = " output
      // - 0 = seconds (with trailing 's')
      // - 1 = day-hh:mm:ss

   ExecutionTime = 112135.2 s  ClockTime = 113017 s

   ExecutionTime = 1-07:08:55.20  ClockTime = 1-07:23:37

- Callable via the new Time::printExecutionTime() method,
  which also helps to reduce clutter in the applications.
  Eg,

     runTime.printExecutionTime(Info);

  vs

     Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
         << "  ClockTime = " << runTime.elapsedClockTime() << " s"
         << nl << endl;

--

ENH: return elapsedClockTime() and clockTimeIncrement as double

- previously returned as time_t, which is less portable.
2018-04-27 15:00:34 +02:00
Andrew Heather
ff9d2c3a9c ENH: Updated frozenFlow option for interFoam and interIsoFoam 2017-06-23 11:43:55 +01:00
Andrew Heather
45381b1085 MRG: Integrated Foundation code to commit 19e602b 2017-03-28 11:30:10 +01:00
Andrew Heather
dcb1a95e35 MRG: Integrated Foundation code to commit 7d6845d 2017-03-23 14:33:33 +00:00
Henry Weller
86dc955605 interFoam family of solvers: Improved Crank-Nicolson implementation
Fewer limiter iterations are now required to obtain sufficient boundedness and
restart is more consistent.
2017-03-06 17:34:10 +00:00
Henry Weller
ba4eefae1d interFoam, interDyMFoam: Removed duplicate include 2017-02-08 20:47:59 +00:00
Andrew Heather
bd0e982d99 MRG: Initial commit after latest Foundation merge 2016-09-30 11:16:28 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
b32bd3f295 solvers: Moved createRDeltaT.H into createFields.H so that it is available with the -postProcess option
Required to support LTS with the -postProcess option with sub-models dependent on ddt
terms during construction, in particular reactingTwoPhaseEulerFoam.
2016-09-19 22:08:39 +01:00
Henry Weller
38916e66bb applications/solvers/multiphase: Added -postProcess option
See also commit cc455173ff
2016-05-08 20:57:08 +01:00
Henry Weller
fce8d0310d interFoam: Added -postProcess option
See also commit cc455173ff
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1301
2016-05-08 14:32:23 +01:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01: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
Andrew Heather
8f1d043364 GIT: Resolved conflict 2015-12-09 09:32:38 +00:00
Andrew Heather
b594d73c65 ENH: Solvers - updated group documentation 2015-12-03 22:05:55 +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
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
91e04d69c1 Resolve various unimportant warning messages from Gcc, Clang and Icpc 2015-07-19 11:31:49 +01:00
Henry Weller
d14e8ed169 interFoam: Change construction order 2015-06-26 18:54:37 +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
c3ee2348a6 MRF: Separate MRF from fvOptions
fvOptions does not have the appropriate structure to support MRF as it
is based on option selection by user-specified fields whereas MRF MUST
be applied to all velocity fields in the particular solver.  A
consequence of the particular design choices in fvOptions made it
difficult to support MRF for multiphase and it is easier to support
frame-related and field related options separately.

Currently the MRF functionality provided supports only rotations but
the structure will be generalized to support other frame motions
including linear acceleration, SRF rotation and 6DoF which will be
run-time selectable.
2015-05-29 23:35:43 +01:00
Henry
bd3cbd4c37 LTSinterFoam: test for localEuler as a valid scheme in the new alphaEqn 2015-02-20 22:47:51 +00:00
Henry
1ace10b372 interFoam family: Add support for MULES-bounded Crank-Nicolson 2nd-order ddt(alpha)
This is an experimental feature demonstrating the potential of MULES to
create bounded solution which are 2nd-order in time AND space.

Crank-Nicolson may be selected on U and/or alpha but will only be fully
2nd-order if used on both within the PIMPLE-loop to converge the
interaction between the flux and phase-fraction.  Note also that
Crank-Nicolson may not be used with sub-cycling but all the features of
semi-implicit MULES are available in particular MULESCorr and
alphaApplyPrevCorr.

Examples of ddt specification:

ddtSchemes
{
    default         Euler;
}

ddtSchemes
{
    default         CrankNicolson 0.9;
}

ddtSchemes
{
    default         none;
    ddt(alpha)      CrankNicolson 0.9;
    ddt(rho,U)      CrankNicolson 0.9;
}

ddtSchemes
{
    default         none;
    ddt(alpha)      Euler;
    ddt(rho,U)      CrankNicolson 0.9;
}

ddtSchemes
{
    default         none;
    ddt(alpha)      CrankNicolson 0.9;
    ddt(rho,U)      Euler;
}

In these examples a small amount of off-centering in used to stabilize
the Crank-Nicolson scheme.  Also the specification for alpha1 is via the
generic phase-fraction name to ensure in multiphase solvers (when
Crank-Nicolson support is added) the scheme is identical for all phase
fractions.
2015-02-20 15:59:43 +00:00
Henry
91ffedbeb2 Solvers: Rationalized correctPhi 2015-02-11 13:22:24 +00:00
Henry
45461bfcfe solvers: rationalize the construction of the fvOptions 2015-02-10 18:33:45 +00:00
Henry
2aec249647 Updated the whole of OpenFOAM to use the new templated TurbulenceModels library
The old separate incompressible and compressible libraries have been removed.

Most of the commonly used RANS and LES models have been upgraded to the
new framework but there are a few missing which will be added over the
next few days, in particular the realizable k-epsilon model.  Some of
the less common incompressible RANS models have been introduced into the
new library instantiated for incompressible flow only.  If they prove to
be generally useful they can be templated for compressible and
multiphase application.

The Spalart-Allmaras DDES and IDDES models have been thoroughly
debugged, removing serious errors concerning the use of S rather than
Omega.

The compressible instances of the models have been augmented by a simple
backward-compatible eddyDiffusivity model for thermal transport based on
alphat and alphaEff.  This will be replaced with a separate run-time
selectable thermal transport model framework in a few weeks.

For simplicity and ease of maintenance and further development the
turbulent transport and wall modeling is based on nut/nuEff rather than
mut/muEff for compressible models so that all forms of turbulence models
can use the same wall-functions and other BCs.

All turbulence model selection made in the constant/turbulenceProperties
dictionary with RAS and LES as sub-dictionaries rather than in separate
files which added huge complexity for multiphase.

All tutorials have been updated so study the changes and update your own
cases by comparison with similar cases provided.

Sorry for the inconvenience in the break in backward-compatibility but
this update to the turbulence modeling is an essential step in the
future of OpenFOAM to allow more models to be added and maintained for a
wider range of cases and physics.  Over the next weeks and months more
turbulence models will be added of single and multiphase flow, more
additional sub-models and further development and testing of existing
models.  I hope this brings benefits to all OpenFOAM users.

Henry G. Weller
2015-01-21 19:21:39 +00:00
Henry
9873774ee9 VoF solvers: rationalize the relationship between VoF solvers
Improve code reuse
Add multiphaseInterDyMFoam
Retire MRFinterFoam -> now handled by interFoam with fvOptions
Update tutorials
2014-04-29 14:16:41 +01:00
Henry
e6236340b5 Removed alphaOuterCorrectors option because the mass-flux should be updated for all PIMPLE iterations
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1225
2014-03-17 21:31:09 +00:00
Henry
7429f59358 VoF solvers: Updated PC-MULES 2013-11-26 21:16:51 +00:00
Henry
f5fd050293 VoF solvers: phase-fraction equation and move mesh motion into PIMPLE loop 2013-10-30 12:50:12 +00:00
Henry
b994d6a11f MULES: Added support for predictor-corrector formulation to interFoam and LTSInterFoam 2013-10-27 21:00:46 +00:00
Henry
ada61bfe2c Rationalise correctPhi in VoF solvers 2013-09-11 16:18:41 +01:00
Henry
08baa6eda6 fixedFluxPressure BC: the snGrad is now pushed into the BC from pEqn.H rather than being evaluated in the BC 2013-09-11 00:10:00 +01:00
Henry
c205857f0b interPhaseChangeFoam: Improve consistency with current interFoam 2013-04-28 21:53:30 +01:00
Henry
d53245c833 Multiphase: Update all solvers to accommodate the split between twoPhaseMixture and incompressibleTwoPhaseMixture 2013-02-07 12:31:00 +00:00
andy
d2b84dc511 ENH: Updated fieldSources->fvOptions for solvers 2013-01-08 09:38:01 +00:00
Henry
281422ccbf interFoam family: added generic sources support in momentum equation 2012-12-07 17:52:18 +00:00
Henry
6138cf6d47 Update headers 2012-10-24 17:25:12 +01:00
Henry
766abbc075 multiphase solver: Update and rationalize the alphaEqnSubCycling.H 2012-10-24 17:25:00 +01:00
andy
d05c5a41a1 ENH: Updated PIMPLE solvers to new pimpleControl framework 2011-10-26 12:04:25 +01:00