Commit 9e12fd9c authored by Elena Lega's avatar Elena Lega
Browse files

Add rhs2 term for explicit radiative energy equation #596

parent 558501a8
......@@ -77,6 +77,7 @@ namespace fargOCA {
ScalarField Bb; // mid diag
ScalarField Rhs;
ScalarField Rhs2;
DiskPhysic const& myPhysic;
};
......@@ -313,6 +314,7 @@ namespace fargOCA {
cc(disk.grid()),
Bb("Bb", disk.grid()),
Rhs("Rhs", disk.grid()),
Rhs2("Rhs2", disk.grid()),
myPhysic(disk.physic())
{
assert(disk.checkPhysicalQuantities());
......@@ -492,6 +494,7 @@ namespace fargOCA {
arr3d<real> ccp = cc.phi().data();
arr3d<real> bb = Bb.data();
arr3d<real> rhs = Rhs.data();
arr3d<real> rhs2 = Rhs2.data();
// Compute explicit solution for the diffusive part of the radiative energy equation using part of the matrix term computations for the div ( diffcoeff( grad Erad)
......@@ -544,9 +547,9 @@ namespace fargOCA {
real temperature4 = pow(temperature(i,h,j),4);
// rhs is integarted over a dt step
//rhs(i,h,j) = dt*density(i,h,j)*ctx.PlankOpacity(i,h,j)*(4.0*SIGMARAD*temperature4-C0*radiativeEnergy(i,h,j));
rhs(i,h,j) = dt*density(i,h,j)*ctx.PlankOpacity(i,h,j);
rhs(i,h,j) = dt*density(i,h,j)*ctx.PlankOpacity(i,h,j)*4.0*SIGMARAD*temperature4;
bb(i,h,j) = 1-aar(i,h,j)-ccr(i,h,j)-aat(i,h,j)-cct(i,h,j)-aap(i,h,j)-ccp(i,h,j);
rhs(i,h,j) *=(4.0*SIGMARAD*temperature4-C0*radiativeEnergy(i,h,j));
rhs2(i,h,j) =-dt*density(i,h,j)*ctx.PlankOpacity(i,h,j)*C0;
if( j == 0){
std::cout << " Therm ene-C0erad " << 4.0*SIGMARAD*temperature4-C0*radiativeEnergy(i,h,j) << "rhs = " << rhs(i,h,j) << "radEne = " << radiativeEnergy(i,h,j) << "\n";
}
......@@ -592,6 +595,7 @@ namespace fargOCA {
arr3d<real const> rhs = Rhs.data();
arr3d<real const> rhs2 = Rhs2.data();
arr3d<real> radiativeEnergy = energyHint.data();
auto aar = aa.radial().data();
......@@ -677,7 +681,7 @@ namespace fargOCA {
for (int i = 1; i < nr-1; i++) {
for ( int h = 1; h < ni-1; h++) {
for (int j = 0; j < ns; j++) {
radEnergyNew(i,h,j) = radiativeEnergy(i,h,j)+rhs(i,h,j);
radEnergyNew(i,h,j) = radiativeEnergy(i,h,j)*(1+rhs2(i,h,j))+rhs(i,h,j);
}
}
}
......@@ -721,9 +725,9 @@ namespace fargOCA {
}
energyHint.setGhosts();
} // End loop on num_exp
}
} // End if implicit_scheme
}
} // End if implicit_scheme
} // End of matrix solve
} // Endo of namespace
RadiationManager::RadiationManager() {}
RadiationManager::~RadiationManager() {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment