43 lines
1.4 KiB
Python
43 lines
1.4 KiB
Python
#!/bin/python
|
|
|
|
import os, sys
|
|
|
|
import argparse
|
|
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("mu_ratio", help="mu1/mu0, ratio between reaction-diffusion layer mu1 and convection-diffusion layer mu0")
|
|
parser.add_argument("c_star", help="reference c value seperate reaction-diffusion and convection-diffusion layers")
|
|
args = parser.parse_args()
|
|
|
|
|
|
# with open("itape.format") as itapeform:
|
|
# format = itapeform.read()
|
|
|
|
itape = ''' nx 512
|
|
l_0 4. !3[pi]
|
|
int_pr 400
|
|
tar_lo 0.60
|
|
dt 0.001
|
|
sc 0.75
|
|
vis 0.020 !2pi(162)ref !2pi(256)mid !2pi(256)Max !2p(162)Low
|
|
pre 2.10E+4 !185.75 !185.75 !316.88 !440.5 !102.69
|
|
ac 26.7 !22.250 !22.25 !22.56 !22.3 !22.39
|
|
bc 3. !7.000 !7.0 !7.0 !7.0 !7.0
|
|
u0 0.21
|
|
tf 100.
|
|
dt_uf 0.4
|
|
ctmp 0. !1.0e-14
|
|
c_cut 0.001 !0.012 ! c < c_cut -> wrate = 0.
|
|
c_ref 0.01 !0.003 !
|
|
min_wr 0. ! 5.0e-14
|
|
prof_wr 1.0
|
|
rvis {}
|
|
cstar {}
|
|
'''
|
|
|
|
print itape.format( args.mu_ratio, args.c_star )
|
|
|
|
# for i in range(15,60,5):
|
|
# with open("itape", 'w') as itape:
|
|
# itape.write(format.format(float(i)/10.0))
|
|
# os.system("../../ex &>"+str(i)+".txt")
|