Commit Graph

423 Commits

Author SHA1 Message Date
Andrew Heather
009f8df176 TUT: minor update 2017-05-22 13:37:51 +01:00
Andrew Heather
db5348880e MRG: resolved merge conflicts from merge from develop branch 2017-05-19 16:29:54 +01:00
Andrew Heather
0a4733acab ENH: Tutorial updates 2017-05-18 14:47:00 +01:00
Andrew Heather
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +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
Henry Weller
448561718c fvOption::radiation: New fvOption providing the radiation source to the energy equation
Radiative heat transfer may now be added to any solver in which an energy
equation is solved at run-time rather than having to change the solver code.

For example, radiative heat transfer is now enabled in the SandiaD_LTS
reactingFoam tutorial by providing a constant/fvOptions file containing

radiation
{
    type            radiation;
    libs ("libradiationModels.so");
}

and appropriate settings in the constant/radiationProperties file.
2017-04-13 14:03:58 +01:00
Henry Weller
5c62d81880 radiation: Corrected the name of the radiative heat flux from Qr to qr
The standard naming convention for heat flux is "q" and this is used for the
conductive and convective heat fluxes is OpenFOAM.  The use of "Qr" for
radiative heat flux is an anomaly which causes confusion, particularly for
boundary conditions in which "Q" is used to denote power in Watts.  The name of
the radiative heat flux has now been corrected to "qr" and all models, boundary
conditions and tutorials updated.
2017-04-08 22:23:40 +01:00
Andrew Heather
332c8acdcd ENH: Clean-up after latest Foundation integrations 2017-03-31 15:36:28 +01:00
Andrew Heather
fb724ce113 MRG: Integrated Foundation code to commit 9f37c3c 2017-03-31 15:34:28 +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
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
864fc239c8 tutorials/combustion/reactingFoam/RAS/DLR_A_LTS: Reduced the endTime 2017-03-18 17:15:58 +00:00
Henry Weller
dd15478158 combustionModels::EDC: New Eddy Dissipation Concept (EDC) turbulent combustion model
including support for TDAC and ISAT for efficient chemistry calculation.

Description
    Eddy Dissipation Concept (EDC) turbulent combustion model.

    This model considers that the reaction occurs in the regions of the flow
    where the dissipation of turbulence kinetic energy takes place (fine
    structures). The mass fraction of the fine structures and the mean residence
    time are provided by an energy cascade model.

    There are many versions and developments of the EDC model, 4 of which are
    currently supported in this implementation: v1981, v1996, v2005 and
    v2016.  The model variant is selected using the optional \c version entry in
    the \c EDCCoeffs dictionary, \eg

    \verbatim
        EDCCoeffs
        {
            version v2016;
        }
    \endverbatim

    The default version is \c v2015 if the \c version entry is not specified.

    Model versions and references:
    \verbatim
        Version v2005:

            Cgamma = 2.1377
            Ctau = 0.4083
            kappa = gammaL^exp1 / (1 - gammaL^exp2),

            where exp1 = 2, and exp2 = 2.

            Magnussen, B. F. (2005, June).
            The Eddy Dissipation Concept -
            A Bridge Between Science and Technology.
            In ECCOMAS thematic conference on computational combustion
            (pp. 21-24).

        Version v1981:

            Changes coefficients exp1 = 3 and exp2 = 3

            Magnussen, B. (1981, January).
            On the structure of turbulence and a generalized
            eddy dissipation concept for chemical reaction in turbulent flow.
            In 19th Aerospace Sciences Meeting (p. 42).

        Version v1996:

            Changes coefficients exp1 = 2 and exp2 = 3

            Gran, I. R., & Magnussen, B. F. (1996).
            A numerical study of a bluff-body stabilized diffusion flame.
            Part 2. Influence of combustion modeling and finite-rate chemistry.
            Combustion Science and Technology, 119(1-6), 191-217.

        Version v2016:

            Use local constants computed from the turbulent Da and Re numbers.

            Parente, A., Malik, M. R., Contino, F., Cuoci, A., & Dally, B. B.
            (2016).
            Extension of the Eddy Dissipation Concept for
            turbulence/chemistry interactions to MILD combustion.
            Fuel, 163, 98-111.
    \endverbatim

Tutorials cases provided: reactingFoam/RAS/DLR_A_LTS, reactingFoam/RAS/SandiaD_LTS.

This codes was developed and contributed by

    Zhiyi Li
    Alessandro Parente
    Francesco Contino
    from BURN Research Group

and updated and tested for release by

    Henry G. Weller
    CFD Direct Ltd.
2017-03-17 09:44:15 +00:00
Henry Weller
47d7240412 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
Henry Weller
9b4f327e2b 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
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
sergio
4f736b5c41 temperatureCoupledBase: alphaAni set to none by default
boundaryRadiationProperties: updating to new format
dynamicMeshDict and snappyHexMeshDict in utorials/multiphase/interDyMFoam/RAS/motorBike to follow Mattijs Git lab id 381
2017-02-10 11:40:15 -08:00
Henry Weller
1e36c99588 PaSR: Removed deprecated "turbulentReaction" switch
To run with laminar reaction rates choose the "laminar" combustion model rather
than setting "turbulentReaction no;" in the "PaSR" model.
2017-01-20 17:17:14 +00:00
Henry Weller
1abec0652d tutorials/combustion/reactingFoam/laminar/counterFlowFlame2D_GRI_TDAC: Added deltaT to TDAC controls 2017-01-17 22:41:30 +00:00
Henry Weller
47bd8e13f7 TDACChemistryModel: simplified, rationalized and automated the handling of variableTimeStep 2017-01-09 21:40:39 +00:00
Henry Weller
7e22440dc5 TDACChemistryModel: Added support for variable time-step and LTS in ISAT
New reactingFoam tutorial counterFlowFlame2DLTS_GRI_TDAC demonstrates this new
functionality.

Additionally the ISAT table growth algorithm has been further optimized
providing an overall speedup of between 15% and 38% for the tests run so far.

Updates to TDAC and ISAT provided by Francesco Contino.

Implementation updated and integrated into OpenFOAM-dev by
Henry G. Weller, CFD Direct Ltd with the help of Francesco Contino.

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.
2017-01-07 16:29:15 +00:00
Andrew Heather
28e37bbec9 STYLE: Consistency updates 2016-12-16 14:36:48 +00:00
Andrew Heather
30d8fc3459 ENH: Tutorial updates and clean-up 2016-12-16 13:26:28 +00:00
Andrew Heather
ad807e8d31 BUG: Updates to DyM tutorials - see #340 2016-12-13 12:40:58 +00: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
dfbb9d0900 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
Conflicts:
	tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
2016-11-21 07:39:46 -08:00
sergio
ab40ddaaf3 Adding fireCompartment tutorial for new pyrolysis thermo, thermocouple FO and EDC combustion model 2016-11-21 07:36:05 -08:00
Mark Olesen
a6a90838fa STYLE: adjust tutorial Allrun scripts (issue #310)
- A few without a 'cd' at the start.
  Use $(getApplication) directly in more places (for clarity).
2016-11-21 10:18:00 +01:00
Mark Olesen
21679c04e4 STYLE: adjust tutorial Allclean scripts (issue #310)
- A few without a 'cd' at the start.
  Several remove files that are already covered by the cleanCase function.
2016-11-20 17:26:44 +01:00
Mark Olesen
f3cc16e42c ENH: Avoid constant/polyMesh/blockMeshDict (issue #309)
- relocate to system/blockMeshDict, which avoids it being cleaned out
  accidentally
2016-11-20 16:50:47 +01:00
Andrew Heather
f80e5164d8 ENH: Tutorial corrections 2016-11-01 15:40:27 +00:00
Andrew Heather
a4ac4ac268 STYLE: Tutorial cleanup 2016-10-28 12:16:29 +01:00
Andrew Heather
99c62425a9 ENH: streamLineBase - set tracking velocity field name to U by default 2016-10-27 16:15:26 +01:00
Mark Olesen
d750eb4e5c GIT: remove vagabond files from compartmentFire tutorial 2016-10-14 10:26:20 +02:00
sergio
ec5eec3a27 Allrun modification for compartmentFire tutorial 2016-10-07 12:02:24 -07:00
sergio
6a8948bb4f Changing permissions 2016-10-07 11:56:11 -07:00
sergio
be148fa44f File styles and permissions 2016-10-07 11:54:11 -07:00
sergio
97c0acd643 ENH: Adding compartmentFire and thermo pyrolysis model 2016-10-07 11:46:51 -07:00
Andrew Heather
e98e372f8e ENH: Tutorial updates 2016-09-30 15:31:35 +01:00
Andrew Heather
bd0e982d99 MRG: Initial commit after latest Foundation merge 2016-09-30 11:16:28 +01:00
Andrew Heather
3dbd39146c STYLE: consistency updates 2016-09-27 15:17:55 +01:00
Andrew Heather
89d9fd1550 ENH: Tutorial updates 2016-09-26 13:00:49 +01:00
Andrew Heather
ad1e798293 ENH: Initial testing updates 2016-09-26 09:28:31 +01:00
Andrew Heather
1fbcb686ff STYLE: Consistency updates 2016-09-23 16:52:46 +01:00
Henry Weller
1e94682f24 tutorials: Renamed sub-directories ras -> RAS and les -> LES 2016-09-20 19:03:40 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
86ccbca390 combustionModels/FSD: Corrected
Renamed 'omega' to 'FSDomega' to avoid a clash with the k-omega
turbulence models.

Resolves bug-report http://bugs.openfoam.org/view.php?id=2237
2016-09-09 16:23:28 +01:00