plasmaReactingFoam removes mvConvection from ne transport and electron drift Courant Number
This commit is contained in:
parent
150202d4e9
commit
06e07d200a
5 changed files with 57 additions and 3 deletions
|
|
@ -132,7 +132,8 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||
|
||||
if (Y[i].name() == electronSpecie)
|
||||
{
|
||||
Udrift = - linearInterpolate(mue*E/ng);
|
||||
Udrift = - linearInterpolate
|
||||
((mue/ng)*E + ((De/ng/Te)*fvc::grad(Te)));
|
||||
ve = (Udrift & mesh.Sf()) + q;
|
||||
|
||||
// Wall electron flux correction
|
||||
|
|
@ -166,7 +167,6 @@ tmp<fv::convectionScheme<scalar> > mvConvection
|
|||
(
|
||||
fvm::ddt(ne)
|
||||
+ fvm::div(ve, ne)
|
||||
// - mvConvection->fvmDiv(fvc::interpolate(De/ng/Te*fvc::grad(Te)) & mesh.Sf(), ne)
|
||||
- fvm::laplacian(De/ng, ne)
|
||||
==
|
||||
electronR
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ volScalarField Phi
|
|||
);
|
||||
|
||||
Info<< "Creating field electric field\n" << endl;
|
||||
volVectorField E(
|
||||
volVectorField E
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"E",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 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/>.
|
||||
|
||||
Global
|
||||
CourantNo
|
||||
|
||||
Description
|
||||
Calculates and outputs the mean and maximum Courant Numbers from electron flux.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
scalar CoNumVe = 0.0;
|
||||
scalar meanCoNumVe = 0.0;
|
||||
|
||||
if (mesh.nInternalFaces())
|
||||
{
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(ve))().internalField()
|
||||
);
|
||||
|
||||
CoNumVe = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanCoNumVe =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Electron Courant Number mean: " << meanCoNumVe
|
||||
<< " max: " << CoNumVe << endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -65,6 +65,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "electronCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ if (pulseTimeStep)
|
|||
}
|
||||
else if (adjustTimeStep)
|
||||
{
|
||||
CoNum = max(CoNum, CoNumVe);
|
||||
scalar maxDeltaTFact = maxCo/(CoNum + SMALL);
|
||||
scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue