@@ -100,7 +100,7 @@ def run_sim(times, x0, normalized_rd_num, normalized_rg_num, normalized_vd_num,
100100
101101 # ================= Fields maps =========================
102102
103- def pertubation (x , A , Re , Im , L ) -> float :
103+ def perturbation (x , A , Re , Im , L ) -> float :
104104 return A * (Re * cos (2 * x * pi / L ) - Im * sin (2 * x * pi / L ))
105105
106106 """
@@ -123,28 +123,28 @@ def pertubation(x, A, Re, Im, L) -> float:
123123 ### Gas maps
124124 def rho_map(rmin,rmax)->float:
125125 x,y,z = rmin
126- return rhog_0 + pertubation (x,A_rho,Re_rho,Im_rho,L)
126+ return rhog_0 + perturbation (x,A_rho,Re_rho,Im_rho,L)
127127 def rhovel_map(rmin, rmax)->tuple[float,float,float]:
128128 x,y,z = rmin
129- rho = rhog_0 + pertubation (x,A_rho,Re_rho,Im_rho,L)
130- vx = pertubation (x,A_vel,Re_vel,Im_vel,L)
129+ rho = rhog_0 + perturbation (x,A_rho,Re_rho,Im_rho,L)
130+ vx = perturbation (x,A_vel,Re_vel,Im_vel,L)
131131 return (rho*vx, 0, 0)
132132 def rhoe_map (rmin, rmax)->float:
133133 x,y,z = rmin
134- rho = rhog_0 + pertubation (x,A_rho,Re_rho,Im_rho,L)
135- vx = pertubation (x,A_vel,Re_vel,Im_vel,L)
134+ rho = rhog_0 + perturbation (x,A_rho,Re_rho,Im_rho,L)
135+ vx = perturbation (x,A_vel,Re_vel,Im_vel,L)
136136 press = (cs * cs * rho) / gamma
137137 rhoeint = press / (gamma - 1.0)
138138 rhoekin = 0.5 * rho * (vx *vx + 0.0)
139139 return (rhoeint + rhoekin)
140140 ### Dust maps
141141 def rho_d_map(rmin,rmax)->float:
142142 x,y,z = rmin
143- return rhod_0 + pertubation (x,A_rho,Re_rd,Im_rd,L)
143+ return rhod_0 + perturbation (x,A_rho,Re_rd,Im_rd,L)
144144 def rhovel_d_map(rmin, rmax)->tuple[float,float,float]:
145145 x,y,z = rmin
146- rho = rhod_0 + pertubation (x,A_rho,Re_rd,Im_rd,L)
147- vx = pertubation (x,A_vel,Re_vd,Im_vd,L)
146+ rho = rhod_0 + perturbation (x,A_rho,Re_rd,Im_rd,L)
147+ vx = perturbation (x,A_vel,Re_vd,Im_vd,L)
148148 return (rho*vx, 0, 0)"""
149149
150150 ## 5 fluids test setup
@@ -188,18 +188,18 @@ def rhovel_d_map(rmin, rmax)->tuple[float,float,float]:
188188 ### Gas maps
189189 def rho_map (rmin , rmax ) -> float :
190190 x , y , z = rmin
191- return rhog_0 + pertubation (x , A_rho , Re_rho , Im_rho , L )
191+ return rhog_0 + perturbation (x , A_rho , Re_rho , Im_rho , L )
192192
193193 def rhovel_map (rmin , rmax ) -> tuple [float , float , float ]:
194194 x , y , z = rmin
195- rho = rhog_0 + pertubation (x , A_rho , Re_rho , Im_rho , L )
196- vx = pertubation (x , A_vel , Re_vel , Im_vel , L )
195+ rho = rhog_0 + perturbation (x , A_rho , Re_rho , Im_rho , L )
196+ vx = perturbation (x , A_vel , Re_vel , Im_vel , L )
197197 return (rho * vx , 0 , 0 )
198198
199199 def rhoe_map (rmin , rmax ) -> float :
200200 x , y , z = rmin
201- rho = rhog_0 + pertubation (x , A_rho , Re_rho , Im_rho , L )
202- vx = pertubation (x , A_vel , Re_vel , Im_vel , L )
201+ rho = rhog_0 + perturbation (x , A_rho , Re_rho , Im_rho , L )
202+ vx = perturbation (x , A_vel , Re_vel , Im_vel , L )
203203 press = (cs * cs * rho ) / gamma
204204 rhoeint = press / (gamma - 1.0 )
205205 rhoekin = 0.5 * rho * (vx * vx + 0.0 )
@@ -209,42 +209,42 @@ def rhoe_map(rmin, rmax) -> float:
209209
210210 def rho_d_1_map (rmin , rmax ) -> float :
211211 x , y , z = rmin
212- return rhod_1 + pertubation (x , A_rho , Re_rd_1 , Im_rd_1 , L )
212+ return rhod_1 + perturbation (x , A_rho , Re_rd_1 , Im_rd_1 , L )
213213
214214 def rhovel_d_1_map (rmin , rmax ) -> tuple [float , float , float ]:
215215 x , y , z = rmin
216- rho = rhod_1 + pertubation (x , A_rho , Re_rd_1 , Im_rd_1 , L )
217- vx = pertubation (x , A_vel , Re_vd_1 , Im_vd_1 , L )
216+ rho = rhod_1 + perturbation (x , A_rho , Re_rd_1 , Im_rd_1 , L )
217+ vx = perturbation (x , A_vel , Re_vd_1 , Im_vd_1 , L )
218218 return (rho * vx , 0 , 0 )
219219
220220 def rho_d_2_map (rmin , rmax ) -> float :
221221 x , y , z = rmin
222- return rhod_2 + pertubation (x , A_rho , Re_rd_2 , Im_rd_2 , L )
222+ return rhod_2 + perturbation (x , A_rho , Re_rd_2 , Im_rd_2 , L )
223223
224224 def rhovel_d_2_map (rmin , rmax ) -> tuple [float , float , float ]:
225225 x , y , z = rmin
226- rho = rhod_2 + pertubation (x , A_rho , Re_rd_2 , Im_rd_2 , L )
227- vx = pertubation (x , A_vel , Re_vd_2 , Im_vd_2 , L )
226+ rho = rhod_2 + perturbation (x , A_rho , Re_rd_2 , Im_rd_2 , L )
227+ vx = perturbation (x , A_vel , Re_vd_2 , Im_vd_2 , L )
228228 return (rho * vx , 0 , 0 )
229229
230230 def rho_d_3_map (rmin , rmax ) -> float :
231231 x , y , z = rmin
232- return rhod_3 + pertubation (x , A_rho , Re_rd_3 , Im_rd_3 , L )
232+ return rhod_3 + perturbation (x , A_rho , Re_rd_3 , Im_rd_3 , L )
233233
234234 def rhovel_d_3_map (rmin , rmax ) -> tuple [float , float , float ]:
235235 x , y , z = rmin
236- rho = rhod_3 + pertubation (x , A_rho , Re_rd_3 , Im_rd_3 , L )
237- vx = pertubation (x , A_vel , Re_vd_3 , Im_vd_3 , L )
236+ rho = rhod_3 + perturbation (x , A_rho , Re_rd_3 , Im_rd_3 , L )
237+ vx = perturbation (x , A_vel , Re_vd_3 , Im_vd_3 , L )
238238 return (rho * vx , 0 , 0 )
239239
240240 def rho_d_4_map (rmin , rmax ) -> float :
241241 x , y , z = rmin
242- return rhod_4 + pertubation (x , A_rho , Re_rd_4 , Im_rd_4 , L )
242+ return rhod_4 + perturbation (x , A_rho , Re_rd_4 , Im_rd_4 , L )
243243
244244 def rhovel_d_4_map (rmin , rmax ) -> tuple [float , float , float ]:
245245 x , y , z = rmin
246- rho = rhod_4 + pertubation (x , A_rho , Re_rd_4 , Im_rd_4 , L )
247- vx = pertubation (x , A_vel , Re_vd_4 , Im_vd_4 , L )
246+ rho = rhod_4 + perturbation (x , A_rho , Re_rd_4 , Im_rd_4 , L )
247+ vx = perturbation (x , A_vel , Re_vd_4 , Im_vd_4 , L )
248248 return (rho * vx , 0 , 0 )
249249
250250 # ============ set init fields values for gas =============
0 commit comments