diff --git a/src/binary_c_debug.h b/src/binary_c_debug.h index 71a1068ed2386c1f44e4cf357f18eaed44cc7350..b145358c2f3429f739d02f831a86718d7f9cc006 100644 --- a/src/binary_c_debug.h +++ b/src/binary_c_debug.h @@ -100,7 +100,7 @@ * this is not shown. */ -#define Debug_show_expression " " +#define Debug_show_expression " sep=%g per=%g J=%g ",stardata->common.orbit.separation,stardata->common.orbit.period,stardata->common.orbit.angular_momentum //#undef Debug_show_expression diff --git a/src/binary_star_functions/calculate_orbital_period.c b/src/binary_star_functions/calculate_orbital_period.c index ccaeb0b299a6b82142b11ff34c54cd63ace30fb5..658a890895eed087a4ca39ea0557c0cbc25578c7 100644 --- a/src/binary_star_functions/calculate_orbital_period.c +++ b/src/binary_star_functions/calculate_orbital_period.c @@ -8,7 +8,8 @@ double Pure_function_if_no_debug calculate_orbital_period (struct stardata_t * R (double)AU_IN_SOLAR_RADII)/(Total_mass)) *YEAR_LENGTH_IN_DAYS; - Dprint("Calculating orbital period: %g (M1+M2=%g a=%g)\n",per, + Dprint("Calculating orbital period: %g (M1+M2=%g a=%g)\n", + per, Total_mass,stardata->common.orbit.separation); return per; diff --git a/src/evolution/binary_star_evolution.c b/src/evolution/binary_star_evolution.c index f654e178fb0db0281ee8d56d585b5e91b1bff23f..497a52cad6710e694a6f48b9e44af407d6466f32 100644 --- a/src/evolution/binary_star_evolution.c +++ b/src/evolution/binary_star_evolution.c @@ -7,8 +7,7 @@ void binary_star_evolution(struct stardata_t * RESTRICT const stardata, * Having calculated stellar evolution, do * binary-specific evolutionary tasks */ - - if(stardata->common.orbit.eccentricity>1.0) + if(stardata->common.orbit.eccentricity > 1.0) { *retval = SYSTEM_IS_BROKEN_APART; } @@ -22,15 +21,4 @@ void binary_star_evolution(struct stardata_t * RESTRICT const stardata, determine_roche_lobe_radii(stardata,&stardata->common.orbit); set_effective_radii(stardata); } - - if(System_is_single) - { - /* - * Single star systems have no orbital angular - * momentum, and orbital frequency is undefined, - * so set both to zero. - */ - stardata->common.orbit.angular_momentum = 0.0; - stardata->common.orbit.angular_frequency = 0.0; - } } diff --git a/src/evolution/initialize_parameters.c b/src/evolution/initialize_parameters.c index 3a69d91d46b4aa895ec459135ba75973394f529d..a131d9b97102ce076a0e5a03c76b0485975bfa38 100644 --- a/src/evolution/initialize_parameters.c +++ b/src/evolution/initialize_parameters.c @@ -237,6 +237,7 @@ void initialize_parameters(struct stardata_t * RESTRICT const stardata) #endif//BSE star->q = Q(k); determine_roche_lobe_radius(stardata,&stardata->common.orbit,star); + Dprint("post-roche\n"); star->rol0 = star->roche_radius; Dprint("setting lum to %12.12e\n",lum); diff --git a/src/orbit/update_orbital_variables.c b/src/orbit/update_orbital_variables.c index 8834960da1c743dc065596d777671aa783fb1ba5..815a07d39b3423de4daf0662db8b4af1d982b791 100644 --- a/src/orbit/update_orbital_variables.c +++ b/src/orbit/update_orbital_variables.c @@ -43,5 +43,5 @@ void update_orbital_variables(struct stardata_t * RESTRICT const stardata, update_orbital_period_and_angular_frequency(orbit,star1,star2); determine_roche_lobe_radii(stardata,orbit); - + Dprint("post-roche\n"); } diff --git a/src/setup/parse_arguments.c b/src/setup/parse_arguments.c index 3fddc7f5e142419df85c75f34f64a976af9f646d..76f9fd3f2c18cb154c0642fe3eb23a17cd00f658 100644 --- a/src/setup/parse_arguments.c +++ b/src/setup/parse_arguments.c @@ -12,7 +12,6 @@ static Boolean match_scanf(const char * const arg, const struct cmd_line_arg_t * const cmd_line_arg, size_t * const offset_p); - static void derived_arguments(struct stardata_t * const stardata); /**************/ @@ -544,6 +543,9 @@ static void derived_arguments(struct stardata_t * const stardata) if(Is_not_zero(stardata->star[0].mass) && Is_not_zero(stardata->star[1].mass)) { + Dprint("preset : sep = %g per = %g\n", + stardata->common.orbit.separation, + stardata->common.orbit.period); if(Is_zero(stardata->common.orbit.period) && Is_not_zero(stardata->common.orbit.separation)) { @@ -567,6 +569,10 @@ static void derived_arguments(struct stardata_t * const stardata) } } + Dprint("postset: sep = %g per = %g\n", + stardata->common.orbit.separation, + stardata->common.orbit.period); + /* * If we are using log times, choose the next * max_evolution_time that correponds to an diff --git a/tbse b/tbse index a74a7d24e5be586f647430603e41731e3179c7bc..9d37c79895a41f6337a46fb14d77ba46dd05adf8 100755 --- a/tbse +++ b/tbse @@ -94,14 +94,14 @@ STELLAR_TYPE1=MAIN_SEQUENCE STELLAR_TYPE2=MAIN_SEQUENCE # stellar masses (solar units) -M1=2 -M2=1.5 +M1=1 +M2=0.1 # orbit: # If the period (days) is given, use it. # If the period is zero, use the separation (in Rsun) to calculate the period. # (this requires that the masses are already set) -ORBITAL_PERIOD=300 +ORBITAL_PERIOD=30000000000 ORBITAL_SEPARATION=0.0 # Orbital eccentricity should be in the range 0.0-1.0.