plasmaReactingFoam Poisson's equation source field rhoq and mag(E) monitor

This commit is contained in:
ignis 2016-10-17 23:05:14 +09:00
parent aa319f188e
commit ac1a56fd3d
2 changed files with 26 additions and 3 deletions

View file

@ -1,14 +1,22 @@
{
rhoq = (rho * qc) - (eCharge * ne);
solve
(
fvm::laplacian(Phi)
+ fvc::Sp(rho, qc)/epsilon0
- fvc::Sp(eCharge, ne)/epsilon0
+ rhoq/epsilon0
);
E = -fvc::grad(Phi);
ng = p / T * (NA / R);
En = mag(E) / (ng);
tmp<volScalarField> tMagE (mag(E));
const volScalarField &magE = tMagE();
Info<< "min/max(|E|) = "
<< min(magE).value() << ", "
<< max(magE).value() << endl;
En = magE / (ng);
}

View file

@ -255,6 +255,21 @@ volScalarField ne
mesh
);
Info<< "Creating field charge density\n" << endl;
volScalarField rhoq
(
IOobject
(
"rhoq",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
(rho * qc) - (eCharge * ne)
);
Info<< "Creating field gas number density\n" << endl;
volScalarField ng("ng", p / R / T * NA);