Commit Graph

2491 Commits

Author SHA1 Message Date
25d523b7a0 dictionary: Added lookupType function for convenient lookup and setting of value
of the specified type
2017-03-16 20:50:11 +00:00
10c1d5697f autoPtr: Added assignment to pointer 2017-03-16 20:49:21 +00:00
96c6c52017 Function1: Added zero and one constant functions for convenience 2017-03-16 20:48:26 +00:00
2598b133a6 BernardCells: tutorial demonstrating Bernard cells
2D buoyancy-driven flow between flat plates with small temperature difference
2017-03-15 19:20:25 +00:00
fbc5595115 foamCreateVideo: avoid dropping frames for some color depths 2017-03-15 19:10:10 +00:00
1a33f4ddab postProcess: Added support for dsmcFields
e.g. postProcess -time 0.001 -func dsmcFields

Resolves bug-report https://bugs.openfoam.org/view.php?id=2499
2017-03-14 15:22:59 +00:00
ac41194341 reactingEulerFoam: Added fvOption support for incompressible phases 2017-03-14 11:56:01 +00:00
047460b053 etc/bashrc: Updated to better support zsh
Resolves patch request https://bugs.openfoam.org/view.php?id=2490
2017-03-13 19:41:38 +00:00
76213ac301 turbulenceModels::RAS: Corrected sign of "C3" dilatation term
Set default value of C3 to 0
Set C3 to -0.33 in the engineFoam/kivaTest tutorial.

Resolves bug-report https://bugs.openfoam.org/view.php?id=2496
2017-03-13 18:01:39 +00:00
25ac9a410e laplacianFoam: added fvOptions library
Resolves bug-report https://bugs.openfoam.org/view.php?id=2492
2017-03-13 08:50:17 +00:00
1e6c9a0a54 Updated UPstream::commsTypes to use the C++11 enum class 2017-03-10 19:54:55 +00:00
2b8a55c9e6 Upgraded to OpenMPI-2.0.2 2017-03-10 17:08:16 +00:00
692242f574 CrankNicolsonDdtScheme: Corrected fvcDdtUfCorr for compressible flow
Resolves bug-report https://bugs.openfoam.org/view.php?id=2491
2017-03-10 11:08:10 +00:00
0573d5771b turbulenceModels::LES::dynamicLagrangian: Converted advection to compressible convection form
Formally this is equivalent to the previous formulation but more convenient to
use given that for compressible flow the mass flux rather than the volume flux
is available.
2017-03-10 11:07:41 +00:00
55f3e808ed sixDoFRigidBodyDisplacementPointPatchVectorField, uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField: removed
These legacy boundary conditions are no longer needed and have been superseded
by the more flexible sixDoFRigidBodyMotion and rigidBodyMotion solvers.  See tutorials:

incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam
multiphase/interDyMFoam/RAS/DTCHull
multiphase/interDyMFoam/RAS/floatingObject

Resolves bug-report https://bugs.openfoam.org/view.php?id=2487
2017-03-09 23:12:06 +00:00
aae84af596 wingMotion tutorial: Corrected fvSolution file 2017-03-09 23:11:30 +00:00
ed488cb83e functionObjects::functionObjects: Corrected initial totalTime for cases with variable time-step
Resolves bug-report https://bugs.openfoam.org/view.php?id=2459
2017-03-09 17:39:27 +00:00
a600a2c91a LES::dynamicLagrangian: Corrected access to the volumetric flux for compressible flow
Resolves bug-report https://bugs.openfoam.org/view.php?id=2489
2017-03-09 09:37:59 +00:00
feb7ad8353 Updated header 2017-03-08 11:51:36 +00:00
6c103e247d decomposePar: Added 'copyZero' option
Using

decomposePar -copyZero

