Commit Graph

2116 Commits

Author SHA1 Message Date
Mark Olesen
751f11089a Merge remote-tracking branch 'origin/master' into develop 2017-07-20 12:17:26 +02:00
Mark Olesen
bc1f2fa97e STYLE: use auto and cfind to simplify selector usage (issue #512) 2017-07-03 10:36:03 +02:00
Mark Olesen
6a0a8b99b3 STYLE: use ""_deg user-literal for degrees to radians conversion
ENH: add degToRad() multiplier (useful for scalar fields)

- use degToRad() functions throughout instead of scattered local solutions
2017-07-04 15:36:46 +02:00
Mark Olesen
f55c568f13 ENH: upgrade from NamedEnum to Enum (issue #515) 2017-07-03 21:43:33 +02:00
Mark Olesen
aefb739584 STYLE: fix permissions on files, remove unused files 2017-07-03 12:15:41 +02:00
Andrew Heather
b9379426c9 ENH: Oriented fields - updated dependent code 2017-04-27 14:47:48 +01:00
Andrew Heather
976ad36776 ENH: Initial attempt to track oriented surface fields 2017-04-24 10:34:05 +01:00
Henry Weller
5c51836501 The "<type>Coeffs" sub-dictionary is now optional for most model parameters
except turbulence and lagrangian which will also be updated shortly.

For example in the nonNewtonianIcoFoam offsetCylinder tutorial the viscosity
model coefficients may be specified in the corresponding "<type>Coeffs"
sub-dictionary:

transportModel  CrossPowerLaw;

CrossPowerLawCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  0.01;
    nuInf       [0 2 -1 0 0 0 0]  10;
    m           [0 0 1 0 0 0 0]   0.4;
    n           [0 0 0 0 0 0 0]   3;
}

BirdCarreauCoeffs
{
    nu0         [0 2 -1 0 0 0 0]  1e-06;
    nuInf       [0 2 -1 0 0 0 0]  1e-06;
    k           [0 0 1 0 0 0 0]   0;
    n           [0 0 0 0 0 0 0]   1;
}

which allows a quick change between models, or using the simpler

transportModel  CrossPowerLaw;

nu0         [0 2 -1 0 0 0 0]  0.01;
nuInf       [0 2 -1 0 0 0 0]  10;
m           [0 0 1 0 0 0 0]   0.4;
n           [0 0 0 0 0 0 0]   3;

if quick switching between models is not required.

To support this more convenient parameter specification the inconsistent
specification of seedSampleSet in the streamLine and wallBoundedStreamLine
functionObjects had to be corrected from

    // Seeding method.
    seedSampleSet   uniform;  //cloud; //triSurfaceMeshPointSet;

    uniformCoeffs
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

to the simpler

    // Seeding method.
    seedSampleSet
    {
        type        uniform;
        axis        x;  //distance;

        // Note: tracks slightly offset so as not to be on a face
        start       (-1.001 -0.05 0.0011);
        end         (-1.001 -0.05 1.0011);
        nPoints     20;
    }

which also support the "<type>Coeffs" form

    // Seeding method.
    seedSampleSet
    {
        type        uniform;

        uniformCoeffs
        {
            axis        x;  //distance;

            // Note: tracks slightly offset so as not to be on a face
            start       (-1.001 -0.05 0.0011);
            end         (-1.001 -0.05 1.0011);
            nPoints     20;
        }
    }
2017-04-20 09:14:48 +01:00
sergio
73460a2993 Test on second order restart using backward time scheme 2017-04-18 14:04:27 -07:00
Chris Greenshields
23d9e2e912 Admin: fixed file permissions from wall boiling model refinements 2017-04-16 18:27:19 +01:00
Henry Weller
1805b3c98f radiationModel: Added "he" argument to the "Sh" function
for consistency with the other energy sources.
2017-04-13 13:57:33 +01:00
Henry Weller
5fd814896a reactingtwoPhaseEulerFoam: Wall boiling model refinements
Patch contributed by Juho Peltola, VTT.

Resolves patch request https://bugs.openfoam.org/view.php?id=2521
2017-04-12 14:31:35 +01:00
Henry Weller
aef09b8daf tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection: Improved stability
Main changes in the tutorial:
  - General cleanup of the phaseProperties of unnecessary entries
  - sensibleEnthalpy is used for both phases
  - setTimeStep functionObject is used to set a sharp reduction in time step near the start of the injection
  - Monitoring of pressure minimum and maximum

Patch contributed by Juho Peltola, VTT.
2017-04-11 20:48:32 +01:00
Henry Weller
707abb910e DPMDyMFoam, MPPICDyMFoam: New dynamic mesh versions of DPMFoam and MPPICFoam
supporting both mesh morphing and topology change.
2017-04-11 10:33:34 +01:00
Mark Olesen
b257e80d9a Merge remote-tracking branch 'origin/master' into develop 2017-04-07 09:28:26 +02:00
sergio
982c28d545 BUG: Gitlab issue 442. Resetting allLambda for phases in the alphaEqns.H for interMixingFoam 2017-04-05 13:58:45 -07:00
Henry Weller
97d12d8b43 surfaceTensionModels::liquidProperties: New temperature-dependent surface tension model
Description
    Temperature-dependent surface tension model in which the surface tension
    function provided by the phase Foam::liquidProperties class is used.

Usage
    \table
        Property     | Description               | Required    | Default value
        phase        | Phase name                | yes         |
    \endtable

    Example of the surface tension specification:
    \verbatim
        sigma
        {
            type    liquidProperties;
            phase   water;
        }
    \endverbatim

for use with e.g. compressibleInterFoam, see
tutorials/multiphase/compressibleInterFoam/laminar/depthCharge2D
2017-04-05 14:36:11 +01:00
Andrew Heather
111c1d2d12 ENH: Added include file to calculate the mechanical energy 2017-04-04 12:51:35 +01:00
sergio
4418c192c4 Deleting alphaEqn.H from overInterDyMFoam 2017-06-20 13:42:10 -07:00
Henry Weller
1f5b9dbbcf tutorials/multiphase: Removed unnecessary specification of name and dimensions for transport properties 2017-03-31 17:11:30 +01:00
Andrew Heather
fb724ce113 MRG: Integrated Foundation code to commit 9f37c3c 2017-03-31 15:34:28 +01:00
Henry Weller
dfd611aeac surfaceTensionModels: New class hierarchy for run-time selectable surface tension models
These models have been particularly designed for use in the VoF solvers, both
incompressible and compressible.  Currently constant and temperature dependent
surface tension models are provided but it easy to write models in which the
surface tension is evaluated from any fields held by the mesh database.
2017-03-31 14:32:38 +01:00
Andrew Heather
e6b67f6790 ENH: Clean-up after latest Foundation integrations 2017-03-28 14:21:07 +01:00
Andrew Heather
45381b1085 MRG: Integrated Foundation code to commit 19e602b 2017-03-28 11:30:10 +01:00
Henry Weller
054eec50ea surfaceFilmModels::contactAngleForce: Added temperatureDependentContactAngleForce
Created a base-class from contactAngleForce from which the
distributionContactAngleForce (for backward compatibility) and the new
temperatureDependentContactAngleForce are derived:

Description
    Temperature dependent contact angle force

    The contact angle in degrees is specified as a \c Function1 type, to
    enable the use of, e.g.  contant, polynomial, table values.

See also
    Foam::regionModels::surfaceFilmModels::contactAngleForce
    Foam::Function1Types

SourceFiles
    temperatureDependentContactAngleForce.C
2017-03-27 20:03:28 +01:00
Andrew Heather
b708c23cfc ENH: Clean-up after latest Foundation integrations 2017-03-27 14:34:01 +01:00
Henry Weller
5efae4cadf reactingTwoPhaseEulerFoam: Small change to avoid warning from wmkdep 2017-03-24 17:27:43 +00:00
Andrew Heather
dcb1a95e35 MRG: Integrated Foundation code to commit 7d6845d 2017-03-23 14:33:33 +00:00
Andrew Heather
436ec1cf1f MRG: Integrated Foundation code to commit ba4dbed 2017-03-23 12:11:49 +00:00
Andrew Heather
04c3d535b0 MRG: Integrated Foundation code to commit 47bd8e1 2017-03-23 10:12:38 +00:00
Henry Weller
ad65ac255a Diffusion number: Corrected in chtMultiRegionFoam and pyrolysisModels::reactingOneDim
Resolves bug-report https://bugs.openfoam.org/view.php?id=2512
2017-03-22 17:13:53 +00:00
Henry Weller
e66e402976 Merge branch 'master' of github.com-OpenFOAM:OpenFOAM/OpenFOAM-dev 2017-03-18 17:19:35 +00:00
Will Bainbridge
d401f1cfb4 reactingMultiphaseEulerFoam: Ensure that an unordered phase pair gets
generated whenever a BlendedInterfacialModel is created.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2472
2017-03-17 11:26:24 +00:00
Henry Weller
dc328945b1 reactingEulerFoam: Added fvOption support for incompressible phases 2017-03-14 11:56:01 +00:00
Henry Weller
d40363079c laplacianFoam: added fvOptions library
Resolves bug-report https://bugs.openfoam.org/view.php?id=2492
2017-03-13 08:50:17 +00:00
Henry Weller
96ad725a0b Updated UPstream::commsTypes to use the C++11 enum class 2017-03-10 19:54:55 +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
50516486a4 rhoPimpleFoam: Added support for transonic flow of liquids and real gases
Both stardard SIMPLE and the SIMPLEC (using the 'consistent' option in
fvSolution) are now supported for both subsonic and transonic flow of all
fluid types.

rhoPimpleFoam now instantiates the lower-level fluidThermo which instantiates
either a psiThermo or rhoThermo according to the 'type' specification in
thermophysicalProperties, see also commit a1c8cde310
2017-02-28 11:14:59 +00:00
Henry Weller
7515ea7550 reactingTwoPhaseEulerFoam::Lavieville: Corrected fLiquid function
Resolves bug-report https://bugs.openfoam.org/view.php?id=2477
2017-02-27 09:39:46 +00:00
Henry Weller
7d6845defa rhoSimpleFoam: Added support for transonic flow of liquids and real gases
Both stardard SIMPLE and the SIMPLEC (using the 'consistent' option in
fvSolution) are now supported for both subsonic and transonic flow of all
fluid types.
2017-02-24 16:20:06 +00:00
Andrew Heather
cbf793fca2 ENH: Updated header file documentation 2017-03-21 09:40:35 +00:00
Henry Weller
a1c8cde310 rhoSimpleFoam: added support for compressible liquid flows
rhoSimpleFoam now instantiates the lower-level fluidThermo which instantiates
either a psiThermo or rhoThermo according to the 'type' specification in
thermophysicalProperties, e.g.

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          janaf;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

instantiates a psiThermo for a perfect gas with JANAF thermodynamics, whereas

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    properties      liquid;
    energy          sensibleInternalEnergy;
}

