From 6bc6b86372d5ed6939adbe00eb5e813937a7ce87 Mon Sep 17 00:00:00 2001
From: David <forenkram@gmx.de>
Date: Mon, 8 Jun 2020 14:49:29 +0200
Subject: [PATCH] set up layered soil simulations

---
 .../TP-R-layered_soil-all-params-one.py           |  9 +++++++++
 .../multi-patch/layered_soil/TP-R-layered_soil.py |  9 +++++++++
 ...ed_soil.py => TP-R-layered_soil-mesh-study.py} | 15 ++++++++++++---
 3 files changed, 30 insertions(+), 3 deletions(-)
 rename Two-phase-Richards/multi-patch/layered_soil/mesh_study/{TP-R-layered_soil.py => TP-R-layered_soil-mesh-study.py} (98%)

diff --git a/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil-all-params-one.py b/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil-all-params-one.py
index cb44482..60f94ca 100755
--- a/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil-all-params-one.py
+++ b/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil-all-params-one.py
@@ -17,6 +17,15 @@ import datetime
 import os
 import pandas as pd
 
+# check if output directory exists
+if not os.path.exists('./output'):
+    os.mkdir('./output')
+    print("Directory ", './output',  " created ")
+else:
+    print("Directory ", './output',  " already exists. Will use as output \
+    directory")
+
+
 date = datetime.datetime.now()
 datestr = date.strftime("%Y-%m-%d")
 
diff --git a/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil.py b/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil.py
index c05a244..8f3f087 100755
--- a/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil.py
+++ b/Two-phase-Richards/multi-patch/layered_soil/TP-R-layered_soil.py
@@ -17,6 +17,15 @@ import datetime
 import os
 import pandas as pd
 
+# check if output directory exists
+if not os.path.exists('./output'):
+    os.mkdir('./output')
+    print("Directory ", './output',  " created ")
+else:
+    print("Directory ", './output',  " already exists. Will use as output \
+    directory")
+
+
 date = datetime.datetime.now()
 datestr = date.strftime("%Y-%m-%d")
 
diff --git a/Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil.py b/Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil-mesh-study.py
similarity index 98%
rename from Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil.py
rename to Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil-mesh-study.py
index 1d56fc1..0e9c966 100755
--- a/Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil.py
+++ b/Two-phase-Richards/multi-patch/layered_soil/mesh_study/TP-R-layered_soil-mesh-study.py
@@ -17,6 +17,14 @@ import datetime
 import os
 import pandas as pd
 
+# check if output directory exists
+if not os.path.exists('./output'):
+    os.mkdir('./output')
+    print("Directory ", './output',  " created ")
+else:
+    print("Directory ", './output',  " already exists. Will use as output \
+    directory")
+
 date = datetime.datetime.now()
 datestr = date.strftime("%Y-%m-%d")
 
@@ -25,7 +33,8 @@ sym.init_printing()
 # solver_tol = 6E-7
 use_case = "TP-R-layered-soil-realistic"
 # name of this very file. Needed for log output.
-thisfile = "TP-R-layered_soil.py"
+thisfile = "TP-R-layered_soil-mesh-study.py"
+
 max_iter_num = 300
 FEM_Lagrange_degree = 1
 mesh_study = True
@@ -352,8 +361,8 @@ lambda_param = {
 intrinsic_permeability = {
     1: 0.1,  # sand
     2: 0.1,  # sand, there is a range
-    3: 0.001,  #10e-2,  # clay has a range
-    4: 0.001,  #10e-3
+    3: 0.001,  # 10e-2,  # clay has a range
+    4: 0.001,  # 10e-3
 }
 
 
-- 
GitLab