diff --git a/Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py b/Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py index 76c5c4e9ef1a164696400a36954647aaff5a5005..ebe4375040a43b19731ce9f006ec292218fb375f 100755 --- a/Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py +++ b/Two-phase-Richards/multi-patch/five_patch_domain_with_inner_patch/TP-R-multi-patch-with-inner-patch.py @@ -36,7 +36,7 @@ thisfile = "TP-R-multi-patch-with-inner-patch.py" # GENERAL SOLVER CONFIG ###################################################### # maximal iteration per timestep -max_iter_num = 700 +max_iter_num = 1000 FEM_Lagrange_degree = 1 # GRID AND MESH STUDY SPECIFICATIONS ######################################### @@ -46,8 +46,8 @@ resolutions = { # 2: 1e-6, # 4: 1e-6, # 8: 5e-5, - 16: 1e-5, - # 32: 5e-6, + # 16: 1e-5, + 32: 1e-6, # 64: 2e-6, # 128: 1e-6, # 256: 1e-6, @@ -57,60 +57,61 @@ resolutions = { # The list is looped over and a simulation is run with t_0 as initial time # for each element t_0 in starttimes. starttimes = {0: 0.0} +# starttimes = {0: 0.0, 1:0.3, 2:0.6, 3:0.9} timestep_size = 0.001 -number_of_timesteps = 5 +number_of_timesteps = 1000 # LDD scheme parameters ###################################################### -Lw1 = 0.025 # /timestep_size -Lnw1 = Lw1 +Lw1 = 0.01 # /timestep_size +Lnw1 = 0.004 -Lw2 = 0.025 # /timestep_size -Lnw2 = Lw2 +Lw2 = 0.01 # /timestep_size +Lnw2 = 0.004 -Lw3 = 0.025 # /timestep_size -Lnw3 = Lw3 +Lw3 = 0.01 # /timestep_size +Lnw3 = 0.004 -Lw4 = 0.025 # /timestep_size -Lnw4 = Lw4 +Lw4 = 0.01 # /timestep_size +Lnw4 = 0.004 -Lw5 = 0.025 # /timestep_size -Lnw5 = Lw5 +Lw5 = 0.01 # /timestep_size +Lnw5 = 0.004 -lambda13_w= 4 -lambda13_nw= 4 +lambda13_w = 1 +lambda13_nw= 0.25 -lambda12_w = 4 -lambda12_nw = 4 +lambda12_w = 1 +lambda12_nw = 0.25 -lambda23_w = 4 -lambda23_nw = 4 +lambda23_w = 1 +lambda23_nw = 0.25 -lambda24_w = 4 -lambda24_nw= 4 +lambda24_w = 1 +lambda24_nw= 0.25 -lambda34_w = 4 -lambda34_nw = 4 +lambda34_w = 1 +lambda34_nw = 0.25 -lambda45_w = 4 -lambda45_nw = 4 +lambda45_w = 1 +lambda45_nw = 0.25 -lambda15_w = 4 -lambda15_nw = 4 +lambda15_w = 1 +lambda15_nw = 0.25 include_gravity = False -debugflag = True +debugflag = False analyse_condition = False # I/O CONFIG ################################################################# # when number_of_timesteps is high, it might take a long time to write all # timesteps to disk. Therefore, you can choose to only write data of every # plot_timestep_every timestep to disk. -plot_timestep_every = 1 +plot_timestep_every = 3 # Decide how many timesteps you want analysed. Analysed means, that # subsequent errors of the L-iteration within the timestep are written out. -number_of_timesteps_to_analyse = 1 +number_of_timesteps_to_analyse = 5 # fine grained control over data to be written to disk in the mesh study case # as well as for a regular simuation for a fixed grid. @@ -438,7 +439,7 @@ if __name__ == '__main__': # parameter=simulation_parameter # ) - LDDsim.join() + # LDDsim.join() if mesh_study: simulation_output_dir = processQueue.get() hlp.merge_spacetime_errornorms(isRichards=isRichards, diff --git a/Two-phase-Richards/multi-patch/layered_soil_with_inner_patch/TP-R-layered_soil_with_inner_patch-realistic.py b/Two-phase-Richards/multi-patch/layered_soil_with_inner_patch/TP-R-layered_soil_with_inner_patch-realistic.py index e4aebcdf90155f9ec3cf3698b78a139d8917ce61..544fd4708cd9d9636834d5b4e6e38598f4248237 100755 --- a/Two-phase-Richards/multi-patch/layered_soil_with_inner_patch/TP-R-layered_soil_with_inner_patch-realistic.py +++ b/Two-phase-Richards/multi-patch/layered_soil_with_inner_patch/TP-R-layered_soil_with_inner_patch-realistic.py @@ -30,13 +30,13 @@ date = datetime.datetime.now() datestr = date.strftime("%Y-%m-%d") # Name of the usecase that will be printed during simulation. -use_case = "TP-R-layered-soil-with-inner-patch-realistic-split-interface45" +use_case = "TP-R-layered-soil-with-inner-patch-realistic-same-intrinsic" # The name of this very file. Needed for creating log output. thisfile = "TP-R-layered_soil_with_inner_patch-realistic.py" # GENERAL SOLVER CONFIG ###################################################### # maximal iteration per timestep -max_iter_num = 500 +max_iter_num = 1000 FEM_Lagrange_degree = 1 # GRID AND MESH STUDY SPECIFICATIONS ######################################### @@ -46,8 +46,8 @@ resolutions = { # 2: 2e-6, # h=1.1180 # 4: 2e-6, # h=0.5590 # 8: 2e-6, # h=0.2814 - 16: 5e-6, # h=0.1412 - # 32: 5e-6, + # 16: 1e-6, # h=0.1412 + 32: 1e-6, # 64: 2e-6, # 128: 2e-6 } @@ -55,58 +55,59 @@ resolutions = { # starttimes gives a list of starttimes to run the simulation from. # The list is looped over and a simulation is run with t_0 as initial time # for each element t_0 in starttimes. -starttimes = {0: 0.0} +# starttimes = {0: 0.0} +# starttimes = {0: 0.0, 1:0.3, 2:0.6, 3:0.9} timestep_size = 0.001 -number_of_timesteps = 10 +number_of_timesteps = 1000 # LDD scheme parameters ###################################################### -Lw1 = 0.5 # /timestep_size +Lw1 = 0.01 # /timestep_size Lnw1 = Lw1 -Lw2 = 0.5 # /timestep_size +Lw2 = 0.01 # /timestep_size Lnw2 = Lw2 -Lw3 = 0.5 # /timestep_size -Lnw3 = Lw3 +Lw3 = 0.01 # /timestep_size +Lnw3 = 0.003 -Lw4 = 0.5 # /timestep_size -Lnw4 = Lw4 +Lw4 = 0.01 # /timestep_size +Lnw4 = 0.003 -Lw5 = 0.5 # /timestep_size -Lnw5 = Lw5 +Lw5 = 0.01 # /timestep_size +Lnw5 = 0.003 -Lw6 = 0.5 # /timestep_size -Lnw6 = Lw6 +Lw6 = 0.01 # /timestep_size +Lnw6 = 0.003 -lambda12_w = 4 -lambda12_nw = 4 +lambda12_w = 0.5 +lambda12_nw = 0.5 -lambda23_w = 4 -lambda23_nw = 4 +lambda23_w = 0.5 +lambda23_nw = 0.5 -lambda24_w = 4 -lambda24_nw= 4 +lambda24_w = 0.5 +lambda24_nw= 0.5 -lambda25_w= 4 -lambda25_nw= 4 +lambda25_w= 0.5 +lambda25_nw= 0.5 -lambda34_w = 4 -lambda34_nw = 4 +lambda34_w = 0.5 +lambda34_nw = 0.5 -lambda36_w = 4 -lambda36_nw = 4 +lambda36_w = 0.5 +lambda36_nw = 0.5 -lambda45_w = 4 -lambda45_nw = 4 +lambda45_w = 0.5 +lambda45_nw = 0.5 -lambda46_w = 4 -lambda46_nw = 4 +lambda46_w = 0.5 +lambda46_nw = 0.5 -lambda56_w = 4 -lambda56_nw = 4 +lambda56_w = 0.5 +lambda56_nw = 0.5 -include_gravity = True +include_gravity = False debugflag = False analyse_condition = False @@ -114,10 +115,10 @@ analyse_condition = False # when number_of_timesteps is high, it might take a long time to write all # timesteps to disk. Therefore, you can choose to only write data of every # plot_timestep_every timestep to disk. -plot_timestep_every = 1 +plot_timestep_every = 3 # Decide how many timesteps you want analysed. Analysed means, that # subsequent errors of the L-iteration within the timestep are written out. -number_of_timesteps_to_analyse = 1 +number_of_timesteps_to_analyse = 5 # fine grained control over data to be written to disk in the mesh study case # as well as for a regular simuation for a fixed grid. @@ -454,18 +455,27 @@ if __name__ == '__main__': for mesh_resolution, solver_tol in resolutions.items(): simulation_parameter.update({"solver_tol": solver_tol}) hlp.info(simulation_parameter["use_case"]) + processQueue = mp.Queue() LDDsim = mp.Process( target=hlp.run_simulation, args=( simulation_parameter, + processQueue, starttime, mesh_resolution ) ) LDDsim.start() - LDDsim.join() + # LDDsim.join() # hlp.run_simulation( # mesh_resolution=mesh_resolution, # starttime=starttime, # parameter=simulation_parameter # ) + + # LDDsim.join() + if mesh_study: + simulation_output_dir = processQueue.get() + hlp.merge_spacetime_errornorms(isRichards=isRichards, + resolutions=resolutions, + output_dir=simulation_output_dir)