mixture
{
    H2O;
}

instantiates a rhoThermo for water, see new tutorial
compressible/rhoSimpleFoam/squareBendLiq.

In order to support complex equations of state the pressure can no longer be
unlimited and rhoSimpleFoam now limits the pressure rather than the density to
handle start-up more robustly.

For backward compatibility 'rhoMin' and 'rhoMax' can still be used in the SIMPLE
sub-dictionary of fvSolution which are converted into 'pMax' and 'pMin' but it
is better to set either 'pMax' and 'pMin' directly or use the more convenient
'pMinFactor' and 'pMinFactor' from which 'pMax' and 'pMin' are calculated using
the fixed boundary pressure or reference pressure e.g.

SIMPLE
{
    nNonOrthogonalCorrectors 0;

    pMinFactor      0.1;
    pMaxFactor      1.5;

    transonic       yes;
    consistent      yes;

    residualControl
    {
        p               1e-3;
        U               1e-4;
        e               1e-3;
        "(k|epsilon|omega)" 1e-3;
    }
}
2017-02-24 11:18:01 +00:00
Mark Olesen
c1ca2f4a38 BUG: missing chdir in Allwclean for wallFunctionTable
STYLE: improve consistency in Allwclean scripts
2017-02-23 01:07:10 +01:00
Henry Weller
d2be645483 thermophysicalProperties: New base-class for liquidProperties and in the future gasProperties
Description
    Base-class for thermophysical properties of solids, liquids and gases
    providing an interface compatible with the templated thermodynamics
    packages.

