Skip to content

Commit bed0844

Browse files
committed
Changes to improve transition thermal --> nuclear mass transfer
When star fills roche lobe, effective radius follows RL. When effective radius is smaller than equilibrium radius, zeta_thermal is kept -10 to ensure that mass transfer remains thermal until star is back to equilibrium
1 parent 271c11d commit bed0844

11 files changed

Lines changed: 36 additions & 25 deletions

File tree

dstar/SeBa.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int main(int argc, char ** argv) {
258258

259259
int input_seed=0;
260260
char seedlog[64];
261-
char paramlog[110];
261+
char paramlog[120];
262262

263263
//check_help();
264264

dstar/starclass/double_star.C

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ void double_star::dump(ostream & s, bool brief) {
381381
<< "\n " << identity
382382
<< " " << bin_type
383383
<< " " << binary_age
384-
<< " " << bin_type
384+
<< " " << current_mass_transfer_type
385385
<< " " << eccentricity
386386
<< " " << get_period()
387387
<< " " << semi
@@ -1280,28 +1280,29 @@ void double_star::recursive_binary_evolution(real dt,
12801280

12811281
// Primary fills Roche-lobe?
12821282
if (rp >= rl_p) {
1283-
get_primary()->set_spec_type(Rl_filling);
1284-
get_primary()->set_spec_type(Accreting, false);
1285-
get_secondary()->set_spec_type(Accreting);
1283+
get_primary()->set_spec_type(Rl_filling);
1284+
get_primary()->set_spec_type(Accreting, false);
1285+
get_secondary()->set_spec_type(Accreting);
1286+
donor->set_effective_radius(rl_p);
12861287
}
12871288
else
1288-
get_primary()->set_spec_type(Rl_filling, false);
1289+
get_primary()->set_spec_type(Rl_filling, false);
12891290

12901291
if (rs >= rl_s) {
12911292

1292-
// secondary is donor
1293-
donor = get_secondary();
1294-
accretor = get_primary();
1295-
1296-
get_secondary()->set_spec_type(Rl_filling);
1297-
get_secondary()->set_spec_type(Accreting, false);
1298-
get_primary()->set_spec_type(Accreting);
1293+
// secondary is donor
1294+
donor = get_secondary();
1295+
accretor = get_primary();
12991296

1300-
// One could check here for contact binary to cause
1301-
// the secondary to be the donor.
1297+
get_secondary()->set_spec_type(Rl_filling);
1298+
get_secondary()->set_spec_type(Accreting, false);
1299+
get_primary()->set_spec_type(Accreting);
1300+
donor->set_effective_radius(rl_s);
1301+
// One could check here for contact binary to cause
1302+
// the secondary to be the donor.
13021303
}
13031304
else
1304-
get_secondary()->set_spec_type(Rl_filling, false);
1305+
get_secondary()->set_spec_type(Rl_filling, false);
13051306

13061307

13071308
// Determines if we really have to do with a mass
@@ -1333,7 +1334,7 @@ void double_star::recursive_binary_evolution(real dt,
13331334
// (SilT Nov 25 2012)
13341335
// Goes wrong when first stable mass transfer. Need to set in ::contact_binary...
13351336
// bin_type = Contact;
1336-
// first_contact=true;
1337+
first_contact=true;
13371338

13381339
if (REPORT_RECURSIVE_EVOLUTION)
13391340
cerr << "\tFirst contact" << endl;
@@ -1488,6 +1489,7 @@ void double_star::recursive_binary_evolution(real dt,
14881489
set_effective_radius(get_secondary()->get_radius());
14891490

14901491
current_mass_transfer_type = Unknown;
1492+
first_contact = false;
14911493

14921494
refresh_memory();
14931495

rdc/rs_birthrate.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ local int extract_population(SeBa_hist *hi, real snap_time,
311311
// main -- driver to reduce SeBa short dump data
312312
//----------------------------------------------------------------------------
313313

314-
main(int argc, char ** argv) {
314+
int main(int argc, char ** argv) {
315315

316316
real normalize = -1;
317317
real snap_time = 0;

rdc/rs_countsn.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ local int count_supernova_types(SeBa_hist *hi, bool normalize) {
9898
// main -- driver to reduce SeBa short dump data
9999
//----------------------------------------------------------------------------
100100

101-
main(int argc, char ** argv) {
101+
int main(int argc, char ** argv) {
102102

103103
bool normalize = false;
104104
real snap_time = 0;

rdc/rs_findtype.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ local void extract_binary_on_stellar_types(SeBa_hist *ha,
142142
//-----------------------------------------------------------------------------
143143

144144

145-
main(int argc, char ** argv) {
145+
int main(int argc, char ** argv) {
146146

147147
bool c_flag = false;
148148
bool v_flag = false;

rdc/rs_reorder.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ local int reorder_binaries(SeBa_hist *hi, const real end_time) {
149149
// main -- driver to reduce SeBa short dump data
150150
//----------------------------------------------------------------------------
151151

152-
main(int argc, char ** argv) {
152+
int main(int argc, char ** argv) {
153153

154154
real end_time = VERY_LARGE_NUMBER;
155155

rdc/rs_scenarios.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ local int extract_scenarios(SeBa_hist *hi, const real end_time) {
114114
// main -- driver to reduce SeBa short dump data
115115
//----------------------------------------------------------------------------
116116

117-
main(int argc, char ** argv) {
117+
int main(int argc, char ** argv) {
118118

119119
real end_time = VERY_LARGE_NUMBER;
120120

rdc/rs_snapshot.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ cerr<<"assuming solar metallicity in extract_snapshot in rs_snapshot.C"<<endl;
295295
// main -- driver to reduce SeBa short dump data
296296
//----------------------------------------------------------------------------
297297

298-
main(int argc, char ** argv) {
298+
int main(int argc, char ** argv) {
299299

300300
bool normalize = false;
301301
real snap_time = 0;

sstar/starclass/hertzsprung_gap.C

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ real hertzsprung_gap::zeta_thermal() {
375375
else // Changed to current values
376376
z = -2; // by (SPZ+GN: 1 Oct 1998)
377377

378+
// (GN Jan 2025) test method to ensure thermal time scale mass transfer until radius back to equilibrium radius
379+
if (effective_radius < 0.98*radius) z = -10;
380+
378381
return z;
379382
}
380383

sstar/starclass/sub_giant.C

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ real sub_giant::zeta_thermal() {
715715
else
716716
z = 0; // (GN+SPZ Apr 28 1999) radius determined by core only (was -1)
717717

718+
// (GN Jan 2025) test method to ensure thermal time scale mass transfer until radius back to equilibrium radius
719+
if (effective_radius < 0.98*radius) z = -10;
720+
718721
return z;
719722
}
720723

0 commit comments

Comments
 (0)