diff --git a/src/hydro/SPHENIX/hydro.h b/src/hydro/SPHENIX/hydro.h index f04c95abb3665bc6f20b7fc9d70f96c3ba32ebdd..dd951c33dcc9cf853611e26d4f37d43685da7fef 100644 --- a/src/hydro/SPHENIX/hydro.h +++ b/src/hydro/SPHENIX/hydro.h @@ -37,6 +37,7 @@ #include "hydro_properties.h" #include "hydro_space.h" #include "kernel_hydro.h" +#include "mhd.h" #include "minmax.h" #include "pressure_floor.h" @@ -840,7 +841,8 @@ __attribute__((always_inline)) INLINE static void hydro_prepare_force( cosmo->a_factor_sound_speed; const float sound_crossing_time_inverse = - soundspeed_physical * kernel_support_physical_inv; + mhd_get_magnetosonic_speed(p,1.0f,1.0f) * kernel_support_physical_inv; + // soundspeed_physical * kernel_support_physical_inv; /* Construct time differential of div.v implicitly following the ANARCHY spec */ diff --git a/src/hydro/SPHENIX/hydro_parameters.h b/src/hydro/SPHENIX/hydro_parameters.h index d8ab02c99c1b728b58834b3e1d4431e7e953cc98..277be9562dd079d160ca1a9d5ab7208551c1e276 100644 --- a/src/hydro/SPHENIX/hydro_parameters.h +++ b/src/hydro/SPHENIX/hydro_parameters.h @@ -50,7 +50,7 @@ /*! Cosmology default beta=3.0. * Alpha can be set in the parameter file. * Beta is defined as in e.g. Price (2010) Eqn (103) */ -#define const_viscosity_beta 1.5f +#define const_viscosity_beta 3.0f /*! The viscosity that the particles are reset to after being hit by a * feedback event. This should be set to the same value as the @@ -62,7 +62,7 @@ /*! The "initial" hydro viscosity, or the fixed value for non-variable * schemes. This usually takes the value 0.8. */ -#define hydro_props_default_viscosity_alpha 0.8f +#define hydro_props_default_viscosity_alpha 0.1f /*! Minimal value for the viscosity alpha in variable schemes. */ #define hydro_props_default_viscosity_alpha_min 0.0f diff --git a/src/mhd/DirectInduction/mhd.h b/src/mhd/DirectInduction/mhd.h index a69beaa5344338a9e289170ca3c0958a88107228..0c08100c790e64dbe555d6d52db6421cf2a66ce4 100644 --- a/src/mhd/DirectInduction/mhd.h +++ b/src/mhd/DirectInduction/mhd.h @@ -411,7 +411,7 @@ __attribute__((always_inline)) INLINE static float mhd_get_psi_over_ch_dt( const float par = hydro_props->mhd.par_dedner; const float div_B = p->mhd_data.divB; - const float div_v = a * a * hydro_get_div_v(p) - 3.0f * a * a * H; + const float div_v = a * a * p->viscosity.div_v - 3.0f * a * a * H; const float psi_over_ch = p->mhd_data.psi_over_ch; const float hyperbolic_term = @@ -576,7 +576,7 @@ __attribute__((always_inline)) INLINE static void mhd_convert_quantities( p->mhd_data.monopole_beta = hydro_props->mhd.monopole_subtraction; /* Set Artificial Difussion */ p->mhd_data.art_diff_beta = hydro_props->mhd.art_diffusion; - + /* Convert B into B/rho */ p->mhd_data.B_over_rho[0] /= p->rho; p->mhd_data.B_over_rho[1] /= p->rho; @@ -586,7 +586,7 @@ __attribute__((always_inline)) INLINE static void mhd_convert_quantities( p->mhd_data.B_over_rho[0] *= pow(cosmo->a, 1.5f * hydro_gamma); p->mhd_data.B_over_rho[1] *= pow(cosmo->a, 1.5f * hydro_gamma); p->mhd_data.B_over_rho[2] *= pow(cosmo->a, 1.5f * hydro_gamma); - + xp->mhd_data.B_over_rho_full[0] = p->mhd_data.B_over_rho[0]; xp->mhd_data.B_over_rho_full[1] = p->mhd_data.B_over_rho[1]; xp->mhd_data.B_over_rho_full[2] = p->mhd_data.B_over_rho[2];