rometsch / fargocpt

Fluid dynamics code to study the interaction between protoplanetary disks and planets.
GNU Affero General Public License v3.0
6 stars 3 forks source link

fix nans in Qplus #47

Closed rometsch closed 11 months ago

rometsch commented 11 months ago

Issue

Simulations froze when an ideal equation of state was used and irradiation was the only heating source.

Cause

The midplane density was not computed before computation of the effective opacity (kappa_eff), so the latter was equal to inf. Then in computing the Qplus contribution from irradiation, this lead to Qplus being NaN and finally the timestep to be zero due to the nan contribution from the heating and cooling terms.

Fix

This is fixed by computing midplane density before the effective opacity.