liquidProperties, solidProperties and thermophysicalFunction libraries have been
combined with the new thermophysicalProperties class into a single
thermophysicalProperties library to simplify compilation and linkage of models,
libraries and applications dependent on these classes.
2017-02-18 21:53:20 +00:00
Henry Weller
c52e4b58a1 thermophysicalModels: Changed specie thermodynamics from mole to mass basis
The fundamental properties provided by the specie class hierarchy were
mole-based, i.e. provide the properties per mole whereas the fundamental
properties provided by the liquidProperties and solidProperties classes are
mass-based, i.e. per unit mass.  This inconsistency made it impossible to
instantiate the thermodynamics packages (rhoThermo, psiThermo) used by the FV
transport solvers on liquidProperties.  In order to combine VoF with film and/or
Lagrangian models it is essential that the physical propertied of the three
representations of the liquid are consistent which means that it is necessary to
instantiate the thermodynamics packages on liquidProperties.  This requires
either liquidProperties to be rewritten mole-based or the specie classes to be
rewritten mass-based.  Given that most of OpenFOAM solvers operate
mass-based (solve for mass-fractions and provide mass-fractions to sub-models it
is more consistent and efficient if the low-level thermodynamics is also
mass-based.

This commit includes all of the changes necessary for all of the thermodynamics
in OpenFOAM to operate mass-based and supports the instantiation of
thermodynamics packages on liquidProperties.

Note that most users, developers and contributors to OpenFOAM will not notice
any difference in the operation of the code except that the confusing

    nMoles     1;

entries in the thermophysicalProperties files are no longer needed or used and
have been removed in this commet.  The only substantial change to the internals
is that species thermodynamics are now "mixed" with mass rather than mole
fractions.  This is more convenient except for defining reaction equilibrium
thermodynamics for which the molar rather than mass composition is usually know.
The consequence of this can be seen in the adiabaticFlameT, equilibriumCO and
equilibriumFlameT utilities in which the species thermodynamics are
pre-multiplied by their molecular mass to effectively convert them to mole-basis
to simplify the definition of the reaction equilibrium thermodynamics, e.g. in
equilibriumCO

    // Reactants (mole-based)
    thermo FUEL(thermoData.subDict(fuelName)); FUEL *= FUEL.W();

    // Oxidant (mole-based)
    thermo O2(thermoData.subDict("O2")); O2 *= O2.W();
    thermo N2(thermoData.subDict("N2")); N2 *= N2.W();

    // Intermediates (mole-based)
    thermo H2(thermoData.subDict("H2")); H2 *= H2.W();

    // Products (mole-based)
    thermo CO2(thermoData.subDict("CO2")); CO2 *= CO2.W();
    thermo H2O(thermoData.subDict("H2O")); H2O *= H2O.W();
    thermo CO(thermoData.subDict("CO")); CO *= CO.W();

    // Product dissociation reactions

    thermo CO2BreakUp
    (
        CO2 == CO + 0.5*O2
    );

    thermo H2OBreakUp
    (
        H2O == H2 + 0.5*O2
    );

Please report any problems with this substantial but necessary rewrite of the
thermodynamic at https://bugs.openfoam.org

Henry G. Weller
CFD Direct Ltd.
2017-02-17 11:22:14 +00:00
Henry Weller
b167c95f19 compressibleInterFoam: Completed LTS and semi-implicit MULES support
Now the interFoam and compressibleInterFoam families of solvers use the same
alphaEqn formulation and supporting all of the MULES options without
code-duplication.

The semi-implicit MULES support allows running with significantly larger
time-steps but this does reduce the interface sharpness.
2017-02-09 17:31:57 +00:00
Henry Weller
6fc2a3dc58 compressibleInterFoam: More consistent with interFoam and added partial support for LTS 2017-02-08 20:50:07 +00:00
Henry Weller
ba4eefae1d interFoam, interDyMFoam: Removed duplicate include 2017-02-08 20:47:59 +00:00
Henry Weller
3879cf48fb interMixingFoam: Renamed alphaEqns.H and alphaEqnsSubCycle.H for consistency with interFoam 2017-02-08 20:46:31 +00:00
Henry Weller
29e83f3958 compressibleInterFoam: Added support for fvOptions in both the U and T equations 2017-02-07 18:59:40 +00:00
Henry Weller
8264c3b988 interDyMFoam: Reinstate alphaPhiCorr0 for moving meshes without topology change 2017-02-07 09:59:19 +00:00
Henry Weller
3d315f09f9 alphatWallBoilingWallFunctionFvPatchScalarField: Resolve restart issue
Patch contributed by Juho Peltola, VTT
Resolves patch request https://bugs.openfoam.org/view.php?id=2446
2017-01-30 16:39:36 +00:00
Henry Weller
9812d957c9 ThermalPhaseChangePhaseSystem: Improved robustness
Patch contributed by Juho Peltola, VTT.
Resolves patch request https://bugs.openfoam.org/view.php?id=2443
2017-01-30 16:37:27 +00:00
Henry Weller
5dd24f4968 Removed unhelpful clutter 2017-01-26 17:47:24 +00:00
Henry Weller
8f7228d6f3 interDyMFoam: delete alphaPhiCorr0 if the mesh changes
The previous time-step compression flux is not valid/accurate on the new mesh
and it is better to re-calculate it rather than map it from the previous mesh to
the new mesh.
2017-01-25 11:54:12 +00:00
Henry Weller
8632583934 Removed trailing blank lines
Resolves bug-report https://bugs.openfoam.org/view.php?id=2438
2017-01-19 20:17:47 +00:00
Henry Weller
1c2093c8b3 Multi-phase solvers: Improved handling of inflow/outflow BCs in MULES
Avoids slight phase-fraction unboundedness at entertainment BCs and improved
robustness.

Additionally the phase-fractions in the multi-phase (rather than two-phase)
solvers are adjusted to avoid the slow growth of inconsistency ("drift") caused
by solving for all of the phase-fractions rather than deriving one from the
others.
2017-01-17 22:43:47 +00:00
Andrew Heather
8701c57ecb BUG: Removed call to topoChanging(false) in interDyMFoam and compressibleInterDyMFoam - see #363 and 03db8627 2016-12-23 09:09:30 +00:00
Mark Olesen
608bb5d83b COMP: update lnInclude directories when building (issue #364)
- Could be related to interrupted builds.
  So if there are any parts of the build that rely on an explicit
  'wmakeLnInclude', make sure that the contents are properly updated.

--

ENH: improved feedback from top-level Allwmake

- Report which section (libraries, applications) is being built.

- Provide final summary of date, version, etc, which can be helpful
  for later diagnosis or record keeping.

- The -log=XXX option for Allwmake now accepts a directory name
  and automatically appends an appropriate log name.
  Eg,
      ./Allwmake -log=logs/  ->> logs/log.linux64GccDPInt32Opt

  The default name is built from the value of WM_OPTIONS.

--

BUG: shell not exiting properly in combination with -log option

- the use of 'tee' causes the shell to hang around.
  Added an explicit exit to catch this.

--

- Detecting the '-k' (-non-stop) option at the top-level Allwmake, which
  may improve robustness.

- Explicit continue-on-error for foamyMesh (as optional component)

- unify format of script messages for better readability

COMP: reduce warnings when building Pstream (old-style casts in openmpi)
2016-12-22 11:26:29 +01:00
Henry Weller
6cae0fdacb reactingFoam::setRDeltaT: Add support for limiting the local time-step by the reaction rates
e.g. in the reactingFoam/laminar/counterFlowFlame2DLTS tutorial:

PIMPLE
{
    momentumPredictor no;
    nOuterCorrectors  1;
    nCorrectors     1;
    nNonOrthogonalCorrectors 0;

    maxDeltaT       1e-2;
    maxCo           1;
    alphaTemp       0.05;
    alphaY          0.05;
    Yref
    {
        O2          0.1;
        ".*"        1;
    }
    rDeltaTSmoothingCoeff 1;
    rDeltaTDampingCoeff 1;
}

will limit the LTS time-step according to the rate of consumption of 'O2'
normalized by the reference mass-fraction of 0.1 and all other species
normalized by the reference mass-fraction of 1.  Additionally the time-step
factor of 'alphaY' is applied to all species.  Only the species specified in the
'Yref' sub-dictionary are included in the LTS limiter and if 'alphaY' is omitted
or set to 1 the reaction rates are not included in the LTS limiter.
2016-12-19 14:19:31 +00:00
sergio
a7c8d1cfca ENH: changing rhoSimpleFoam to rhothermo and bounding thermo.rho between minRho and maxRho.
Bounding thermo.rho in rhoPorousSimpleFoam.
Changing initial time step in externalSolarLoad tutorial.
Commenting out momemtun source term in steamInjection which causes problems
2016-12-19 15:39:13 -08:00
Andrew Heather
b53389edef GIT: Resolved conflict merging master into develop 2016-12-16 17:10:38 +00:00
Andrew Heather
267903077b ENH: interCondensingEvaporatingFoam - updated for postProcess utility; tidying 2016-12-16 13:33:19 +00:00
Henry Weller
b99817d924 Rationalized heat release rate functions
Combined 'dQ()' and 'Sh()' into 'Qdot()' which returns the heat-release rate in
the normal units [kg/m/s3] and used as the heat release rate source term in
the energy equations, to set the field 'Qdot' in several combustion solvers
and for the evaluation of the local time-step when running LTS.
2016-12-15 17:10:21 +00:00
sergio
d5301772f7 Update of interCondensingEvaporatingFoam and its tutorial 2016-12-15 12:36:48 -08:00
Andrew Heather
6baf1d7d8f Merge branch 'integration-ihcantabria' into 'develop'
Integration of ihcantabria wave models

Integration of functionality produced by The Environmental Hydraulics Institute "IHCantabria" (http://www.ihcantabria.com/en/)

- Original code introduced in commit 95e9467e
- Restructured and updated by OpenCFD into a new `waveModels` library available to the interFoam family of solvers

Main source:
`$FOAM_SRC/waveModels`

Tutorials:
`$FOAM_TUTORIALS/multiphase/interFoam/waveExample*`

Capabilities include:
- Wave generation
- Solitary wave using Boussinesq theory
- Cnoidal wave theory
- StokesI, StokesII, StokesV wave theory
    
- Active wave absorption at the inflow/outflow boundaries based on shallow water theory

IHCantabria Authors:
- Javier Lopez Lara (jav.lopez@unican.es)
- Gabriel Barajas (barajasg@unican.es)
- Inigo Losada (losadai@unican.es)

See merge request !88
2016-12-15 13:38:13 +00:00
Andrew Heather
bf9fcba645 ENH: Added waveModels library to interFoam family of solvers 2016-12-15 13:07:00 +00:00
Henry Weller
6fc22debc8 reactingTwoPhaseEulerFoam: Removed temporary debug option 2016-12-14 09:00:14 +00:00
Henry Weller
ab1fc22398 reactingTwoPhaseEulerFoam: Updated LTS support in the cell-based momentum algorithm 2016-12-13 15:47:24 +00:00
sergio
36f8895e78 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-12-13 07:20:39 -08:00
Henry Weller
5514b74922 sprayFoam: Explicitly write cloud when not solving flow 2016-12-13 13:19:22 +00:00
Henry Weller
eefddbc8a8 reactingTwoPhaseEulerFoam::partitioningModels::cosine: Corrected slope
Patch contributed by Juho Peltola, VTT.
2016-12-13 12:03:56 +00:00
sergio
c0a2c16f6c Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-12-12 10:36:33 -08:00
sergio
88128e0392 ENH: compressibleInterDyMFoam enhancements for mesh motion and sphere drop test case tutorial 2016-12-12 10:34:49 -08:00
Henry Weller
141a1df59b wallBoilingSubModels: Corrected references
Patch contributed by Juho Peltola, VTT
2016-12-12 16:58:52 +00:00
Henry Weller
f31623d337 pimpleControl: Added optional 'solveFlow' control
sprayFoam: Added support for the optional 'solveFlow' control to allow
           simulation of the spray evolution with all sub-models in a 'frozen'
           flow-field.
2016-12-12 14:35:21 +00:00
Andrew Heather
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
sergio
11479c51d7 ENH: Changes in handling topological changes in VOF solvers
1) Using divU instead of fvc::absolute(phi,U) in TEqn as the latter uses latest time meshPhi which is inconsistent
2) Adding fvc::interpolate(U) when topo changes
3) in pEq for compressible dgdt is updated using the latest rho1 and rho2 after compressible effects are considered
2016-12-07 12:57:32 -08:00
Henry Weller
5c7b3c7886 reactingTwoPhaseEulerFoam: Corrected LTS support
Resolves bug-report http://bugs.openfoam.org/view.php?id=2374
2016-12-06 09:30:50 +00:00
Henry Weller
a95b7aa6b7 alphatWallBoilingWallFunctionFvPatchScalarField.H: corrected mode 2016-12-05 20:08:24 +00:00
Henry Weller
304af9fc5f reactingTwoPhaseEulerFoam: Added LTS support to the face-momentum algorithm 2016-12-04 10:14:43 +00:00
Henry Weller
144e08e213 reactingEulerFoam: Updated to support zoneCombustion models 2016-12-01 15:16:19 +00:00
Mark Olesen
6f2b2aff40 STYLE: reduce script verbosity 2016-12-13 08:15:00 +01:00
Andrew Heather
1f826361c6 STYLE: Consistency updates to change input of <var>Name to <var>. Fixes #306 2016-11-22 14:50:33 +00:00
sergio
143e99194f ENH: Adding functionality to scalarTransport FO and residence time tutorials for VOF
and single phase cases. Registration of the compressed flux in interFoam as it is
needed for the FO if used.
2016-11-21 09:21:45 -08:00
Henry Weller
80db302666 Allwmake: Remove 'set -x' which generates a lot of noise
'set -x' should be used for debugging.

