diffenix 0.0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
diffenix/Constantes.py ADDED
@@ -0,0 +1,761 @@
1
+ from __future__ import annotations
2
+
3
+ # This file contains all globals constants needed
4
+
5
+ import os
6
+ import numpy as np
7
+ from diffenix.chemains import racine, results, data_leiden, data_stars, data_radmc
8
+ from scipy.interpolate import LinearNDInterpolator, CloughTocher2DInterpolator, CubicSpline
9
+
10
+ ii = np.iinfo(int) # Informations sur les results possibles de la
11
+
12
+ ii_max = ii.max # np.iinfo(int).max the maximum integer possible
13
+
14
+ if os.path.exists(racine):
15
+ if "interrupteur.npz" not in os.listdir(results):
16
+ np.savez_compressed(results + "/interrupteur.npz")
17
+ if not os.path.exists(results + "/informations.csv"):
18
+ print("Genrating new informations.csv file")
19
+ # d: dict = dict(simulation=np.empty(1), C_L=np.empty(1), C_M=np.empty(1), C_t=np.empty(1),
20
+ # Me=np.empty(1), gamma=np.empty(1), IT_s=np.empty(1), méthode=np.empty(1), Rad=np.empty(1))
21
+ d: dict = dict(Simulation=np.empty(1), C_L=np.empty(1),
22
+ C_M=np.empty(1), C_t=np.empty(1),
23
+ Ms=np.empty(1), Ts=np.empty(1), Rs=np.empty(1), Ls=np.empty(1),
24
+ a_in=np.empty(1), a_out=np.empty(1), a0=np.empty(1),
25
+ T0=np.empty(1), pls_temp=np.empty(1), m_dot=np.empty(1),
26
+ alpha=np.empty(1), gamma=np.empty(1),
27
+ AB_Mbelt=np.empty(1), AB_Abelt=np.empty(1),
28
+ AB_a0=np.empty(1), AB_delta_r=np.empty(1),
29
+ AB_K=np.empty(1), AB_Phi=np.empty(1), AB_rp=np.empty(1),
30
+ AB_f_ice=np.empty(1), AB_rho_refr=np.empty(1),
31
+ AB_rho_ice=np.empty(1), AB_sublimation_model=np.empty(1),
32
+ AB_SD_amax=np.empty(1), AB_SD_abig=np.empty(1),
33
+ AB_SD_amed=np.empty(1), AB_SD_amin=np.empty(1),
34
+ AB_SD_qh=np.empty(1), AB_SD_qm=np.empty(1), AB_SD_ql=np.empty(1),
35
+ AB_sb=np.empty(1), AB_e=np.empty(1), AB_i=np.empty(1),
36
+ AB_As=np.empty(1), AB_bs=np.empty(1), AB_bg=np.empty(1), AB_t0_diss=np.empty(1),
37
+ AB_t1_diss=np.empty(1), KB_Mbelt=np.empty(1), KB_Abelt=np.empty(1),
38
+ KB_a0=np.empty(1), KB_delta_r=np.empty(1),
39
+ KB_K=np.empty(1), KB_Phi=np.empty(1), KB_rp=np.empty(1),
40
+ KB_f_ice=np.empty(1), KB_rho_refr=np.empty(1),
41
+ KB_rho_ice=np.empty(1), KB_sublimation_model=np.empty(1),
42
+ KB_SD_amax=np.empty(1), KB_SD_abig=np.empty(1),
43
+ KB_SD_amed=np.empty(1), KB_SD_amin=np.empty(1),
44
+ KB_SD_qh=np.empty(1), KB_SD_qm=np.empty(1), KB_SD_ql=np.empty(1),
45
+ KB_sb=np.empty(1), KB_e=np.empty(1), KB_i=np.empty(1),
46
+ KB_As=np.empty(1), KB_bs=np.empty(1), KB_bg=np.empty(1), KB_t0_diss=np.empty(1),
47
+ KB_t1_diss=np.empty(1), a_planets=np.empty(1), m_planets=np.empty(1), f_accr=np.empty(1),
48
+ t0=np.empty(1), IT_s=np.empty(1), dip=np.empty(1), rtol=np.empty(1), atol=np.empty(1),
49
+ method_root=np.empty(1))
50
+ import pandas as pd
51
+
52
+ tab: pd.DataFrame = pd.DataFrame(columns=d)
53
+ tab.to_csv(results + "/informations.csv")
54
+
55
+ # Mathematical constantes
56
+ Pi: np.float64 = np.double(np.pi) #: Pi double precision
57
+ inf: np.float64 = np.double(np.inf) #: infinite double precision
58
+ zero: np.float64 = np.double(0.) #: 0. double precision
59
+
60
+ # Conversion factor from MKSA to code unit, the only unit that cannot be changed is the temperature in K
61
+
62
+ C_L: np.float64 = np.double(1 / 149597870700) #: 1/6371009 # m -> au: length
63
+ C_M: np.float64 = np.double(1 / 5.9722e24) #: 1/5.9722*1e24 # kg -> Mearth : mass
64
+ C_t: np.float64 = np.double(1 / (3600 * 24 * 365.25 * 1e6)) #: s-> 1 Myr : time
65
+
66
+ C_F: np.float64 = np.double(C_M * C_L / (C_t * C_t)) #: N -> Mearth au**2 / Myr : force
67
+ C_rho: np.float64 = np.double(C_M / (C_L * C_L * C_L)) #: kg/m3 -> Mearth / au**2: density
68
+ C_E: np.float64 = np.double(C_M * C_L * C_L / (C_t * C_t)) #: j -> Mearth au**2 / Myr**2 : energy
69
+ C_Lum: np.float64 = np.double(C_E / C_t) #: W = j / s -> Mearth au**2 / Myr**3: Luminosity
70
+
71
+ yr: np.float64 = np.double(3600 * 24 * 365.25) * C_t #: One year in code unit
72
+ kyr: np.float64 = np.double(3600 * 24 * 365.25 * 1.e3) * C_t #: One thousand year in code unit
73
+ Myr: np.float64 = np.double(3600 * 24 * 365.25 * 1.e6) * C_t #: One million year in code unit
74
+ Gyr: np.float64 = np.double(3600 * 24 * 365.25 * 1.e9) * C_t #: One billion year in code unit
75
+
76
+ # Fundamentals constantes
77
+ G: np.float64 = np.double(6.67430e-11 * C_F * C_L * C_L / (C_M * C_M)
78
+ ) #: 6.67430e-11 N m*2 kg**-2 : Gravitational constant
79
+ Rgp: np.float64 = np.double(8.31446261815324 * C_E) #: 8.31446261815324 J K−1 mol−1 : perfect gas constant
80
+ c: np.float64 = np.double(299792458) * C_L / C_t #: 299792458 m/s Speed of light
81
+ sigma: np.float64 = np.double(5.670374419 * 1e-8 * C_E / (C_t * C_L * C_L)
82
+ ) #: 5.670374419 * 1e-8 W m-2 K-4 : Stefan-Boltzmann's constant
83
+ kb: np.float64 = np.double(1.380649e-23 * C_E) #: 1.380649e-23 J/K Boltzmann constant
84
+ Na: np.float64 = np.double(Rgp / kb) #: Avogadro constant
85
+ h: np.float64 = np.double(6.62607015e-34 * C_E * C_t) #: 6.62607015e-34 J/s Planck constant
86
+ mp = np.double(1.6726e-27) * C_M # Mass of proton
87
+
88
+ # Earth
89
+ Rearth: np.float64 = np.double(6371009 * C_L) # 6371009 m Earth's radius
90
+ Mearth: np.float64 = np.double(5.9722 * 1e24 * C_M) # 5.9722 * 1e24 kg Earth's mass
91
+ au: np.float64 = np.double(149597870700 * C_L) # 149597870700 m : Astronomic unity
92
+ # Sun
93
+ Msun: np.float64 = np.double((1.9884 * 1e30) * C_M) # 1.9891*10**30 kg Sun's mass
94
+ Rsun: np.float64 = np.double(1.392684e9 / 2. * C_L) # Present-day sun's radius
95
+ Lsun: np.float64 = np.double(3.826e26 * C_Lum) # 3.826 10^26 W Sun's luminosity (present day)
96
+
97
+ # parsec
98
+ pc: np.float64 = np.double(648000) * au / Pi
99
+
100
+ # Default central star properties
101
+ Ms: np.float64 = Msun
102
+ Ts: np.float64 = np.double(5500.) # 5500 K Surface temperature of the central star
103
+ Rs: np.float64 = Rsun # Radius
104
+ Ls: np.float64 = np.double(Lsun) # Luminosity
105
+
106
+ # Disc properties
107
+
108
+ # Radial extension
109
+ a_in: np.float64 = .05 * au #: Inner radius
110
+ # a_in = 5 * au #: Inner radius
111
+ # a0 = 1. * au
112
+ a0: np.float64 = 2.65 * au
113
+ # a_out = 50 * au #: outer radius
114
+ a_out: np.float64 = 500 * au #: outer radius
115
+ # a_in = .5 * au
116
+ # a0 = 26.5 * au
117
+ # a0 = 50 * au
118
+ # a_out = 1500 * au
119
+
120
+ # Temperature
121
+ T0: np.float64 = (278 * ((Ls / Lsun) ** (1 / 4)) * ((a0 / au) ** (-1 / 2))) #: Reference temperature at a0
122
+
123
+ pls_temp: np.float64 = -0.5 #: Temperature distribution power slope
124
+ # m_dot: np.float64 = np.double(1e-3 * Mearth / (C_t * 3600 * 24 * 365.25 * 1e6)
125
+ # m_dot: np.float64 = np.double(1e-3 * Mearth / (C_t * 3600 * 24 * 365.25 * 1e6)
126
+ # ) #: Gas generation rate (if constant generation rate)
127
+ m_dot: np.float64 = np.double(1e-1 * Mearth / (C_t * 3600 * 24 * 365.25 * 1e6)
128
+ ) #: Gas generation rate (if constant generation rate)
129
+
130
+ # Gas properties
131
+ # alpha: np.float64 = np.double(5e-1) # viscous parameter
132
+ # alpha: np.float64 = np.double(1e-1) # viscous parameter
133
+ alpha: np.float64 = np.double(1e-3) #: viscous parameter
134
+ gamma: np.float64 = np.double(1.)
135
+ # gamma: np.float64 = np.double(7. / 5.)
136
+
137
+ # Belts properties
138
+
139
+ # Asteroid belt : Water ice
140
+
141
+ # AB_sublimation_model: str = "thermal_full"
142
+ AB_sublimation_model: str = "constant_rate"
143
+ # AB_sublimation_model: str = "none"
144
+ AB_a0: np.float64 = np.double(2.65) * au #: Central radius
145
+ AB_delta_r: np.float64 = np.double(.8) * au #: Radial extention above and below central redius (half of belt's size)
146
+ AB_Mbelt: np.float64 = np.double(0.12 * Mearth) #: Total initial mass
147
+ AB_Abelt: np.float64 = np.double(0.06) # Asteroids' albedo
148
+ AB_rho_refr: np.float64 = np.double(2.5e3 * C_M / (C_L * C_L * C_L)) # Refractories density 2.5 kg / m3
149
+ AB_rho_ice: np.float64 = np.double(1.e3 * C_M / (C_L * C_L * C_L)) # ice density = 1 kg / m3
150
+ AB_f_ice: np.float64 = np.double(0.2) # Initial ice to solid mass ratio for Asteroids
151
+ AB_K: np.float64 = np.double(1e-5 * C_L * C_L / C_t) # thermal diffusion coefficent
152
+ AB_Phi: np.float64 = np.double(0.6) # Porosity
153
+ AB_rp: np.float64 = np.double(1e-6 * C_L) # Pore's radius
154
+ # Size distribution of asteroid belt
155
+ AB_SD_amax: np.float64 = np.double(1.e6) * C_L # Maximum size of asteroids
156
+ AB_SD_abig: np.float64 = np.double(120e3) * C_L # Intermediate size
157
+ AB_SD_amed: np.float64 = np.double(20.e3) * C_L # Medium size
158
+ AB_SD_amin: np.float64 = C_L # Minimal size
159
+ AB_SD_qh: np.float64 = np.double(-4.5) # Power slope of the distribution between abig and amax
160
+ AB_SD_qm: np.float64 = np.double(-1.2) # Power slope of the distribution between amed and abig
161
+ AB_SD_ql: np.float64 = np.double(-3.6) # Power slope of the distribution between amin and amed
162
+ # Parameter for the collision model
163
+ AB_sb: np.float64 = np.double(316) * C_L # Intermediate size
164
+ AB_e: np.float64 = np.double(0.075) # Eccentricity
165
+ AB_i: np.float64 = AB_e / np.double(2.) # Inclination
166
+ AB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
167
+ AB_bs: np.float64 = np.double(-0.1)
168
+ AB_bg: np.float64 = np.double(0.5)
169
+ # Lifetime
170
+ AB_t0_diss: np.float64 = 2000 * Gyr # Belt's lifetime before dissipation
171
+ AB_t1_diss: np.float64 = 0.1 * Myr # Dissipation timescale
172
+ # Kuiper belt : CO ice
173
+ KB_sublimation_model: str = "none"
174
+ # KB_sublimation_model: str = "constant_rate"
175
+ KB_a0: np.float64 = np.double(44) * au #: Central radius
176
+ KB_delta_r: np.float64 = np.double(8) * au #: Radial extention above and below central redius (half of belt's size)
177
+ KB_Mbelt: np.float64 = np.double(0.01 * Mearth) #: Total initial mass
178
+ KB_Abelt: np.float64 = np.double(0.06) # KBO's albedo
179
+ KB_rho_refr: np.float64 = np.double(2.5e3 * C_M / (C_L * C_L * C_L)) # Solids density 2.5 kg / m3
180
+ KB_rho_ice: np.float64 = np.double(1.e3 * C_M / (C_L * C_L * C_L)) # ice density = 1 kg / m3
181
+ KB_f_ice: np.float64 = np.double(0.2) # Initial ice to solid mass ratio for Asteroids
182
+ KB_K: np.float64 = np.double(1e-10 * C_L * C_L / C_t) # thermal diffusion coefficent
183
+ KB_Phi: np.float64 = np.double(0.6) # Porosity
184
+ KB_rp: np.float64 = np.double(1e-6 * C_L) # Pore's radius
185
+ # Size distribution of asteroid belt
186
+ KB_SD_amax: np.float64 = np.double(1.e6) * C_L # Maximum size of KBO
187
+ KB_SD_abig: np.float64 = np.double(120e3) * C_L # Intermediate size
188
+ KB_SD_amed: np.float64 = np.double(20.e3) * C_L # Medium size
189
+ KB_SD_amin: np.float64 = C_L # Minimal size
190
+ KB_SD_qh: np.float64 = np.double(-4.5) # Power slope of the distribution between abig and amax
191
+ KB_SD_qm: np.float64 = np.double(-1.2) # Power slope of the distribution between amed and abig
192
+ KB_SD_ql: np.float64 = np.double(-3.6) # Power slope of the distribution between amin and amed
193
+ # Parameter for the collision model
194
+ KB_sb: np.float64 = np.double(316) * C_L # Intermediate size
195
+ KB_e: np.float64 = np.double(0.075) # Eccentricity
196
+ KB_i: np.float64 = KB_e / np.double(2.) # Inclination
197
+ KB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
198
+ KB_bs: np.float64 = np.double(-0.1)
199
+ KB_bg: np.float64 = np.double(0.5)
200
+ # Lifetime
201
+ KB_t0_diss: np.float64 = 10 * Gyr # Belt's lifetime before dissipation
202
+ KB_t1_diss: np.float64 = 10 * Gyr # Dissipation timescale
203
+
204
+ # Planets
205
+ # a_planets: np.ndarray = np.array([1.52371 * au, au, 0.723336 * au, 0.387098 * au])
206
+ # m_planets: np.ndarray = np.array([0.107 * Mearth, Mearth, 0.815 * Mearth, 0.055 * Mearth])
207
+ # a_planets: np.ndarray = np.array([1.53 * au, au, 0.723336 * au, 0.387098 * au])
208
+ # m_planets: np.ndarray = np.array([0.107 * Mearth, Mearth, 0.815 * Mearth, 0.055 * Mearth])
209
+ a_planets: np.ndarray = np.array([])
210
+ m_planets: np.ndarray = np.array([])
211
+ # a_planets: np.ndarray = np.array([au]) #: Semi majors axis
212
+ # a_planets: np.ndarray = np.array([0.6 * AB_a0]) #: Semi majors axis
213
+ # m_planets: np.ndarray = np.array([Mearth]) #: Masses
214
+ # a_planets: np.ndarray = np.array([30.069 * au, 19.189 * au, 9.537 * au])
215
+ # m_planets: np.ndarray = np.array([17.147 * Mearth, 14.536 * Mearth, 95.152 * Mearth])
216
+ f_accr: np.float64 = np.double(0.5)
217
+
218
+ # Photodissociation
219
+ t0: np.float64 = np.double(5.) * Myr #: Time at which the disc dissipates
220
+ if os.path.exists(data_stars): # Loading luminosity profiles as function of mass en time
221
+ wfus = np.load(data_stars)
222
+ interpLbol = CloughTocher2DInterpolator(np.array([wfus["Age"] * 3600 * 24 * 365.25 * 1.e6 * C_t,
223
+ wfus["M"] * Msun]).T, wfus["Lbol"] * Lsun, fill_value=Lsun)
224
+ interpRs = CloughTocher2DInterpolator(np.array([wfus["Age"] * 3600 * 24 * 365.25 * 1.e6 * C_t,
225
+ wfus["M"] * Msun]).T, wfus["R"] * Rsun, fill_value=Rsun)
226
+ interpReuv_3692 = CloughTocher2DInterpolator(np.array([wfus["Age"] * 3600 * 24 * 365.25 * 1.e6 * C_t,
227
+ wfus["M"] * Msun]).T, wfus["Reuv_3692"])
228
+ interpReuv_lya = CloughTocher2DInterpolator(np.array([wfus["Age"] * 3600 * 24 * 365.25 * 1.e6 * C_t,
229
+ wfus["M"] * Msun]).T, wfus["Reuv_lya"])
230
+ else:
231
+ print("Warning : no file for the central star's luminosity has been provided. The luminosity will be assumed "
232
+ "to be a constant")
233
+ interpLbol = None
234
+ interpRs = None
235
+ interpReuv_3692 = None
236
+ interpReuv_lya = None
237
+
238
+ # Loading photodissociation data
239
+ photo_diss: dict = {}
240
+ tabH2O = np.loadtxt(data_leiden + "/H2O.txt")
241
+ photo_diss["lambdas_nm"] = tabH2O[:, 0]
242
+ photo_diss["cs"] = tabH2O[:, 1] * 1e-4 * C_L * C_L
243
+ tabI = np.loadtxt(data_leiden + "/ISRF.dat")
244
+ photo_diss["I"] = np.interp(photo_diss["lambdas_nm"], tabI[:, 0], tabI[:, 1]) / (1e-4 * C_L * C_L * C_t)
245
+ photo_diss["I"][photo_diss["lambdas_nm"] < tabI[0, 0]] = 0.
246
+
247
+ # Integration parameter
248
+ IT_s: int = 700 #: Spatials steps
249
+ dip: int = 10 #: half of the number of sink cells for a given planets to model the accretion
250
+ method: str = 'RK45' #: 'LSODA','BDF','DOP853','RK45' : Temporal integration method_root
251
+ rtol: np.float64 = np.double(1e-5) #: Relative tolerance for temporal integration
252
+ atol: np.float64 = np.double(1e-250) #: Absolute tolerance for temporal integration (by default too small hence to
253
+
254
+
255
+ # relative tolerance will always be the limiting factor)
256
+
257
+
258
+ def constantes() -> dict[str, np.double | str]:
259
+ """
260
+ All the constants
261
+
262
+ Returns
263
+ -------
264
+ dict
265
+ A dictionary with all the constants :
266
+ - racine : str, The absolute path to the directory where all the results are saved
267
+ - results : str, The relative path to racine of the directory (inside racine) where the simulations are saved
268
+ - C_L : np.float64, 1/6371009 m -> au: length conversion factor
269
+ - C_M : np.float64, 1/(5.9722*1e24) kg -> Mearth : mass conversion factor
270
+ - C_t : np.float64, 1 / (3600 * 24 * 365.25 * 1e6) : s-> 1 Myr : time conversion factor
271
+ - Ts : np.float64, Surface temperature of the central star
272
+ - Ms : np.float64, Mass of the central star
273
+ - Rs : np.float64, Radius of the central star
274
+ - Ls : np.float64, Luminosity of the central star
275
+ - a_in : np.float64, Inner radius of the integration domain
276
+ - a0 : np.float64,
277
+ - a_out : np.float64, Outer radius of the integration domain
278
+ - T0 : np.float64, Temperature at a0
279
+ - pls_temp : np.float64, the radial power slope of the temperature
280
+ - mdot : np.float64, gas mass generation rate (if constant generation rate)
281
+ - AB_Mbelt : np.float64, Asteroid belt's size
282
+ - AB_Abelt : np.float64, Asteroids albedo
283
+ - AB_a0 : np.float64, Asteroid belt's central radius
284
+ - AB_delta_r : np.float64, Half of asteroid belt size
285
+ - AB_K : np.float64, Thermal diffusion coefficient in asteroids
286
+ - AB_Phi : np.float64, Porosity
287
+ - AB_rp : np.float64, Asteroid's pore radius
288
+ - AB_f_ice : np.float64, Ice to total mass ratio
289
+ - AB_rho_refr : np.float64, Refractory's materials density in asteroids
290
+ - AB_rho_ice : np.float64 Ice density
291
+ - AB_sublimation_model : np.float64 Sublimation model in asteroid belt
292
+ - AB_SD_amax : np.double, Maximum size of asteroids
293
+ - AB_SD_abig : np.double, Intermediate size
294
+ - AB_SD_amed : np.double, Medium size for size distribution
295
+ - AB_SD_amin : np.double, Minimal size
296
+ - AB_SD_qh : np.double, Power slope of the distribution between abig and amax
297
+ - AB_SD_qm : np.double, Power slope of the distribution between amed and abig
298
+ - AB_SD_ql : np.double, Power slope of the distribution between amin and amed
299
+ - AB_s_min: np.float64 = np.double(316) * C_L # Minimum size for collision model
300
+ - AB_sb: np.float64 = np.double(316) * C_L # Intermediate size for collision model
301
+ - AB_s_max: np.float64 = np.double(316) * C_L # Maximum size for collision model
302
+ - AB_e: np.float64 = np.double(0.075) # Eccentricity
303
+ - AB_i: np.float64 = AB_e / np.double(2.) # Inclination
304
+ - AB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
305
+ - AB_bs: np.float64 = np.double(-0.1)
306
+ - AB_bg: np.float64 = np.double(0.5)
307
+ - AB_t0_diss: np.float64 = 10 * Gyr # Belt's lifetime before dissipation
308
+ - AB_t1_diss: np.float64 = 10 * Gyr # Dissipation timescale
309
+ - KB_Mbelt : np.float64, Kuiper belt's mass
310
+ - KB_Abelt : np.float64, KBO's albedo
311
+ - KB_a0 : np.float64, Kuiper belt central radius
312
+ - KB_delta_r : np.float64, Half of Kuiper belt size
313
+ - KB_K : np.float64, Thermal diffusion coefficient in KBO
314
+ - KB_Phi : np.float64, KBO's porosity
315
+ - KB_rp : np.float64, KBO's pore's radius
316
+ - KB_f_ice : np.float64, Initial ice to total mass ratio in KBO
317
+ - KB_rho_refr : np.float64, Refractory's materials density in KBO
318
+ - KB_rho_ice : np.float64, Ice density
319
+ - KB_sublimation_model : np.float64, Sublimation model in Kuiper belt
320
+ - KB_SD_amax : np.double, Maximum size of KBO
321
+ - KB_SD_abig : np.double, Intermediate size
322
+ - KB_SD_amed : np.double, Medium size
323
+ - KB_SD_amin : np.double, Minimal size
324
+ - KB_SD_qh : np.double, Power slope of the distribution between abig and amax
325
+ - KB_SD_qm : np.double, Power slope of the distribution between amed and abig
326
+ - KB_SD_ql : np.double, Power slope of the distribution between amin and amed
327
+ - KB_s_min: np.float64 = np.double(316) * C_L # Minimum size for collision model
328
+ - KB_sb: np.float64 = np.double(316) * C_L # Intermediate size for collision model
329
+ - KB_s_max: np.float64 = np.double(316) * C_L # Maximum size for collision model
330
+ - KB_e: np.float64 = np.double(0.075) # Eccentricity
331
+ - KB_i: np.float64 = KB_e / np.double(2.) # Inclination
332
+ - KB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
333
+ - KB_bs: np.float64 = np.double(-0.1)
334
+ - KB_bg: np.float64 = np.double(0.5)
335
+ - KB_t0_diss: np.float64 = 10 * Gyr # Belt's lifetime before dissipation
336
+ - KB_t1_diss: np.float64 = 10 * Gyr # Dissipation timescale
337
+ - a_planet : list[np.double], planet's semi-major axis
338
+ - m_planet : list[np.double], planet's masses
339
+ - f_accr : np.float64, Hydrodynamic accretion efficiency
340
+ - t0 : The dissipation time of the protoplanetary disc
341
+ - IT_s : int, number of spatial steps
342
+ - dip : int, half of the number of sink cells for a given planets to model the accretion
343
+ - rtol : np.float64, Relative tolerance for temporal integration
344
+ - atol : np.float64, Absolute tolerance for temporal integration (by default too small hence to
345
+ relative tolerance will always be the limiting factor)
346
+ - method_root : str, 'LSODA','BDF','DOP853','RK45' : Temporal integration method_root
347
+
348
+ """
349
+ dic: dict = {"racine": racine, "results": results,
350
+ "C_L": C_L, "C_M": C_M, "C_t": C_t,
351
+ "Ms": Ms, "Ts": Ts, "Rs": Rs, "Ls": Ls,
352
+ "a_in": a_in, "a_out": a_out, "a0": a0,
353
+ "T0": T0, "pls_temp": pls_temp, "m_dot": m_dot,
354
+ "alpha": alpha, "gamma": gamma,
355
+ "AB_Mbelt": AB_Mbelt, "AB_Abelt": AB_Abelt,
356
+ "AB_a0": AB_a0, "AB_delta_r": AB_delta_r,
357
+ "AB_K": AB_K, "AB_Phi": AB_Phi, "AB_rp": AB_rp,
358
+ "AB_f_ice": AB_f_ice, "AB_rho_refr": AB_rho_refr,
359
+ "AB_rho_ice": AB_rho_ice, "AB_sublimation_model": AB_sublimation_model,
360
+ "AB_SD_amax": AB_SD_amax, "AB_SD_abig": AB_SD_abig,
361
+ "AB_SD_amed": AB_SD_amed, "AB_SD_amin": AB_SD_amin,
362
+ "AB_SD_qh": AB_SD_qh, "AB_SD_qm": AB_SD_qm, "AB_SD_ql": AB_SD_ql,
363
+ "AB_sb": AB_sb, "AB_e": AB_e, "AB_i": AB_i,
364
+ "AB_As": AB_As, "AB_bs": AB_bs, "AB_bg": AB_bg, "AB_t0_diss": AB_t0_diss, "AB_t1_diss": AB_t1_diss,
365
+ "KB_Mbelt": KB_Mbelt, "KB_Abelt": KB_Abelt,
366
+ "KB_a0": KB_a0, "KB_delta_r": KB_delta_r,
367
+ "KB_K": KB_K, "KB_Phi": KB_Phi, "KB_rp": KB_rp,
368
+ "KB_f_ice": KB_f_ice, "KB_rho_refr": KB_rho_refr,
369
+ "KB_rho_ice": KB_rho_ice, "KB_sublimation_model": KB_sublimation_model,
370
+ "KB_SD_amax": KB_SD_amax, "KB_SD_abig": KB_SD_abig,
371
+ "KB_SD_amed": KB_SD_amed, "KB_SD_amin": KB_SD_amin,
372
+ "KB_SD_qh": KB_SD_qh, "KB_SD_qm": KB_SD_qm, "KB_SD_ql": KB_SD_ql,
373
+ "KB_sb": KB_sb, "KB_e": KB_e, "KB_i": KB_i,
374
+ "KB_As": KB_As, "KB_bs": KB_bs, "KB_bg": KB_bg, "KB_t0_diss": KB_t0_diss, "KB_t1_diss": KB_t1_diss,
375
+ "a_planets": a_planets, "m_planets": m_planets, "f_accr": f_accr,
376
+ "t0": t0,
377
+ "IT_s": IT_s, "dip": dip, "rtol": rtol, "atol": atol, "method_root": method,
378
+ }
379
+ return dic
380
+
381
+
382
+ def update_constantes(dic: dict) -> None:
383
+ """
384
+ Update all constates from a dictionary
385
+
386
+ Parameters
387
+ ----------
388
+
389
+ dic : dict, optional, default=None
390
+ A dictionary with all the constants :
391
+ - racine : str, The absolute path to the directory where all the results are saved
392
+ - results : str, The relative path to racine of the directory (inside racine) where the simulations are saved
393
+ - C_L : np.float64, 1/6371009 m -> au: length conversion factor
394
+ - C_M : np.float64, 1/(5.9722*1e24) kg -> Mearth : mass conversion factor
395
+ - C_t : np.float64, 1 / (3600 * 24 * 365.25 * 1e6) : s-> 1 Myr : time conversion factor
396
+ - Ts : np.float64, Surface temperature of the central star
397
+ - Ms : np.float64, Mass of the central star
398
+ - Rs : np.float64, Radius of the central star
399
+ - Ls : np.float64, Luminosity of the central star
400
+ - a_in : np.float64, Inner radius of the integration domain
401
+ - a0 : np.float64,
402
+ - a_out : np.float64, Outer radius of the integration domain
403
+ - T0 : np.float64, Temperature at a0
404
+ - mdot : np.float64, gas mass generation rate (if constant generation rate)
405
+ - AB_Mbelt : np.float64, Asteroid belt's size
406
+ - AB_Abelt : np.float64, Asteroids albedo
407
+ - AB_a0 : np.float64, Asteroid belt's central radius
408
+ - AB_delta_r : np.float64, Half of asteroid belt size
409
+ - AB_K : np.float64, Thermal diffusion coefficient in asteroids
410
+ - AB_Phi : np.float64, Porosity
411
+ - AB_rp : np.float64, Asteroid's pore radius
412
+ - AB_f_ice : np.float64, Ice to total mass ratio
413
+ - AB_rho_refr : np.float64, Refractory's materials density in asteroids
414
+ - AB_rho_ice : np.float64 Ice density
415
+ - AB_sublimation_model : np.float64 Sublimation model in asteroid belt
416
+ - AB_SD_amax : np.double, Maximum size of asteroids
417
+ - AB_SD_abig : np.double, Intermediate size
418
+ - AB_SD_amed : np.double, Medium size for size distribution
419
+ - AB_SD_amin : np.double, Minimal size
420
+ - AB_SD_qh : np.double, Power slope of the distribution between abig and amax
421
+ - AB_SD_qm : np.double, Power slope of the distribution between amed and abig
422
+ - AB_SD_ql : np.double, Power slope of the distribution between amin and amed
423
+ - AB_s_min: np.float64 = np.double(316) * C_L # Minimum size for collision model
424
+ - AB_sb: np.float64 = np.double(316) * C_L # Intermediate size for collision model
425
+ - AB_s_max: np.float64 = np.double(316) * C_L # Maximum size for collision model
426
+ - AB_e: np.float64 = np.double(0.075) # Eccentricity
427
+ - AB_i: np.float64 = AB_e / np.double(2.) # Inclination
428
+ - AB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
429
+ - AB_bs: np.float64 = np.double(-0.1)
430
+ - AB_bg: np.float64 = np.double(0.5)
431
+ - AB_t0_diss: np.float64 = 10 * Gyr # Belt's lifetime before dissipation
432
+ - AB_t1_diss: np.float64 = 10 * Gyr # Dissipation timescale
433
+ - KB_Mbelt : np.float64, Kuiper belt's mass
434
+ - KB_Abelt : np.float64, KBO's albedo
435
+ - KB_a0 : np.float64, Kuiper belt central radius
436
+ - KB_delta_r : np.float64, Half of Kuiper belt size
437
+ - KB_K : np.float64, Thermal diffusion coefficient in KBO
438
+ - KB_Phi : np.float64, KBO's porosity
439
+ - KB_rp : np.float64, KBO's pore's radius
440
+ - KB_f_ice : np.float64, Initial ice to total mass ratio in KBO
441
+ - KB_rho_refr : np.float64, Refractory's materials density in KBO
442
+ - KB_rho_ice : np.float64, Ice density
443
+ - KB_sublimation_model : np.float64, Sublimation model in Kuiper belt
444
+ - KB_SD_amax : np.double, Maximum size of KBO
445
+ - KB_SD_abig : np.double, Intermediate size
446
+ - KB_SD_amed : np.double, Medium size
447
+ - KB_SD_amin : np.double, Minimal size
448
+ - KB_SD_qh : np.double, Power slope of the distribution between abig and amax
449
+ - KB_SD_qm : np.double, Power slope of the distribution between amed and abig
450
+ - KB_SD_ql : np.double, Power slope of the distribution between amin and amed
451
+ - KB_s_min: np.float64 = np.double(316) * C_L # Minimum size for collision model
452
+ - KB_sb: np.float64 = np.double(316) * C_L # Intermediate size for collision model
453
+ - KB_s_max: np.float64 = np.double(316) * C_L # Maximum size for collision model
454
+ - KB_e: np.float64 = np.double(0.075) # Eccentricity
455
+ - KB_i: np.float64 = KB_e / np.double(2.) # Inclination
456
+ - KB_As: np.float64 = np.double(5.) * C_E / C_M # Massique energy to disrupt the asteroids
457
+ - KB_bs: np.float64 = np.double(-0.1)
458
+ - KB_bg: np.float64 = np.double(0.5)
459
+ - KB_t0_diss: np.float64 = 10 * Gyr # Belt's lifetime before dissipation
460
+ - KB_t1_diss: np.float64 = 10 * Gyr # Dissipation timescale
461
+ - a_planet : list[np.double], planet's semi-major axis
462
+ - m_planet : list[np.double], planet's masses
463
+ - f_accr : np.float64, Hydrodynamic accretion efficiency
464
+ - t0 : The dissipation time of the protoplanetary disc
465
+ - IT_s : int, number of spatial steps
466
+ - dip : int, half of the number of sink cells for a given planets to model the accretion
467
+ - rtol : np.float64, Relative tolerance for temporal integration
468
+ - atol : np.float64, Absolute tolerance for temporal integration (by default too small hence to
469
+ relative tolerance will always be the limiting factor)
470
+ - method_root : str, 'LSODA','BDF','DOP853','RK45' : Temporal integration method_root
471
+
472
+
473
+ Returns
474
+ -------
475
+ None
476
+
477
+ """
478
+
479
+ global racine, results, C_L, C_M, C_t, C_F, C_rho, C_E, C_Lum, yr, kyr, Myr, Gyr, G, Rgp, c, sigma, \
480
+ kb, Na, h, Rearth, Mearth, au, Msun, Lsun, Ms, Ts, Rs, Ls, a_in, a_out, a0, T0, pls_temp, m_dot, alpha, gamma, \
481
+ AB_Mbelt, AB_delta_r, AB_K, AB_Phi, AB_rp, AB_f_ice, AB_rho_refr, AB_rho_ice, \
482
+ AB_sublimation_model, AB_SD_amax, AB_SD_abig, AB_SD_amed, AB_SD_amin, AB_SD_qh, AB_SD_qm, \
483
+ AB_sb, AB_e, AB_i, AB_As, AB_bs, AB_bg, AB_t0_diss, AB_t1_diss, KB_Mbelt, KB_Abelt, \
484
+ AB_SD_ql, KB_Mbelt, KB_Abelt, KB_a0, KB_delta_r, KB_K, KB_Phi, KB_rp, KB_f_ice, KB_rho_refr, \
485
+ KB_rho_ice, KB_sublimation_model, KB_SD_amax, KB_SD_abig, KB_SD_amed, KB_SD_amin, KB_SD_qh, \
486
+ KB_SD_qm, KB_SD_ql, KB_sb, KB_e, KB_i, KB_As, KB_bs, KB_bg, KB_t0_diss, KB_t1_diss, \
487
+ a_planets, m_planets, f_accr, t0, IT_s, dip, rtol, atol, method
488
+
489
+ if not os.path.exists(dic["racine"]):
490
+ raise UserWarning("The directory racine : " + str(dic["racine"]) + "dosn't exist")
491
+ racine = str(dic["racine"])
492
+ results = str(dic["results"])
493
+ C_L = np.double(dic["C_L"])
494
+ C_M = np.double(dic["C_M"])
495
+ C_t = np.double(dic["C_t"])
496
+ Ms = np.double(dic["Ms"])
497
+ Ts = np.double(dic["Ts"])
498
+ Rs = np.double(dic["Rs"])
499
+ Ls = np.double(dic["Ls"])
500
+ a_in = np.double(dic["a_in"])
501
+ a_out = np.double(dic["a_out"])
502
+ a0 = np.double(dic["a0"])
503
+ T0 = np.double(dic["T0"])
504
+ pls_temp = np.double(dic["pls_temp"])
505
+ m_dot = np.double(dic["m_dot"])
506
+ alpha = np.double(dic["alpha"])
507
+ gamma = np.double(dic["gamma"])
508
+ AB_Mbelt = np.double(dic["AB_Mbelt"])
509
+ AB_delta_r = np.double(dic["AB_delta_r"])
510
+ AB_K = np.double(dic["AB_K"])
511
+ AB_Phi = np.double(dic["AB_Phi"])
512
+ AB_rp = np.double(dic["AB_rp"])
513
+ AB_f_ice = np.double(dic["AB_f_ice"])
514
+ AB_rho_refr = np.double(dic["AB_rho_refr"])
515
+ AB_rho_ice = np.double(dic["AB_rho_ice"])
516
+ AB_sublimation_model = np.double(dic["AB_sublimation_model"])
517
+ AB_SD_abig = np.double(dic["AB_SD_abig"])
518
+ AB_SD_amed = np.double(dic["AB_SD_amed"])
519
+ AB_SD_amin = np.double(dic["AB_SD_amin"])
520
+ AB_SD_qh = np.double(dic["AB_SD_qh"])
521
+ AB_SD_qm = np.double(dic["AB_SD_qm"])
522
+ AB_SD_ql = np.double(dic["AB_SD_ql"])
523
+ AB_sb = np.double(dic["AB_sb"])
524
+ AB_e = np.double(dic["AB_e"])
525
+ AB_i = np.double(dic["AB_i"])
526
+ AB_As = np.double(dic["AB_As"])
527
+ AB_bs = np.double(dic["AB_bs"])
528
+ AB_bg = np.double(dic["AB_bg"])
529
+ AB_t0_diss = np.double(dic["AB_t0_diss"])
530
+ AB_t1_diss = np.double(dic["AB_t1_diss"])
531
+ KB_Mbelt = np.double(dic["KB_Mbelt"])
532
+ KB_delta_r = np.double(dic["KB_delta_r"])
533
+ KB_K = np.double(dic["KB_K"])
534
+ KB_Phi = np.double(dic["KB_Phi"])
535
+ KB_rp = np.double(dic["KB_rp"])
536
+ KB_f_ice = np.double(dic["KB_f_ice"])
537
+ KB_rho_refr = np.double(dic["KB_rho_refr"])
538
+ KB_rho_ice = np.double(dic["KB_rho_ice"])
539
+ KB_sublimation_model = np.double(dic["KB_sublimation_model"])
540
+ KB_SD_abig = np.double(dic["KB_SD_abig"])
541
+ KB_SD_amed = np.double(dic["KB_SD_amed"])
542
+ KB_SD_amin = np.double(dic["KB_SD_amin"])
543
+ KB_SD_qh = np.double(dic["KB_SD_qh"])
544
+ KB_SD_qm = np.double(dic["KB_SD_qm"])
545
+ KB_SD_ql = np.double(dic["KB_SD_ql"])
546
+ KB_sb = np.double(dic["KB_sb"])
547
+ KB_e = np.double(dic["KB_e"])
548
+ KB_i = np.double(dic["KB_i"])
549
+ KB_As = np.double(dic["KB_As"])
550
+ KB_bs = np.double(dic["KB_bs"])
551
+ KB_bg = np.double(dic["KB_bg"])
552
+ KB_t0_diss = np.double(dic["KB_t0_diss"])
553
+ KB_t1_diss = np.double(dic["KB_t1_diss"])
554
+ t0 = np.double(dic["t0"])
555
+ a_planets = list(np.array(dic["a_planets"], dtype="double"))
556
+ m_planets = list(np.array(dic["m_planets"], dtype="double"))
557
+ f_accr = np.double(dic["f_accr"])
558
+ IT_s = np.double(dic["IT_s"])
559
+ dip = np.double(dic["dip"])
560
+ rtol = np.double(dic["rtol"])
561
+ atol = np.double(dic["atol"])
562
+ method = np.double(dic["method_root"])
563
+
564
+ if "interrupteur.npz" not in os.listdir(results):
565
+ np.savez_compressed(results + "/interrupteur.npz")
566
+ if "informations.csv" not in os.listdir(results):
567
+ d: dict = dict(simulation=np.empty(1), C_L=np.empty(1), C_M=np.empty(1), C_t=np.empty(1),
568
+ Me=np.empty(1), Mc=np.empty(1), Rc=np.empty(1), a=np.empty(1),
569
+ gamma=np.empty(1), mu=np.empty(1), Pd=np.empty(1), Td=np.empty(1),
570
+ Mp=np.empty(1), IT_s=np.empty(1), méthode=np.empty(1), Rad=np.empty(1))
571
+ tab: pd.DataFrame = pd.DataFrame(columns=d)
572
+ tab.to_csv(results + "/informations.csv")
573
+ print("test csv : ", os.listdir(results))
574
+
575
+ # Secondary calculs
576
+ C_F = np.double(C_M * C_L / (C_t * C_t)) #: N -> Mearth au**2 / Myr : force
577
+ C_rho = np.double(C_M / (C_L * C_L * C_L)) #: kg/m3 -> Mearth / au**2: density
578
+ C_E = np.double(C_M * C_L * C_L / (C_t * C_t)) #: j -> Mearth au**2 / Myr**2 : energy
579
+ C_Lum = np.double(C_E / C_t) #: W = j / s -> Mearth au**2 / Myr**3: Luminosity
580
+
581
+ yr = np.double(3600 * 24 * 365.25) * C_t #: One year in code unit
582
+ kyr = np.double(3600 * 24 * 365.25 * 1.e3) * C_t #: One million year in code unit
583
+ Myr = np.double(3600 * 24 * 365.25 * 1.e6) * C_t #: One million year in code unit
584
+ Gyr = np.double(3600 * 24 * 365.25 * 1.e9) * C_t #: One million year in code unit
585
+
586
+ # Fundamentals constantes
587
+ G = np.double(6.67430e-11 * C_F * C_L * C_L / (C_M * C_M)
588
+ ) #: 6.67430e-11 N m*2 kg**-2 : Gravitational constant
589
+ Rgp = np.double(8.31446261815324 * C_E) #: 8.31446261815324 J K−1 mol−1 : perfect gas constant
590
+ c = np.double(299792458) * C_L / C_t #: 299792458 m/s Speed of light
591
+ sigma = np.double(5.670374419 * 1e-8 * C_E / (C_t * C_L * C_L)
592
+ ) #: 5.670374419 * 1e-8 W m-2 K-4 : Stefan-Boltzmann's constant
593
+ kb = np.double(1.380649e-23 * C_E) #: 1.380649e-23 J/K Boltzmann constant
594
+ Na = np.double(Rgp / kb) #: Avogadro constant
595
+ h = np.double(6.62607015e-34 * C_E * C_t) #: 6.62607015e-34 J/s Planck constant
596
+
597
+ # Earth
598
+ Rearth = np.double(6371009 * C_L) # 6371009 m Earth's radius
599
+ Mearth = np.double(5.9722 * 1e24 * C_M) # 5.9722 * 1e24 kg Earth's mass
600
+ au = np.double(149597870700 * C_L) # 149597870700 m : Astronomic unity
601
+ # Sun
602
+ Msun = np.double((1.9884 * 1e30) * C_M) # 1.9891*10**30 kg Sun's mass
603
+ Lsun = np.double(3.826e26 * C_Lum) # 3.826 10^26 W Sun's luminosity (presant day)
604
+
605
+
606
+ def chargement_constantes(consts_filename: str) -> None:
607
+ """
608
+ Load all the constantes in const_filename
609
+
610
+ Parameters
611
+ ----------
612
+ consts_filename : str
613
+ path to the .npz file containing all the constantes
614
+
615
+ Returns
616
+ -------
617
+
618
+ """
619
+ print("Loading the new constants : ", consts_filename)
620
+ dic = dict(np.load(consts_filename))
621
+ update_constantes(dic)
622
+
623
+
624
+ if "constantes.npz" in os.listdir():
625
+ chargement_constantes("constantes.npz")
626
+ elif "constantes.npz" in os.listdir(racine):
627
+ chargement_constantes(racine + "/constantes.npz")
628
+
629
+ # Typical configuration sets
630
+
631
+ # Solar system like, with only an asteroid belt and an earth-like planet only
632
+
633
+ sys_sol_ast: dict = {"racine": racine, "results": results,
634
+ "C_L": C_L, "C_M": C_M, "C_t": C_t,
635
+ "Ms": Msun, "Ts": np.double(5500.), "Rs": Rsun, "Ls": Lsun,
636
+ "a_in": .05 * au, "a_out": 100 * au, "a0": 2.65 * au,
637
+ "T0": T0, "pls_temp": np.double(-1 / 2), "mH_init": zero,
638
+ "alpha": np.double(1e-3), "gamma": np.double(1.),
639
+ "AB_mdot_st_init": np.double(1e-10) * Mearth / Myr,
640
+ "AB_Mbelt": np.double(0.12) * Mearth,
641
+ "AB_Abelt": np.double(0.06),
642
+ "AB_a0": np.double(2.65) * au, "AB_delta_r": np.double(2.65 / 2.) * au,
643
+ "AB_K": np.double(1e-5 * C_L * C_L / C_t), "AB_Phi": np.double(0.6),
644
+ "AB_rp": np.double(1e-6 * C_L),
645
+ "AB_f_ice": np.double(0.2), "AB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
646
+ "AB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "AB_sublimation_model": "thermal_full",
647
+ "AB_const_mdot": np.double(1e-1) * Mearth / Myr,
648
+ "AB_SD_amax": np.double(1.e6) * C_L, "AB_SD_abig": np.double(120e3) * C_L,
649
+ "AB_SD_amed": np.double(20.e3) * C_L, "AB_SD_amin": C_L,
650
+ "AB_SD_qh": np.double(-4.5), "AB_SD_qm": np.double(-1.2), "AB_SD_ql": np.double(-3.6),
651
+ "AB_sb": np.double(316) * C_L, "AB_e": np.double(0.075), "AB_i": np.double(0.075 / 2.),
652
+ "AB_As": np.double(5.) * C_E / C_M, "AB_bs": np.double(-0.1), "AB_bg": np.double(0.5),
653
+ "AB_t0_diss": 150 * Myr, "AB_t1_diss": Myr,
654
+ "KB_mdot_st_init": zero,
655
+ "KB_Mbelt": np.double(0.01 * Mearth), "KB_Abelt": np.double(0.06),
656
+ "KB_a0": np.double(44) * au, "KB_delta_r": np.double(8) * au,
657
+ "KB_K": np.double(1e-10 * C_L * C_L / C_t), "KB_Phi": np.double(0.6),
658
+ "KB_rp": np.double(1e-6 * C_L),
659
+ "KB_f_ice": np.double(0.2), "KB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
660
+ "KB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "KB_sublimation_model": "none",
661
+ "KB_const_mdot": zero,
662
+ "KB_SD_amax": np.double(1.e6) * C_L, "KB_SD_abig": np.double(120e3) * C_L,
663
+ "KB_SD_amed": np.double(20.e3) * C_L, "KB_SD_amin": C_L,
664
+ "KB_SD_qh": np.double(-4.5), "KB_SD_qm": np.double(-1.2), "KB_SD_ql": np.double(-3.6),
665
+ "KB_sb": np.double(316) * C_L, "KB_e": np.double(0.075), "KB_i": np.double(0.075 / 2.),
666
+ "KB_As": np.double(5.) * C_E / C_M, "KB_bs": np.double(-0.1), "KB_bg": np.double(0.5),
667
+ "KB_t0_diss": np.double(10.) * Gyr, "KB_t1_diss": np.double(10.) * Gyr,
668
+ "a_planets": np.array([au]), "m_planets": np.array([Mearth]), "f_accr": np.double(0.5),
669
+ "t0": np.double(5. * Myr),
670
+ "IT_s": 3000, "dip": 10, "rtol": np.double(1e-6), "atol": np.double(1e-250), "method_root": 'RK45',
671
+ }
672
+
673
+ # Only a kuiper belt. By changing the sublimation model to constant rate, the masse generation rate is 0.1 Mearth/Myr.
674
+ # This mass generation rate can also be modified if needed in that case
675
+
676
+ sys_sol_kuip: dict = {"racine": racine, "results": results,
677
+ "C_L": C_L, "C_M": C_M, "C_t": C_t,
678
+ "Ms": Msun, "Ts": np.double(5500.), "Rs": Rsun, "Ls": Lsun,
679
+ "a_in": .05 * au, "a_out": 500 * au, "a0": 44. * au,
680
+ "T0": T0, "pls_temp": np.double(-1 / 2), "mH_init": zero,
681
+ "alpha": np.double(1e-3), "gamma": np.double(1.),
682
+ "AB_mdot_st_init": zero,
683
+ "AB_Mbelt": np.double(0.12) * Mearth,
684
+ "AB_Abelt": np.double(0.06),
685
+ "AB_a0": np.double(2.65) * au, "AB_delta_r": np.double(2.65 / 2.) * au,
686
+ "AB_K": np.double(1e-5 * C_L * C_L / C_t), "AB_Phi": np.double(0.6),
687
+ "AB_rp": np.double(1e-6 * C_L),
688
+ "AB_f_ice": np.double(0.2), "AB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
689
+ "AB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "AB_sublimation_model": "none",
690
+ "AB_const_mdot": zero,
691
+ "AB_SD_amax": np.double(1.e6) * C_L, "AB_SD_abig": np.double(120e3) * C_L,
692
+ "AB_SD_amed": np.double(20.e3) * C_L, "AB_SD_amin": C_L,
693
+ "AB_SD_qh": np.double(-4.5), "AB_SD_qm": np.double(-1.2), "AB_SD_ql": np.double(-3.6),
694
+ "AB_sb": np.double(316) * C_L, "AB_e": np.double(0.075), "AB_i": np.double(0.075 / 2.),
695
+ "AB_As": np.double(5.) * C_E / C_M, "AB_bs": np.double(-0.1), "AB_bg": np.double(0.5),
696
+ "AB_t0_diss": 150 * Myr, "AB_t1_diss": Myr,
697
+ "KB_mdot_st_init": np.double(1e-10) * Mearth / Myr,
698
+ "KB_Mbelt": np.double(0.01 * Mearth), "KB_Abelt": np.double(0.06),
699
+ "KB_a0": np.double(44) * au, "KB_delta_r": np.double(8) * au,
700
+ "KB_K": np.double(1e-10 * C_L * C_L / C_t), "KB_Phi": np.double(0.6),
701
+ "KB_rp": np.double(1e-6 * C_L),
702
+ "KB_f_ice": np.double(0.2), "KB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
703
+ "KB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "KB_sublimation_model": "thermal_full",
704
+ "KB_const_mdot": np.double(1e-1) * Mearth / Myr,
705
+ "KB_SD_amax": np.double(1.e6) * C_L, "KB_SD_abig": np.double(120e3) * C_L,
706
+ "KB_SD_amed": np.double(20.e3) * C_L, "KB_SD_amin": C_L,
707
+ "KB_SD_qh": np.double(-4.5), "KB_SD_qm": np.double(-1.2), "KB_SD_ql": np.double(-3.6),
708
+ "KB_sb": np.double(316) * C_L, "KB_e": np.double(0.075), "KB_i": np.double(0.075 / 2.),
709
+ "KB_As": np.double(5.) * C_E / C_M, "KB_bs": np.double(-0.1), "KB_bg": np.double(0.5),
710
+ "KB_t0_diss": np.double(10.) * Gyr, "KB_t1_diss": np.double(10.) * Gyr,
711
+ "a_planets": np.array([30.069 * au, 19.189 * au, 9.537 * au, 5.202 * au,
712
+ 1.53 * au, au, 0.723336 * au, 0.387098 * au]),
713
+ "m_planets": np.array([17.147 * Mearth, 14.536 * Mearth, 95.152 * Mearth, 317.8 * Mearth,
714
+ 0.107 * Mearth, Mearth, 0.815 * Mearth, 0.055 * Mearth]),
715
+ "f_accr": np.double(0.5),
716
+ "t0": np.double(5. * Myr),
717
+ "IT_s": 2000, "dip": 10, "rtol": np.double(1e-6), "atol": np.double(1e-250),
718
+ "method_root": 'RK45',
719
+ }
720
+
721
+ # Solar system like, primordial belt
722
+
723
+ sys_sol_ppd: dict = {"racine": racine, "results": results,
724
+ "C_L": C_L, "C_M": C_M, "C_t": C_t,
725
+ "Ms": Msun, "Ts": np.double(5500.), "Rs": Rsun, "Ls": Lsun,
726
+ "a_in": .05 * au, "a_out": 100 * au, "a0": 2.65 * au,
727
+ "T0": T0, "pls_temp": np.double(-1 / 2), "mH_init": Mearth,
728
+ "alpha": np.double(1e-3), "gamma": np.double(1.),
729
+ "AB_mdot_st_init": np.double(1e-10) * Mearth / Myr,
730
+ "AB_Mbelt": np.double(0.12) * Mearth,
731
+ "AB_Abelt": np.double(0.06),
732
+ "AB_a0": np.double(2.65) * au, "AB_delta_r": np.double(2.65 / 2.) * au,
733
+ "AB_K": np.double(1e-5 * C_L * C_L / C_t), "AB_Phi": np.double(0.6),
734
+ "AB_rp": np.double(1e-6 * C_L),
735
+ "AB_f_ice": np.double(0.2), "AB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
736
+ "AB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "AB_sublimation_model": "none",
737
+ "AB_const_mdot": np.double(1e-1) * Mearth / Myr,
738
+ "AB_SD_amax": np.double(1.e6) * C_L, "AB_SD_abig": np.double(120e3) * C_L,
739
+ "AB_SD_amed": np.double(20.e3) * C_L, "AB_SD_amin": C_L,
740
+ "AB_SD_qh": np.double(-4.5), "AB_SD_qm": np.double(-1.2), "AB_SD_ql": np.double(-3.6),
741
+ "AB_sb": np.double(316) * C_L, "AB_e": np.double(0.075), "AB_i": np.double(0.075 / 2.),
742
+ "AB_As": np.double(5.) * C_E / C_M, "AB_bs": np.double(-0.1), "AB_bg": np.double(0.5),
743
+ "AB_t0_diss": 150 * Myr, "AB_t1_diss": Myr,
744
+ "KB_mdot_st_init": zero,
745
+ "KB_Mbelt": np.double(0.01 * Mearth), "KB_Abelt": np.double(0.06),
746
+ "KB_a0": np.double(44) * au, "KB_delta_r": np.double(8) * au,
747
+ "KB_K": np.double(1e-10 * C_L * C_L / C_t), "KB_Phi": np.double(0.6),
748
+ "KB_rp": np.double(1e-6 * C_L),
749
+ "KB_f_ice": np.double(0.2), "KB_rho_refr": np.double(2.5e3 * C_M / (C_L * C_L * C_L)),
750
+ "KB_rho_ice": np.double(1.e3 * C_M / (C_L * C_L * C_L)), "KB_sublimation_model": "none",
751
+ "KB_const_mdot": zero,
752
+ "KB_SD_amax": np.double(1.e6) * C_L, "KB_SD_abig": np.double(120e3) * C_L,
753
+ "KB_SD_amed": np.double(20.e3) * C_L, "KB_SD_amin": C_L,
754
+ "KB_SD_qh": np.double(-4.5), "KB_SD_qm": np.double(-1.2), "KB_SD_ql": np.double(-3.6),
755
+ "KB_sb": np.double(316) * C_L, "KB_e": np.double(0.075), "KB_i": np.double(0.075 / 2.),
756
+ "KB_As": np.double(5.) * C_E / C_M, "KB_bs": np.double(-0.1), "KB_bg": np.double(0.5),
757
+ "KB_t0_diss": np.double(10.) * Gyr, "KB_t1_diss": np.double(10.) * Gyr,
758
+ "a_planets": np.array([au]), "m_planets": np.array([Mearth]), "f_accr": np.double(0.5),
759
+ "t0": np.double(5. * Myr),
760
+ "IT_s": 3000, "dip": 10, "rtol": np.double(1e-6), "atol": np.double(1e-250), "method_root": 'RK45',
761
+ }