aboutsummaryrefslogtreecommitdiff
path: root/boltzgen.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-10-26 13:42:11 +0200
committerAdrian Kummerlaender2019-10-26 13:42:11 +0200
commit9ddfd0f54ddb95b181421c851826e0bb462c249d (patch)
treecda21c586fbe0969508e56060851a47849acce62 /boltzgen.py
parent1c58183e84b2f7024855dc3c5bac19c48ba45f69 (diff)
downloadboltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar.gz
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar.bz2
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar.lz
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar.xz
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.tar.zst
boltzgen-9ddfd0f54ddb95b181421c851826e0bb462c249d.zip
Add BGK relaxation time argument
Still thinking how various collision models (BGK, MRT and so on) may be nicely abstracted in this setting.
Diffstat (limited to 'boltzgen.py')
-rwxr-xr-xboltzgen.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/boltzgen.py b/boltzgen.py
index ad76471..24a17b2 100755
--- a/boltzgen.py
+++ b/boltzgen.py
@@ -14,6 +14,7 @@ argparser.add_argument('--lattice', dest = 'lattice', required = True, help
argparser.add_argument('--layout', dest = 'layout', required = True, help = 'Memory layout ("AOS" or "SOA")')
argparser.add_argument('--precision', dest = 'precision', required = True, help = 'Floating precision ("single" or "double")')
argparser.add_argument('--geometry', dest = 'geometry', required = True, help = 'Size of the block geometry ("x:y(:z)")')
+argparser.add_argument('--tau', dest = 'tau', required = True, help = 'BGK relaxation time')
args = argparser.parse_args()
@@ -23,7 +24,7 @@ lbm = LBM(lattice)
generator = Generator(
descriptor = lattice,
moments = lbm.moments(),
- collision = lbm.bgk(f_eq = lbm.equilibrium(), tau = 0.6))
+ collision = lbm.bgk(f_eq = lbm.equilibrium(), tau = float(args.tau)))
geometry = Geometry.parse(args.geometry)