2020)
2121from source .momentum import momentum_ux
2222from source .phase_detect import phase_detect_from_temperature
23+ from source .viscosity_calc import viscosity_exp_temp
2324from source .vof import calculate_total_h , h_mesh_assign , mass_conservation_2D_vof
2425
2526# from source.boundary_condition import boundary_set
@@ -209,21 +210,38 @@ def solifluction_simulate(
209210 # i,
210211 # )
211212
213+ # initial temperature assign (linear)
214+
215+ surface_temperature = temps_temperature_file [0 ]
216+
217+ surface_temperature_lue = lfr .create_array (
218+ array_shape ,
219+ dtype = np .float64 ,
220+ fill_value = surface_temperature ,
221+ partition_shape = partition_shape ,
222+ )
223+
224+ layer_list [0 ].T = temperature_bed
225+
226+ for layer_id in range (1 , num_layers ):
227+
228+ layer_list [layer_id ].T = (layer_id / num_layers ) * surface_temperature_lue
229+
212230 if heat_transfer_warmup :
213231
214232 for _ in range (1 , heat_transfer_warmup_iteration ):
215233
216- surface_temperature = temps_temperature_file [0 ]
234+ # surface_temperature = temps_temperature_file[0]
217235
218- surface_temperature_lue = lfr .create_array (
219- array_shape ,
220- dtype = np .float64 ,
221- fill_value = surface_temperature ,
222- partition_shape = partition_shape ,
223- )
236+ # surface_temperature_lue = lfr.create_array(
237+ # array_shape,
238+ # dtype=np.float64,
239+ # fill_value=surface_temperature,
240+ # partition_shape=partition_shape,
241+ # )
224242
225- layer_list [0 ].T = temperature_bed
226- layer_list [num_layers - 1 ].T = surface_temperature_lue
243+ # layer_list[0].T = temperature_bed
244+ # layer_list[num_layers - 1].T = surface_temperature_lue
227245
228246 for layer_id in range (1 , num_layers - 1 ):
229247
@@ -353,6 +371,13 @@ def solifluction_simulate(
353371
354372 for layer_id in range (1 , num_layers ):
355373
374+ # a, b: 2e13, 0.4605 (T_data = ([0, 5]), mu_data([2e13, 2e12]))
375+ # a, b: 2e13, 0.9210 (T_data = ([0, 5]), mu_data([2e13, 2e11]))
376+
377+ layer_list [layer_id ].mu_soil = viscosity_exp_temp (
378+ layer_list [layer_id ].T , 2e13 , 0.9210
379+ )
380+
356381 gama_prim_surface : float = (2610 - 1000 ) * 9.81
357382
358383 rhs = (
@@ -370,7 +395,7 @@ def solifluction_simulate(
370395 )
371396 )
372397
373- # NOTE: rhs cannot be negative as the flow cannot be to the upstream
398+ # NOTE: rhs cannot be negative as the fluid cannot flow to the upstream
374399 rhs = lfr .where (
375400 (rhs > 0 ),
376401 rhs ,
@@ -525,6 +550,13 @@ def solifluction_simulate(
525550 layer_id ,
526551 )
527552
553+ print (
554+ "layer_u_x_numpy[10,10] (cm/year)" ,
555+ layer_u_x_numpy [10 , 10 ] * 3600 * 24 * 365 * 100 ,
556+ "layer_id" ,
557+ layer_id ,
558+ )
559+
528560 for layer_id in range (0 , num_layers ):
529561
530562 layer_h_mesh_numpy = lfr .to_numpy (layer_list [layer_id ].h_mesh )
0 commit comments