fix bug CvRot/CvRot => CvRot/R in calculateK and additional code cleanup
This commit is contained in:
parent
1540954104
commit
9615a4158e
1 changed files with 1 additions and 40 deletions
|
|
@ -347,7 +347,7 @@ void Foam::diffusivityModel::calculateK
|
|||
const scalar rSc = rhoi * Dii[i] / muI[i];
|
||||
|
||||
const scalar A = 5./2. - rSc;
|
||||
const scalar B = Zrot[i] + (2./Neutral::pi) * ((5./3.)*neutrals_[j].CvRot()/neutrals_[j].CvRot() + rSc);
|
||||
const scalar B = Zrot[i] + (2./Neutral::pi) * ((5./3.)*neutrals_[j].CvRot()/neutrals_[j].R() + rSc);
|
||||
const scalar AB = (2./Neutral::pi)*(A/B);
|
||||
|
||||
const scalar fTrans = (5./2.) * (1.0 - AB * neutrals_[j].CvRot() / neutrals_[j].CvTrans());
|
||||
|
|
@ -657,7 +657,6 @@ void Foam::diffusivityModel::correct()
|
|||
const volScalarField &T = thermo_.T();
|
||||
const volScalarField &p = thermo_.p();
|
||||
const volScalarField rho(thermo_.rho());
|
||||
const volScalarField Cp(thermo_.Cp());
|
||||
|
||||
const speciesTable &species_(thermo_.composition().species());
|
||||
|
||||
|
|
@ -677,41 +676,12 @@ void Foam::diffusivityModel::correct()
|
|||
|
||||
scalarField localX(species_.size());
|
||||
scalarField localY(species_.size());
|
||||
scalarField localCv(species_.size());
|
||||
|
||||
scalarField localD(species_.size());
|
||||
|
||||
scalarField Di(species_.size());
|
||||
scalarField Dii(species_.size());
|
||||
scalarField muI(species_.size());
|
||||
scalarField kI(species_.size());
|
||||
|
||||
scalarField dof(species_.size());
|
||||
scalarField::subField dofI(dof, ions_.size(), 1);
|
||||
scalarField::subField dofN(dof, neutrals_.size(), ions_.size()+1);
|
||||
|
||||
|
||||
if (electron_.valid())
|
||||
{
|
||||
dof[0] = 0;
|
||||
forAll (ions_, i)
|
||||
{
|
||||
// dofI[i] = ions_[i].F();
|
||||
dofI[i] = 0.0;
|
||||
}
|
||||
forAll (neutrals_, i)
|
||||
{
|
||||
dofN[i] = neutrals_[i].F();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll (neutrals_, i)
|
||||
{
|
||||
dof[i] = neutrals_[i].F();
|
||||
}
|
||||
}
|
||||
|
||||
scalarField Zrot(species_.size());
|
||||
scalarField::subField ZrotI(Zrot, ions_.size(), 1);
|
||||
scalarField::subField ZrotN(Zrot, neutrals_.size(), ions_.size()+1);
|
||||
|
|
@ -719,15 +689,11 @@ void Foam::diffusivityModel::correct()
|
|||
forAll (p, celli)
|
||||
{
|
||||
const scalar rhoi = rho[celli];
|
||||
const scalar Cpi = Cp[celli];
|
||||
const scalar pi = p[celli];
|
||||
const scalar Ti = T[celli];
|
||||
const scalar WbarI = Wbar[celli];
|
||||
const scalar rhoQc2i = rhoQc2[celli];
|
||||
|
||||
thermo_.composition().Cv(localCv,pi,Ti); // J / kg / K
|
||||
localCv *= Wpure; // convert to J / kmol / K
|
||||
|
||||
forAll (species_, i)
|
||||
{
|
||||
localY[i] = Y[i][celli];
|
||||
|
|
@ -778,7 +744,6 @@ void Foam::diffusivityModel::correct()
|
|||
forAll(p.boundaryField(), patchi)
|
||||
{
|
||||
const volScalarField::Patch &rhop = rho.boundaryField()[patchi];
|
||||
const volScalarField::Patch &Cpp = Cp.boundaryField()[patchi];
|
||||
const volScalarField::Patch &pp = p.boundaryField()[patchi];
|
||||
const volScalarField::Patch &Tp = T.boundaryField()[patchi];
|
||||
const volScalarField::Patch &Wbarp = Wbar.boundaryField()[patchi];
|
||||
|
|
@ -787,15 +752,11 @@ void Foam::diffusivityModel::correct()
|
|||
forAll(rhop, facei)
|
||||
{
|
||||
const scalar rhoi = rhop[facei];
|
||||
const scalar Cpi = Cpp[facei];
|
||||
const scalar pi = pp[facei];
|
||||
const scalar Ti = Tp[facei];
|
||||
const scalar WbarI = Wbarp[facei];
|
||||
const scalar rhoQc2i = rhoQc2p[facei];
|
||||
|
||||
thermo_.composition().Cv(localCv,pi,Ti);
|
||||
localCv /= Wpure;
|
||||
|
||||
forAll (species_, i)
|
||||
{
|
||||
localY[i] = Y[i].boundaryField()[patchi][facei];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue