diff --git a/src/rotation/moment_of_inertia.c b/src/rotation/moment_of_inertia.c index 69548607463de5289a7cb9d49c268b2126e8a112..6056b10dde97ffb6362e911890a3e62cfdd63762 100644 --- a/src/rotation/moment_of_inertia.c +++ b/src/rotation/moment_of_inertia.c @@ -22,36 +22,12 @@ double moment_of_inertia(struct stardata_t * const stardata, star->stellar_type == BLACK_HOLE ? BH_MOI(star) : star->stellar_type == NEUTRON_STAR ? neutron_star_MOI(star,r) : normal_star_MOI(star,r); -/* - if(1) - printf("momI [star %d type %d has core? %d, M=%g R=%g (RL=%g) L=%g J=%g] = (Menv=%g-%g) * (moment_of_inertia_factor=%g) * (r=%g)^2 + (k3=%g) * (Mc=%g) * (rc=%g)^2 = %g (%g) + %g (%g) = %g\n", - star->starnum, - star->stellar_type, - HAS_BSE_CORE(star->stellar_type), - - star->mass, - star->radius, - star->roche_radius, - star->luminosity, - star->angular_momentum, - - star->mass, -Outermost_core_mass(star), - star->moment_of_inertia_factor, - r, - K3, - Outermost_core_mass(star), - star->core_radius, - (star->mass - Outermost_core_mass(star))*star->moment_of_inertia_factor*Pow2(r), - envelope_moment_of_inertia(star,r), - K3* Pow2(star->core_radius)*Outermost_core_mass(star), - core_moment_of_inertia(star,star->core_radius), - momI); -*/ if(stardata->preferences->apply_Darwin_Radau_correction == TRUE) { /* + * EXPERIMENTAL! (maybe even wrong!) + * * Darwin-Radau corretion todata into account that * the star is rotating. * @@ -105,7 +81,7 @@ static double neutron_star_MOI(const struct star_t * RESTRICT const star, */ const double x = GRAVITATIONAL_CONSTANT * star->mass * M_SUN / (r * R_SUN * Pow2(SPEED_OF_LIGHT)); - return 0.21* star->mass * Pow2(star->radius) / Max(1e-20,1.0 - 2.0 * x); + return CORE_MOMENT_OF_INERTIA_FACTOR * star->mass * Pow2(star->radius) / Max(1e-20,1.0 - 2.0 * x); } static double BH_MOI(const struct star_t * RESTRICT const star) diff --git a/src/stellar_structure/convective_envelope_mass_and_radius.c b/src/stellar_structure/convective_envelope_mass_and_radius.c index 2f9beabf19cb662bfa7573a8fa7d685e6e1a8e3b..1497c0e9c7a789923a4435f8447c04d5d445e905 100644 --- a/src/stellar_structure/convective_envelope_mass_and_radius.c +++ b/src/stellar_structure/convective_envelope_mass_and_radius.c @@ -91,7 +91,8 @@ void convective_envelope_mass_and_radius(struct stardata_t * const stardata, /* * Zero-age and BGB values of k^2 (== moment_of_inertia_factor = I/(MR^2)) */ - k2z = Min(0.21,Max(0.09-0.27*logm,0.037+0.033*logm)); + k2z = Min(CORE_MOMENT_OF_INERTIA_FACTOR, + Max(0.09-0.27*logm,0.037+0.033*logm)); if(logm>1.3) k2z -= 0.055*Pow2(logm-1.3); k2bgb = Min3(0.15,0.147+0.03*logm,0.162-0.04*logm); diff --git a/src/stellar_structure/stellar_structure_BSE_given_timescales.c b/src/stellar_structure/stellar_structure_BSE_given_timescales.c index d671b1c868d46d5f047801552bd6541de8c085f0..a08fcb4dc815523f3b0f9b1969726e8733c361f1 100644 --- a/src/stellar_structure/stellar_structure_BSE_given_timescales.c +++ b/src/stellar_structure/stellar_structure_BSE_given_timescales.c @@ -477,12 +477,15 @@ int stellar_structure_BSE_given_timescales(struct star_t *newstar, /* presumably menv (convective envelope mass) should be zero ? */ newstar->menv = 0.0; + /* similarly renv should be zero */ newstar->renv = 0.0; + /* set core radius to actual radius */ newstar->core_radius = newstar->radius; + /* generic k2 */ - newstar->moment_of_inertia_factor = 0.21; + newstar->moment_of_inertia_factor = CORE_MOMENT_OF_INERTIA_FACTOR; } #ifdef NUCSYN diff --git a/src/stellar_structure/stellar_structure_remnant_and_perturbations.c b/src/stellar_structure/stellar_structure_remnant_and_perturbations.c index 05fe38554162351452ebaf40ba8e4cdb0d36b4a0..7128667b5952d877775f8c7037c87d991ae3012e 100644 --- a/src/stellar_structure/stellar_structure_remnant_and_perturbations.c +++ b/src/stellar_structure/stellar_structure_remnant_and_perturbations.c @@ -269,9 +269,9 @@ void stellar_structure_remnant_and_perturbations(struct star_t * newstar, else { newstar->core_radius = newstar->radius; - newstar->menv = 1E-10; - newstar->renv = 1E-10; - newstar->moment_of_inertia_factor = 0.21; + newstar->menv = 1e-10; + newstar->renv = 1e-10; + newstar->moment_of_inertia_factor = CORE_MOMENT_OF_INERTIA_FACTOR; } /*