Made accretion time-dependent now, need to come up with better accretion crition than truelove.

This commit is contained in:
JackHsu
2019-08-13 18:06:29 +08:00
parent ff59431d65
commit 927a5e74f2

View File

@@ -423,8 +423,11 @@ solve(Scalar dt) {
#endif
#if LSINK
out_lnrho = log(exp(out_lnrho) - accretion_profile(globalVertexIdx, lnrho));
out_accretion = value(accretion) + (accretion_profile(globalVertexIdx,lnrho) * dsx * dsy * dsz);
// out_lnrho = log(exp(out_lnrho) - accretion_profile(globalVertexIdx, lnrho));
// out_accretion = value(accretion) + (accretion_profile(globalVertexIdx,lnrho) * dsx * dsy * dsz);
out_accretion = rk3(out_accretion, accretion, accretion_profile(globalVertexIdx, lnrho), dt);// unit now is rho!
out_lnrho = log(exp(out_lnrho) - out_accretion);
out_accretion = out_accretion * dsx * dsy * dsz;// unit is now mass!
#endif
}