Added command printing into wmake and Allwmake as a replacement for
'set -x' to log current target.
2016-11-13 18:08:22 +00:00
Henry Weller
ad476af9b3 reactingEulerFoam, twoPhaseEulerFoam: Reinstated interfacial pressure-work
Added the interfacial pressure-work terms according to:

Ishii, M., Hibiki, T.,
Thermo-fluid dynamics of two-phase flow,
ISBN-10: 0-387-28321-8, 2006

While this is the most common approach to handling the interfacial
pressure-work it introduces numerical stability issues in regions of low
phase-fraction and rapid flow deformation.  To alleviate this problem an
optional limiter may be applied to the pressure-work term in either of
the energy forms.  This may specified in the
"thermophysicalProperties.<phase>" file, e.g.

pressureWorkAlphaLimit 1e-3;

which sets the pressure work term to 0 for phase-fractions below 1e-3.

For particularly unstable cases a limit of 1e-2 may be necessary.
2016-11-09 11:14:26 +00:00
Henry Weller
b06c4280c7 Revert "twoPhaseEulerFoam::EEqns: Updated pressure-work"
This reverts commit f7996e45a0.
2016-11-09 08:44:36 +00:00
Henry Weller
f7996e45a0 twoPhaseEulerFoam::EEqns: Updated pressure-work
See commit b5206472b5
2016-11-07 23:14:13 +00:00
Henry Weller
0ed96603d4 driftFluxFoam: Corrected Udm BCs
Added 'READ_IF_PRESENT' option to support overriding of the default BCs
for complex problems requiring special treatment of Udm at boundaries.

Resolves bug-report http://bugs.openfoam.org/view.php?id=2317
2016-11-05 18:17:24 +00:00
Henry Weller
b5206472b5 reactingEulerFoam: Corrected and rationalized pressure-work
In many publications and Euler-Euler codes the pressure-work term in the
total enthalpy is stated and implemented as -alpha*dp/dt rather than the
conservative form derived from the total internal energy equation
-d(alpha*p)/dt.  In order for the enthalpy and internal energy equations
to be consistent this error/simplification propagates to the total
internal energy equation as a spurious additional term p*d(alpha)/dt
which is included in the OpenFOAM Euler-Euler solvers and causes
stability and conservation issues.

I have now re-derived the energy equations for multiphase flow from
first-principles and implemented in the reactingEulerFoam solvers the
correct conservative form of pressure-work in both the internal energy
and enthalpy equations.

Additionally an optional limiter may be applied to the pressure-work
term in either of the energy forms to avoid spurious fluctuations in the
phase temperature in regions where the phase-fraction -> 0.  This may
specified in the "thermophysicalProperties.<phase>" file, e.g.

pressureWorkAlphaLimit 1e-3;

which sets the pressure work term to 0 for phase-fractions below 1e-3.
2016-11-04 12:07:09 +00:00
Henry Weller
e0574c471f chemFoam: Construct fields on the mesh database for consistency 2016-10-31 13:15:48 +00:00
Henry Weller
a6918385b7 reactingEulerFoam: Correct continuity error at the end of the energy correction loop
to handle the change in density generated by the temperature correction.
2016-10-31 08:23:51 +00:00
Henry Weller
f2ce1fa9ac twoPhaseEulerFoam::twoPhaseSystem: Ensure inlet flow of BOTH phases matches the BCs
Previously the inlet flow of phase 1 (the phase solved for) is corrected
to match the inlet specification for that phase.  However, if the second
phase is also constrained at inlets the inlet flux must also be
corrected to match the inlet specification.
2016-10-28 10:50:10 +01:00
sergio
ccf3b9db13 BUG: Changing init for thermocouple FO. Changing radiation.correct in fireFoam to allow
correct case re-start
2016-10-27 08:49:47 -07:00
sergio
f223e8c6f0 ENH: Changing radiation correct in YEEq.H in fireFoam.
Adding clone member functions to motion solvers
2016-10-26 11:45:57 -07:00
Andrew Heather
af81184ecf MRG: Resolve conflict with latest foundation merge 2016-10-26 15:37:15 +01:00
Henry Weller
a375d6b2ed solidRegionDiffNo: Include the boundary faces in the calculation of the diffusion number
Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2303
2016-10-25 18:33:59 +01:00
Henry Weller
7edc2495e0 twoPhaseEulerFoam, reactingTwoPhaseEulerFoam: Corrected support for implicitPhasePressure with nAlphaCorr > 1
Resolves bug-report http://bugs.openfoam.org/view.php?id=2290
2016-10-12 18:43:18 +01:00
Andrew Heather
8ff2e8f14d BUG: Corrected assignment to reference object 2016-10-07 12:26:09 +01:00
Henry Weller
b92754311a reactingTwoPhaseEulerFoam::IATE: Added phaseChange source
to handle the effect of condensation and evaporation on bubble size
2016-10-07 09:34:35 +01:00
Henry Weller
d6b404dba2 reactingTwoPhaseEulerFoam::IATE: Added wallBoiling sub-model
to handle the size of bubbles created by boiling.  To be used in
conjunction with the alphatWallBoilingWallFunction boundary condition.

The IATE variant of the wallBoiling tutorial case is provided to
demonstrate the functionality:

tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE
2016-10-06 12:40:58 +01:00
Henry Weller
0d66ffcce8 twoPhaseEulerFoam: Corrected kineticTheory frictional stress at walls
Patch contributed by Juho Peltola, VTT

The new JohnsonJacksonSchaefferFrictionalStress model is included.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2058
2016-10-05 09:27:28 +01:00
Henry Weller
daf57eddf6 alphatWallBoilingWallFunctionFvPatchScalarField: Evaluate alphatConv_ outside loop to improve speed
Patch contributed by Juho Peltola
2016-10-04 16:37:32 +01:00
Henry Weller
8016af3704 reactingTwoPhaseEulerFoam: Enhanced support for wall boiling
Contributed by Juho Peltola, VTT

Notable changes:

    1. The same wall function is now used for both phases, but user must
       specify phaseType ‘liquid’ or ‘vapor’

    2. Runtime selectable submodels for:
       - wall heat flux partitioning between the phases
       - nucleation site density
       - bubble departure frequency
       - bubble departure diameter

    3. An additional iteration loop for the wall boiling model in case
       the initial guess for the wall temperature proves to be poor.

The wallBoiling tutorial has been updated to demonstrate this new functionality.
2016-10-04 09:53:09 +01:00
Andrew Heather
839f14afcd ENH: Code clean-up 2016-09-30 12:30:02 +01:00
Andrew Heather
bd0e982d99 MRG: Initial commit after latest Foundation merge 2016-09-30 11:16:28 +01:00
Henry Weller
b6feaea53b fvPatchFields: Constructors from dictionary now call the corresponding constructor of the fvPatchField base-class
to ensure 'patchType' is set as specified.

Required substantial change to the organization of the reading of the
'value' entry requiring careful testing and there may be some residual
issues remaining.  Please report any problems with the reading and
initialization of patch fields.

Resolves bug-report http://bugs.openfoam.org/view.php?id=2266
2016-09-25 09:11:53 +01:00
Andrew Heather
1fbcb686ff STYLE: Consistency updates 2016-09-23 16:52:46 +01:00
Andrew Heather
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00
Henry Weller
6b42dbae41 TurbulenceModels: Created a general base-class and selection mechanism for laminar stress models
Renamed the original 'laminar' model to 'Stokes' to indicate it is a
linear stress model supporting both Newtonian and non-Newtonian
viscosity.

This general framework will support linear, non-linear, visco-elastic
etc. laminar transport models.

For backward compatibility the 'Stokes' laminar stress model can be
selected either the original 'laminar' 'simulationType'
specification in turbulenceProperties:

    simulationType laminar;

or using the new more general 'laminarModel' specification:

    simulationType laminar;

    laminar
    {
        laminarModel        Stokes;
    }

