Compare commits
18 commits
kwonwoo-or
...
trunk
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed25887ecc | ||
|
|
2c655680a6 | ||
|
|
cf0d9f904f | ||
|
|
b510f145d2 | ||
|
|
7873f46038 | ||
|
|
e5fd6a4caf | ||
|
|
e2268053c1 | ||
|
|
ccb67c70d2 | ||
|
|
c0264dcdfa | ||
|
|
211cb97540 | ||
|
|
df0957a855 | ||
|
|
2e799dbc77 | ||
|
|
786d9fba2e | ||
|
|
cb57fe5a57 | ||
|
|
f8b83b579e | ||
|
|
367133f440 | ||
|
|
7f45daf526 | ||
|
|
3b7f67cd7b |
152 changed files with 378614 additions and 20 deletions
49
applications/solvers/combustion/SLFMFoam/AMC/AMC.C
Normal file
49
applications/solvers/combustion/SLFMFoam/AMC/AMC.C
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "AMC.H"
|
||||
|
||||
#include "error.H"
|
||||
|
||||
// * * * * * * * * * * * * * Functions * * * * * * * * * * * * //
|
||||
|
||||
//Amplitude Mapping Closure (from KIVA)
|
||||
Foam::tmp<Foam::scalarField> Foam::CMC::AMC(const scalarField& eta)
|
||||
{
|
||||
tmp<scalarField> tRes(new scalarField(eta.size(), 0.0));
|
||||
|
||||
scalarField& Res = tRes.ref();
|
||||
|
||||
for(label i=0 ; i<eta.size() ; i++)
|
||||
{
|
||||
Res[i] = AMC(eta[i]);
|
||||
}
|
||||
|
||||
return tRes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
74
applications/solvers/combustion/SLFMFoam/AMC/AMC.H
Normal file
74
applications/solvers/combustion/SLFMFoam/AMC/AMC.H
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Function
|
||||
Foam::CMC::AMC
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
AMC.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef AMC_H
|
||||
#define AMC_H
|
||||
|
||||
#include "tmp.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace CMC
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Function AMC Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
const scalar pi = 3.141592;
|
||||
|
||||
const scalar spi = Foam::sqrt(pi);
|
||||
|
||||
//Amplitude Mapping Closure (from KIVA)
|
||||
tmp<scalarField> AMC(const scalarField& eta);
|
||||
|
||||
|
||||
//Amplitude Mapping Closure (from KIVA)
|
||||
//Define exp(-2*(erf^-1(2*eta - 1))^2)
|
||||
inline scalar AMC(const scalar eta);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CMC
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "AMCI.H"
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
54
applications/solvers/combustion/SLFMFoam/AMC/AMCI.H
Normal file
54
applications/solvers/combustion/SLFMFoam/AMC/AMCI.H
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
//Amplitude Mapping Closure (from KIVA)
|
||||
//Define exp(-2*(erf^-1(2*eta - 1))^2)
|
||||
inline Foam::scalar Foam::CMC::AMC(const scalar eta)
|
||||
{
|
||||
const scalar a0 = (2.0*eta - 1.0);
|
||||
scalar a1 = 0.5;
|
||||
scalar slope;
|
||||
scalar da = GREAT;
|
||||
|
||||
while(mag(da) > SMALL)
|
||||
{
|
||||
slope = (2.0/spi)*Foam::exp(-1.0*Foam::pow(a1,2.0));
|
||||
da = (a0 - Foam::erf(a1))/slope;
|
||||
a1 = a1 + da;
|
||||
}
|
||||
|
||||
return Foam::exp(-2.0*Foam::pow(a1,2.0));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaFunction.H"
|
||||
|
||||
#include "error.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// const scalar Foam::CMC::BetaFunction::staticData();
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
void Foam::CMC::BetaFunction::_setParameters()
|
||||
{
|
||||
scalar gamma = mf_*(1.0 - mf_)/(mfVar_ + SMALL) - 1.0;
|
||||
|
||||
if (gamma < SMALL || (mfVar_)/(mf_*(1 - mf_) + SMALL) < 0.001)
|
||||
{
|
||||
fdelta_ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
a_ = max(mf_*gamma, 0.0);
|
||||
b_ = max((1.0 - mf_)*gamma, 0.0);
|
||||
|
||||
if(a_ < 1.0)
|
||||
{
|
||||
delta0_ = true;
|
||||
}
|
||||
if(b_ < 1.0)
|
||||
{
|
||||
delta1_ = true;
|
||||
}
|
||||
|
||||
_limitAB();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::CMC::BetaFunction::_limitAB()
|
||||
{
|
||||
scalar fmax = 1.0/(1.0 + (b_ - 1.0)/(a_ - 1.0));
|
||||
|
||||
if(a_ > 500.0)
|
||||
{
|
||||
a_ = 500.0;
|
||||
b_ = (a_ - 1.0 - fmax*(a_ - 2.0))/fmax;
|
||||
}
|
||||
else if(b_ > 500.0)
|
||||
{
|
||||
b_ = 500.0;
|
||||
a_ = (1.0 + fmax*(b_ - 2.0))/(1.0 - fmax);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaFunction::BetaFunction(const scalar mf, const scalar mfVar)
|
||||
:
|
||||
mf_(mf),
|
||||
mfVar_(mfVar),
|
||||
a_(0.0),
|
||||
b_(0.0),
|
||||
fdelta_(false),
|
||||
delta0_(false),
|
||||
delta1_(false)
|
||||
{
|
||||
_setParameters();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaFunction::~BetaFunction()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::BetaFunction
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
BetaFunctionI.H
|
||||
BetaFunction.C
|
||||
BetaFunctionIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef BetaFunction_H
|
||||
#define BetaFunction_H
|
||||
|
||||
#include "scalar.H"
|
||||
#include "Switch.H"
|
||||
#include "scalarField.H"
|
||||
#include "tmp.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
namespace CMC
|
||||
{
|
||||
class BetaFunction;
|
||||
}
|
||||
Istream& operator>>(Istream&, CMC::BetaFunction&);
|
||||
Ostream& operator<<(Ostream&, const CMC::BetaFunction&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class BetaFunction Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace CMC
|
||||
{
|
||||
|
||||
class BetaFunction
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Mean mixture fraction
|
||||
scalar mf_;
|
||||
|
||||
//- Mixture fraction variance
|
||||
scalar mfVar_;
|
||||
|
||||
//- Beta pdf parameter alpha
|
||||
scalar a_;
|
||||
|
||||
//- Beta pdf parameter beta
|
||||
scalar b_;
|
||||
|
||||
//- Flag beta pdf special case: forced-delta function
|
||||
Switch fdelta_;
|
||||
|
||||
//- delta function at pure oxidizer stream
|
||||
Switch delta0_;
|
||||
|
||||
//- delta function at pure fuel stream
|
||||
Switch delta1_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Calculate alpha and beta and set special case flags
|
||||
void _setParameters();
|
||||
|
||||
//- Limit too large value of beta pdf parameters
|
||||
void _limitAB();
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
// BetaFunction(const BetaFunction&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
// void operator=(const BetaFunction&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Static data staticData
|
||||
// static const scalar staticData;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
BetaFunction(const scalar mf, const scalar mfVar);
|
||||
|
||||
//- Construct from Istream
|
||||
BetaFunction(Istream&);
|
||||
|
||||
//- Construct as copy
|
||||
// BetaFunction(const BetaFunction&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~BetaFunction();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
tmp<scalarField> etaFunc(const UList<scalar>& eta) const
|
||||
{
|
||||
return pow(eta, a_-1.0)*pow(1.0-eta, b_-1.0);
|
||||
}
|
||||
|
||||
scalar etaFunc(const scalar eta) const
|
||||
{
|
||||
return Foam::pow(eta, a_-1.0)*Foam::pow(1.0-eta, b_-1.0);
|
||||
}
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
Switch fdelta() const {return fdelta_;}
|
||||
|
||||
Switch delta0() const {return delta0_;}
|
||||
|
||||
Switch delta1() const {return delta1_;}
|
||||
|
||||
scalar mf() const {return mf_;}
|
||||
|
||||
scalar mfVar() const {return mfVar_;}
|
||||
|
||||
scalar alpha() const {return a_;}
|
||||
|
||||
scalar beta() const {return b_;}
|
||||
|
||||
// Check
|
||||
|
||||
// Edit
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// void operator=(const BetaFunction&);
|
||||
|
||||
|
||||
// Friend Functions
|
||||
|
||||
// Friend Operators
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& ::Foam::operator>>(Istream&, BetaFunction&);
|
||||
friend Ostream& ::Foam::operator<<(Ostream&, const BetaFunction&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CMC
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "BetaFunctionI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaFunction.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaFunction::BetaFunction(Istream& is)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check("Foam::CMC::BetaFunction::BetaFunction(Foam::Istream&)");
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, CMC::BetaFunction&)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::CMC::BetaFunction&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const CMC::BetaFunction&)
|
||||
{
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::CMC::BetaFunction&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
126
applications/solvers/combustion/SLFMFoam/BetaGrid/BetaGrid.C
Normal file
126
applications/solvers/combustion/SLFMFoam/BetaGrid/BetaGrid.C
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaGrid.H"
|
||||
|
||||
#include "error.H"
|
||||
#include "dictionary.H"
|
||||
#include "SubList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// const scalar Foam::CMC::BetaGrid::staticData();
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaGrid::BetaGrid(const dictionary& dict)
|
||||
:
|
||||
etaCut_(dict.lookup("detailedEta")),
|
||||
nSpacings_(dict.lookup("detailedN")),
|
||||
etaSpace_(sum(nSpacings_)+3)
|
||||
{
|
||||
// Check for input list size
|
||||
if (etaCut_.size() != nSpacings_.size() + 1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Number of grid interval points does not match number of grid sizes"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Check for evenness of number of spacings in each interval
|
||||
forAll (nSpacings_, i)
|
||||
{
|
||||
if ((nSpacings_[i] % 2) == 1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Number of spacings in intervals should be even"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
forAll(nSpacings_, i)
|
||||
{
|
||||
const label ns = nSpacings_[i];
|
||||
const labelList::subList prev(nSpacings_, i);
|
||||
const label baseI = sum(prev) + 1;
|
||||
|
||||
const scalar low = etaCut_[i];
|
||||
const scalar upp = etaCut_[i+1];
|
||||
const scalar delta = (upp - low) / scalar(ns);
|
||||
|
||||
for (label j = 0; j < ns; j++)
|
||||
{
|
||||
etaSpace_[baseI+j] = low + delta * j;
|
||||
}
|
||||
}
|
||||
etaSpace_[0] = 0.0;
|
||||
etaSpace_[etaSpace_.size()-2] = etaCut_.last();
|
||||
etaSpace_[etaSpace_.size()-1] = 1.0;
|
||||
}
|
||||
|
||||
|
||||
Foam::CMC::BetaGrid::BetaGrid(const BetaGrid&)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaGrid::~BetaGrid()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::CMC::BetaGrid::operator=(const BetaGrid& rhs)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
161
applications/solvers/combustion/SLFMFoam/BetaGrid/BetaGrid.H
Normal file
161
applications/solvers/combustion/SLFMFoam/BetaGrid/BetaGrid.H
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::BetaGrid
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
BetaGridI.H
|
||||
BetaGrid.C
|
||||
BetaGridIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef BetaGrid_H
|
||||
#define BetaGrid_H
|
||||
|
||||
#include "scalarField.H"
|
||||
#include "labelList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
namespace CMC
|
||||
{
|
||||
class BetaGrid;
|
||||
}
|
||||
class dictionary;
|
||||
|
||||
Istream& operator>>(Istream&, CMC::BetaGrid&);
|
||||
Ostream& operator<<(Ostream&, const CMC::BetaGrid&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class BetaGrid Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace CMC
|
||||
{
|
||||
|
||||
class BetaGrid
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Piecewise uniform interval points
|
||||
scalarField etaCut_;
|
||||
|
||||
//- Sizes of piecewise uniform intervals
|
||||
labelList nSpacings_;
|
||||
|
||||
//- Mixture fraction eta grid points
|
||||
scalarField etaSpace_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
BetaGrid(const BetaGrid&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const BetaGrid&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Static data staticData
|
||||
// static const scalar staticData;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
BetaGrid(const dictionary& dict);
|
||||
|
||||
//- Construct from Istream
|
||||
BetaGrid(Istream&);
|
||||
|
||||
//- Construct as copy
|
||||
// BetaGrid(const BetaGrid&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~BetaGrid();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
const labelList& N() const {return nSpacings_;}
|
||||
|
||||
const scalarField& etaCut() const {return etaCut_;}
|
||||
|
||||
const scalarField& etaSpace() const {return etaSpace_;}
|
||||
|
||||
// Check
|
||||
|
||||
// Edit
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// void operator=(const BetaGrid&);
|
||||
|
||||
|
||||
// Friend Functions
|
||||
|
||||
// Friend Operators
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& ::Foam::operator>>(Istream&, BetaGrid&);
|
||||
friend Ostream& ::Foam::operator<<(Ostream&, const BetaGrid&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CMC
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "BetaGridI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaGrid.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaGrid::BetaGrid(Istream& is)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check("Foam::CMC::BetaGrid::BetaGrid(Foam::Istream&)");
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, CMC::BetaGrid&)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::CMC::BetaGrid&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const CMC::BetaGrid&)
|
||||
{
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::CMC::BetaGrid&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaIntegrator.H"
|
||||
|
||||
|
||||
#include "error.H"
|
||||
#include "SubList.H"
|
||||
#include "SubField.H"
|
||||
#include "interpolateXY.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
// const scalar Foam::CMC::BetaIntegrator::staticData();
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
//extended Simpson's rule (Numerical recipes, 2nd Ed. p.128)
|
||||
//for equally spaced and even N intervals (or odd N+1 points)
|
||||
Foam::scalar Foam::CMC::BetaIntegrator::simps
|
||||
(const scalar xl, const scalar xh, const label n, const UList<scalar>& fx)
|
||||
const
|
||||
{
|
||||
scalar evensum(0.0), oddsum(0.0), sum(0.0);
|
||||
|
||||
scalar h = (xh - xl)/scalar(n);
|
||||
|
||||
for(label i=0 ; i<fx.size() ; i++)
|
||||
{
|
||||
if(i%2 == 0)
|
||||
{
|
||||
evensum += fx[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
oddsum += fx[i];
|
||||
}
|
||||
}
|
||||
|
||||
sum = -1.0*fx.first() + 2.0*evensum + 4.0*oddsum - 1.0*fx.last();
|
||||
|
||||
return sum*(h/3.0);
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::CMC::BetaIntegrator::sumSimps(const UList<scalar>& f) const
|
||||
{
|
||||
scalar total = 0.0;
|
||||
|
||||
const labelList &N(bg_.N());
|
||||
const scalarField &etaCut(bg_.etaCut());
|
||||
|
||||
forAll(N, i)
|
||||
{
|
||||
const labelList::subList prev(N, i);
|
||||
const label baseI = sum(prev) + 1;
|
||||
|
||||
const scalarField::subField subInterval(f, N[i]+1, baseI);
|
||||
|
||||
total += simps(etaCut[i], etaCut[i+1], N[i], subInterval);
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaIntegrator::BetaIntegrator(const BetaFunction& bf, const BetaGrid &bg)
|
||||
:
|
||||
etaSpace_(bg.etaSpace()),
|
||||
pdfNum_(bg.etaSpace().size(), 0.0),
|
||||
pdfDen_(0.0),
|
||||
bf_(bf),
|
||||
bg_(bg)
|
||||
{
|
||||
const scalarField::subField domain(etaSpace_, etaSpace_.size()-2, 1);
|
||||
scalarField::subField range(pdfNum_, etaSpace_.size()-2, 1);
|
||||
|
||||
if (bf_.fdelta())
|
||||
{
|
||||
pdfDen_ = 1.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
range = bf_.etaFunc(domain);
|
||||
|
||||
if (!bf_.delta0())
|
||||
{
|
||||
pdfNum_.first() = bf_.etaFunc(etaSpace_.first());
|
||||
}
|
||||
|
||||
if (!bf_.delta1())
|
||||
{
|
||||
pdfNum_.last() = bf_.etaFunc(etaSpace_.last());
|
||||
}
|
||||
|
||||
pdfDen_ = sumSimps(pdfNum_)
|
||||
+ Foam::pow(etaSpace_[1], bf_.alpha())/(bf_.alpha() + SMALL)
|
||||
+ Foam::pow(etaSpace_[1], bf_.beta())/(bf_.beta() + SMALL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::CMC::BetaIntegrator::~BetaIntegrator()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// beta-pdf weighted integration for given mf, mfVar and f
|
||||
Foam::scalar Foam::CMC::BetaIntegrator::betaIntegrate(const scalarField& f) const
|
||||
{
|
||||
scalar result = 0.0;
|
||||
|
||||
if(bf_.fdelta())
|
||||
{
|
||||
result = interpolateXY(bf_.mf(), etaSpace_, f);
|
||||
}
|
||||
else
|
||||
{
|
||||
scalar num = sumSimps (f * pdfNum_)
|
||||
+ f.first()*Foam::pow(etaSpace_[1], bf_.alpha())/(bf_.alpha() + SMALL)
|
||||
+ f.last()*Foam::pow(etaSpace_[1], bf_.beta())/(bf_.beta() + SMALL);
|
||||
result = num/pdfDen_;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::CMC::BetaIntegrator::operator=(const BetaIntegrator& rhs)
|
||||
{
|
||||
// Check for assignment to self
|
||||
if (this == &rhs)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Attempted assignment to self"
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::CMC::BetaIntegrator
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
BetaIntegratorI.H
|
||||
BetaIntegrator.C
|
||||
BetaIntegratorIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef BetaIntegrator_H
|
||||
#define BetaIntegrator_H
|
||||
|
||||
#include "scalarField.H"
|
||||
#include "BetaFunction.H"
|
||||
#include "BetaGrid.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
namespace CMC
|
||||
{
|
||||
class BetaIntegrator;
|
||||
}
|
||||
Istream& operator>>(Istream&, CMC::BetaIntegrator&);
|
||||
Ostream& operator<<(Ostream&, const CMC::BetaIntegrator&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class BetaIntegrator Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
namespace CMC
|
||||
{
|
||||
|
||||
class BetaIntegrator
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Quadrature points
|
||||
const scalarField &etaSpace_;
|
||||
|
||||
//- Beta pdf numerators
|
||||
scalarField pdfNum_;
|
||||
|
||||
//- Beta pdf denominator
|
||||
scalar pdfDen_;
|
||||
|
||||
//- Description of data_
|
||||
BetaFunction bf_;
|
||||
|
||||
//- Description of data_
|
||||
const BetaGrid &bg_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Calculate integral using Simpson's rule
|
||||
scalar simps(const scalar xl, const scalar xh, const label n, const UList<scalar>& fx) const;
|
||||
|
||||
//- Calculate integral using Simpson's rule
|
||||
scalar sumSimps(const UList<scalar>& f) const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
BetaIntegrator(const BetaIntegrator&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const BetaIntegrator&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Static data staticData
|
||||
// static const scalar staticData;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
BetaIntegrator(const BetaFunction& bf, const BetaGrid &bg);
|
||||
|
||||
//- Construct as copy
|
||||
// BetaIntegrator(const BetaIntegrator&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~BetaIntegrator();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
scalar betaIntegrate(const scalarField& f) const;
|
||||
|
||||
// Access
|
||||
|
||||
scalar pdfDen () const {return pdfDen_;}
|
||||
|
||||
// Check
|
||||
|
||||
// Edit
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// void operator=(const BetaIntegrator&);
|
||||
|
||||
|
||||
// Friend Functions
|
||||
|
||||
// Friend Operators
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& ::Foam::operator>>(Istream&, BetaIntegrator&);
|
||||
friend Ostream& ::Foam::operator<<(Ostream&, const BetaIntegrator&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace CMC
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "BetaIntegratorI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "BetaIntegrator.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, CMC::BetaIntegrator&)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::CMC::BetaIntegrator&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const CMC::BetaIntegrator&)
|
||||
{
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::CMC::BetaIntegrator&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "FlameStructure.H"
|
||||
|
||||
#include "fileName.H"
|
||||
#include "IFstream.H"
|
||||
#include "hashedWordList.H"
|
||||
#include "interpolateXY.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::SLFM::FlameStructure::FlameStructure(const string& NstDir, scalarList NstList, const scalarField &etaGrid, const hashedWordList &spTable)
|
||||
:
|
||||
NstDir_(NstDir),
|
||||
NstList_(NstList),
|
||||
eta_(etaGrid),
|
||||
species_(spTable),
|
||||
Y_(spTable.size(), scalarFieldArray1d(NstList_.size(), scalarField(eta_.size(), 0.0))),
|
||||
W_(spTable.size(), scalarFieldArray1d(NstList_.size(), scalarField(eta_.size(), 0.0))),
|
||||
T_(NstList_.size(), scalarField(eta_.size(), 0.0)),
|
||||
Q_(NstList_.size(), scalarField(eta_.size(), 0.0)),
|
||||
h_(NstList_.size(), scalarField(eta_.size(), 0.0)),
|
||||
rho_(NstList_.size(), scalarField(eta_.size(), 0.0)),
|
||||
Rgas_(NstList_.size(), scalarField(eta_.size(), 0.0))
|
||||
{
|
||||
for (label n = 0; n < NstList_.size(); n++)
|
||||
{
|
||||
scalar N = NstList_[n];
|
||||
|
||||
fileName fname = "sdr"+Foam::name(N)+".inp";
|
||||
IFstream fin(NstDir_/fname);
|
||||
|
||||
string gbg;
|
||||
label etamax_SLFM, NoSpecies;
|
||||
|
||||
//INPUT FILE...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//No.GRID...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//Number of eta-point and species
|
||||
fin >> etamax_SLFM >> NoSpecies;
|
||||
|
||||
//blank line
|
||||
fin.getLine(gbg);
|
||||
|
||||
//PRESSURE...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//1.00...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//MIXTURE...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//read eta space (from SLFM library)
|
||||
scalarField etaValue_SLFM(etamax_SLFM, 0.0);
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
fin>>etaValue_SLFM[j];
|
||||
}
|
||||
|
||||
//blank line
|
||||
fin.getLine(gbg);
|
||||
|
||||
//INITIAL...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//species loop
|
||||
scalarField temp(etamax_SLFM, 0.0);
|
||||
for(label i = 0 ; i < NoSpecies ; i++)
|
||||
{
|
||||
word spName;
|
||||
//H2... (species name)
|
||||
fin >> spName;
|
||||
const label spI (species_[spName]);
|
||||
|
||||
// Info << spI << spName << endl;
|
||||
|
||||
//read species mass fraction (from SLFM library)
|
||||
for(label j=0 ; j<etamax_SLFM ; j++)
|
||||
{
|
||||
scalar Yj = 0.0;
|
||||
fin >> Yj;
|
||||
temp[j] = max(0.0, Yj);
|
||||
}
|
||||
|
||||
Y_[spI][n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
|
||||
//read reaction rate (from SLFM library)
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
fin>>temp[j];
|
||||
}
|
||||
|
||||
W_[spI][n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
|
||||
//blank line
|
||||
fin.getLine(gbg);
|
||||
}
|
||||
|
||||
//read temperature
|
||||
{
|
||||
//H2... (species name)
|
||||
fin.getLine(gbg);
|
||||
|
||||
//read temperature
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
scalar Yj = 0.0;
|
||||
fin >> Yj;
|
||||
temp[j] = max(0.0, Yj);
|
||||
}
|
||||
|
||||
T_[n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
|
||||
//read heat source
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
fin>>temp[j];
|
||||
}
|
||||
|
||||
Q_[n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
|
||||
//blank line
|
||||
fin.getLine(gbg);
|
||||
}
|
||||
|
||||
//DENSITY...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//read density (from SLFM library)
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
fin>>temp[j];
|
||||
}
|
||||
//Info<<rho_temp<<endl;
|
||||
|
||||
rho_[n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
|
||||
//blank line
|
||||
fin.getLine(gbg);
|
||||
|
||||
//ENTHALPY...
|
||||
fin.getLine(gbg);
|
||||
|
||||
//read enthalpy (from SLFM library)
|
||||
for(label j = 0 ; j < etamax_SLFM ; j++)
|
||||
{
|
||||
fin>>temp[j];
|
||||
}
|
||||
|
||||
h_[n] = interpolateXY(etaGrid, etaValue_SLFM, temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::SLFM::FlameStructure::~FlameStructure()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::SLFM::FlameStructure
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
FlameStructureI.H
|
||||
FlameStructure.C
|
||||
FlameStructureIO.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef FlameStructure_H
|
||||
#define FlameStructure_H
|
||||
|
||||
#include "error.H"
|
||||
#include "scalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
class hashedWordList;
|
||||
|
||||
namespace SLFM
|
||||
{
|
||||
class FlameStructure;
|
||||
}
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
Istream& operator>>(Istream&, SLFM::FlameStructure&);
|
||||
Ostream& operator<<(Ostream&, const SLFM::FlameStructure&);
|
||||
|
||||
namespace SLFM
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class FlameStructure Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class FlameStructure
|
||||
{
|
||||
// Private data
|
||||
typedef List<scalarField> scalarFieldArray1d;
|
||||
|
||||
typedef List<scalarFieldArray1d> scalarFieldArray2d;
|
||||
|
||||
typedef List<scalarFieldArray2d> scalarFieldArray3d;
|
||||
|
||||
//- Species mass fraction
|
||||
word NstDir_;
|
||||
|
||||
//- Species mass fraction
|
||||
const scalarList NstList_;
|
||||
|
||||
//- Species mass fraction
|
||||
const scalarField eta_;
|
||||
|
||||
//- Species mass fraction
|
||||
const hashedWordList &species_;
|
||||
|
||||
//- Species mass fraction
|
||||
scalarFieldArray2d Y_;
|
||||
|
||||
//- Species production rate
|
||||
scalarFieldArray2d W_;
|
||||
|
||||
//- Temperature
|
||||
scalarFieldArray1d T_;
|
||||
|
||||
//- Heat source
|
||||
scalarFieldArray1d Q_;
|
||||
|
||||
//- Enthalpy
|
||||
scalarFieldArray1d h_;
|
||||
|
||||
//- Density
|
||||
scalarFieldArray1d rho_;
|
||||
|
||||
//- Specific gas constant for mean W
|
||||
scalarFieldArray1d Rgas_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow Construct null
|
||||
FlameStructure();
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
// FlameStructure(const FlameStructure&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
// void operator=(const FlameStructure&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
// Static data members
|
||||
|
||||
//- Static data staticData
|
||||
// static const dataType staticData;
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
FlameStructure(const string& NstDir, scalarList NstList, const scalarField &etaGrid, const hashedWordList& spTable);
|
||||
|
||||
//- Construct from Istream
|
||||
// FlameStructure(Istream&);
|
||||
|
||||
//- Construct as copy
|
||||
// FlameStructure(const FlameStructure&);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Select null constructed
|
||||
// static autoPtr<FlameStructure> New();
|
||||
|
||||
|
||||
//- Destructor
|
||||
~FlameStructure();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray2d& Y() {return Y_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray2d& W() {return W_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray1d& T() {return T_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray1d& Q() {return Q_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray1d& rho() {return rho_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray1d& h() {return h_;}
|
||||
|
||||
//- Select null constructed
|
||||
scalarFieldArray1d& Rgas() {return Rgas_;}
|
||||
|
||||
// Check
|
||||
|
||||
// Edit
|
||||
|
||||
// Write
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
// void operator=(const FlameStructure&);
|
||||
|
||||
|
||||
// Friend Functions
|
||||
|
||||
// Friend Operators
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>(Istream&, FlameStructure&);
|
||||
friend Ostream& operator<<(Ostream&, const FlameStructure&);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace SLFM
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "FlameStructureI.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "FlameStructure.H"
|
||||
#include "IOstreams.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
/*
|
||||
Foam::SLFM::FlameStructure::FlameStructure(Istream& is)
|
||||
:
|
||||
base1(is),
|
||||
base2(is),
|
||||
member1(is),
|
||||
member2(is)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check("Foam::SLFM::FlameStructure::FlameStructure(Foam::Istream&)");
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, SLFM::FlameStructure&)
|
||||
{
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::SLFM::FlameStructure&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<(Ostream& os, const SLFM::FlameStructure&)
|
||||
{
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::SLFM::FlameStructure&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
17
applications/solvers/combustion/SLFMFoam/Make/files
Normal file
17
applications/solvers/combustion/SLFMFoam/Make/files
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
FlameStructure/FlameStructure.C
|
||||
FlameStructure/FlameStructureIO.C
|
||||
|
||||
./AMC/AMC.C
|
||||
|
||||
./BetaFunction/BetaFunction.C
|
||||
./BetaFunction/BetaFunctionIO.C
|
||||
|
||||
./BetaGrid/BetaGrid.C
|
||||
./BetaGrid/BetaGridIO.C
|
||||
|
||||
./BetaIntegrator/BetaIntegrator.C
|
||||
./BetaIntegrator/BetaIntegratorIO.C
|
||||
|
||||
SLFMFoam.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/SLFMFoam
|
||||
34
applications/solvers/combustion/SLFMFoam/Make/options
Normal file
34
applications/solvers/combustion/SLFMFoam/Make/options
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
EXE_INC = \
|
||||
-I. \
|
||||
-I./AMC \
|
||||
-I./BetaFunction \
|
||||
-I./BetaGrid \
|
||||
-I./BetaIntegrator \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lspecie \
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lreactionThermophysicalModels \
|
||||
-lchemistryModel \
|
||||
-lODE \
|
||||
-lcombustionModels \
|
||||
-lfvOptions \
|
||||
-lsampling
|
||||
10
applications/solvers/combustion/SLFMFoam/Mixturefraction.H
Normal file
10
applications/solvers/combustion/SLFMFoam/Mixturefraction.H
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// mixture fraction equation
|
||||
fvScalarMatrix mfEqn
|
||||
(
|
||||
fvm::div(phi, mf)
|
||||
- fvm::laplacian((1/Sc)*turbulence->mut(), mf) //let 1/Sc = 1.47
|
||||
);
|
||||
|
||||
mfEqn.relax();
|
||||
|
||||
mfEqn.solve();
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
//mixture fraction variance equation
|
||||
//cf) mfVar should not be ZERO
|
||||
SDR = turbulence->epsilon() * mfVar / turbulence->k();
|
||||
volVectorField Gradmf = fvc::grad(mf);
|
||||
|
||||
fvScalarMatrix mfVarEqn
|
||||
(
|
||||
fvm::div(phi, mfVar)
|
||||
- fvm::laplacian((1/Sc) * turbulence->mut(), mfVar)
|
||||
==
|
||||
2 * ((1/Sc) * turbulence->mut()) * (Gradmf & Gradmf)
|
||||
- 2 * rho * SDR
|
||||
);
|
||||
|
||||
mfVarEqn.relax();
|
||||
|
||||
mfVarEqn.solve();
|
||||
118
applications/solvers/combustion/SLFMFoam/SLFMFoam.C
Normal file
118
applications/solvers/combustion/SLFMFoam/SLFMFoam.C
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
SLFMFoam
|
||||
|
||||
Description
|
||||
Steady Laminar Flamelet Model(SLFM) solver for turbulent combustion. SLFM
|
||||
assumes a turbulent flame composed of thin stretched laminar flamelets.
|
||||
Each flamelet library is generated by external program and imported by
|
||||
the solver.
|
||||
|
||||
References
|
||||
A.Y. Klimenko, R.W. Bilger, Progress in Energy and Combustion Science 25 (1999) 595-687
|
||||
N. Peters, Turbulent Combustion, Cambridge University Press (2000)
|
||||
|
||||
Contact
|
||||
POSTECH combustion lab.
|
||||
huh@postech.ac.kr
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "rhoCombustionModel.H"
|
||||
#include "fvOptions.H"
|
||||
#include "simpleControl.H"
|
||||
#include "FlameStructure/FlameStructure.H"
|
||||
#include "interpolateXY.H"
|
||||
|
||||
#include "AMC.H"
|
||||
#include "BetaFunction.H"
|
||||
#include "BetaGrid.H"
|
||||
#include "BetaIntegrator.H"
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
turbulence->validate();
|
||||
|
||||
//SLFM
|
||||
Info<<"Read SLFM library"<<endl;
|
||||
#include "readSLFMlib.H" //read SLFM library
|
||||
|
||||
Info<<"Construct Beta-PDF"<<endl;
|
||||
#include "preIntegration.H" //AMC C1 coefficient pdf integration
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (simple.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// --- Pressure-velocity SIMPLE corrector loop
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "Mixturefraction.H" //mean mixture fraction
|
||||
#include "MixturefractionVar.H" //mean mixture fraction variance
|
||||
#include "setSDR.H" //calculate scalar dissipation rate
|
||||
#include "updateT_RHO.H" //update temperature and density
|
||||
#include "pEqn.H"
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
if (runTime.write())
|
||||
{
|
||||
#include "updateYi.H" //update species
|
||||
}
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
20
applications/solvers/combustion/SLFMFoam/UEqn.H
Normal file
20
applications/solvers/combustion/SLFMFoam/UEqn.H
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
MRF.correctBoundaryVelocity(U);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ MRF.DDt(rho, U)
|
||||
+ turbulence->divDevRhoReff(U)
|
||||
==
|
||||
rho()*g
|
||||
+ fvOptions(rho, U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
|
||||
fvOptions.correct(U);
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
const volScalarField& psi = thermo.psi();
|
||||
//const volScalarField& T = thermo.T();
|
||||
374
applications/solvers/combustion/SLFMFoam/createFields.H
Normal file
374
applications/solvers/combustion/SLFMFoam/createFields.H
Normal file
|
|
@ -0,0 +1,374 @@
|
|||
#include "readGravitationalAcceleration.H"
|
||||
|
||||
Info<< "Creating combustion model\n" << endl;
|
||||
|
||||
autoPtr<combustionModels::rhoCombustionModel> combustion
|
||||
(
|
||||
combustionModels::rhoCombustionModel::New(mesh)
|
||||
);
|
||||
|
||||
rhoReactionThermo& thermo = combustion->thermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
|
||||
basicSpecieMixture& composition = thermo.composition();
|
||||
PtrList<volScalarField>& Y = composition.Y();
|
||||
|
||||
const word inertSpecie(thermo.lookup("inertSpecie"));
|
||||
|
||||
if (!composition.contains(inertSpecie))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Specified inert specie '" << inertSpecie << "' not found in "
|
||||
<< "species list. Available species:" << composition.species()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
volScalarField& p = thermo.p();
|
||||
volScalarField& T = thermo.T();
|
||||
|
||||
wordList rhoBoundaryTypes
|
||||
(
|
||||
T.boundaryField().size(),
|
||||
zeroGradientFvPatchScalarField::typeName
|
||||
);
|
||||
|
||||
forAll(composition.Y(inertSpecie).boundaryField(), patchi)
|
||||
{
|
||||
rhoBoundaryTypes[patchi]
|
||||
= composition.Y(inertSpecie).boundaryField()[patchi].type();
|
||||
}
|
||||
|
||||
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo.rho(),
|
||||
rhoBoundaryTypes
|
||||
);
|
||||
|
||||
Info<< "\nReading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
#include "compressibleCreatePhi.H"
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMax",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
GREAT
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMin
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMin",
|
||||
simple.dict(),
|
||||
dimDensity,
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
// Set the turbulence into the combustion model
|
||||
combustion->setTurbulence(turbulence());
|
||||
|
||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
fields.add(thermo.he());
|
||||
|
||||
|
||||
// SLFM-related fields
|
||||
|
||||
Info<<"Creating field mf, mfVar, SDR\n"<<endl;
|
||||
|
||||
volScalarField mf //mixture fraction
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mf",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volScalarField mfVar //mixture fraction variance
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"mfVar",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volScalarField SDR //scalar dissipation rate
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"SDR",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("SDR", dimEnergy/dimTime/dimEnergy, 0.0)
|
||||
);
|
||||
|
||||
volScalarField jlc //eta-index, lower
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"jlc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("jlc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField jhc //eta-index, higher
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"jhc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("jhc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField jfc //eta-factor
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"jfc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("jfc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField vlc //var-index, lower
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"vlc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("vlc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField vhc //var-index, higher
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"vhc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("vhc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField vfc //var-factor
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"vfc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("vfc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField nlc //sdr-index, lower
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nlc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("nlc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField nhc //sdr-index, higher
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nhc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("nhc", dimless, 0.0)
|
||||
);
|
||||
|
||||
volScalarField nfc //sdr-factor
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nfc",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("nfc", dimless, 0.0)
|
||||
);
|
||||
|
||||
//SLFM property read
|
||||
|
||||
IOdictionary SLFMdict //SLFM properties dictionary
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"SLFMdict",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
const wordList postSpecieNames(SLFMdict.lookup("postSpecieNames"));
|
||||
labelList postSpecieIndices(postSpecieNames.size(),-1);
|
||||
forAll(postSpecieNames, i)
|
||||
{
|
||||
const word &spName (postSpecieNames[i]);
|
||||
const label spI (composition.species()[spName]);
|
||||
postSpecieIndices[i] = spI;
|
||||
}
|
||||
scalar stoiMF(readScalar(SLFMdict.lookup("stoiMF")));
|
||||
scalar stretchFac(readScalar(SLFMdict.lookup("stretchFactor")));
|
||||
scalar lowerN(readScalar(SLFMdict.lookup("lowerN")));
|
||||
scalar upperN(readScalar(SLFMdict.lookup("upperN")));
|
||||
scalar Sc(readScalar(SLFMdict.lookup("Sc")));
|
||||
const label etamax(lowerN+upperN+1);
|
||||
word outletName(SLFMdict.lookup("outletName"));
|
||||
|
||||
labelList nIntervals (SLFMdict.lookup("detailedN"));
|
||||
|
||||
CMC::BetaGrid bg(SLFMdict);
|
||||
const scalarField &etaGrid(bg.etaSpace());
|
||||
const scalarField amcGridValue(CMC::AMC(etaGrid));
|
||||
|
||||
Info << etaGrid << endl;
|
||||
|
||||
scalarField etaValue(etamax,0);
|
||||
scalarField etaIndex(etamax,0);
|
||||
scalarField deta_h(etamax,0);
|
||||
scalarField deta_l(etamax,0);
|
||||
scalarField deta_m(etamax,0);
|
||||
|
||||
#include "setEtaSpace.H"
|
||||
|
||||
Info<<"\nNumber of eta-point = "<<etamax<<endl;
|
||||
|
||||
|
||||
scalar NVar(readScalar(SLFMdict.lookup("NVar")));
|
||||
scalarField varValue(NVar+1,0);
|
||||
scalarField varIndex(NVar+1,0);
|
||||
|
||||
#include "setVarSpace.H"
|
||||
|
||||
|
||||
|
||||
PtrList<volScalarField> Neta(etamax);
|
||||
|
||||
for(label j=0 ; j<etamax ; j++)
|
||||
{
|
||||
|
||||
|
||||
word Netai = "Neta_"+Foam::name(j);
|
||||
Neta.set
|
||||
(
|
||||
j,
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
Netai,
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar(Netai, dimless, 0.0)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
#include "createMRF.H"
|
||||
55
applications/solvers/combustion/SLFMFoam/pEqn.H
Normal file
55
applications/solvers/combustion/SLFMFoam/pEqn.H
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
// Thermodynamic density needs to be updated by psi*d(p) after the
|
||||
// pressure solution - done in 2 parts. Part 1:
|
||||
thermo.rho() -= psi*p;
|
||||
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
tUEqn.clear();
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
fvc::interpolate(rho)*fvc::flux(HbyA)
|
||||
);
|
||||
|
||||
MRF.makeRelative(fvc::interpolate(rho), phiHbyA);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rho, U, phiHbyA, rhorAUf, MRF);
|
||||
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvc::div(phiHbyA)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi = phiHbyA + pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
p.relax();
|
||||
|
||||
// Second part of thermodynamic density update
|
||||
thermo.rho() += psi*p;
|
||||
|
||||
#include "compressibleContinuityErrs.H"
|
||||
|
||||
U = HbyA - rAU*fvc::grad(p);
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
Info<< "p min/max = " << min(p).value() << ", " << max(p).value() << endl;
|
||||
}
|
||||
78
applications/solvers/combustion/SLFMFoam/preIntegration.H
Normal file
78
applications/solvers/combustion/SLFMFoam/preIntegration.H
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
scalarFieldArray1d C1table //AMC C1 coefficient table
|
||||
(
|
||||
etamax,
|
||||
scalarField(NVar+1, 0)
|
||||
);
|
||||
|
||||
scalarFieldArray2d Ttable
|
||||
(
|
||||
etamax,
|
||||
scalarFieldArray1d
|
||||
(
|
||||
NVar+1,
|
||||
scalarField(NstList.size(), 0)
|
||||
)
|
||||
);
|
||||
|
||||
scalarFieldArray2d Rtable
|
||||
(
|
||||
etamax,
|
||||
scalarFieldArray1d
|
||||
(
|
||||
NVar+1,
|
||||
scalarField(NstList.size(), 0)
|
||||
)
|
||||
);
|
||||
|
||||
scalarFieldArray3d Ytable
|
||||
(
|
||||
Y.size(),
|
||||
scalarFieldArray2d
|
||||
(
|
||||
etamax,
|
||||
scalarFieldArray1d
|
||||
(
|
||||
NVar+1,
|
||||
scalarField(NstList.size(), 0)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
Info<<"Construct C1 coefficient table"<<endl;
|
||||
for(label j = 1; j < etamax - 1; j++)
|
||||
{
|
||||
for(label v = 1; v < varValue.size() - 1; v++)
|
||||
{
|
||||
const scalar mf = etaValue[j];
|
||||
const scalar mfVar = varValue[v]*mf*(1.0-mf);
|
||||
|
||||
CMC::BetaFunction bf(mf, mfVar);
|
||||
CMC::BetaIntegrator bi(bf, bg);
|
||||
|
||||
C1table[j][v] = 1.0/bi.betaIntegrate(amcGridValue);
|
||||
}
|
||||
}
|
||||
|
||||
Info<<"Construct Temp and Rgas table"<<endl;
|
||||
for(label j=0 ; j<etamax ; j++)
|
||||
{
|
||||
for(label v=0 ; v<=NVar ; v++)
|
||||
{
|
||||
const scalar mf = etaValue[j];
|
||||
const scalar mfVar = varValue[v]*mf*(1.0-mf);
|
||||
|
||||
CMC::BetaFunction bf(mf, mfVar);
|
||||
CMC::BetaIntegrator bi(bf, bg);
|
||||
|
||||
for(label n=0 ; n<NstList.size() ; n++)
|
||||
{
|
||||
Ttable[j][v][n] = bi.betaIntegrate(T_SLFM[n]);
|
||||
Rtable[j][v][n] = bi.betaIntegrate(Rgas_SLFM[n]);
|
||||
forAll(Y, yi)
|
||||
{
|
||||
Ytable[yi][j][v][n] = bi.betaIntegrate(Y_SLFM[yi][n]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Info<<scalar(j+1)/etamax*100<<"%"<<endl;
|
||||
}
|
||||
33
applications/solvers/combustion/SLFMFoam/readSLFMlib.H
Normal file
33
applications/solvers/combustion/SLFMFoam/readSLFMlib.H
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Switch Equilibrium = SLFMdict.lookup("Equilibrium");
|
||||
word NstFolder = SLFMdict.lookup("NstFolder");
|
||||
scalarField NstList = SLFMdict.lookup("NstList");
|
||||
scalarField NstIndex(NstList.size(),0);
|
||||
|
||||
forAll(NstList, n)
|
||||
{
|
||||
NstIndex[n] = n;
|
||||
}
|
||||
|
||||
typedef List<scalarField> scalarFieldArray1d;
|
||||
typedef List<scalarFieldArray1d> scalarFieldArray2d;
|
||||
typedef List<scalarFieldArray2d> scalarFieldArray3d;
|
||||
|
||||
SLFM::FlameStructure slfmLibrary(runTime.constant()/NstFolder, NstList, etaGrid, composition.species());
|
||||
|
||||
scalarFieldArray2d& Y_SLFM (slfmLibrary.Y());
|
||||
scalarFieldArray2d& W_SLFM (slfmLibrary.W());
|
||||
scalarFieldArray1d& T_SLFM (slfmLibrary.T());
|
||||
scalarFieldArray1d& Q_SLFM (slfmLibrary.Q());
|
||||
scalarFieldArray1d& rho_SLFM (slfmLibrary.rho());
|
||||
scalarFieldArray1d& h_SLFM (slfmLibrary.h());
|
||||
scalarFieldArray1d& Rgas_SLFM (slfmLibrary.Rgas());
|
||||
|
||||
for(label n=0 ; n<NstList.size() ; n++)
|
||||
{
|
||||
for(label i=0 ; i<Y.size() ; i++)
|
||||
{
|
||||
Rgas_SLFM[n] += Y_SLFM[i][n]/composition.W(i); // = 1/meanMW
|
||||
}
|
||||
Rgas_SLFM[n] = 8314.46*Rgas_SLFM[n]; //universal gas constant = 8314.46 [J/K.Kmole]
|
||||
|
||||
}
|
||||
51
applications/solvers/combustion/SLFMFoam/setEtaSpace.H
Normal file
51
applications/solvers/combustion/SLFMFoam/setEtaSpace.H
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
//set eta-space
|
||||
scalar upperSum(0), upperDelta(0);
|
||||
scalar lowerSum(0), lowerDelta(0);
|
||||
|
||||
//summation of geometric progression (eta > stoi)
|
||||
upperSum = Foam::pow(stretchFac,upperN)-1.0;
|
||||
upperSum = upperSum/(stretchFac-1.0);
|
||||
|
||||
//summation of geometric progression (eta < stoi)
|
||||
lowerSum = Foam::pow(stretchFac,lowerN)-1.0;
|
||||
lowerSum = lowerSum/(stretchFac-1.0);
|
||||
|
||||
//set reference delta eta
|
||||
upperDelta = (1.0-stoiMF)/upperSum;
|
||||
lowerDelta = stoiMF/lowerSum;
|
||||
|
||||
//set boundary and stoichiometric value of eta
|
||||
etaValue[0] = 0.0;
|
||||
etaValue[lowerN] = stoiMF;
|
||||
etaValue.last() = 1.0;
|
||||
|
||||
//set internal value of eta (eta > stoi)
|
||||
for(label j=0 ; j<upperN-1 ; j++)
|
||||
{
|
||||
etaValue[lowerN+j+1] = etaValue[lowerN+j] + upperDelta*pow(stretchFac,j);
|
||||
}
|
||||
|
||||
//set internal value of eta (eta < stoi)
|
||||
for(label j=0 ; j<lowerN-1 ; j++)
|
||||
{
|
||||
etaValue[lowerN-j-1] = etaValue[lowerN-j] - lowerDelta*pow(stretchFac,j);
|
||||
}
|
||||
|
||||
Info<<etaValue<<endl;
|
||||
|
||||
//calculate delta eta
|
||||
for(label j=1 ; j<etamax-1 ; j++)
|
||||
{
|
||||
deta_h[j] = etaValue[j+1] - etaValue[j];
|
||||
deta_l[j] = etaValue[j] - etaValue[j-1];
|
||||
deta_m[j] = 0.5*(etaValue[j+1] - etaValue[j-1]);
|
||||
}
|
||||
|
||||
//Info<<deta_h<<endl;
|
||||
//Info<<deta_l<<endl;
|
||||
//Info<<deta_m<<endl;
|
||||
|
||||
for(label j=0 ; j<etamax ; j++)
|
||||
{
|
||||
etaIndex[j] = j;
|
||||
}
|
||||
79
applications/solvers/combustion/SLFMFoam/setSDR.H
Normal file
79
applications/solvers/combustion/SLFMFoam/setSDR.H
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
scalarField AMCcoeff(CMC::AMC(etaValue));
|
||||
|
||||
//cell loop
|
||||
|
||||
forAll(mf, cellI)
|
||||
{
|
||||
|
||||
|
||||
scalar jl(0), jh(0), vl(0), vh(0);
|
||||
scalar jfac(0), vfac(0);
|
||||
scalar C1coeff(0);
|
||||
|
||||
//find eta-index, factor
|
||||
if(mf[cellI] < etaValue[1])
|
||||
{
|
||||
jl = 0;
|
||||
jh = 1;
|
||||
}
|
||||
else if(mf[cellI] > etaValue[etamax-2])
|
||||
{
|
||||
jl = etamax-2;
|
||||
jh = etamax-1;
|
||||
}
|
||||
else
|
||||
{
|
||||
jl = label( interpolateXY(mf[cellI], etaValue, etaIndex) );
|
||||
jh = jl+1;
|
||||
}
|
||||
jfac = max(0.0, (mf[cellI]-etaValue[jl])/(etaValue[jh]-etaValue[jl]));
|
||||
|
||||
//find var-index, factor
|
||||
scalar scaledVar = min(0.99999, mfVar[cellI]/(mf[cellI]*(1.0-mf[cellI])+SMALL));
|
||||
if(scaledVar < varValue[1])
|
||||
{
|
||||
vl = 0;
|
||||
vh = 1;
|
||||
}
|
||||
else if(scaledVar > varValue[NVar-1])
|
||||
{
|
||||
vl = NVar-1;
|
||||
vh = NVar;
|
||||
}
|
||||
else
|
||||
{
|
||||
vl = label( interpolateXY(scaledVar, varValue, varIndex) );
|
||||
vh = vl+1;
|
||||
}
|
||||
vfac = max(0.0, (scaledVar-varValue[vl])/(varValue[vh]-varValue[vl]));
|
||||
|
||||
|
||||
//Bi-linear interpolation on j and v
|
||||
//Numerical recipes, 2nd Ed. p.117
|
||||
C1coeff
|
||||
= C1table[jl][vl]*(1-jfac)*(1-vfac)
|
||||
+ C1table[jh][vl]*(jfac)*(1-vfac)
|
||||
+ C1table[jh][vh]*(jfac)*(vfac)
|
||||
+ C1table[jl][vh]*(1-jfac)*(vfac);
|
||||
|
||||
jlc[cellI] = jl;
|
||||
jhc[cellI] = jh;
|
||||
jfc[cellI] = jfac;
|
||||
vlc[cellI] = vl;
|
||||
vhc[cellI] = vh;
|
||||
vfc[cellI] = vfac;
|
||||
|
||||
|
||||
scalar Coeff = AMCcoeff[lowerN];
|
||||
|
||||
if (Equilibrium == true)
|
||||
{
|
||||
Neta[lowerN][cellI] = 0; //Equilibrium
|
||||
}
|
||||
else
|
||||
{
|
||||
Neta[lowerN][cellI] = SDR[cellI]*Coeff*C1coeff; //CSDR at stoichiometic m.f.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
23
applications/solvers/combustion/SLFMFoam/setVarSpace.H
Normal file
23
applications/solvers/combustion/SLFMFoam/setVarSpace.H
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
//set normalized variance space
|
||||
{
|
||||
scalar sum(0), del(0), fac(1.075);
|
||||
|
||||
sum = Foam::pow(fac,NVar) - 1.0;
|
||||
sum = sum/(fac-1.0);
|
||||
|
||||
del = 1.0/sum;
|
||||
|
||||
varValue[0] = 0.0;
|
||||
varValue[NVar] = 1.0;
|
||||
|
||||
for(label v=0 ; v<NVar-1 ; v++)
|
||||
{
|
||||
varValue[v+1] = varValue[v] + del*Foam::pow(fac,v);
|
||||
}
|
||||
|
||||
for(label v=0 ; v<=NVar ; v++)
|
||||
{
|
||||
varIndex[v] = v;
|
||||
}
|
||||
Info<<varValue<<endl;
|
||||
}
|
||||
60
applications/solvers/combustion/SLFMFoam/updateT_RHO.H
Normal file
60
applications/solvers/combustion/SLFMFoam/updateT_RHO.H
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
//force the saving of the old-time values
|
||||
//important!!
|
||||
|
||||
rho.oldTime();
|
||||
|
||||
forAll(rho, cellI)
|
||||
{
|
||||
scalar& Nst = Neta[lowerN][cellI];
|
||||
|
||||
//find Nst index
|
||||
if(Nst < NstList.first())
|
||||
{
|
||||
nlc[cellI] = 0;
|
||||
nfc[cellI] = 0;
|
||||
}
|
||||
else if(Nst > NstList[NstList.size()-2])
|
||||
{
|
||||
nhc[cellI] = NstList.size()-2; //just before extinction
|
||||
nfc[cellI] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nlc[cellI] = label( interpolateXY(Nst, NstList, NstIndex) );
|
||||
nhc[cellI] = nlc[cellI]+1;
|
||||
nfc[cellI] = (Nst-NstList[nlc[cellI]])
|
||||
/(NstList[nhc[cellI]]-NstList[nlc[cellI]]);
|
||||
}
|
||||
|
||||
//update Favre mean temp. and rho(=1/RT)
|
||||
scalar jl = jlc[cellI], jh = jhc[cellI];
|
||||
scalar vl = vlc[cellI], vh = vhc[cellI];
|
||||
scalar nl = nlc[cellI], nh = nhc[cellI];
|
||||
scalar jfac = jfc[cellI], vfac = vfc[cellI], nfac = nfc[cellI];
|
||||
|
||||
scalar T00 = Ttable[jl][vl][nl]*(1-jfac)+Ttable[jh][vl][nl]*jfac;
|
||||
scalar T01 = Ttable[jl][vl][nh]*(1-jfac)+Ttable[jh][vl][nh]*jfac;
|
||||
scalar T10 = Ttable[jl][vh][nl]*(1-jfac)+Ttable[jh][vh][nl]*jfac;
|
||||
scalar T11 = Ttable[jl][vh][nh]*(1-jfac)+Ttable[jh][vh][nh]*jfac;
|
||||
|
||||
scalar T0 = T00*(1-vfac)+T10*vfac;
|
||||
scalar T1 = T01*(1-vfac)+T11*vfac;
|
||||
|
||||
T[cellI] = T0*(1-nfac)+T1*nfac;
|
||||
|
||||
scalar R00 = Rtable[jl][vl][nl]*(1-jfac)+Rtable[jh][vl][nl]*jfac;
|
||||
scalar R01 = Rtable[jl][vl][nh]*(1-jfac)+Rtable[jh][vl][nh]*jfac;
|
||||
scalar R10 = Rtable[jl][vh][nl]*(1-jfac)+Rtable[jh][vh][nl]*jfac;
|
||||
scalar R11 = Rtable[jl][vh][nh]*(1-jfac)+Rtable[jh][vh][nh]*jfac;
|
||||
|
||||
scalar R0 = R00*(1-vfac)+R10*vfac;
|
||||
scalar R1 = R01*(1-vfac)+R11*vfac;
|
||||
|
||||
scalar Rgas = R0*(1-nfac)+R1*nfac;
|
||||
rho[cellI] = p[cellI]/(Rgas*T[cellI]);
|
||||
}
|
||||
|
||||
//correct processor boundary value of T and rho
|
||||
T.correctBoundaryConditions();
|
||||
rho.correctBoundaryConditions();
|
||||
|
||||
56
applications/solvers/combustion/SLFMFoam/updateYi.H
Normal file
56
applications/solvers/combustion/SLFMFoam/updateYi.H
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
//force the saving of the old-time values
|
||||
//important!!
|
||||
|
||||
forAll(rho, cellI)
|
||||
{
|
||||
scalar& Nst = Neta[lowerN][cellI];
|
||||
|
||||
//find Nst index
|
||||
if(Nst < NstList.first())
|
||||
{
|
||||
nlc[cellI] = 0;
|
||||
nfc[cellI] = 0;
|
||||
}
|
||||
else if(Nst > NstList[NstList.size()-2])
|
||||
{
|
||||
nhc[cellI] = NstList.size()-2; //just before extinction
|
||||
nfc[cellI] = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nlc[cellI] = label( interpolateXY(Nst, NstList, NstIndex) );
|
||||
nhc[cellI] = nlc[cellI]+1;
|
||||
nfc[cellI] = (Nst-NstList[nlc[cellI]])
|
||||
/(NstList[nhc[cellI]]-NstList[nlc[cellI]]);
|
||||
}
|
||||
|
||||
//update Favre mean temp. and rho(=1/RT)
|
||||
scalar jl = jlc[cellI], jh = jhc[cellI];
|
||||
scalar vl = vlc[cellI], vh = vhc[cellI];
|
||||
scalar nl = nlc[cellI], nh = nhc[cellI];
|
||||
scalar jfac = jfc[cellI], vfac = vfc[cellI], nfac = nfc[cellI];
|
||||
|
||||
|
||||
forAll(Y, yi)
|
||||
{
|
||||
scalar y00 = Ytable[yi][jl][vl][nl]*(1-jfac)+Ytable[yi][jh][vl][nl]*jfac;
|
||||
scalar y01 = Ytable[yi][jl][vl][nh]*(1-jfac)+Ytable[yi][jh][vl][nh]*jfac;
|
||||
scalar y10 = Ytable[yi][jl][vh][nl]*(1-jfac)+Ytable[yi][jh][vh][nl]*jfac;
|
||||
scalar y11 = Ytable[yi][jl][vh][nh]*(1-jfac)+Ytable[yi][jh][vh][nh]*jfac;
|
||||
|
||||
scalar y0 = y00*(1-vfac)+y10*vfac;
|
||||
scalar y1 = y01*(1-vfac)+y11*vfac;
|
||||
|
||||
scalar ygas = y0*(1-nfac)+y1*nfac;
|
||||
|
||||
Y[yi][cellI] = ygas;
|
||||
}
|
||||
}
|
||||
|
||||
//correct processor boundary value of T and rho
|
||||
forAll(Y, yi)
|
||||
{
|
||||
Y[yi].correctBoundaryConditions();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
ThermoMPPICFoam.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/ThermoMPPICFoam
|
||||
EXE = $(FOAM_APPBIN)/ThermoMPPICFoam
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
DEV_PATH=../../libs
|
||||
|
||||
EXE_INC = \
|
||||
-I. \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
|
|
@ -7,6 +5,7 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/coalCombustion/lnInclude \
|
||||
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
|
||||
|
|
@ -19,15 +18,14 @@ EXE_INC = \
|
|||
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/SLGThermo/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
|
||||
-I$(LIB_SRC)/ODE/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
|
||||
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
|
||||
-I$(LIB_SRC)/combustionModels/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam \
|
||||
-I$(DEV_PATH)/combustionModels_POSTECH/lnInclude \
|
||||
-I$(DEV_PATH)/chemistryModel_POSTECH/lnInclude \
|
||||
-I$(DEV_PATH)/radiationModels_POSTECH/lnInclude \
|
||||
-I$(DEV_PATH)/intermediate_POSTECH/lnInclude
|
||||
-I$(FOAM_SOLVERS)/combustion/reactingFoam
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
|
|
@ -36,6 +34,7 @@ EXE_LIBS = \
|
|||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-llagrangianTurbulence \
|
||||
-lspecie \
|
||||
-lcompressibleTransportModels \
|
||||
|
|
@ -47,13 +46,11 @@ EXE_LIBS = \
|
|||
-lthermophysicalFunctions \
|
||||
-lreactionThermophysicalModels \
|
||||
-lSLGThermo \
|
||||
-lchemistryModel \
|
||||
-lradiationModels \
|
||||
-lODE \
|
||||
-lregionModels \
|
||||
-lsurfaceFilmModels \
|
||||
-lcombustionModels \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lcombustionModels_POSTECH \
|
||||
-llagrangianIntermediate_POSTECH \
|
||||
-lchemistryModel_POSTECH \
|
||||
-lradiationModels_POSTECH
|
||||
-lsampling
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ basicThermoKinematicMPPICCloud parcels
|
|||
"reactingCloud",
|
||||
rho,
|
||||
U,
|
||||
g,
|
||||
slgThermo
|
||||
slgThermo.thermo().mu(),
|
||||
g
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ EXE_LIBS = \
|
|||
-lcompressibleTurbulenceModels \
|
||||
-llagrangian \
|
||||
-llagrangianIntermediate \
|
||||
-lcoalCombustion \
|
||||
-llagrangianTurbulence \
|
||||
-lspecie \
|
||||
-lcompressibleTransportModels \
|
||||
|
|
|
|||
227
src/combustionModels/EDM/EDM.C
Normal file
227
src/combustionModels/EDM/EDM.C
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "EDM.H"
|
||||
#include "fvmSup.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::EDM<Type>::EDM
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
)
|
||||
:
|
||||
Type(modelType, mesh, phaseName),
|
||||
finiteRate_ (this->coeffs().lookupOrDefault("finiteRate", false)),
|
||||
A_ (this->coeffs().lookupOrDefault("A", 4.0)),
|
||||
B_ (this->coeffs().lookupOrDefault("B", 0.5))
|
||||
{
|
||||
if (finiteRate_)
|
||||
{
|
||||
Info<< " using Finite-rate/Eddy Dissipation Model" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< " using Eddy Dissipation Model" << endl;
|
||||
}
|
||||
Info<< " A = " << A_ << endl;
|
||||
Info<< " B = " << B_ << endl;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::combustionModels::EDM<Type>::~EDM()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::EDM<Type>::tc() const
|
||||
{
|
||||
return this->chemistryPtr_->tc();
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
void Foam::combustionModels::EDM<Type>::correct()
|
||||
{
|
||||
if (this->active())
|
||||
{
|
||||
tmp<volScalarField> tk(this->turbulence().k());
|
||||
const volScalarField& k = tk();
|
||||
|
||||
tmp<volScalarField> tepsilon(this->turbulence().epsilon());
|
||||
const volScalarField& epsilon = tepsilon();
|
||||
|
||||
this->chemistryPtr_->edm(epsilon/k, A_, B_);
|
||||
|
||||
if (finiteRate_)
|
||||
{
|
||||
// Copy edm rate stored in chemistryPtr_->RR(i)
|
||||
PtrList<DimensionedField<scalar, volMesh>> edmRates
|
||||
(
|
||||
this->thermo().composition().Y().size()
|
||||
);
|
||||
forAll(edmRates, i)
|
||||
{
|
||||
edmRates.set
|
||||
(
|
||||
i,
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
this->chemistryPtr_->RR(i)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
this->chemistryPtr_->calculate();
|
||||
|
||||
forAll(edmRates, i)
|
||||
{
|
||||
DimensionedField<scalar, volMesh> &finiteRatei
|
||||
(
|
||||
this->chemistryPtr_->RR(i)
|
||||
);
|
||||
|
||||
forAll(finiteRatei, celli)
|
||||
{
|
||||
finiteRatei[celli] = min(finiteRatei[celli], edmRates[i][celli]);
|
||||
finiteRatei[celli] =
|
||||
finiteRatei[celli]*edmRates[i][celli]
|
||||
/ (finiteRatei[celli] + edmRates[i][celli] + SMALL);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::fvScalarMatrix>
|
||||
Foam::combustionModels::EDM<Type>::R(volScalarField& Y) const
|
||||
{
|
||||
tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime));
|
||||
|
||||
fvScalarMatrix& Su = tSu.ref();
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
const label specieI =
|
||||
this->thermo().composition().species()[Y.member()];
|
||||
|
||||
Su += this->chemistryPtr_->RR(specieI);
|
||||
}
|
||||
|
||||
return tSu;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::EDM<Type>::dQ() const
|
||||
{
|
||||
tmp<volScalarField> tdQ
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":dQ", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tdQ.ref() = this->chemistryPtr_->dQ();
|
||||
}
|
||||
|
||||
return tdQ;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::combustionModels::EDM<Type>::Sh() const
|
||||
{
|
||||
tmp<volScalarField> tSh
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName(typeName + ":Sh", this->phaseName_),
|
||||
this->mesh().time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
if (this->active())
|
||||
{
|
||||
tSh.ref() = this->chemistryPtr_->Sh();
|
||||
}
|
||||
|
||||
return tSh;
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
bool Foam::combustionModels::EDM<Type>::read()
|
||||
{
|
||||
if (Type::read())
|
||||
{
|
||||
this->coeffs().lookup("finiteRate") >> finiteRate_;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
147
src/combustionModels/EDM/EDM.H
Normal file
147
src/combustionModels/EDM/EDM.H
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::combustionModels::EDM
|
||||
|
||||
Description
|
||||
Eddy dissipation model with finite-rate chemistry.
|
||||
28.Feb.2017
|
||||
Combustion Lab. POSTECH
|
||||
Karam Han
|
||||
(Version upgraded by Jinwoo Park)
|
||||
|
||||
SourceFiles
|
||||
EDM.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef EDM_H
|
||||
#define EDM_H
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace combustionModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class EDM Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class EDM
|
||||
:
|
||||
public Type
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- finite-rate/EDM using Arrhenius formula
|
||||
bool finiteRate_;
|
||||
|
||||
//- EDM Parameter A
|
||||
scalar A_;
|
||||
|
||||
//- EDM Parameter B
|
||||
scalar B_;
|
||||
|
||||
protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Return the chemical time scale
|
||||
tmp<volScalarField> tc() const;
|
||||
|
||||
private:
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
EDM(const EDM&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const EDM&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("EDM");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
EDM
|
||||
(
|
||||
const word& modelType,
|
||||
const fvMesh& mesh,
|
||||
const word& phaseName
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~EDM();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Evolution
|
||||
|
||||
//- Correct combustion rate
|
||||
virtual void correct();
|
||||
|
||||
//- Fuel consumption rate matrix.
|
||||
virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
|
||||
|
||||
//- Heat release rate calculated from fuel consumption rate matrix
|
||||
virtual tmp<volScalarField> dQ() const;
|
||||
|
||||
//- Return source for enthalpy equation [kg/m/s3]
|
||||
virtual tmp<volScalarField> Sh() const;
|
||||
|
||||
|
||||
// IO
|
||||
|
||||
//- Update properties from given dictionary
|
||||
virtual bool read();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace combustionModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
#include "EDM.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
38
src/combustionModels/EDM/EDMs.C
Normal file
38
src/combustionModels/EDM/EDMs.C
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "makeCombustionTypes.H"
|
||||
|
||||
#include "psiChemistryCombustion.H"
|
||||
#include "rhoChemistryCombustion.H"
|
||||
#include "EDM.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeCombustionTypes(EDM, psiChemistryCombustion, psiCombustionModel);
|
||||
makeCombustionTypes(EDM, rhoChemistryCombustion, rhoCombustionModel);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -13,6 +13,8 @@ rhoCombustionModel/rhoChemistryCombustion/rhoChemistryCombustion.C
|
|||
diffusion/diffusions.C
|
||||
infinitelyFastChemistry/infinitelyFastChemistrys.C
|
||||
|
||||
EDM/EDMs.C
|
||||
|
||||
PaSR/PaSRs.C
|
||||
|
||||
laminar/laminars.C
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ Foam::MPPICCloud<CloudType>::MPPICCloud
|
|||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const volScalarField& mu,
|
||||
const dimensionedVector& g,
|
||||
const SLGThermo& thermo,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
CloudType(cloudName, rho, U, g, thermo, false),
|
||||
CloudType(cloudName, rho, U, mu, g, false),
|
||||
packingModel_(NULL),
|
||||
dampingModel_(NULL),
|
||||
isotropyModel_(NULL)
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ SourceFiles
|
|||
#include "fvMesh.H"
|
||||
#include "volFields.H"
|
||||
|
||||
#include "ThermoCloud.H"
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
|
@ -134,8 +133,8 @@ public:
|
|||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const volScalarField& mu,
|
||||
const dimensionedVector& g,
|
||||
const SLGThermo& thermo,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -213,6 +213,88 @@ Foam::ThermoCloud<CloudType>::ThermoCloud
|
|||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const volScalarField& mu,
|
||||
const dimensionedVector& g,
|
||||
bool readFields
|
||||
)
|
||||
:
|
||||
CloudType
|
||||
(
|
||||
cloudName,
|
||||
rho,
|
||||
U,
|
||||
mu,
|
||||
g,
|
||||
false
|
||||
),
|
||||
thermoCloud(),
|
||||
cloudCopyPtr_(NULL),
|
||||
constProps_(this->particleProperties()),
|
||||
thermo_(this->mesh().template lookupObject<SLGThermo>("SLGThermo")),
|
||||
T_(thermo_.thermo().T()),
|
||||
p_(thermo_.thermo().p()),
|
||||
heatTransferModel_(NULL),
|
||||
TIntegrator_(NULL),
|
||||
radiation_(false),
|
||||
radAreaP_(NULL),
|
||||
radT4_(NULL),
|
||||
radAreaPT4_(NULL),
|
||||
hsTrans_
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->name() + ":hsTrans",
|
||||
this->db().time().timeName(),
|
||||
this->db(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy, 0.0)
|
||||
)
|
||||
),
|
||||
hsCoeff_
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
this->name() + ":hsCoeff",
|
||||
this->db().time().timeName(),
|
||||
this->db(),
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
this->mesh(),
|
||||
dimensionedScalar("zero", dimEnergy/dimTemperature, 0.0)
|
||||
)
|
||||
)
|
||||
{
|
||||
if (this->solution().active())
|
||||
{
|
||||
setModels();
|
||||
|
||||
if (readFields)
|
||||
{
|
||||
parcelType::readFields(*this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->solution().resetSourcesOnStartup())
|
||||
{
|
||||
resetSourceTerms();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
Foam::ThermoCloud<CloudType>::ThermoCloud
|
||||
(
|
||||
|
|
|
|||
|
|
@ -180,6 +180,17 @@ public:
|
|||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Construct given carrier gas fields
|
||||
ThermoCloud
|
||||
(
|
||||
const word& cloudName,
|
||||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const volScalarField& mu,
|
||||
const dimensionedVector& g,
|
||||
bool readFields = true
|
||||
);
|
||||
|
||||
//- Copy constructor with new name
|
||||
ThermoCloud(ThermoCloud<CloudType>& c, const word& name);
|
||||
|
||||
|
|
|
|||
|
|
@ -86,4 +86,17 @@ Foam::basicChemistryModel::~basicChemistryModel()
|
|||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::basicChemistryModel::edm
|
||||
(
|
||||
const scalarField& mixing,
|
||||
const scalar A,
|
||||
const scalar B
|
||||
)
|
||||
{
|
||||
NotImplemented;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
|||
|
|
@ -159,6 +159,14 @@ public:
|
|||
//- Calculates the reaction rates
|
||||
virtual void calculate() = 0;
|
||||
|
||||
//- Calculates the eddy dissipation reaction rates
|
||||
virtual void edm
|
||||
(
|
||||
const scalarField& mixing,
|
||||
const scalar A,
|
||||
const scalar B
|
||||
);
|
||||
|
||||
//- Solve the reaction system for the given time step
|
||||
// and return the characteristic time
|
||||
virtual scalar solve(const scalar deltaT) = 0;
|
||||
|
|
|
|||
|
|
@ -756,6 +756,104 @@ void Foam::chemistryModel<CompType, ThermoType>::calculate()
|
|||
}
|
||||
|
||||
|
||||
template<class CompType, class ThermoType>
|
||||
void Foam::chemistryModel<CompType, ThermoType>::edm
|
||||
(
|
||||
const scalarField& mixing,
|
||||
const scalar A,
|
||||
const scalar B
|
||||
)
|
||||
{
|
||||
if (!this->chemistry_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
this->time().timeName(),
|
||||
this->mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
this->thermo().rho()
|
||||
);
|
||||
|
||||
forAll(rho, celli)
|
||||
{
|
||||
const scalar rhoi = rho[celli];
|
||||
const scalar mixingi = mixing[celli];
|
||||
|
||||
scalarField Yi(nSpecie_, 0.0);
|
||||
for (label k=0; k<nSpecie_; k++)
|
||||
{
|
||||
Yi[k] = Y_[k][celli];
|
||||
}
|
||||
|
||||
scalarField om(nSpecie_, 0.0);
|
||||
|
||||
scalar minYR = 1.0;
|
||||
scalar YP = 0.0;
|
||||
forAll(reactions_, m)
|
||||
{
|
||||
const Reaction<ThermoType>& R = reactions_[m];
|
||||
|
||||
scalar num = 0.0;
|
||||
scalar den = 0.0;
|
||||
|
||||
forAll(R.lhs(), s)
|
||||
{
|
||||
const label k = R.lhs()[s].index;
|
||||
const scalar vk = R.lhs()[s].stoichCoeff + SMALL;
|
||||
const scalar Wk = specieThermo_[k].W();
|
||||
|
||||
minYR = min(minYR, Yi[k]/Wk/vk);
|
||||
}
|
||||
|
||||
forAll(R.rhs(), s)
|
||||
{
|
||||
const label k = R.rhs()[s].index;
|
||||
const scalar vk = R.rhs()[s].stoichCoeff;
|
||||
const scalar Wk = specieThermo_[k].W();
|
||||
|
||||
num += Yi[k];
|
||||
den += vk*Wk;
|
||||
}
|
||||
YP = num/den;
|
||||
|
||||
scalar omegam = min (A*rhoi*mixingi*minYR, A*B*rhoi*mixingi*YP);
|
||||
|
||||
forAll(R.lhs(), s)
|
||||
{
|
||||
const label k = R.lhs()[s].index;
|
||||
const scalar vk = R.lhs()[s].stoichCoeff;
|
||||
const scalar Wk = specieThermo_[k].W();
|
||||
|
||||
om[k] -= vk*Wk*omegam;
|
||||
}
|
||||
|
||||
forAll(R.rhs(), s)
|
||||
{
|
||||
const label k = R.rhs()[s].index;
|
||||
const scalar vk = R.rhs()[s].stoichCoeff;
|
||||
const scalar Wk = specieThermo_[k].W();
|
||||
|
||||
om[k] += vk*Wk*omegam;
|
||||
}
|
||||
}
|
||||
|
||||
for (label k=0; k<nSpecie_; k++)
|
||||
{
|
||||
RR_[k][celli] = om[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CompType, class ThermoType>
|
||||
template<class DeltaTType>
|
||||
Foam::scalar Foam::chemistryModel<CompType, ThermoType>::solve
|
||||
|
|
|
|||
|
|
@ -191,6 +191,14 @@ public:
|
|||
//- Calculates the reaction rates
|
||||
virtual void calculate();
|
||||
|
||||
//- Calculates the eddy dissipation reaction rates
|
||||
virtual void edm
|
||||
(
|
||||
const scalarField& mixing,
|
||||
const scalar A,
|
||||
const scalar B
|
||||
);
|
||||
|
||||
|
||||
// Chemistry model functions (overriding abstract functions in
|
||||
// basicChemistryModel.H)
|
||||
|
|
|
|||
65
tutorials/combustion/SLFMFoam/FlameD/0/CH4
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/CH4
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object CH4;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.155956;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/CO
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/CO
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/Fluid";
|
||||
object CO;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.00407;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/CO2
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/CO2
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object CO2;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1098;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/H
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/H
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object H;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 2.48e-05;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/H2
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/H2
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object H2;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.000129;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/H2O
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/H2O
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object H2O;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0942;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/N2
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/N2
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object N2;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.767;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.647382;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.7342;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.767;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/NO
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/NO
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object NO;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 4.8e-06;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/O
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/O
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object O;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.000747;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/O2
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/O2
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/Fluid";
|
||||
object O2;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.233;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.196662;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0540244;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.233;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/OH
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/OH
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/Fluid";
|
||||
object OH;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.0028;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/T
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/T
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0/Fluid";
|
||||
object T;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 1 0 0 0 ];
|
||||
|
||||
internalField uniform 200;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 294;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1880;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 291;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
66
tutorials/combustion/SLFMFoam/FlameD/0/U
Normal file
66
tutorials/combustion/SLFMFoam/FlameD/0/U
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
|
||||
dimensions [ 0 1 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform ( 0 0 0 );
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 49.6 0 );
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 11.4 0 );
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 0.9 0 );
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform ( 0 0 0 );
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/Ydefault
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/Ydefault
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object Ydefault;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
66
tutorials/combustion/SLFMFoam/FlameD/0/alphat
Normal file
66
tutorials/combustion/SLFMFoam/FlameD/0/alphat
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alphat;
|
||||
}
|
||||
|
||||
dimensions [ 1 -1 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.1;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.1;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0.1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type compressible::alphatWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
69
tutorials/combustion/SLFMFoam/FlameD/0/epsilon
Normal file
69
tutorials/combustion/SLFMFoam/FlameD/0/epsilon
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 50;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.000504;
|
||||
value uniform 200;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.000735;
|
||||
value uniform 200;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type turbulentMixingLengthDissipationRateInlet;
|
||||
mixingLength 0.0197;
|
||||
value uniform 200;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type epsilonWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
69
tutorials/combustion/SLFMFoam/FlameD/0/k
Normal file
69
tutorials/combustion/SLFMFoam/FlameD/0/k
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.0458;
|
||||
value uniform 1;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.0628;
|
||||
value uniform 1;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type turbulentIntensityKineticEnergyInlet;
|
||||
intensity 0.0471;
|
||||
value uniform 1;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type kqRWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/mf
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/mf
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object mf;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.27;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
65
tutorials/combustion/SLFMFoam/FlameD/0/mfVar
Normal file
65
tutorials/combustion/SLFMFoam/FlameD/0/mfVar
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object mfVar;
|
||||
}
|
||||
|
||||
dimensions [ 0 0 0 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
66
tutorials/combustion/SLFMFoam/FlameD/0/nut
Normal file
66
tutorials/combustion/SLFMFoam/FlameD/0/nut
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object mut;
|
||||
}
|
||||
|
||||
dimensions [ 0 2 -1 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type calculated;
|
||||
value uniform 0;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type nutkWallFunction;
|
||||
value uniform 0;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
63
tutorials/combustion/SLFMFoam/FlameD/0/p
Normal file
63
tutorials/combustion/SLFMFoam/FlameD/0/p
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
|
||||
dimensions [ 1 -1 -2 0 0 0 0 ];
|
||||
|
||||
internalField uniform 100616;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
mainjet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 100616;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
57
tutorials/combustion/SLFMFoam/FlameD/constant/SLFMdict
Normal file
57
tutorials/combustion/SLFMFoam/FlameD/constant/SLFMdict
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object combustionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
postSpecieNames (CO OH); //names of species for post-processing
|
||||
stoiMF 0.351; //stoichiometric mixture fraction
|
||||
stretchFactor 1.05;
|
||||
lowerN 20; //number of eta-space under stoichiometric value
|
||||
upperN 30; //number of eta-space over stoichiometric value
|
||||
|
||||
Equilibrium false;
|
||||
NVar 40; //20;
|
||||
|
||||
Sc 0.68; //Schmidt number
|
||||
outletName outlet; // outletName
|
||||
|
||||
detailedEta
|
||||
(
|
||||
1e-6 1e-5 1e-4 1e-3 1e-2
|
||||
0.1 0.9
|
||||
0.99 0.999 0.9999 0.99999 0.999999
|
||||
);
|
||||
|
||||
detailedN
|
||||
(
|
||||
10 10 10 10 10
|
||||
100
|
||||
10 10 10 10 10
|
||||
);
|
||||
|
||||
NstFolder slfm_lib; //folder name of SLFM library
|
||||
NstList //list of Nst
|
||||
|
||||
(
|
||||
1 3 5 10 15 20 25 30 35 40
|
||||
45 50 55 60 65 70 75 80 85 90
|
||||
95 100 105 110 115 120 125 130 135 140
|
||||
145 150 155 160 165 170 175 180 185 190
|
||||
195 200 205 210 215 220 225 230 235 240
|
||||
245 250 255 260 265 270 275 280 285 290
|
||||
293
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object chemistryProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
chemistryType
|
||||
{
|
||||
chemistrySolver ode; //EulerImplicit;
|
||||
chemistryThermo rho;
|
||||
}
|
||||
|
||||
chemistry off;
|
||||
|
||||
initialChemicalTimeStep 1e-07;
|
||||
|
||||
EulerImplicitCoeffs
|
||||
{
|
||||
cTauChem 1;
|
||||
equilibriumRateLimiter off;
|
||||
}
|
||||
|
||||
odeCoeffs
|
||||
{
|
||||
solver SIBS; //seulex; //Rosenbrock34; //Rosenbrock43;
|
||||
eps 0.05;
|
||||
//absTol 1e-12;
|
||||
//relTol 0.01;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object combustionProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
combustionModel laminar<rhoChemistryCombustion>;
|
||||
|
||||
active false;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
EDCCoeffs
|
||||
{
|
||||
// EDC for RANS/URANS
|
||||
underRelaxFineStructures 1.0;
|
||||
CD1 2.1377;
|
||||
CD2 2.45;
|
||||
CD3 0.01;
|
||||
gammaStarClipFactor 0.5;
|
||||
|
||||
// Limiting temperature
|
||||
TMin 290;
|
||||
TMax 3000;
|
||||
|
||||
// tolerancies
|
||||
absoluteTolerance 1e-5;
|
||||
relativeTolerance 1e-5;
|
||||
|
||||
// maxIterations:
|
||||
maxIterations 1e+5;
|
||||
}
|
||||
22
tutorials/combustion/SLFMFoam/FlameD/constant/g
Normal file
22
tutorials/combustion/SLFMFoam/FlameD/constant/g
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format binary;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value ( 0 0 0 );
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
5579
tutorials/combustion/SLFMFoam/FlameD/constant/mech.dat
Normal file
5579
tutorials/combustion/SLFMFoam/FlameD/constant/mech.dat
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,130 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 1.7.1 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 0.001;
|
||||
|
||||
vertices
|
||||
(
|
||||
|
||||
(0 0 0)
|
||||
(0 576 0)
|
||||
(-0.15702979454 0 3.5965736)
|
||||
(-0.15702979454 576 3.5965736)
|
||||
(-0.167934643323 0 3.8463357)
|
||||
(-0.167934643323 576 3.8463357)
|
||||
(-0.396936424116 0 9.0913388)
|
||||
(-0.396936424116 576 9.0913388)
|
||||
(-0.412203210667 0 9.4410057)
|
||||
(-0.412203210667 576 9.4410057)
|
||||
(-6.5429081 0 149.8572332)
|
||||
(-6.5429081 576 149.8572332)
|
||||
(0.15702979454 0 3.5965736)
|
||||
(0.15702979454 576 3.5965736)
|
||||
(0.167934643323 0 3.8463357)
|
||||
(0.167934643323 576 3.8463357)
|
||||
(0.396936424116 0 9.0913388)
|
||||
(0.396936424116 576 9.0913388)
|
||||
(0.412203210667 0 9.4410057)
|
||||
(0.412203210667 576 9.4410057)
|
||||
(6.5429081 0 149.8572332)
|
||||
(6.5429081 576 149.8572332)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
|
||||
hex (0 1 3 2 0 1 13 12) (150 10 1) simpleGrading (5 1 1)
|
||||
hex (2 3 5 4 12 13 15 14) (150 1 1) simpleGrading (5 1 1)
|
||||
hex (4 5 7 6 14 15 17 16) (150 15 1) simpleGrading (5 1 1)
|
||||
hex (6 7 9 8 16 17 19 18) (150 1 1) simpleGrading (5 1 1)
|
||||
hex (8 9 11 10 18 19 21 20) (150 80 1) simpleGrading (5 5 1)
|
||||
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
/*
|
||||
arc 2 12 (0 3.6 0)
|
||||
arc 3 13 (576 3.6 0)
|
||||
arc 4 14 (0 3.85 0)
|
||||
arc 5 15 (576 3.85 0)
|
||||
arc 6 16 (0 9.1 0)
|
||||
arc 7 17 (576 9.1 0)
|
||||
arc 8 18 (0 9.45 0)
|
||||
arc 9 19 (576 9.45 0)
|
||||
arc 10 20 (0 150 0)
|
||||
arc 11 21 (576 150 0)
|
||||
*/
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
symmetryPlane axis
|
||||
(
|
||||
(0 1 1 0)
|
||||
)
|
||||
patch mainjet
|
||||
(
|
||||
(0 2 12 0)
|
||||
)
|
||||
patch pilot
|
||||
(
|
||||
(4 6 16 14)
|
||||
)
|
||||
patch coflow
|
||||
(
|
||||
(8 10 20 18)
|
||||
)
|
||||
patch outlet
|
||||
(
|
||||
(1 3 13 1)
|
||||
(3 5 15 13)
|
||||
(5 7 17 15)
|
||||
(7 9 19 17)
|
||||
(9 11 21 19)
|
||||
)
|
||||
wall burnerwall
|
||||
(
|
||||
(2 4 14 12)
|
||||
(6 8 18 16)
|
||||
)
|
||||
wall slipwall
|
||||
(
|
||||
(10 11 21 20)
|
||||
)
|
||||
wedge front
|
||||
(
|
||||
(0 1 13 12)
|
||||
(12 13 15 14)
|
||||
(14 15 17 16)
|
||||
(16 17 19 18)
|
||||
(18 19 21 20)
|
||||
)
|
||||
wedge back
|
||||
(
|
||||
(0 1 3 2)
|
||||
(2 3 5 4)
|
||||
(4 5 7 6)
|
||||
(6 7 9 8)
|
||||
(8 9 11 10)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 4.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
9
|
||||
(
|
||||
axis
|
||||
{
|
||||
type symmetryPlane;
|
||||
inGroups 1(symmetryPlane);
|
||||
nFaces 0;
|
||||
startFace 31843;
|
||||
}
|
||||
mainjet
|
||||
{
|
||||
type patch;
|
||||
nFaces 10;
|
||||
startFace 31843;
|
||||
}
|
||||
pilot
|
||||
{
|
||||
type patch;
|
||||
nFaces 15;
|
||||
startFace 31853;
|
||||
}
|
||||
coflow
|
||||
{
|
||||
type patch;
|
||||
nFaces 80;
|
||||
startFace 31868;
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
nFaces 107;
|
||||
startFace 31948;
|
||||
}
|
||||
burnerwall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 2;
|
||||
startFace 32055;
|
||||
}
|
||||
slipwall
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 150;
|
||||
startFace 32057;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
inGroups 1(wedge);
|
||||
nFaces 16050;
|
||||
startFace 32207;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
inGroups 1(wedge);
|
||||
nFaces 16050;
|
||||
startFace 48257;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
64331
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/faces
Normal file
64331
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/faces
Normal file
File diff suppressed because it is too large
Load diff
31868
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/neighbour
Normal file
31868
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/neighbour
Normal file
File diff suppressed because it is too large
Load diff
64332
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/owner
Normal file
64332
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/owner
Normal file
File diff suppressed because it is too large
Load diff
32489
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/points
Normal file
32489
tutorials/combustion/SLFMFoam/FlameD/constant/polyMesh/points
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr1.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr1.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr10.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr10.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr100.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr100.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr105.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr105.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr110.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr110.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr115.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr115.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr120.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr120.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr125.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr125.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr130.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr130.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr135.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr135.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr140.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr140.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr145.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr145.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr15.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr15.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr150.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr150.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr155.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr155.inp
Normal file
File diff suppressed because it is too large
Load diff
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr160.inp
Normal file
2838
tutorials/combustion/SLFMFoam/FlameD/constant/slfm_lib/sdr160.inp
Normal file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue