SOxFoam multi fuel support and direct read lagrangian source

This commit is contained in:
ignis 2018-01-31 00:30:28 +09:00
parent 28a67ebe20
commit f3a6d8b525
4 changed files with 43 additions and 87 deletions

View file

@ -53,8 +53,7 @@ int main(int argc, char *argv[])
{
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "Sso2Calc.H"
mut=rho*nut;
#include "calculateSso2.H"
while (simple.correctNonOrthogonal())
{

View file

@ -1,11 +0,0 @@
const scalar Wso2 = 0.064066; //Molecular weight of SO2[kg/mol]
const scalar Ws = 0.032065; // S [kg/mol]
forAll (mesh.cells(),celli)
{
Sso2[celli] = (Sfuel1[celli]+Sfuel2[celli])*Ys[celli]*Wso2/Ws/mesh.V()[celli];
}

View file

@ -0,0 +1,14 @@
const scalar Wso2 = 0.064066; // Molecular weight of SO2[kg/mol]
const scalar Ws = 0.032065; // Molecular weight of S [kg/mol]
forAll (mesh.cells(),celli)
{
scalar sulfurSource = 0.0;
forAll (fuelSources, si)
{
sulfurSource += fuelSources[si][celli] * sulfurMassInFuels[si];
}
Sso2[celli] = sulfurSource*Wso2/Ws/mesh.V()[celli];
}

View file

@ -9,7 +9,6 @@ volScalarField rho
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
//thermo.rho()
mesh
);
@ -62,39 +61,9 @@ volScalarField mut
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("mut",dimensionSet(1,-1,-1,0,0,0,0),0.0)
rho * nut
);
//#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
// )
//);
volScalarField SO2
(
IOobject
@ -119,40 +88,14 @@ volScalarField Sso2
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Sso2",dimensionSet(1,-3,-1,0,0,0,0),0.0)
dimensionedScalar("Sso2",dimDensity/dimTime,0.0)
);
volScalarField Sfuel1
IOdictionary SOxProperties
(
IOobject
(
"Sfuel1",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField Sfuel2
(
IOobject
(
"Sfuel2",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
IOdictionary fuelSulfurMassFraction
(
IOobject
(
"fuelSulfurMassFraction",
"SOxProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
@ -160,17 +103,28 @@ IOdictionary fuelSulfurMassFraction
)
);
volScalarField Ys
(
IOobject
(
"Ys",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(fuelSulfurMassFraction.lookup("Ys"))
);
wordList fuelSourceNames(SOxProperties.lookup("fuelSourceNames"));
PtrList<volScalarField::Internal> fuelSources(fuelSourceNames.size());
forAll (fuelSources, si)
{
fuelSources.set
(
si,
new volScalarField::Internal
(
IOobject
(
fuelSourceNames[si],
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
)
);
}
scalarField sulfurMassInFuels(SOxProperties.lookup("sulfurMassInFuels"));