From 5abdac7b31fbd13d5441e0977e476422e1fb8a27 Mon Sep 17 00:00:00 2001 From: David <forenkram@gmx.de> Date: Sat, 1 Aug 2020 15:54:07 +0200 Subject: [PATCH] set up a few layered soil examples --- .../TP-TP-layered_soil.py | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/Two-phase-Two-phase/multi-patch/TP-TP-layered-soil-case/TP-TP-layered_soil.py b/Two-phase-Two-phase/multi-patch/TP-TP-layered-soil-case/TP-TP-layered_soil.py index 53994e0..ead54cc 100755 --- a/Two-phase-Two-phase/multi-patch/TP-TP-layered-soil-case/TP-TP-layered_soil.py +++ b/Two-phase-Two-phase/multi-patch/TP-TP-layered-soil-case/TP-TP-layered_soil.py @@ -31,13 +31,13 @@ datestr = date.strftime("%Y-%m-%d") # Name of the usecase that will be printed during simulation. -use_case = "TP-TP-layered_soil-realistic-same-L" +use_case = "TP-TP-layered_soil-realistic-not-VanGenuchten" # The name of this very file. Needed for creating log output. thisfile = "TP-TP-layered_soil.py" # GENERAL SOLVER CONFIG ###################################################### # maximal iteration per timestep -max_iter_num = 1000 +max_iter_num = 2000 FEM_Lagrange_degree = 1 # GRID AND MESH STUDY SPECIFICATIONS ######################################### @@ -48,7 +48,7 @@ resolutions = { # 4: 1e-6, # 8: 1e-5, # 16: 5e-6, - 32: 2e-6, + 32: 1e-6, # 64: 2e-6, # 128: 1e-6, # 256: 1e-6, @@ -57,28 +57,28 @@ 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, 1: 0.3, 2: 0.6, 3: 0.9} -starttimes = {0: 0.0} +starttimes = {0: 0.0, 1: 0.3, 2: 0.6, 3: 0.9} +# starttimes = {0: 0.0} timestep_size = 0.001 -number_of_timesteps = 1500 +number_of_timesteps = 1 # LDD scheme parameters ###################################################### -Lw1 = 0.025 -Lnw1 = 0.025 -Lw2 = 0.025 -Lnw2 = 0.025 -Lw3 = 0.025 -Lnw3 = 0.025 -Lw4 = 0.025 -Lnw4 = 0.025 - -lambda12_w = 1 -lambda12_nw = 0.5 -lambda23_w = 1 -lambda23_nw = 0.5 -lambda34_w = 1 -lambda34_nw = 0.5 +Lw1 = 0.1 +Lnw1 = 0.1 +Lw2 = 0.1 +Lnw2 = 0.1 +Lw3 = 0.1 +Lnw3 = 0.1 +Lw4 = 0.1 +Lnw4 = 0.1 + +lambda12_w = 20 +lambda12_nw = 20 +lambda23_w = 20 +lambda23_nw = 20 +lambda34_w = 20 +lambda34_nw = 20 include_gravity = False debugflag = False @@ -88,10 +88,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 = 5 +plot_timestep_every = 1 # 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 = 10 +number_of_timesteps_to_analyse = 1 # 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. @@ -177,9 +177,9 @@ gravity_acceleration = 9.81 # https://www.geotechdata.info/parameter/soil-porosity.html # Dict of the form: { subdom_num : porosity } porosity = { - 1: 0.37, # 0.2, # Clayey gravels, clayey sandy gravels + 1: 0.22, # 0.2, # Clayey gravels, clayey sandy gravels 2: 0.22, # 0.22, # Silty gravels, silty sandy gravels - 3: 0.2, # 0.37, # Clayey sands + 3: 0.22, # 0.37, # Clayey sands 4: 0.22, # 0.2 # Silty or sandy clay } @@ -234,11 +234,17 @@ ka_prime = rel_perm_dict["ka_prime"] # S-pc relation Spc_on_subdomains = { - 1: {"vanGenuchten": {"n": 3, "alpha": 0.001}}, - 2: {"vanGenuchten": {"n": 3, "alpha": 0.001}}, - 3: {"vanGenuchten": {"n": 6, "alpha": 0.001}}, - 4: {"vanGenuchten": {"n": 6, "alpha": 0.001}}, + 1: {"vanGenuchten": {"n": 3, "alpha": 0.1}}, + 2: {"vanGenuchten": {"n": 3, "alpha": 0.1}}, + 3: {"vanGenuchten": {"n": 6, "alpha": 0.1}}, + 4: {"vanGenuchten": {"n": 6, "alpha": 0.1}}, } +# Spc_on_subdomains = { +# 1: {"testSpc": {"index": 1}}, +# 2: {"testSpc": {"index": 1}}, +# 3: {"testSpc": {"index": 2}}, +# 4: {"testSpc": {"index": 2}}, +# } Spc = fts.generate_Spc_dicts(Spc_on_subdomains) S_pc_sym = Spc["symbolic"] S_pc_sym_prime = Spc["prime_symbolic"] @@ -251,10 +257,10 @@ x, y = sym.symbols('x[0], x[1]') # needed by UFL t = sym.symbols('t', positive=True) p_e_sym_2patch = { - 1: {'wetting': -7 - (1+t*t)*(1 + x*x + y*y), + 1: {'wetting': -7.0 - (1.0 + t*t)*(1.0 + x*x + y*y), 'nonwetting': -1-t*(1.1 + y + x**2)**2}, 2: {'wetting': -7.0 - (1.0 + t*t)*(1.0 + x*x), - 'nonwetting': -1-t*(1.1 + x**2)**2 - sym.sqrt(5+t**2)*y**2}, + 'nonwetting': -1-t*(1.1 + x**2)**2}, } -- GitLab