The mesh is decomposed as usual but the '0' directory is recursively copied to
the 'processor.*' directories rather than decomposing the fields.  This is a
convenient option to handle cases where the initial field files are generic and
can be used for serial or parallel running.  See for example the
incompressible/simpleFoam/motorBike tutorial case.
2017-03-08 11:48:06 +00:00
54b96fb765 verticalChannel tutorial: removed 'bounded' from the 'div(phid,p)' scheme. 2017-03-08 11:34:08 +00:00
0ba6179f23 tutorials: Updated pcorr settings in fvSolution to provide pcorrFinal if required 2017-03-07 11:48:20 +00:00
ba45546c32 tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/Allrun: Remove previous 0 directories
Patch contributed by Mattijs Janssens
2017-03-06 23:18:13 +00:00
a7166e3273 CrankNicolsonDdtScheme, backwardDdtScheme: Ensure V00 is available for moving meshes 2017-03-06 23:15:54 +00:00
13aacde1c7 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
5546fe444d CorrectPhi: only use the "Final" tolerance for the last non-orthogonal iteration 2017-03-03 22:05:24 +00:00
577b089a34 GAMGSolverScale: minor update 2017-03-03 22:04:41 +00:00
e36a294de2 CrankNicolsonDdtScheme, backwardDdtScheme: Ensure the V00 field is cached 2017-03-03 22:03:29 +00:00
0d4b7cbab1 PBiCGStab: Instantiate for symmetric and asymmetric matrices
PBiCGStab has proved more reliable than PCG for solving the pressure equation in
compressible systems.
2017-02-28 20:08:38 +00:00
b053ad0356 tutorials/incompressible/pisoFoam/LES/motorBike: Removed unused $1 arguments to xargs
Resolves bug-report https://bugs.openfoam.org/view.php?id=2475
2017-02-28 11:27:28 +00:00
99c992d65c 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 655fc78748
2017-02-28 11:14:59 +00:00
5bc07189ee reactingTwoPhaseEulerFoam::Lavieville: Corrected fLiquid function
Resolves bug-report https://bugs.openfoam.org/view.php?id=2477
2017-02-27 09:39:46 +00:00
8504e43657 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
655fc78748 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
cb2bc60fa5 MULES: Adjust limiter only at boundaries for which the field value is fixed
Resolves bug-report https://bugs.openfoam.org/view.php?id=2470
2017-02-23 12:03:50 +00:00
4a22ab94b5 MULES: Adjust limiter only at boundaries for which the field value is fixed
Resolves bug-report https://bugs.openfoam.org/view.php?id=2470
2017-02-22 15:34:13 +00:00
0f4fae169a GeometricField: corrected assignment to tmp which wraps a non-tmp 2017-02-22 13:20:49 +00:00
c3848b6e98 functionObjects::fieldCoordinateSystemTransform: added coordinateSystem sub-dict and updated the description
Patch contributed by Bruno Santos
Resolves bug-report https://bugs.openfoam.org/view.php?id=2454
2017-02-22 13:20:15 +00:00
c9237fd980 chemkinToFoam: Increase the precision of the thermophysical coefficient written 2017-02-21 11:59:49 +00:00
0ab1758b2f solidMixtureProperties: Updated documentation, removed unused functions and corrected remaining 2017-02-20 15:30:25 +00:00
9f3cf0a7fa liquidMixtureProperties: Updated documentation 2017-02-20 15:30:07 +00:00
cdec9b23b9 liquidThermo: rhoThermo instantiated on liquidProperties
This allows single, multi-phase and VoF compressible simulations to be performed
with the accurate thermophysical property functions for liquids provided by the
liquidProperty classes.  e.g. in the
multiphase/compressibleInterFoam/laminar/depthCharge2D tutorial water can now be
specified by

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

mixture
{
    H2O;
}

as an alternative to the previous less accurate representation defined by

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectFluid;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight   18.0;
    }
    equationOfState
    {
        R           3000;
        rho0        1027;
    }
    thermodynamics
    {
        Cp          4195;
        Hf          0;
    }
    transport
    {
        mu          3.645e-4;
        Pr          2.289;
    }
}

However the increase in accuracy of the new simpler and more convenient
specification and representation comes at a cost: the NSRDS functions used by
the liquidProperties classes are relatively expensive to evaluate and the
depthCharge2D case takes ~14% longer to run.
2017-02-19 16:44:00 +00:00
80123f59ce 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
95574a6c6b liquidProperties, solidProperties: Simplified input
The entries for liquid and solid species can now be simply be the name unless
property coefficients are overridden in which are specified in a dictionary as
before e.g. in the tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek case
the water is simply specified

liquids
{
    H2O;
}

and solid ash uses standard coefficients but the coefficients for carbon are
overridden thus

solids
{
    C
    {
        rho             2010;
        Cp              710;
        kappa           0.04;
        Hf              0;
        emissivity      1.0;
    }

    ash;
}
2017-02-18 12:43:10 +00:00
081f1784f9 liquidProperties: Simplified dictionary format
The defaultCoeffs entry is now redundant and supported only for backward
compatibility.  To specify a liquid with default coefficients simply leave the
coefficients dictionary empty:

    liquids
    {
        H2O {}
    }

Any or all of the coefficients may be overridden by specifying the properties in
the coefficients dictionary, e.g.

    liquids
    {
        H2O
        {
            rho
            {
                a 1000;
                b 0;
                c 0;
                d 0;
            }
        }
    }
2017-02-17 22:08:42 +00:00
5bc064c165 liquidProperties: simplified and generalized the IO
When liquids are constructed from dictionary the coefficients are now first
initialized to their standard values and overridden by the now optional entries
provided in the dictionary.  For example to specify water with all the standard
temperature varying properties but override only the density with a constant
value of 1000 specify in thermophysicalProperties

liquids
{
    H2O
    {
        defaultCoeffs   no;

        H2OCoeffs
        {
            rho
            {
                a 1000;
                b 0;
                c 0;
                d 0;
            }
        }
    }
}
2017-02-17 20:29:58 +00:00
dc3c78c757 thermophysicalModels: Ostream operator calls write(os) for consistent IO 2017-02-17 16:35:43 +00:00
49cd45bb89 thermophysicalModels: Removed unused and unmaintained Istream constructors 2017-02-17 15:50:00 +00:00
565576b13c liquidProperties: Removed unused construction from Istream 2017-02-17 13:41:05 +00:00
abc50e214c 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