plasmaReactingFoam ne equation added

This commit is contained in:
ignis 2016-04-15 12:42:08 +09:00
parent 456d7fdd6e
commit 33a4b4945c
3 changed files with 30 additions and 14 deletions

View file

@ -17,7 +17,29 @@ tmp<fv::convectionScheme<scalar> > mvConvection
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
if (Y[i].name() == electronSpecie)
{
fvScalarMatrix neEqn
(
fvm::ddt(ne)
+ mvConvection->fvmDiv(ve, ne)
- mvConvection->fvmDiv(fvc::interpolate(De/Te*fvc::grad(Te)) & mesh.Sf(), ne)
- fvm::laplacian(De, ne)
==
fvOptions(ne)
);
neEqn.relax();
fvOptions.constrain(neEqn);
neEqn.solve(mesh.solver("ne"));
fvOptions.correct(ne);
ne.max(0.0);
}
else if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];

View file

@ -55,10 +55,15 @@ basicMultiComponentMixture& composition = thermo.composition();
//- Elementary charge (default in [C])
const dimensionedScalar eCharge = constant::electromagnetic::e;
//- Avogadro number (default in [1/mol])
const dimensionedScalar NA = constant::physicoChemical::NA;
//- Universal gas constant (default in [J/mol/K])
const dimensionedScalar R = constant::physicoChemical::R;
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
word electronSpecie("E-");
volScalarField rho
(
@ -164,19 +169,7 @@ volScalarField ne
);
Info<< "Creating field gas number density\n" << endl;
volScalarField ng
(
IOobject
(
"ng",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("ng", ne.dimensions(), 1e-25)
);
volScalarField ng("ng", p / R / T * NA);
Info<< "Creating field reduced electric field\n" << endl;
volScalarField En ("En", mag(E) / (ne+ng));

View file

@ -67,6 +67,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "PhiEqn.H"
En = mag(E) / (ne+ng);
#include "rhoEqn.H"
while (pimple.loop())