stable disk-like model.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -18,18 +18,18 @@ AC_dsz = 0.04908738521
|
|||||||
* Run-time params
|
* Run-time params
|
||||||
* =============================================================================
|
* =============================================================================
|
||||||
*/
|
*/
|
||||||
AC_max_steps = 501
|
AC_max_steps = 20001
|
||||||
AC_save_steps = 10
|
AC_save_steps = 50
|
||||||
AC_bin_steps = 100
|
AC_bin_steps = 1000
|
||||||
AC_bin_save_t = 1e666
|
AC_bin_save_t = 1e666
|
||||||
|
|
||||||
// Hydro
|
// Hydro
|
||||||
AC_cdt = 0.4
|
AC_cdt = 0.4
|
||||||
AC_cdtv = 0.3
|
AC_cdtv = 0.3
|
||||||
AC_cdts = 1.0
|
AC_cdts = 1.0
|
||||||
AC_nu_visc = 5e-3
|
AC_nu_visc = 5e-4
|
||||||
AC_cs_sound = 1.0
|
AC_cs_sound = 1.0
|
||||||
AC_zeta = 0.01
|
AC_zeta = 0.0
|
||||||
|
|
||||||
// Magnetic
|
// Magnetic
|
||||||
AC_eta = 5e-3
|
AC_eta = 5e-3
|
||||||
@@ -72,4 +72,4 @@ AC_unit_length = 1.5e17
|
|||||||
* =============================================================================
|
* =============================================================================
|
||||||
*/
|
*/
|
||||||
AC_ampl_lnrho = 0.0
|
AC_ampl_lnrho = 0.0
|
||||||
AC_ampl_uu = 0.0
|
AC_ampl_uu = 2e10
|
||||||
|
@@ -254,6 +254,8 @@ simple_uniform_core(AcMesh* mesh)
|
|||||||
//TEMPORARY TEST INPUT PARAMETERS
|
//TEMPORARY TEST INPUT PARAMETERS
|
||||||
const double core_radius = DX*32.0;
|
const double core_radius = DX*32.0;
|
||||||
const double trans = DX*12.0;
|
const double trans = DX*12.0;
|
||||||
|
const double vel_scale = mesh->info.real_params[AC_ampl_uu];
|
||||||
|
double abso_vel;
|
||||||
|
|
||||||
RR = 1.0;
|
RR = 1.0;
|
||||||
printf("%e %e %e \n", RR, trans, core_radius);
|
printf("%e %e %e \n", RR, trans, core_radius);
|
||||||
@@ -274,12 +276,19 @@ simple_uniform_core(AcMesh* mesh)
|
|||||||
//tanhRR = double(-0.5)*tanh((core_radius-RR)/trans) + double(0.5)
|
//tanhRR = double(-0.5)*tanh((core_radius-RR)/trans) + double(0.5)
|
||||||
// + double(0.1);
|
// + double(0.1);
|
||||||
tanhRR = double(1.0);
|
tanhRR = double(1.0);
|
||||||
|
|
||||||
|
if (RR >= mesh->info.real_params[AC_soft]) {
|
||||||
|
|
||||||
abso_vel = c * sqrt(2.0 * mesh->info.real_params[AC_G_const] * mesh->info.real_params[AC_M_sink_init] / RR);
|
abso_vel = vel_scale * sqrt(2.0 * mesh->info.real_params[AC_G_const] * mesh->info.real_params[AC_M_sink_init] / RR);
|
||||||
|
} else {
|
||||||
|
abso_vel = 0.0;
|
||||||
|
RR = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
mesh->vertex_buffer[VTXBUF_LNRHO][idx] = log(exp(ampl_lnrho)*tanhRR);
|
mesh->vertex_buffer[VTXBUF_LNRHO][idx] = log(exp(ampl_lnrho)*tanhRR);
|
||||||
mesh->vertex_buffer[VTXBUF_UUX][idx] = double(0.0);
|
mesh->vertex_buffer[VTXBUF_UUX][idx] = -abso_vel * (yy / RR);
|
||||||
mesh->vertex_buffer[VTXBUF_UUY][idx] = double(0.0);
|
mesh->vertex_buffer[VTXBUF_UUY][idx] = abso_vel * (xx / RR);
|
||||||
mesh->vertex_buffer[VTXBUF_UUZ][idx] = double(0.0);
|
mesh->vertex_buffer[VTXBUF_UUZ][idx] = double(0.0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -272,7 +272,7 @@ run_simulation(void)
|
|||||||
|
|
||||||
int on_off_switch;
|
int on_off_switch;
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
on_off_switch = 0; //accretion is off till 1000 steps.
|
on_off_switch = 0; //accretion is off till certain amount of steps.
|
||||||
} else {
|
} else {
|
||||||
on_off_switch = 1;
|
on_off_switch = 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user