which allows other laminar stress models to be selected.
2016-09-20 15:05:43 +01:00
Henry Weller
e468d1ecc9 reactingParcelFilmFoam: Corrected support for -postProcess option 2016-09-20 14:50:41 +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
91c8c053a9 setInitialMultiRegionDeltaT: update to be consistent with the standard setInitialDeltaT
Resolves bug-report http://bugs.openfoam.org/bug_change_status_page.php
2016-09-16 17:39:50 +01:00
Henry Weller
34928b7c82 reactingEulerFoam/interfacialModels/dragModels: Corrected file permissions 2016-09-09 21:48:29 +01:00
Andrew Heather
1589e8d431 BUG: buoyantPimpleFoam - div term should be present for both compressible and incompressible 2016-09-02 08:14:10 +01:00
Henry Weller
58f905ff70 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
Henry Weller
b8614eca07 Make/options: Removed duplicate entries
Thanks to Bruno Santos for providing the script to check the files
Resolves bug-report http://bugs.openfoam.org/view.php?id=2169
2016-08-01 20:55:16 +01:00
Henry Weller
46ba7267de TurbulenceModels: Reorganized support macros to simplify the creation of additional turbulence model libraries 2016-07-29 15:59:09 +01:00
Henry Weller
b8bb388ffd reactingEulerFoam, twoPhaseEulerFoam: Added fvOption sources to the face-based momentum equations 2016-07-19 16:33:07 +01:00
Henry Weller
1d57269680 TDACChemistryModel: New chemistry model providing Tabulation of Dynamic Adaptive Chemistry
Provides efficient integration of complex laminar reaction chemistry,
combining the advantages of automatic dynamic specie and reaction
reduction with ISAT (in situ adaptive tabulation).  The advantages grow
as the complexity of the chemistry increases.

References:
    Contino, F., Jeanmart, H., Lucchini, T., & D’Errico, G. (2011).
    Coupling of in situ adaptive tabulation and dynamic adaptive chemistry:
    An effective method for solving combustion in engine simulations.
    Proceedings of the Combustion Institute, 33(2), 3057-3064.

    Contino, F., Lucchini, T., D'Errico, G., Duynslaegher, C.,
    Dias, V., & Jeanmart, H. (2012).
    Simulations of advanced combustion modes using detailed chemistry
    combined with tabulation and mechanism reduction techniques.
    SAE International Journal of Engines,
    5(2012-01-0145), 185-196.

    Contino, F., Foucher, F., Dagaut, P., Lucchini, T., D’Errico, G., &
    Mounaïm-Rousselle, C. (2013).
    Experimental and numerical analysis of nitric oxide effect on the
    ignition of iso-octane in a single cylinder HCCI engine.
    Combustion and Flame, 160(8), 1476-1483.

    Contino, F., Masurier, J. B., Foucher, F., Lucchini, T., D’Errico, G., &
    Dagaut, P. (2014).
    CFD simulations using the TDAC method to model iso-octane combustion
    for a large range of ozone seeding and temperature conditions
    in a single cylinder HCCI engine.
    Fuel, 137, 179-184.

Two tutorial cases are currently provided:
    + tutorials/combustion/chemFoam/ic8h18_TDAC
    + tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC

the first of which clearly demonstrates the advantage of dynamic
adaptive chemistry providing ~10x speedup,

the second demonstrates ISAT on the modest complex GRI mechanisms for
methane combustion, providing a speedup of ~4x.

More tutorials demonstrating TDAC on more complex mechanisms and cases
will be provided soon in addition to documentation for the operation and
settings of TDAC.  Also further updates to the TDAC code to improve
consistency and integration with the rest of OpenFOAM and further
optimize operation can be expected.

Original code providing all algorithms for chemistry reduction and
tabulation contributed by Francesco Contino, Tommaso Lucchini, Gianluca
D’Errico, Hervé Jeanmart, Nicolas Bourgeois and Stéphane Backaert.

Implementation updated, optimized and integrated into OpenFOAM-dev by
Henry G. Weller, CFD Direct Ltd with the help of Francesco Contino.
2016-07-17 15:13:54 +01:00
Henry Weller
c4390f7059 laplacianFoam: Added support for fvOptions 2016-07-08 11:34:00 +01:00
Henry Weller
04afdaffc7 reactingTwoPhaseEulerFoam/pUf/UEqns: Changed naming convention for the dmdt's
for consistency with HeatAndMassTransferPhaseSystem.C
Resolves bug-report http://bugs.openfoam.org/view.php?id=2141
2016-07-07 14:36:10 +01:00
Henry Weller
7e53be1560 Reacting solvers: Added check for the existence of the inert specie 2016-07-06 17:45:34 +01:00
Henry Weller
8a93e13df3 reactingEulerFoam dragModels: New models Beetstra, Tenneti
Contributed by Alberto Passalacqua, Iowa State University

Foam::dragModels::Beetstra
    Drag model of Beetstra et al. for monodisperse gas-particle flows obtained
    with direct numerical simulations with the Lattice-Boltzmann method and
    accounting for the effect of particle ensembles.

    Reference:
    \verbatim
        Beetstra, R., van der Hoef, M. A., & Kuipers, J. a. M. (2007).
        Drag force of intermediate Reynolds number flow past mono- and
        bidisperse arrays of spheres.
        AIChE Journal, 53(2), 489–501.
    \endverbatim

Foam::dragModels::Tenneti
    Drag model of Tenneti et al. for monodisperse gas-particle flows obtained
    with particle-resolved direct numerical simulations and accounting for the
    effect of particle ensembles.

    Reference:
    \verbatim
        Tenneti, S., Garg, R., & Subramaniam, S. (2011).
        Drag law for monodisperse gas–solid systems using particle-resolved
        direct numerical simulation of flow past fixed assemblies of spheres.
        International Journal of Multiphase Flow, 37(9), 1072–1092.
    \verbatim
2016-07-05 16:10:07 +01:00
Henry Weller
ec43e2cf5a Updated headers 2016-07-05 16:09:56 +01:00
Henry Weller
34972962a4 reactingEulerFoam/interfacialCompositionModels: Minor reformatting 2016-07-05 16:09:39 +01:00
Andrew Heather
a0b598a5e4 COMP: Created conditional Allwmake scripts for FFTW dependent applications 2016-06-29 20:50:49 +01:00
Henry Weller
c28a45a8c5 Corrected file permissions 2016-06-24 22:32:08 +01:00
Henry Weller
dea6a3c6e8 wmake/Allwmake: Completed support for targetType 'objects'
Patch contributed by Mattijs Janssens
2016-06-24 15:25:11 +01:00
Henry Weller
186b2c1c69 potentialFoam: simplify the Phi BCs to use only fixedValue and zeroGradient by default
Resolves bug-report http://bugs.openfoam.org/view.php?id=2129
2016-06-24 15:16:51 +01:00
Henry Weller
e680a2716b Updated header 2016-06-23 16:05:11 +01:00
Henry Weller
f7801bd815 Corrected file permissions 2016-06-23 16:05:02 +01:00
Henry Weller
71fdcab771 Updated header documentation processed by Doxygen 2016-06-19 21:23:54 +01:00
Henry Weller
6a53ed41ba Doxygen documentation: Standardized the 'See also' heading 2016-06-17 17:31:34 +01:00
Henry Weller
b3f3562d3c Doxygen documentation: Use the standard 'Usage' rather than the '\heading....' 2016-06-17 17:22:24 +01:00
Henry Weller
6bade21b2a multiphaseCompressibleTurbulenceModels, twoPhaseCompressibleTurbulenceModels, phaseCompressibleTurbulenceModels: Added LIB_LIBS 2016-06-14 12:17:15 +01:00
Henry Weller
6be269ca0b Minor reformatting 2016-06-12 21:12:13 +01:00
Chris Greenshields
288ead131d Descriptions of solvers corrected and made more consistent and more user-friendly 2016-06-09 18:59:40 +01:00
Henry Weller
1be96a546c Added forward declaration of friend functions 2016-05-30 13:21:29 +01:00
Henry Weller
8ab6b4df2c buoyantBoussinesqPimpleFoam: Corrected handling of time-step adjustment
Resolves bug-report http://bugs.openfoam.org/view.php?id=2104
2016-05-29 22:26:53 +01:00
Henry Weller
3eec5854be Standardized the selection of required and optional fields in BCs, fvOptions, functionObjects etc.
In most boundary conditions, fvOptions etc. required and optional fields
to be looked-up from the objectRegistry are selected by setting the
keyword corresponding to the standard field name in the BC etc. to the
appropriate name in the objectRegistry.  Usually a default is provided
with sets the field name to the keyword name, e.g. in the
totalPressureFvPatchScalarField the velocity is selected by setting the
keyword 'U' to the appropriate name which defaults to 'U':

        Property     | Description             | Required    | Default value
        U            | velocity field name     | no          | U
        phi          | flux field name         | no          | phi
        .
        .
        .

