aboutsummaryrefslogtreecommitdiff
path: root/implosion.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-13 18:08:14 +0200
committerAdrian Kummerlaender2019-06-13 18:08:14 +0200
commit2046e1329f522eeafb0f979a97eb91adeebb7a14 (patch)
treea4f8c77ebe49c42ee704ab15d01dfe474bb22944 /implosion.py
parent3d93f204e80f90ba06fd1f451c8bfac7f9b629d1 (diff)
downloadsymlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.gz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.bz2
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.lz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.xz
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.tar.zst
symlbm_playground-2046e1329f522eeafb0f979a97eb91adeebb7a14.zip
Add kernel customization point for velocity boundaries
Diffstat (limited to 'implosion.py')
-rw-r--r--implosion.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/implosion.py b/implosion.py
index d2754c2..e5e87bc 100644
--- a/implosion.py
+++ b/implosion.py
@@ -42,6 +42,13 @@ pop_eq = """
% endfor
}"""
+boundary = """
+ if ( m == 2 ) {
+ u_0 = 0.0;
+ u_1 = 0.0;
+ }
+"""
+
nUpdates = 2000
nStat = 100
@@ -49,7 +56,7 @@ moments = []
print("Initializing simulation...\n")
-lattice = Lattice(nX = 1024, nY = 1024, tau = 0.8, geometry = box, pop_eq_src = pop_eq)
+lattice = Lattice(nX = 1024, nY = 1024, tau = 0.8, geometry = box, pop_eq_src = pop_eq, boundary_src = boundary)
print("Starting simulation using %d cells...\n" % lattice.nCells)