diff options
author | Adrian Kummerlaender | 2019-10-26 13:42:11 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2019-10-26 13:42:11 +0200 |
commit | 9ddfd0f54ddb95b181421c851826e0bb462c249d (patch) | |
tree | cda21c586fbe0969508e56060851a47849acce62 /boltzgen/lbm | |
parent | 1c58183e84b2f7024855dc3c5bac19c48ba45f69 (diff) | |
download | boltzgen-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/lbm')
-rw-r--r-- | boltzgen/lbm/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/boltzgen/lbm/__init__.py b/boltzgen/lbm/__init__.py index f80feaa..bafe331 100644 --- a/boltzgen/lbm/__init__.py +++ b/boltzgen/lbm/__init__.py @@ -51,6 +51,9 @@ class LBM: return f_eq def bgk(self, tau, f_eq, optimize = True): + if tau <= 0.5: + raise Exception('Relaxation time must be larger than 0.5') + exprs = [ self.f_curr[i] + 1/tau * (f_eq_i - self.f_curr[i]) for i, f_eq_i in enumerate(f_eq) ] if optimize: |