However, in some BCs and functionObjects and many fvOptions another
convention is used in which the field name keyword is appended by 'Name'
e.g.

        Property     | Description             | Required    | Default value
        pName        | pressure field name     | no          | p
        UName        | velocity field name     | no          | U

This difference in convention is unnecessary and confusing, hinders code
and dictionary reuse and complicates code maintenance.  In this commit
the appended 'Name' is removed from the field selection keywords
standardizing OpenFOAM on the first convention above.
2016-05-21 20:28:20 +01:00
Henry Weller
6164c2f262 Standardized the naming of functions which control the writing of fields etc.
to have the prefix 'write' rather than 'output'

So outputTime() -> writeTime()

but 'outputTime()' is still supported for backward-compatibility.

Also removed the redundant secondary-writing functionality from Time
which has been superseded by the 'writeRegisteredObject' functionObject.
2016-05-12 17:38:01 +01:00
Henry Weller
80a0b4a124 applications/solvers/heatTransfer/chtMultiRegionFoam: Check there are fluid meshes present for the '-postProcess' option 2016-05-09 19:55:11 +01:00
Henry Weller
98f69d417f applications/solvers/heatTransfer: Added -postProcess option
See also commit cc455173ff
2016-05-09 16:28:48 +01:00
Henry Weller
30a18e31ae applications/solvers: Moved createMRF.H into createField.H
to ensure MRF functionality is available for the -postProcess option
2016-05-09 16:06:12 +01:00
Henry Weller
0dc0301da7 applications/solvers/lagrangian: Added -postProcess option
See also commit cc455173ff
2016-05-09 15:55:23 +01:00
Henry Weller
0297dd9187 Updated headers 2016-05-09 15:23:36 +01:00
Henry Weller
e450e8048b applications/solvers/discreteMethods: Added -postProcess option
See also commit cc455173ff
2016-05-09 15:23:07 +01:00
Henry Weller
008086f64c applications/solvers/compressible: Added -postProcess option
See also commit cc455173ff
2016-05-09 15:16:22 +01:00
Henry Weller
364044243a applications/solvers/combustion: Added -postProcess option
See also commit cc455173ff
2016-05-09 14:51:21 +01:00
Henry Weller
7dca6b6a21 applications/solvers: Added -postProcess option
See also commit cc455173ff
2016-05-09 14:08:15 +01:00
Henry Weller
89159e7f39 applications/solvers/incompressible: Added -postProcess option
See also commit cc455173ff
2016-05-08 22:40:42 +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
7bbad53240 interPhaseChangeFoam, multiphaseInterFoam, potentialFreeSurfaceFoam: Added -postProcess option
See also commit cc455173ff
2016-05-08 17:23:36 +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
Henry Weller
cc455173ff simpleFoam: Added experimental "-postProcess" option
Executes application functionObjects to post-process existing results.

    If the "dict" argument is specified the functionObjectList is constructed
    from that dictionary otherwise the functionObjectList is constructed from
    the "functions" sub-dictionary of "system/controlDict"

    Multiple time-steps may be processed and the standard utility time
    controls are provided.

This functionality is equivalent to execFlowFunctionObjects but in a
more efficient and general manner and will be included in all the
OpenFOAM solvers if it proves effective and maintainable.

The command-line options available with the "-postProcess" option may be
obtained by

simpleFoam -help -postProcess

Usage: simpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -postProcess      Execute functionObjects only
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Henry G. Weller
CFD Direct Ltd.
2016-05-08 09:33:46 +01:00
Henry Weller
318123e7e4 Multiphase solvers: Update p_rgh following density changes 2016-05-03 15:51:15 +01:00
Henry Weller
055b41e4da reactingTwoPhaseEulerFoam: Update p_rgh following density changes
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2073
2016-05-03 14:53:11 +01:00
Henry Weller
4c5052a3a1 applications/solvers: include readTimeControls.H in the time-loop rather than createTimeControls.H
Patch contributed by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2079
2016-05-01 11:06:21 +01:00
Henry Weller
81f31acbb3 Updated headers 2016-04-30 21:53:19 +01:00
Henry Weller
3c053c2fe6 GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:

primitiveField():
primitiveFieldRef():
    Provides low-level access to the Field<Type> (primitive field)
    without dimension or mesh-consistency checking.  This should only be
    used in the low-level functions where dimensional consistency is
    ensured by careful programming and computational efficiency is
    paramount.

internalField():
internalFieldRef():
    Provides access to the DimensionedField<Type, GeoMesh> of values on
    the internal mesh-type for which the GeometricField is defined and
    supports dimension and checking and mesh-consistency checking.
2016-04-30 21:40:09 +01:00
Henry Weller
ccd958a8f1 GeometricField::dimensionedInteralFieldRef() -> GeometricField::ref()
In order to simplify expressions involving dimensioned internal field it
is preferable to use a simpler access convention.  Given that
GeometricField is derived from DimensionedField it is simply a matter of
de-referencing this underlying type unlike the boundary field which is
peripheral information.  For consistency with the new convention in
"tmp"  "dimensionedInteralFieldRef()" has been renamed "ref()".
2016-04-30 18:43:51 +01:00
Henry Weller
5df2b96489 GeometricField::internalField() -> GeometricField::internalFieldRef()
Non-const access to the internal field now obtained from a specifically
named access function consistent with the new names for non-canst access
to the boundary field boundaryFieldRef() and dimensioned internal field
dimensionedInternalFieldRef().

See also commit 22f4ad32b1
2016-04-30 14:25:21 +01:00
Henry Weller
62c62abda8 fireFoam: New additional controls switch "solvePyrolysisRegion"
provides optional control for solving the pyrolysis region.

Patch contributed by Karl Meredith, FMGlobal.
2016-04-28 12:54:17 +01:00
Henry Weller
ea5401c770 GeometricField::GeometricBoundaryField -> GeometricField::Boundary
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now.  Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit 4a57b9be2e

