Dear gadget-list,
I noticed a bug in the calculation of the decay velocity of artificial
viscosity at line 1030-1033 (and 895-898 for EXPLICIT_VECTRIATION) in
density.cc when running non-cosmological simulation.
1030 if(All.ComovingIntegrationOn)
1031 vdotr2 += All.cf_atime2_hubble_a * r2;
1032
1033 double mu_ij = vdotr2 / (All.cf_afac3 * All.Time * kernel.r);
1034 double decay_vel;
1035
1036 if(vdotr2 < 0)
1037 decay_vel = targetSphP->Csnd + ngb->Csnd - mu_ij;
1038 else
1039 decay_vel = targetSphP->Csnd + ngb->Csnd;
At line 1031 and 1033, mu_ij is scaled for comoving integration. For a
non-cosmological run, this part would be
mu_ij = vdotr / kernel.r .
Also, there is a typo in the corresponding part of the code paper. In eq. (75),
v_ij * r_ij
is
v_ij * r_ij / |r_ij| .
Best,
Yuri
--
Yuri Oku
Theoretical Astrophysics Group
Department of Earth and Space Science
Graduate School of Science, Osaka University, Japan
Received on 2021-05-13 12:03:12