Version 1 (modified by 10 years ago) ( diff ) | ,
---|
The current version of the code has changed the temperature from computational units to Kelvin or solves the energy equation instead of temperature. This note is to check the parameter and equations changes need to do to be consistent comparing the old ways of thermal diffusion equation in Astrobear. So lhs of the equation was replaced by the derivative of the energy.
- Scales for converting from cgs to cu ScaleFlux is the scale which converts the heat flux from cgs units to computational units in AstroBEAR. Since
The new scaleFlux is or as the temperature is in Kelvin now. While in the older version where the temperature is in c.u. scale, So scaleFlux is instead…
scaleDiff is the scale that converts the kappa1 from cgs units to computational units. Since
SoThese scales are defined in physics_control.f90
- subroutine getdEdT in EOS.f90
This subroutine will return the value of dE/dT which has a unit as C.U. Energy/Kelvin
- source and stencil_fix(0) in diffusion.f90 will be modified as
source = ((ndiff-1.0)/(ndiff+1.0))*dot_product(T(0:2*nDim),stencil_fixed(0:2*nDim)) - T(0)*GetdEdT(Info%q(i,j,k,:)) stencil_fixed(0) = stencil_fixed(0) - GetdEdT(Info%q(i,j,k,:))
comparing with the old way
! source = ((ndiff-1.0)/(ndiff+1.0))*dot_product(T(0:2*nDim),stencil_fixed(0:2*nDim)) - T(0)*gamma7*Info%q(i,j,k,1) ! stencil_fixed(0) = stencil_fixed(0) - gamma7*Info%q(i,j,k,1)
So the lefthand side vector has unit of Kelvin and righthand side vector has unit of C.U.energy