remove selective species update function

This commit is contained in:
ignis 2017-08-23 21:32:38 +09:00
parent 582ae81300
commit 8f99f732f0
4 changed files with 9 additions and 23 deletions

View file

@ -95,16 +95,10 @@ int main(int argc, char *argv[])
turbulence->correct();
#include "updateYi.H" //update species
if(runTime.write() == true)
{
rho.write();
#include "updateYi.H" //update species
forAll(postSpecieIndices, yi)
{
const label y = postSpecieIndices[yi];
Y[y].write();
}
rho.write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"

View file

@ -11,10 +11,6 @@ thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
forAll (Y, i)
{
Y[i].writeOpt() = IOobject::NO_WRITE;
}
word inertSpecie(thermo.lookup("inertSpecie"));
@ -303,7 +299,6 @@ forAll(postSpecieNames, i)
const word &spName (postSpecieNames[i]);
const label spI (composition.species()[spName]);
postSpecieIndices[i] = spI;
Y[spI].writeOpt() = IOobject::AUTO_WRITE;
}
scalar stoiMF(readScalar(SLFMdict.lookup("stoiMF")));
scalar stretchFac(readScalar(SLFMdict.lookup("stretchFactor")));

View file

@ -26,9 +26,9 @@ scalarFieldArray2d Rtable
scalarFieldArray3d Ytable
(
postSpecieNames.size(),
Y.size(),
scalarFieldArray2d
(
(
etamax,
scalarFieldArray1d
(
@ -58,10 +58,9 @@ for(label j=0 ; j<etamax ; j++)
{
Ttable[j][v][n] = bpdf.betaIntegrate(T_SLFM[n]);
Rtable[j][v][n] = bpdf.betaIntegrate(Rgas_SLFM[n]);
forAll(postSpecieIndices, yi)
forAll(Y, yi)
{
const label y = postSpecieIndices[yi];
Ytable[yi][j][v][n] = bpdf.betaIntegrate(Y_SLFM[y][n]);
Ytable[yi][j][v][n] = bpdf.betaIntegrate(Y_SLFM[yi][n]);
}
}
}

View file

@ -31,9 +31,8 @@ forAll(rho, cellI)
scalar jfac = jfc[cellI], vfac = vfc[cellI], nfac = nfc[cellI];
forAll(postSpecieIndices, yi)
forAll(Y, yi)
{
const label y = postSpecieIndices[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;
@ -44,15 +43,14 @@ forAll(rho, cellI)
scalar ygas = y0*(1-nfac)+y1*nfac;
Y[y][cellI] = ygas;
Y[yi][cellI] = ygas;
}
}
//correct processor boundary value of T and rho
forAll(postSpecieIndices, yi)
forAll(Y, yi)
{
const label y = postSpecieIndices[yi];
Y[y].correctBoundaryConditions();
Y[yi].correctBoundaryConditions();
}