This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.
2016-04-28 07:22:02 +01:00
Henry Weller
4a57b9be2e GeometricField: Rationalized and simplified access to the dimensioned internal field
Given that the type of the dimensioned internal field is encapsulated in
the GeometricField class the name need not include "Field"; the type
name is "Internal" so

volScalarField::DimensionedInternalField -> volScalarField::Internal

In addition to the ".dimensionedInternalField()" access function the
simpler "()" de-reference operator is also provided to greatly simplify
FV equation source term expressions which need not evaluate boundary
conditions.  To demonstrate this kEpsilon.C has been updated to use
dimensioned internal field expressions in the k and epsilon equation
source terms.
2016-04-27 21:32:45 +01:00
Henry Weller
dc2951ca2f GeometricField::dimensionedInternalField() -> GeometricField::dimensionedInternalFieldRef()
See also commit 22f4ad32b1
2016-04-26 16:29:43 +01:00
Henry Weller
22f4ad32b1 Completed boundaryField() -> boundaryFieldRef()
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1938

Because C++ does not support overloading based on the return-type there
is a problem defining both const and non-const member functions which
are resolved based on the const-ness of the object for which they are
called rather than the intent of the programmer declared via the
const-ness of the returned type.  The issue for the "boundaryField()"
member function is that the non-const version increments the
event-counter and checks the state of the stored old-time fields in case
the returned value is altered whereas the const version has no
side-effects and simply returns the reference.  If the the non-const
function is called within the patch-loop the event-counter may overflow.
To resolve this it in necessary to avoid calling the non-const form of
"boundaryField()" if the results is not altered and cache the reference
outside the patch-loop when mutation of the patch fields is needed.

The most straight forward way of resolving this problem is to name the
const and non-const forms of the member functions differently e.g. the
non-const form could be named:

    mutableBoundaryField()
    mutBoundaryField()
    nonConstBoundaryField()
    boundaryFieldRef()

Given that in C++ a reference is non-const unless specified as const:
"T&" vs "const T&" the logical convention would be

    boundaryFieldRef()
    boundaryFieldConstRef()

and given that the const form which is more commonly used is it could
simply be named "boundaryField()" then the logical convention is

    GeometricBoundaryField& boundaryFieldRef();

    inline const GeometricBoundaryField& boundaryField() const;

This is also consistent with the new "tmp" class for which non-const
access to the stored object is obtained using the ".ref()" member function.

This new convention for non-const access to the components of
GeometricField will be applied to "dimensionedInternalField()" and "internalField()" in the
future, i.e. "dimensionedInternalFieldRef()" and "internalFieldRef()".
2016-04-25 16:16:05 +01:00
Henry Weller
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Henry Weller
673e0d1704 fireFoam: Added optional hydrostatic initialization of the pressure and density
Also added the new prghTotalHydrostaticPressure p_rgh BC which uses the
hydrostatic pressure field as the reference state for the far-field
which provides much more accurate entrainment is large open domains
typical of many fire simulations.

The hydrostatic field solution is controlled by the optional entries in
the fvSolution.PIMPLE dictionary, e.g.

    hydrostaticInitialization yes;
    nHydrostaticCorrectors 5;

and the solver must also be specified for the hydrostatic p_rgh field
ph_rgh e.g.

    ph_rgh
    {
        $p_rgh;
    }

Suitable boundary conditions for ph_rgh cannot always be derived from
those for p_rgh and so the ph_rgh is read to provide them.

To avoid accuracy issues with IO, restart and post-processing the p_rgh
and ph_rgh the option to specify a suitable reference pressure is
provided via the optional pRef file in the constant directory, e.g.

    dimensions      [1 -1 -2 0 0 0 0];
    value           101325;

which is used in the relationship between p_rgh and p:

    p = p_rgh + rho*gh + pRef;

Note that if pRef is specified all pressure BC specifications in the
p_rgh and ph_rgh files are relative to the reference to avoid round-off
errors.

For examples of suitable BCs for p_rgh and ph_rgh for a range of
fireFoam cases please study the tutorials in
tutorials/combustion/fireFoam/les which have all been updated.

Henry G. Weller
CFD Direct Ltd.
2016-04-23 10:04:39 +01:00
Henry Weller
a78beef988 JohnsonJacksonSchaefferFrictionalStress: Updated I2D expression 2016-04-22 15:13:45 +01:00
Henry Weller
bbca1fd5e7 reactingTwoPhaseEulerFoam: Corrected kineticTheory frictional stress at walls
Patch contributed by Juho Peltola, VTT

The new JohnsonJacksonSchaefferFrictionalStress model is included and
the LBend tutorial case to demonstrate the need for the changes to the
frictional stress models.

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=2058
2016-04-22 14:25:58 +01:00
Henry Weller
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +01:00
Henry Weller
77b03e2e0c Specialized dotInterpolate for the efficient calculation of flux fields
e.g. (fvc::interpolate(HbyA) & mesh.Sf()) -> fvc::flux(HbyA)

This removes the need to create an intermediate face-vector field when
computing fluxes which is more efficient, reduces the peak storage and
improved cache coherency in addition to providing a simpler and cleaner
API.
2016-04-06 20:20:53 +01:00
Henry Weller
a9b8bb13e0 applications/.*/Allwmake: Updated to support "stop on 1st error"
Patch contributed by Bruno Santos
Resolved bug-report http://www.openfoam.org/mantisbt/view.php?id=2042
2016-04-04 09:03:40 +01:00
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
Andrew Heather
7d389bcead STYLE: Consistency in Copyright statement 2016-06-27 22:38:50 +01:00
mattijs
3fc2ec183d ENH: potentialFoam: construct Phi with only types() so does not work
for initialising 'complex' bcs. Instead now 'clone' from p. Fixes #153.
2016-06-20 20:57:47 +01:00
Andrew Heather
9e84deeb09 STYLE: Updated template code 2016-06-17 14:11:59 +01:00
sergio
97585e2952 BUG: Fixing error in using reference to tmp in pEqn.H for chtMultiRegionFoam 2016-06-14 09:30:14 -07:00
Andrew Heather
ac6f01ed7a Merge branch 'feature-MPPICInterFoam' into 'develop'
Feature mppic inter foam

New MPPICInterFoam solver. Add MPPIC cloud to a VOF approach. Particles volume are considered into transport Eq fluxes.
    Solves for 2 incompressible, isothermal immiscible fluids using a VOF
    (volume of fluid) phase-fraction based interface capturing approach.
    The momentum and other fluid properties are of the "mixture" and a single
    momentum equation is solved.

Solver:
/applications/solvers/multiphase/MPPICInterFoam
Tutorial:
/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka

See merge request !41
2016-06-08 14:04:49 +01:00
sergio
af648d7c89 Changing header in tutorial files and updating pEq.H 2016-06-03 09:31:56 -07:00
sergio
e1f2329222 STY: Updating function in pEq, ErrorInFunction and tutorial web site name 2016-06-03 09:16:34 -07:00
sergio
00d4761aa8 MPPICInterFoam and tutorial 2016-06-01 11:08:06 -07:00