Skip to content

Commit 26b4697

Browse files
committed
Refactoring examples files
Into single parametrized scripts, in which the model equation can be chosen
1 parent 347844e commit 26b4697

File tree

11 files changed

+65
-1534
lines changed

11 files changed

+65
-1534
lines changed

examples/1D_exp_tube_phasechange/case.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/usr/bin/env python3
2-
import math, json
2+
import math, json, argparse
3+
4+
parser = argparse.ArgumentParser(
5+
prog="phasechange",
6+
description="phase change considering both 5 and 6 equation models.",
7+
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
8+
9+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
10+
help="MFC's toolchain's internal state.")
11+
parser.add_argument("-me", "--model_eqns", type=int, metavar="MODEL EQN", choices=[2, 3],
12+
help="Whether 5 or 6 equation models are chosen.")
13+
args = parser.parse_args()
314

415
# Pressure
516
p01 = 1.175435854855077e05
@@ -123,7 +134,7 @@
123134
"t_step_save": AS,
124135
# Simulation Algorithm Parameters
125136
"num_patches": 2,
126-
"model_eqns": 3,
137+
"model_eqns": args.model_eqns,
127138
"num_fluids": 3,
128139
"mpp_lim": "T",
129140
"mixture_err": "T",

examples/1D_exp_tube_phasechange_5Eqn/case.py

Lines changed: 0 additions & 193 deletions
This file was deleted.

0 commit comments

Comments
 (0)