Skip to content

Commit

Permalink
Revert some changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lsoucasse committed Aug 21, 2024
1 parent a6c9580 commit 488e355
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 21 deletions.
3 changes: 2 additions & 1 deletion input/dummy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ CH4_included = 1
CH4_initial_bar = 0.0

CO_included = 1
CO_initial_bar = 0.0
CO_initial_bar = 0.0

2 changes: 1 addition & 1 deletion input/jgr_grid.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,4 @@ CO_included = 1
CO_initial_bar = 0.0

N2_included = 1
N2_initial_bar = 0.0
N2_initial_bar = 0.0
3 changes: 2 additions & 1 deletion input/t1c.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ CH4_included = 1
CH4_initial_bar = 0.0

CO_included = 1
CO_initial_bar = 0.0
CO_initial_bar = 0.0

7 changes: 0 additions & 7 deletions src/proteus/utils/escape.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,13 @@ def RunZEPHYRUS(hf_row, dt, M_star,Omega_star,tidal_contribution, semi_major_axi
## Step 1 : Load stellar evolution track + compute EL escape
log.info("Step 1 : Load stellar evolution track + compute EL escape ")

<<<<<<< HEAD:utils/escape.py
# Get the age of the star at time t to compute XUV flux at that time
age_star = hf_row["age_star"] # [years]

if (Fxuv_star_SI_full is None):
star = mors.Star(Mstar=M_star, Age=age_star/1e6, Omega=Omega_star)
age_star_mors = star.Tracks['Age']
Fxuv_star_SI_full = ((star.Tracks['Lx'] + star.Tracks['Leuv']) / (4 * np.pi * (semi_major_axis * 1e2)**2)) * ergcm2stoWm2
=======
# Get the age of the star at time t to compute XUV flux at that time
age_star = hf_row["age_star"] # [years]
star = mors.Star(Mstar=M_star, Age=age_star/1e6, Omega=Omega_star) # Load the stellar evolution track from MORS
age_star_mors = star.Tracks['Age'] # [Myrs]
>>>>>>> bc6a55d5b127f40b8ad90656657485d12e032533:src/proteus/utils/escape.py

# Interpolating the XUV flux at the age of the star
Fxuv_star_SI = np.interp(age_star, age_star_mors * 1e6, Fxuv_star_SI_full) # Interpolate to get Fxuv at age_star
Expand Down
20 changes: 10 additions & 10 deletions start_proteus.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ def main():

if OPTIONS["escape_model"] == 1:
esc_result = RunZEPHYRUS(hf_row, dt,
OPTIONS['star_mass'],
OPTIONS['star_omega'],
OPTIONS['escape_el_tidal_correction'],
OPTIONS['mean_distance']*AU,
OPTIONS["eccentricity"],
hf_row["M_planet"],
OPTIONS["efficiency_factor"],
hf_row["R_planet"],
OPTIONS['star_mass'],
OPTIONS['star_omega'],
OPTIONS['escape_el_tidal_correction'],
OPTIONS['mean_distance']*AU,
OPTIONS["eccentricity"],
hf_row["M_planet"],
OPTIONS["efficiency_factor"],
hf_row["R_planet"],
hf_row["R_planet"])

elif OPTIONS["escape_model"] == 2:
Expand All @@ -498,8 +498,8 @@ def main():
solvevol_target[e] = esc_m

# print info to user
#log.debug(" escape %s: m=%.2e kg, dm=%.2e (%.3f%%)"%
#(e, esc_m, esc_dm, 100*esc_dm/esc_m))
log.debug(" escape %s: m=%.2e kg, dm=%.2e (%.3f%%)"%
(e, esc_m, esc_dm, 100*esc_dm/esc_m))

# do not allow negative masses
solvevol_target[e] = max(0.0, solvevol_target[e])
Expand Down
2 changes: 1 addition & 1 deletion tools/GridPROTEUS.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,4 +515,4 @@ def _thread_target(cfg_path):
# When this script ends, it means that all processes ARE complete or they
# have been killed or crashed.
print("Exit GridPROTEUS")
exit(0)
exit(0)

0 comments on commit 488e355

Please sign in to comment.