diff --git a/docs/.buildinfo b/docs/.buildinfo new file mode 100644 index 0000000..79e3920 --- /dev/null +++ b/docs/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 460f45d6faf9867abf533d23c6816ee9 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ + diff --git a/docs/.nojekyll copy b/docs/.nojekyll copy new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/.nojekyll copy @@ -0,0 +1 @@ + diff --git a/docs/2phase.html b/docs/2phase.html new file mode 100644 index 0000000..6df4792 --- /dev/null +++ b/docs/2phase.html @@ -0,0 +1,125 @@ + + + + + + + 2phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

2phase

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/2phase.rst b/docs/2phase.rst new file mode 100644 index 0000000..d0d402f --- /dev/null +++ b/docs/2phase.rst @@ -0,0 +1,11 @@ +2phase +============== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + twophase/lbm_solver_3d_2phase_sparse + twophase/lbm_solver_3d_2phase + + diff --git a/docs/Convert_stl_to_binary.html b/docs/Convert_stl_to_binary.html new file mode 100644 index 0000000..9a97016 --- /dev/null +++ b/docs/Convert_stl_to_binary.html @@ -0,0 +1,126 @@ + + + + + + + Convert_stl_to_binary — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Convert_stl_to_binary

+

This file reads the stl file and output to vtk file

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Grey_Scale.html b/docs/Grey_Scale.html new file mode 100644 index 0000000..5485831 --- /dev/null +++ b/docs/Grey_Scale.html @@ -0,0 +1,125 @@ + + + + + + + Grey_Scale — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Grey_Scale

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Grey_Scale.rst b/docs/Grey_Scale.rst new file mode 100644 index 0000000..ef21d69 --- /dev/null +++ b/docs/Grey_Scale.rst @@ -0,0 +1,10 @@ +Grey\_Scale +=================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Grey_scale/flow_domain_geo_generation + Grey_scale/lbm_solver_3d_Macro_Sukop + diff --git a/docs/Grey_scale/flow_domain_geo_generation.html b/docs/Grey_scale/flow_domain_geo_generation.html new file mode 100644 index 0000000..ea8bf17 --- /dev/null +++ b/docs/Grey_scale/flow_domain_geo_generation.html @@ -0,0 +1,149 @@ + + + + + + + flow_domain_geo_generation — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation

+

This file output geometry data

+
#import numpy and math packahe
+import numpy as np
+import math
+
+
+# INPUT STL FILE NAME
+output_name = 'geo.dat'
+
+# POINT SEARCHING RESOLUTION IN X direction, Y,Z direction will be calculate by the code
+# the bigger value ~ more points will be found inside STL
+dnx, dny, dnz = 60, 60, 60
+
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+#create np matrix with dnx*dny*dnz zero
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#out_dat[1,:,:] = 1
+
+#=========================================================
+#reshape out_dat with column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+#save the file with the transfer of out_dat based on integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Grey_scale/flow_domain_geo_generation.rst b/docs/Grey_scale/flow_domain_geo_generation.rst new file mode 100644 index 0000000..bf4c4a7 --- /dev/null +++ b/docs/Grey_scale/flow_domain_geo_generation.rst @@ -0,0 +1,34 @@ +flow_domain_geo_generation +================================= + +This file output geometry data + +.. code-block:: python + + #import numpy and math packahe + import numpy as np + import math + + + # INPUT STL FILE NAME + output_name = 'geo.dat' + + # POINT SEARCHING RESOLUTION IN X direction, Y,Z direction will be calculate by the code + # the bigger value ~ more points will be found inside STL + dnx, dny, dnz = 60, 60, 60 + + + #========================================================== + # DO NOT CHANGE BELOW + #========================================================== + #create np matrix with dnx*dny*dnz zero + out_dat = np.zeros((dnx,dny,dnz)) + + #=======Can define some geometry here to out_dat========= + #out_dat[1,:,:] = 1 + + #========================================================= + #reshape out_dat with column major + out_dat = out_dat.reshape(out_dat.size, order = 'F') + #save the file with the transfer of out_dat based on integer type + np.savetxt(output_name,out_dat.T,fmt='%d') \ No newline at end of file diff --git a/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.html b/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.html new file mode 100644 index 0000000..5668cf1 --- /dev/null +++ b/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.html @@ -0,0 +1,185 @@ + + + + + + + lbm_solver_3d_Macro_Sukop — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_Macro_Sukop

+

This solver is almost similar to lbm_solver_3d expect several difference as follows:

+
    +
  1. Some parameter is different

  2. +
+
#grid resolution
+nx,ny,nz = 60,50,5
+#external force
+fx,fy,fz = 1.0e-6,0.0,0.0
+#viscosity
+niu = 0.1
+#import geometry
+geo_name = './BC.dat'
+#maximum timestep
+max_timestep = 5000
+#output frequency
+output_fre = 100
+#vtk file output frequency
+vtk_fre = 500
+
+
+
    +
  1. There are two array for solid flag data.

  2. +
+
ns_np = init_geo(geo_name)
+solid_np = ns_np.astype(int)
+#solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+ns.from_numpy(ns_np)
+
+
+
    +
  1. The streaming function is different

  2. +
+
@ti.kernel
+def streaming0():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            for s in ti.static(range(19)):
+                ip = periodic_index(i+e[s])
+                #if it is fluid f2=f otherwise apply bounce-back f2[i,s]=f[ip,LR[s]]
+                f2[i,s] = f[i,s] + ns[i]*(f[ip,LR[s]] - f[i,s])
+
+
+@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            #if it is fluid apply streaming
+            for s in ti.static(range(19)):
+                ip = periodic_index(i+e[s])
+                F[ip,s] = f2[i,s]
+
+                #if (solid[ip]==0):
+                #    F[ip,s] = f[i,s]
+                #else:
+                #    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+#not used
+@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in ti.static(range(19)):
+            f[i,s] = F[i,s]
+
+
+

streaming3() calculates the macroscopic variable

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.rst b/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.rst new file mode 100644 index 0000000..26eb0cc --- /dev/null +++ b/docs/Grey_scale/lbm_solver_3d_Macro_Sukop.rst @@ -0,0 +1,70 @@ +lbm_solver_3d_Macro_Sukop +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. Some parameter is different + +.. code-block:: python + + #grid resolution + nx,ny,nz = 60,50,5 + #external force + fx,fy,fz = 1.0e-6,0.0,0.0 + #viscosity + niu = 0.1 + #import geometry + geo_name = './BC.dat' + #maximum timestep + max_timestep = 5000 + #output frequency + output_fre = 100 + #vtk file output frequency + vtk_fre = 500 + +2. There are two array for solid flag data. + +.. code-block:: python + + ns_np = init_geo(geo_name) + solid_np = ns_np.astype(int) + #solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + ns.from_numpy(ns_np) + +3. The streaming function is different + +.. code-block:: python + + @ti.kernel + def streaming0(): + for i in ti.grouped(rho): + if (solid[i] == 0): + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + #if it is fluid f2=f otherwise apply bounce-back f2[i,s]=f[ip,LR[s]] + f2[i,s] = f[i,s] + ns[i]*(f[ip,LR[s]] - f[i,s]) + + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + if (solid[i] == 0): + #if it is fluid apply streaming + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + F[ip,s] = f2[i,s] + + #if (solid[ip]==0): + # F[ip,s] = f[i,s] + #else: + # F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + #not used + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in ti.static(range(19)): + f[i,s] = F[i,s] + +``streaming3()`` calculates the macroscopic variable \ No newline at end of file diff --git a/docs/LBM_3D_SinglePhase_Solver.html b/docs/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..2a694db --- /dev/null +++ b/docs/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,660 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/Phase_change.html b/docs/Phase_change.html new file mode 100644 index 0000000..3d736f6 --- /dev/null +++ b/docs/Phase_change.html @@ -0,0 +1,135 @@ + + + + + + + Phase_change — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Phase_change.rst b/docs/Phase_change.rst new file mode 100644 index 0000000..485b770 --- /dev/null +++ b/docs/Phase_change.rst @@ -0,0 +1,15 @@ +Phase\_change +===================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + phasechange/example_cavity_melting + phasechange/example_phase_change + phasechange/LBM_3D_SinglePhase_Solute_Solver + phasechange/LBM_3D_SinglePhase_Solver + phasechange/read_img_solute_psi_generation_2D + phasechange/solute_psi_generation_2D + phasechange/test1 + diff --git a/docs/Single_phase.LBM_3D_SinglePhase_Solver.html b/docs/Single_phase.LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..3ff0dd7 --- /dev/null +++ b/docs/Single_phase.LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,644 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase.example_cavity.html b/docs/Single_phase.example_cavity.html new file mode 100644 index 0000000..7668e20 --- /dev/null +++ b/docs/Single_phase.example_cavity.html @@ -0,0 +1,119 @@ + + + + + + + Single_phase_example — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase_example

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase.html b/docs/Single_phase.html new file mode 100644 index 0000000..21fdb62 --- /dev/null +++ b/docs/Single_phase.html @@ -0,0 +1,137 @@ + + + + + + + Single_phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase.lbm_solver_3d.html b/docs/Single_phase.lbm_solver_3d.html new file mode 100644 index 0000000..b6c4821 --- /dev/null +++ b/docs/Single_phase.lbm_solver_3d.html @@ -0,0 +1,425 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

this

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

``

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

this

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        if (solid[i,j,k] == 0):
+            m_temp = multiply_M(i,j,k)
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

this

+
@ti.func
+def periodic_index(i):
+    iout = i
+    if i[0]<0:     iout[0] = nx-1
+    if i[0]>nx-1:  iout[0] = 0
+    if i[1]<0:     iout[1] = ny-1
+    if i[1]>ny-1:  iout[1] = 0
+    if i[2]<0:     iout[2] = nz-1
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

this

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            for s in range(19):
+                ip = periodic_index(i+e[s])
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

this

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

this

+
@ti.kernel
+def Boundary_condition():
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

this

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

this

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase.rst b/docs/Single_phase.rst new file mode 100644 index 0000000..d66928e --- /dev/null +++ b/docs/Single_phase.rst @@ -0,0 +1,20 @@ +Single\_phase +===================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Single_phase/LBM_3D_SinglePhase_Solver + Single_phase/lbm_solver_3d + Single_phase/lbm_solver_3d_cavity + Single_phase/lbm_solver_3d_sparse + Single_phase/flow_domain_geo_generation_2D + Single_phase/example_cavity + Single_phase/example_porous_medium + Single_phase/Convert_stl_to_binary + + + + + diff --git a/docs/Single_phase/Convert_stl_to_binary.html b/docs/Single_phase/Convert_stl_to_binary.html new file mode 100644 index 0000000..a9d5677 --- /dev/null +++ b/docs/Single_phase/Convert_stl_to_binary.html @@ -0,0 +1,126 @@ + + + + + + + Convert_stl_to_binary — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Convert_stl_to_binary

+

This file reads the stl file and output to vtk file

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/Convert_stl_to_binary.rst b/docs/Single_phase/Convert_stl_to_binary.rst new file mode 100644 index 0000000..edf04e6 --- /dev/null +++ b/docs/Single_phase/Convert_stl_to_binary.rst @@ -0,0 +1,4 @@ +Convert_stl_to_binary +================================= + +This file reads the stl file and output to vtk file \ No newline at end of file diff --git a/docs/Single_phase/LBM_3D_SinglePhase_Solver.html b/docs/Single_phase/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..37c70ec --- /dev/null +++ b/docs/Single_phase/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,667 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/LBM_3D_SinglePhase_Solver.rst b/docs/Single_phase/LBM_3D_SinglePhase_Solver.rst new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/Single_phase/LBM_3D_SinglePhase_Solver.rst @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.x + + + + + + example_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity

+

This file use the LBM_3D_SinglePhase_Solver to simulate the cavity flow

+
#import certain packages
+import time
+import taichi as ti
+
+ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#set 50*50*50 cavity based on LB3D_Solver_Single_Phase solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=50,ny=50,nz=50, sparse_storage=False)
+
+#import geometry data
+lb3d.init_geo('./geo_cavity.dat')
+#set the x-right velocity
+lb3d.set_bc_vel_x1([0.0,0.0,0.1])
+#initialize
+lb3d.init_simulation()
+
+#simulation step
+for iter in range(2000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #get the maximum velocity
+        max_v = lb3d.get_max_v()
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the number of time steps, maxiumum force and the force scale=0
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, max_v,  0.0))
+        #every 1000 time steps export the vtk file
+        if (iter%1000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/example_cavity.rst b/docs/Single_phase/example_cavity.rst new file mode 100644 index 0000000..d3b2b17 --- /dev/null +++ b/docs/Single_phase/example_cavity.rst @@ -0,0 +1,52 @@ +example_cavity +================================= + +This file use the LBM_3D_SinglePhase_Solver to simulate the cavity flow + +.. code-block:: python + + #import certain packages + import time + import taichi as ti + + ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False) + import LBM_3D_SinglePhase_Solver as lb3dsp + #set the time + time_init = time.time() + time_now = time.time() + time_pre = time.time() + + #set 50*50*50 cavity based on LB3D_Solver_Single_Phase solver + lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=50,ny=50,nz=50, sparse_storage=False) + + #import geometry data + lb3d.init_geo('./geo_cavity.dat') + #set the x-right velocity + lb3d.set_bc_vel_x1([0.0,0.0,0.1]) + #initialize + lb3d.init_simulation() + + #simulation step + for iter in range(2000+1): + lb3d.step() + + if (iter%500==0): + + #calculate the time + time_pre = time_now + time_now = time.time() + diff_time = int(time_now-time_pre) + elap_time = int(time_now-time_init) + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + #get the maximum velocity + max_v = lb3d.get_max_v() + #print the time + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + #print the number of time steps, maxiumum force and the force scale=0 + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, max_v, 0.0)) + #every 1000 time steps export the vtk file + if (iter%1000==0): + lb3d.export_VTK(iter) \ No newline at end of file diff --git a/docs/Single_phase/example_porous_medium.html b/docs/Single_phase/example_porous_medium.html new file mode 100644 index 0000000..2d11834 --- /dev/null +++ b/docs/Single_phase/example_porous_medium.html @@ -0,0 +1,170 @@ + + + + + + + example_porous_medium — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_porous_medium

+

This file simulate the porous medium based on the LBM_3D_SinglePhase_Solver

+
#import time and taichi package
+import time
+import taichi as ti
+#taichi intialization
+ti.init(arch=ti.cpu)
+#import the LBM_3D_SinglePhase_Solver
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#create the 131*131*131 gird LBM_3D_SinglePhase_Solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=131,ny=131,nz=131)
+#import the porous medium geometry
+lb3d.init_geo('./img_ftb131.txt')
+#set x-left and x-right density
+lb3d.set_bc_rho_x1(0.99)
+lb3d.set_bc_rho_x0(1.0)
+#initialize the simulation
+lb3d.init_simulation()
+#simulation loop
+for iter in range(50000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the time step, max force=10, force_scale=10
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+        #export VTK every 2000 time step
+        if (iter%2000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/example_porous_medium.rst b/docs/Single_phase/example_porous_medium.rst new file mode 100644 index 0000000..fb47072 --- /dev/null +++ b/docs/Single_phase/example_porous_medium.rst @@ -0,0 +1,49 @@ +example_porous_medium +================================= + +This file simulate the porous medium based on the LBM_3D_SinglePhase_Solver + +.. code-block:: python + + #import time and taichi package + import time + import taichi as ti + #taichi intialization + ti.init(arch=ti.cpu) + #import the LBM_3D_SinglePhase_Solver + import LBM_3D_SinglePhase_Solver as lb3dsp + #set the time + time_init = time.time() + time_now = time.time() + time_pre = time.time() + + #create the 131*131*131 gird LBM_3D_SinglePhase_Solver + lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=131,ny=131,nz=131) + #import the porous medium geometry + lb3d.init_geo('./img_ftb131.txt') + #set x-left and x-right density + lb3d.set_bc_rho_x1(0.99) + lb3d.set_bc_rho_x0(1.0) + #initialize the simulation + lb3d.init_simulation() + #simulation loop + for iter in range(50000+1): + lb3d.step() + + if (iter%500==0): + #calculate the time + time_pre = time_now + time_now = time.time() + diff_time = int(time_now-time_pre) + elap_time = int(time_now-time_init) + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + #print the time + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + #print the time step, max force=10, force_scale=10 + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + #export VTK every 2000 time step + if (iter%2000==0): + lb3d.export_VTK(iter) \ No newline at end of file diff --git a/docs/Single_phase/flow_domain_geo_generation_2D.html b/docs/Single_phase/flow_domain_geo_generation_2D.html new file mode 100644 index 0000000..5ed62c6 --- /dev/null +++ b/docs/Single_phase/flow_domain_geo_generation_2D.html @@ -0,0 +1,163 @@ + + + + + + + flow_domain_geo_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation_2D

+

This file generate geometry file for solver to read

+
#import certain module
+import numpy as np
+import math
+
+
+#define the input file name
+# INPUT STL FILE NAME
+output_name = 'geo_cavity.dat'
+
+#define the grid resolution
+dnx, dny, dnz = 50, 50, 50
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+
+#define an matrix dnx*dny*dnz with zero values
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#define the boundary to be solid
+out_dat[0,:,:] = 1
+#cout_dat[:,:,0] = 1
+out_dat[:,0,:] = 1
+out_dat[:,-1,:] = 1
+out_dat[:,:,0] = 1
+out_dat[:,:,-1] = 1
+
+#=========================================================
+#reshape the data to be column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+
+
+#output the transfer of out_dat to the file with integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/flow_domain_geo_generation_2D.rst b/docs/Single_phase/flow_domain_geo_generation_2D.rst new file mode 100644 index 0000000..d12b8e1 --- /dev/null +++ b/docs/Single_phase/flow_domain_geo_generation_2D.rst @@ -0,0 +1,42 @@ +flow_domain_geo_generation_2D +================================= + +This file generate geometry file for solver to read + +.. code-block:: python + + #import certain module + import numpy as np + import math + + + #define the input file name + # INPUT STL FILE NAME + output_name = 'geo_cavity.dat' + + #define the grid resolution + dnx, dny, dnz = 50, 50, 50 + + #========================================================== + # DO NOT CHANGE BELOW + #========================================================== + + #define an matrix dnx*dny*dnz with zero values + out_dat = np.zeros((dnx,dny,dnz)) + + #=======Can define some geometry here to out_dat========= + #define the boundary to be solid + out_dat[0,:,:] = 1 + #cout_dat[:,:,0] = 1 + out_dat[:,0,:] = 1 + out_dat[:,-1,:] = 1 + out_dat[:,:,0] = 1 + out_dat[:,:,-1] = 1 + + #========================================================= + #reshape the data to be column major + out_dat = out_dat.reshape(out_dat.size, order = 'F') + + + #output the transfer of out_dat to the file with integer type + np.savetxt(output_name,out_dat.T,fmt='%d') \ No newline at end of file diff --git a/docs/Single_phase/lbm_solver_3d.html b/docs/Single_phase/lbm_solver_3d.html new file mode 100644 index 0000000..9007848 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d.html @@ -0,0 +1,536 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s Force scheme

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+    #calculate Guo's force here
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) calculate equilibrium density distribution function in momentum space

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

collison() define the prcoess of collision

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is fluid
+        if (solid[i,j,k] == 0):
+            #calculate m
+            m_temp = multiply_M(i,j,k)
+            #calculate meq
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                #calculate -s*(m-meq)
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #add Guo's force
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    #f=-M^-1*S(m-meq)
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

periodic_index(i) set the bounary index with periodic bounary condition

+
@ti.func
+def periodic_index(i):
+    #inner index
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = nx-1
+    #x-right
+    if i[0]>nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = ny-1
+    #y-right
+    if i[1]>ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = nz-1
+    #z-right
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming process of denisty distibution function

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        #if it is fluid
+        if (solid[i] == 0):
+            for s in range(19):
+                #the neighbour index
+                ip = periodic_index(i+e[s])
+                #if neighbour index is fluid just streaming
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                #if neighbour index is solid just bounce back
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

streaming2() a simple streaming process without consideration of solid and boundary

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

Boudary_condition() define the bounary condition of fixed pressure and fixed velocity

+
@ti.kernel
+def Boundary_condition():
+    #pressure-boundary condtion x-left
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #if boundary is fluid but the neighbour is solid
+                #equilibrium density distribution function is calculated based on the neighbour velocity
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                #if boundary is fluid and the neighbour is also fluid
+                #equilibrium density distribution function is calculated based on the boundary velocity
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    #velocity-boundary conditon x-left
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #calculate density distribution fucntion based on equilibrium part and non-equilibrium part
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    #pressure boundary condition x-right similar to x-left
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    #velocity booundary condition x-right similar to x-left
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

streaming3() calculate the macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        #if it is fluid calculate density and velocity based on density distribution function
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+        # if it is solid set denisty equals one and velocity equals zero
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

At the end of the file do the actual simulation and export the data

+
#define some time varible
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+#import the solid flag data
+#solid_np = init_geo('./BC.dat')
+solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+
+# do the initialization
+static_init()
+init()
+
+# do the actual simulation
+for iter in range(50000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    # calculate every 1000 time step
+    if (iter%1000==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        #calculate the time difference between now and previous time step
+        diff_time = int(time_now-time_pre)
+        #calculate the time difference between now and the initial time
+        elap_time = int(time_now-time_init)
+        #divmod function return the quotient and the remainder
+        #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2]))
+                            }
+            )
+# ti.sync()
+# ti.profiler.print_kernel_profiler_info()
+#print the profiler information of every kernel and task of taichi in this file
+ti.profiler.print_scoped_profiler_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/lbm_solver_3d.rst b/docs/Single_phase/lbm_solver_3d.rst new file mode 100644 index 0000000..c8df414 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d.rst @@ -0,0 +1,443 @@ +Single\_phase.lbm\_solver\_3d +================================= +This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first. + +.. code-block:: python + + #import some package + import taichi as ti + import numpy as np + from pyevtk.hl import gridToVTK + import time + #initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation + ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False) + #enable projection + enable_projection = True + #nx,ny,nz = 100,50,5 + #define 131x131x131 and zero external force + nx,ny,nz = 131,131,131 + fx,fy,fz = 0.0e-6,0.0,0.0 + #viscosity=0.1 + niu = 0.1 + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + + #define old density distribution funciton nx*ny*nz*19 + f = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #define new density distribution function nx*ny*nz*19 + F = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #define density nx*ny*nz + rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity nx*ny*nz + v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + #define lattice speed 3*19 + e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagonal 19 dimension vector + S_dig = ti.field(ti.f32,shape=(19)) + #define another lattice speed 3*19 + e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter 19 dimesnion vector + w = ti.field(ti.f32, shape=(19)) + #define solid flag nx*ny*nz + solid = ti.field(ti.i32,shape=(nx,ny,nz)) + #define vector for streaming 19 dimensional vector + LR = ti.field(ti.i32,shape=(19)) + #define external force with a 3 dimensional vector + ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define velocity in x,y,z direction with 3 dimensional vector + bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=()) + bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=()) + bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=()) + bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=()) + bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=()) + bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=()) + #define transforming matrix 19*19 + M = ti.field(ti.f32, shape=(19,19)) + #define inverse of transforming matrix + inv_M = ti.field(ti.f32, shape=(19,19)) + #define single relaxation parameter + tau_f=3.0*niu+0.5 + #define single relaxation frequency + s_v=1.0/tau_f + #define other parameter in the s diagonal + s_other=8.0*(2.0-s_v)/(8.0-s_v) + #define s matrix but not used + S_np = np.zeros((19,19)) + S_np[0,0]=0; S_np[1,1]=s_v; S_np[2,2]=s_v; S_np[3,3]=0; S_np[4,4]=s_other; S_np[5,5]=0; + S_np[6,6]=s_other; S_np[7,7]=0; S_np[8,8]=s_other; S_np[9,9]=s_v; S_np[10,10]=s_v; S_np[11,11]=s_v; + S_np[12,12]=s_v; S_np[13,13]=s_v; S_np[14,14]=s_v; S_np[15,15]=s_v; S_np[16,16]=s_other; S_np[17,17]=s_other; + S_np[18,18]=s_other + #define numpy array version of s diagonal. + S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other]) + #define numpy version of transforming matrix + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define inverse of transforming matrix using inv function in linalg package + inv_M_np = np.linalg.inv(M_np) + #define index for streaming + LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]) + #assign numpy version to M.np to M + M.from_numpy(M_np) + #assign numpy version of inverser matrix inv_M_np to inv_M + inv_M.from_numpy(inv_M_np) + #assign numpy versio of LR array to LR + LR.from_numpy(LR_np) + #assign fx,fy,fz to vector external force + ext_f[None] = ti.Vector([fx,fy,fz]) + #assign numpy version of S diagnal S_dig_np to S_dig + S_dig.from_numpy(S_dig_np) + #make inv_M,M,LR,S_dig not modified + ti.static(inv_M) + ti.static(M) + ti.static(LR) + ti.static(S_dig) + + #create mesh nx*ny*nz + x = np.linspace(0, nx, nx) + y = np.linspace(0, ny, ny) + z = np.linspace(0, nz, nz) + #numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing + X, Y, Z = np.meshgrid(x, y, z, indexing='ij') + +``feq(k,rho_local,u)`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + # taichi funciton + @ti.func + def feq(k,rho_local, u): + eu = e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, w[k]) + return feqout + +``init()`` initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function + +.. code-block:: python + + @ti.kernel + def init(): + for i,j,k in rho: + rho[i,j,k] = 1.0 + v[i,j,k] = ti.Vector([0,0,0]) + for s in range(19): + f[i,j,k,s] = feq(s,1.0,v[i,j,k]) + F[i,j,k,s] = feq(s,1.0,v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` load geometry file + +.. code-block:: python + + def init_geo(filename): + #load data + in_dat = np.loadtxt(filename) + #reshape it with column major + in_dat = np.reshape(in_dat, (nx,ny,nz),order='F') + return in_dat + +``static_init()`` initialize lattixe speed weight parameter and boundary velocity + +.. code-block:: python + + @ti.kernel + def static_init(): + if ti.static(enable_projection): # No runtime overhead + #initialize lattice speed + e[0] = ti.Vector([0,0,0]) + e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1]) + e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0]) + e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1]) + e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1]) + #initialize lattice speed + e_f[0] = ti.Vector([0,0,0]) + e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1]) + e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0]) + e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1]) + e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1]) + #intialize weight parameter + w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0; + w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0; + w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0; + #intialize boundary velocity + bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl]) + bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr]) + bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl]) + bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr]) + bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl]) + bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr]) + +``multiply_M`` calculate denisty distribution function in momentum space M*f=m + +.. code-block:: python + + @ti.func + def multiply_M(i,j,k): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + for index in range(19): + for s in range(19): + #calculte m=M*f here + out[index] += M[index,s]*F[i,j,k,s] + #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s]) + return out + +``GuoF(i,j,k,s,u)`` calculate Guo's Force scheme + +.. code-block:: python + + @ti.func + def GuoF(i,j,k,s,u): + out=0.0 + for l in range(19): + #calculate Guo's force here + out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l] + + return out + +``meq_vec(rho_local,u)`` calculate equilibrium density distribution function in momentum space + +.. code-block:: python + + @ti.func + def meq_vec(rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``collison()`` define the prcoess of collision + +.. code-block:: python + + @ti.kernel + def colission(): + for i,j,k in rho: + #if it is fluid + if (solid[i,j,k] == 0): + #calculate m + m_temp = multiply_M(i,j,k) + #calculate meq + meq = meq_vec(rho[i,j,k],v[i,j,k]) + for s in range(19): + #calculate -s*(m-meq) + m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s]) + #add Guo's force + m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k]) + + for s in range(19): + f[i,j,k,s] = 0 + for l in range(19): + #f=-M^-1*S(m-meq) + f[i,j,k,s] += inv_M[s,l]*m_temp[l] + +``periodic_index(i)`` set the bounary index with periodic bounary condition + +.. code-block:: python + + @ti.func + def periodic_index(i): + #inner index + iout = i + #x-left + if i[0]<0: iout[0] = nx-1 + #x-right + if i[0]>nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = ny-1 + #y-right + if i[1]>ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = nz-1 + #z-right + if i[2]>nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming process of denisty distibution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + #if it is fluid + if (solid[i] == 0): + for s in range(19): + #the neighbour index + ip = periodic_index(i+e[s]) + #if neighbour index is fluid just streaming + if (solid[ip]==0): + F[ip,s] = f[i,s] + #if neighbour index is solid just bounce back + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +``streaming2()`` a simple streaming process without consideration of solid and boundary + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +``Boudary_condition()`` define the bounary condition of fixed pressure and fixed velocity + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + #pressure-boundary condtion x-left + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #if boundary is fluid but the neighbour is solid + #equilibrium density distribution function is calculated based on the neighbour velocity + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + #if boundary is fluid and the neighbour is also fluid + #equilibrium density distribution function is calculated based on the boundary velocity + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + #velocity-boundary conditon x-left + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #calculate density distribution fucntion based on equilibrium part and non-equilibrium part + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + #pressure boundary condition x-right similar to x-left + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + #velocity booundary condition x-right similar to x-left + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + + +``streaming3()`` calculate the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + #if it is fluid calculate density and velocity based on density distribution function + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + # if it is solid set denisty equals one and velocity equals zero + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +At the end of the file do the actual simulation and export the data + +.. code-block:: python + + #define some time varible + time_init = time.time() + time_now = time.time() + time_pre = time.time() + dt_count = 0 + + #import the solid flag data + #solid_np = init_geo('./BC.dat') + solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + + # do the initialization + static_init() + init() + + # do the actual simulation + for iter in range(50000+1): + colission() + streaming1() + Boundary_condition() + #streaming2() + streaming3() + # calculate every 1000 time step + if (iter%1000==0): + + time_pre = time_now + time_now = time.time() + #calculate the time difference between now and previous time step + diff_time = int(time_now-time_pre) + #calculate the time difference between now and the initial time + elap_time = int(time_now-time_init) + #divmod function return the quotient and the remainder + #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + + #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable + if (iter%10000==0): + gridToVTK( + "./structured"+str(iter), + x, + y, + z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()), + "rho": np.ascontiguousarray(rho.to_numpy()), + "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2])) + } + ) + # ti.sync() + # ti.profiler.print_kernel_profiler_info() + #print the profiler information of every kernel and task of taichi in this file + ti.profiler.print_scoped_profiler_info() diff --git a/docs/Single_phase/lbm_solver_3d_cavity.html b/docs/Single_phase/lbm_solver_3d_cavity.html new file mode 100644 index 0000000..f851f46 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d_cavity.html @@ -0,0 +1,155 @@ + + + + + + + lbm_solver_3d_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_cavity

+

This solver is almost similar to lbm_solver_3d expect several difference as follows:

+
    +
  1. The Grid resolution in this solver is 50x50x50

  2. +
  3. The viscosity in this solver is 0.16667

  4. +
  5. The boundary condition in this solver is velocity solver on x-right as follows

  6. +
+

boundary condition of this solver

+
#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+
+

x-right is implementated with velocity boundary condition

+

4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary.

+
if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left))
+
+
+
    +
  1. Finally, the definition of the varible is slightly different from lbm_solver_3d

  2. +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/lbm_solver_3d_cavity.rst b/docs/Single_phase/lbm_solver_3d_cavity.rst new file mode 100644 index 0000000..08d16d9 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d_cavity.rst @@ -0,0 +1,37 @@ +lbm_solver_3d_cavity +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. The Grid resolution in this solver is 50x50x50 +2. The viscosity in this solver is 0.16667 +3. The boundary condition in this solver is velocity solver on x-right as follows + +boundary condition of this solver + +.. code-block:: python + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + +x-right is implementated with velocity boundary condition + +4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary. + +.. code-block:: python + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left)) + + +5. Finally, the definition of the varible is slightly different from lbm_solver_3d \ No newline at end of file diff --git a/docs/Single_phase/lbm_solver_3d_sparse.html b/docs/Single_phase/lbm_solver_3d_sparse.html new file mode 100644 index 0000000..9064c37 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d_sparse.html @@ -0,0 +1,143 @@ + + + + + + + lbm_solver_3d_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_sparse

+

This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible:

+
f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse.

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Single_phase/lbm_solver_3d_sparse.rst b/docs/Single_phase/lbm_solver_3d_sparse.rst new file mode 100644 index 0000000..d76a344 --- /dev/null +++ b/docs/Single_phase/lbm_solver_3d_sparse.rst @@ -0,0 +1,24 @@ +lbm_solver_3d_sparse +================================= + + +This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible: + +.. code-block:: python + + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse. \ No newline at end of file diff --git a/docs/_build/doctrees/2phase.doctree b/docs/_build/doctrees/2phase.doctree new file mode 100644 index 0000000..895738d Binary files /dev/null and b/docs/_build/doctrees/2phase.doctree differ diff --git a/docs/_build/doctrees/Convert_stl_to_binary.doctree b/docs/_build/doctrees/Convert_stl_to_binary.doctree new file mode 100644 index 0000000..790d79f Binary files /dev/null and b/docs/_build/doctrees/Convert_stl_to_binary.doctree differ diff --git a/docs/_build/doctrees/Grey_Scale.doctree b/docs/_build/doctrees/Grey_Scale.doctree new file mode 100644 index 0000000..253d554 Binary files /dev/null and b/docs/_build/doctrees/Grey_Scale.doctree differ diff --git a/docs/_build/doctrees/Grey_scale/flow_domain_geo_generation.doctree b/docs/_build/doctrees/Grey_scale/flow_domain_geo_generation.doctree new file mode 100644 index 0000000..7627483 Binary files /dev/null and b/docs/_build/doctrees/Grey_scale/flow_domain_geo_generation.doctree differ diff --git a/docs/_build/doctrees/Grey_scale/lbm_solver_3d_Macro_Sukop.doctree b/docs/_build/doctrees/Grey_scale/lbm_solver_3d_Macro_Sukop.doctree new file mode 100644 index 0000000..bdeee51 Binary files /dev/null and b/docs/_build/doctrees/Grey_scale/lbm_solver_3d_Macro_Sukop.doctree differ diff --git a/docs/_build/doctrees/LBM_3D_SinglePhase_Solver.doctree b/docs/_build/doctrees/LBM_3D_SinglePhase_Solver.doctree new file mode 100644 index 0000000..58cf520 Binary files /dev/null and b/docs/_build/doctrees/LBM_3D_SinglePhase_Solver.doctree differ diff --git a/docs/_build/doctrees/Phase_change.doctree b/docs/_build/doctrees/Phase_change.doctree new file mode 100644 index 0000000..2507573 Binary files /dev/null and b/docs/_build/doctrees/Phase_change.doctree differ diff --git a/docs/_build/doctrees/Single_phase.LBM_3D_SinglePhase_Solver.doctree b/docs/_build/doctrees/Single_phase.LBM_3D_SinglePhase_Solver.doctree new file mode 100644 index 0000000..dc586af Binary files /dev/null and b/docs/_build/doctrees/Single_phase.LBM_3D_SinglePhase_Solver.doctree differ diff --git a/docs/_build/doctrees/Single_phase.doctree b/docs/_build/doctrees/Single_phase.doctree new file mode 100644 index 0000000..2438f5b Binary files /dev/null and b/docs/_build/doctrees/Single_phase.doctree differ diff --git a/docs/_build/doctrees/Single_phase.example_cavity.doctree b/docs/_build/doctrees/Single_phase.example_cavity.doctree new file mode 100644 index 0000000..9d10204 Binary files /dev/null and b/docs/_build/doctrees/Single_phase.example_cavity.doctree differ diff --git a/docs/_build/doctrees/Single_phase.lbm_solver_3d.doctree b/docs/_build/doctrees/Single_phase.lbm_solver_3d.doctree new file mode 100644 index 0000000..96beb54 Binary files /dev/null and b/docs/_build/doctrees/Single_phase.lbm_solver_3d.doctree differ diff --git a/docs/_build/doctrees/Single_phase/Convert_stl_to_binary.doctree b/docs/_build/doctrees/Single_phase/Convert_stl_to_binary.doctree new file mode 100644 index 0000000..2d443f1 Binary files /dev/null and b/docs/_build/doctrees/Single_phase/Convert_stl_to_binary.doctree differ diff --git a/docs/_build/doctrees/Single_phase/LBM_3D_SinglePhase_Solver.doctree b/docs/_build/doctrees/Single_phase/LBM_3D_SinglePhase_Solver.doctree new file mode 100644 index 0000000..d900cda Binary files /dev/null and b/docs/_build/doctrees/Single_phase/LBM_3D_SinglePhase_Solver.doctree differ diff --git a/docs/_build/doctrees/Single_phase/example_cavity.doctree b/docs/_build/doctrees/Single_phase/example_cavity.doctree new file mode 100644 index 0000000..aa39d31 Binary files /dev/null and b/docs/_build/doctrees/Single_phase/example_cavity.doctree differ diff --git a/docs/_build/doctrees/Single_phase/example_porous_medium.doctree b/docs/_build/doctrees/Single_phase/example_porous_medium.doctree new file mode 100644 index 0000000..0765992 Binary files /dev/null and b/docs/_build/doctrees/Single_phase/example_porous_medium.doctree differ diff --git a/docs/_build/doctrees/Single_phase/flow_domain_geo_generation_2D.doctree b/docs/_build/doctrees/Single_phase/flow_domain_geo_generation_2D.doctree new file mode 100644 index 0000000..b0fc5c0 Binary files /dev/null and b/docs/_build/doctrees/Single_phase/flow_domain_geo_generation_2D.doctree differ diff --git a/docs/_build/doctrees/Single_phase/lbm_solver_3d.doctree b/docs/_build/doctrees/Single_phase/lbm_solver_3d.doctree new file mode 100644 index 0000000..b8de48a Binary files /dev/null and b/docs/_build/doctrees/Single_phase/lbm_solver_3d.doctree differ diff --git a/docs/_build/doctrees/Single_phase/lbm_solver_3d_cavity.doctree b/docs/_build/doctrees/Single_phase/lbm_solver_3d_cavity.doctree new file mode 100644 index 0000000..990b971 Binary files /dev/null and b/docs/_build/doctrees/Single_phase/lbm_solver_3d_cavity.doctree differ diff --git a/docs/_build/doctrees/Single_phase/lbm_solver_3d_sparse.doctree b/docs/_build/doctrees/Single_phase/lbm_solver_3d_sparse.doctree new file mode 100644 index 0000000..cf68e1d Binary files /dev/null and b/docs/_build/doctrees/Single_phase/lbm_solver_3d_sparse.doctree differ diff --git a/docs/_build/doctrees/aaa.doctree b/docs/_build/doctrees/aaa.doctree new file mode 100644 index 0000000..a3b0503 Binary files /dev/null and b/docs/_build/doctrees/aaa.doctree differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle new file mode 100644 index 0000000..bb9c474 Binary files /dev/null and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/example_cavity.doctree b/docs/_build/doctrees/example_cavity.doctree new file mode 100644 index 0000000..ff936c6 Binary files /dev/null and b/docs/_build/doctrees/example_cavity.doctree differ diff --git a/docs/_build/doctrees/example_porous_medium.doctree b/docs/_build/doctrees/example_porous_medium.doctree new file mode 100644 index 0000000..cfb9f11 Binary files /dev/null and b/docs/_build/doctrees/example_porous_medium.doctree differ diff --git a/docs/_build/doctrees/flow_domain_geo_generation_2D.doctree b/docs/_build/doctrees/flow_domain_geo_generation_2D.doctree new file mode 100644 index 0000000..78721f4 Binary files /dev/null and b/docs/_build/doctrees/flow_domain_geo_generation_2D.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree new file mode 100644 index 0000000..472c6d4 Binary files /dev/null and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/lbm_solver_3d.doctree b/docs/_build/doctrees/lbm_solver_3d.doctree new file mode 100644 index 0000000..8157569 Binary files /dev/null and b/docs/_build/doctrees/lbm_solver_3d.doctree differ diff --git a/docs/_build/doctrees/lbm_solver_3d_cavity.doctree b/docs/_build/doctrees/lbm_solver_3d_cavity.doctree new file mode 100644 index 0000000..c89cd6d Binary files /dev/null and b/docs/_build/doctrees/lbm_solver_3d_cavity.doctree differ diff --git a/docs/_build/doctrees/lbm_solver_3d_sparse.doctree b/docs/_build/doctrees/lbm_solver_3d_sparse.doctree new file mode 100644 index 0000000..b485205 Binary files /dev/null and b/docs/_build/doctrees/lbm_solver_3d_sparse.doctree differ diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/doctrees/modules.doctree new file mode 100644 index 0000000..447129a Binary files /dev/null and b/docs/_build/doctrees/modules.doctree differ diff --git a/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solute_Solver.doctree b/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solute_Solver.doctree new file mode 100644 index 0000000..014830f Binary files /dev/null and b/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solute_Solver.doctree differ diff --git a/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solver.doctree b/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solver.doctree new file mode 100644 index 0000000..144aa35 Binary files /dev/null and b/docs/_build/doctrees/phasechange/LBM_3D_SinglePhase_Solver.doctree differ diff --git a/docs/_build/doctrees/phasechange/example_cavity_melting.doctree b/docs/_build/doctrees/phasechange/example_cavity_melting.doctree new file mode 100644 index 0000000..e8a5e0f Binary files /dev/null and b/docs/_build/doctrees/phasechange/example_cavity_melting.doctree differ diff --git a/docs/_build/doctrees/phasechange/example_phase_change.doctree b/docs/_build/doctrees/phasechange/example_phase_change.doctree new file mode 100644 index 0000000..99e9cff Binary files /dev/null and b/docs/_build/doctrees/phasechange/example_phase_change.doctree differ diff --git a/docs/_build/doctrees/phasechange/read_img_solute_psi_generation_2D.doctree b/docs/_build/doctrees/phasechange/read_img_solute_psi_generation_2D.doctree new file mode 100644 index 0000000..b8ebb85 Binary files /dev/null and b/docs/_build/doctrees/phasechange/read_img_solute_psi_generation_2D.doctree differ diff --git a/docs/_build/doctrees/phasechange/solute_psi_generation_2D.doctree b/docs/_build/doctrees/phasechange/solute_psi_generation_2D.doctree new file mode 100644 index 0000000..df65393 Binary files /dev/null and b/docs/_build/doctrees/phasechange/solute_psi_generation_2D.doctree differ diff --git a/docs/_build/doctrees/phasechange/test1.doctree b/docs/_build/doctrees/phasechange/test1.doctree new file mode 100644 index 0000000..0a320f0 Binary files /dev/null and b/docs/_build/doctrees/phasechange/test1.doctree differ diff --git a/docs/_build/doctrees/twophase/lbm_solver_3d_2phase.doctree b/docs/_build/doctrees/twophase/lbm_solver_3d_2phase.doctree new file mode 100644 index 0000000..54c4c5a Binary files /dev/null and b/docs/_build/doctrees/twophase/lbm_solver_3d_2phase.doctree differ diff --git a/docs/_build/doctrees/twophase/lbm_solver_3d_2phase_sparse.doctree b/docs/_build/doctrees/twophase/lbm_solver_3d_2phase_sparse.doctree new file mode 100644 index 0000000..fd45e67 Binary files /dev/null and b/docs/_build/doctrees/twophase/lbm_solver_3d_2phase_sparse.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo new file mode 100644 index 0000000..79e3920 --- /dev/null +++ b/docs/_build/html/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 460f45d6faf9867abf533d23c6816ee9 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/.nojekyll b/docs/_build/html/.nojekyll new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/docs/_build/html/.nojekyll @@ -0,0 +1 @@ + diff --git a/docs/_build/html/2phase.html b/docs/_build/html/2phase.html new file mode 100644 index 0000000..6df4792 --- /dev/null +++ b/docs/_build/html/2phase.html @@ -0,0 +1,125 @@ + + + + + + + 2phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

2phase

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Convert_stl_to_binary.html b/docs/_build/html/Convert_stl_to_binary.html new file mode 100644 index 0000000..9a97016 --- /dev/null +++ b/docs/_build/html/Convert_stl_to_binary.html @@ -0,0 +1,126 @@ + + + + + + + Convert_stl_to_binary — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Convert_stl_to_binary

+

This file reads the stl file and output to vtk file

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Grey_Scale.html b/docs/_build/html/Grey_Scale.html new file mode 100644 index 0000000..5485831 --- /dev/null +++ b/docs/_build/html/Grey_Scale.html @@ -0,0 +1,125 @@ + + + + + + + Grey_Scale — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Grey_Scale

+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Grey_scale/flow_domain_geo_generation.html b/docs/_build/html/Grey_scale/flow_domain_geo_generation.html new file mode 100644 index 0000000..ea8bf17 --- /dev/null +++ b/docs/_build/html/Grey_scale/flow_domain_geo_generation.html @@ -0,0 +1,149 @@ + + + + + + + flow_domain_geo_generation — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation

+

This file output geometry data

+
#import numpy and math packahe
+import numpy as np
+import math
+
+
+# INPUT STL FILE NAME
+output_name = 'geo.dat'
+
+# POINT SEARCHING RESOLUTION IN X direction, Y,Z direction will be calculate by the code
+# the bigger value ~ more points will be found inside STL
+dnx, dny, dnz = 60, 60, 60
+
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+#create np matrix with dnx*dny*dnz zero
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#out_dat[1,:,:] = 1
+
+#=========================================================
+#reshape out_dat with column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+#save the file with the transfer of out_dat based on integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Grey_scale/lbm_solver_3d_Macro_Sukop.html b/docs/_build/html/Grey_scale/lbm_solver_3d_Macro_Sukop.html new file mode 100644 index 0000000..5668cf1 --- /dev/null +++ b/docs/_build/html/Grey_scale/lbm_solver_3d_Macro_Sukop.html @@ -0,0 +1,185 @@ + + + + + + + lbm_solver_3d_Macro_Sukop — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_Macro_Sukop

+

This solver is almost similar to lbm_solver_3d expect several difference as follows:

+
    +
  1. Some parameter is different

  2. +
+
#grid resolution
+nx,ny,nz = 60,50,5
+#external force
+fx,fy,fz = 1.0e-6,0.0,0.0
+#viscosity
+niu = 0.1
+#import geometry
+geo_name = './BC.dat'
+#maximum timestep
+max_timestep = 5000
+#output frequency
+output_fre = 100
+#vtk file output frequency
+vtk_fre = 500
+
+
+
    +
  1. There are two array for solid flag data.

  2. +
+
ns_np = init_geo(geo_name)
+solid_np = ns_np.astype(int)
+#solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+ns.from_numpy(ns_np)
+
+
+
    +
  1. The streaming function is different

  2. +
+
@ti.kernel
+def streaming0():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            for s in ti.static(range(19)):
+                ip = periodic_index(i+e[s])
+                #if it is fluid f2=f otherwise apply bounce-back f2[i,s]=f[ip,LR[s]]
+                f2[i,s] = f[i,s] + ns[i]*(f[ip,LR[s]] - f[i,s])
+
+
+@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            #if it is fluid apply streaming
+            for s in ti.static(range(19)):
+                ip = periodic_index(i+e[s])
+                F[ip,s] = f2[i,s]
+
+                #if (solid[ip]==0):
+                #    F[ip,s] = f[i,s]
+                #else:
+                #    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+#not used
+@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in ti.static(range(19)):
+            f[i,s] = F[i,s]
+
+
+

streaming3() calculates the macroscopic variable

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/LBM_3D_SinglePhase_Solver.html b/docs/_build/html/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..2a694db --- /dev/null +++ b/docs/_build/html/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,660 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Phase_change.html b/docs/_build/html/Phase_change.html new file mode 100644 index 0000000..3d736f6 --- /dev/null +++ b/docs/_build/html/Phase_change.html @@ -0,0 +1,135 @@ + + + + + + + Phase_change — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase.LBM_3D_SinglePhase_Solver.html b/docs/_build/html/Single_phase.LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..3ff0dd7 --- /dev/null +++ b/docs/_build/html/Single_phase.LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,644 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase.example_cavity.html b/docs/_build/html/Single_phase.example_cavity.html new file mode 100644 index 0000000..7668e20 --- /dev/null +++ b/docs/_build/html/Single_phase.example_cavity.html @@ -0,0 +1,119 @@ + + + + + + + Single_phase_example — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase_example

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase.html b/docs/_build/html/Single_phase.html new file mode 100644 index 0000000..21fdb62 --- /dev/null +++ b/docs/_build/html/Single_phase.html @@ -0,0 +1,137 @@ + + + + + + + Single_phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase.lbm_solver_3d.html b/docs/_build/html/Single_phase.lbm_solver_3d.html new file mode 100644 index 0000000..b6c4821 --- /dev/null +++ b/docs/_build/html/Single_phase.lbm_solver_3d.html @@ -0,0 +1,425 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

this

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

``

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

this

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        if (solid[i,j,k] == 0):
+            m_temp = multiply_M(i,j,k)
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

this

+
@ti.func
+def periodic_index(i):
+    iout = i
+    if i[0]<0:     iout[0] = nx-1
+    if i[0]>nx-1:  iout[0] = 0
+    if i[1]<0:     iout[1] = ny-1
+    if i[1]>ny-1:  iout[1] = 0
+    if i[2]<0:     iout[2] = nz-1
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

this

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        if (solid[i] == 0):
+            for s in range(19):
+                ip = periodic_index(i+e[s])
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

this

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

this

+
@ti.kernel
+def Boundary_condition():
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

this

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

this

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/Convert_stl_to_binary.html b/docs/_build/html/Single_phase/Convert_stl_to_binary.html new file mode 100644 index 0000000..a9d5677 --- /dev/null +++ b/docs/_build/html/Single_phase/Convert_stl_to_binary.html @@ -0,0 +1,126 @@ + + + + + + + Convert_stl_to_binary — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Convert_stl_to_binary

+

This file reads the stl file and output to vtk file

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/LBM_3D_SinglePhase_Solver.html b/docs/_build/html/Single_phase/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..37c70ec --- /dev/null +++ b/docs/_build/html/Single_phase/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,667 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/example_cavity.html b/docs/_build/html/Single_phase/example_cavity.html new file mode 100644 index 0000000..9d41d02 --- /dev/null +++ b/docs/_build/html/Single_phase/example_cavity.html @@ -0,0 +1,173 @@ + + + + + + + example_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity

+

This file use the LBM_3D_SinglePhase_Solver to simulate the cavity flow

+
#import certain packages
+import time
+import taichi as ti
+
+ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#set 50*50*50 cavity based on LB3D_Solver_Single_Phase solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=50,ny=50,nz=50, sparse_storage=False)
+
+#import geometry data
+lb3d.init_geo('./geo_cavity.dat')
+#set the x-right velocity
+lb3d.set_bc_vel_x1([0.0,0.0,0.1])
+#initialize
+lb3d.init_simulation()
+
+#simulation step
+for iter in range(2000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #get the maximum velocity
+        max_v = lb3d.get_max_v()
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the number of time steps, maxiumum force and the force scale=0
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, max_v,  0.0))
+        #every 1000 time steps export the vtk file
+        if (iter%1000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/example_porous_medium.html b/docs/_build/html/Single_phase/example_porous_medium.html new file mode 100644 index 0000000..2d11834 --- /dev/null +++ b/docs/_build/html/Single_phase/example_porous_medium.html @@ -0,0 +1,170 @@ + + + + + + + example_porous_medium — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_porous_medium

+

This file simulate the porous medium based on the LBM_3D_SinglePhase_Solver

+
#import time and taichi package
+import time
+import taichi as ti
+#taichi intialization
+ti.init(arch=ti.cpu)
+#import the LBM_3D_SinglePhase_Solver
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#create the 131*131*131 gird LBM_3D_SinglePhase_Solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=131,ny=131,nz=131)
+#import the porous medium geometry
+lb3d.init_geo('./img_ftb131.txt')
+#set x-left and x-right density
+lb3d.set_bc_rho_x1(0.99)
+lb3d.set_bc_rho_x0(1.0)
+#initialize the simulation
+lb3d.init_simulation()
+#simulation loop
+for iter in range(50000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the time step, max force=10, force_scale=10
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+        #export VTK every 2000 time step
+        if (iter%2000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/flow_domain_geo_generation_2D.html b/docs/_build/html/Single_phase/flow_domain_geo_generation_2D.html new file mode 100644 index 0000000..5ed62c6 --- /dev/null +++ b/docs/_build/html/Single_phase/flow_domain_geo_generation_2D.html @@ -0,0 +1,163 @@ + + + + + + + flow_domain_geo_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation_2D

+

This file generate geometry file for solver to read

+
#import certain module
+import numpy as np
+import math
+
+
+#define the input file name
+# INPUT STL FILE NAME
+output_name = 'geo_cavity.dat'
+
+#define the grid resolution
+dnx, dny, dnz = 50, 50, 50
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+
+#define an matrix dnx*dny*dnz with zero values
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#define the boundary to be solid
+out_dat[0,:,:] = 1
+#cout_dat[:,:,0] = 1
+out_dat[:,0,:] = 1
+out_dat[:,-1,:] = 1
+out_dat[:,:,0] = 1
+out_dat[:,:,-1] = 1
+
+#=========================================================
+#reshape the data to be column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+
+
+#output the transfer of out_dat to the file with integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/lbm_solver_3d.html b/docs/_build/html/Single_phase/lbm_solver_3d.html new file mode 100644 index 0000000..9007848 --- /dev/null +++ b/docs/_build/html/Single_phase/lbm_solver_3d.html @@ -0,0 +1,536 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s Force scheme

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+    #calculate Guo's force here
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) calculate equilibrium density distribution function in momentum space

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

collison() define the prcoess of collision

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is fluid
+        if (solid[i,j,k] == 0):
+            #calculate m
+            m_temp = multiply_M(i,j,k)
+            #calculate meq
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                #calculate -s*(m-meq)
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #add Guo's force
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    #f=-M^-1*S(m-meq)
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

periodic_index(i) set the bounary index with periodic bounary condition

+
@ti.func
+def periodic_index(i):
+    #inner index
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = nx-1
+    #x-right
+    if i[0]>nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = ny-1
+    #y-right
+    if i[1]>ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = nz-1
+    #z-right
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming process of denisty distibution function

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        #if it is fluid
+        if (solid[i] == 0):
+            for s in range(19):
+                #the neighbour index
+                ip = periodic_index(i+e[s])
+                #if neighbour index is fluid just streaming
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                #if neighbour index is solid just bounce back
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

streaming2() a simple streaming process without consideration of solid and boundary

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

Boudary_condition() define the bounary condition of fixed pressure and fixed velocity

+
@ti.kernel
+def Boundary_condition():
+    #pressure-boundary condtion x-left
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #if boundary is fluid but the neighbour is solid
+                #equilibrium density distribution function is calculated based on the neighbour velocity
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                #if boundary is fluid and the neighbour is also fluid
+                #equilibrium density distribution function is calculated based on the boundary velocity
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    #velocity-boundary conditon x-left
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #calculate density distribution fucntion based on equilibrium part and non-equilibrium part
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    #pressure boundary condition x-right similar to x-left
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    #velocity booundary condition x-right similar to x-left
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

streaming3() calculate the macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        #if it is fluid calculate density and velocity based on density distribution function
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+        # if it is solid set denisty equals one and velocity equals zero
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

At the end of the file do the actual simulation and export the data

+
#define some time varible
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+#import the solid flag data
+#solid_np = init_geo('./BC.dat')
+solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+
+# do the initialization
+static_init()
+init()
+
+# do the actual simulation
+for iter in range(50000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    # calculate every 1000 time step
+    if (iter%1000==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        #calculate the time difference between now and previous time step
+        diff_time = int(time_now-time_pre)
+        #calculate the time difference between now and the initial time
+        elap_time = int(time_now-time_init)
+        #divmod function return the quotient and the remainder
+        #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2]))
+                            }
+            )
+# ti.sync()
+# ti.profiler.print_kernel_profiler_info()
+#print the profiler information of every kernel and task of taichi in this file
+ti.profiler.print_scoped_profiler_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/lbm_solver_3d_cavity.html b/docs/_build/html/Single_phase/lbm_solver_3d_cavity.html new file mode 100644 index 0000000..f851f46 --- /dev/null +++ b/docs/_build/html/Single_phase/lbm_solver_3d_cavity.html @@ -0,0 +1,155 @@ + + + + + + + lbm_solver_3d_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_cavity

+

This solver is almost similar to lbm_solver_3d expect several difference as follows:

+
    +
  1. The Grid resolution in this solver is 50x50x50

  2. +
  3. The viscosity in this solver is 0.16667

  4. +
  5. The boundary condition in this solver is velocity solver on x-right as follows

  6. +
+

boundary condition of this solver

+
#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+
+

x-right is implementated with velocity boundary condition

+

4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary.

+
if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left))
+
+
+
    +
  1. Finally, the definition of the varible is slightly different from lbm_solver_3d

  2. +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/Single_phase/lbm_solver_3d_sparse.html b/docs/_build/html/Single_phase/lbm_solver_3d_sparse.html new file mode 100644 index 0000000..9064c37 --- /dev/null +++ b/docs/_build/html/Single_phase/lbm_solver_3d_sparse.html @@ -0,0 +1,143 @@ + + + + + + + lbm_solver_3d_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_sparse

+

This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible:

+
f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse.

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_sources/2phase.rst.txt b/docs/_build/html/_sources/2phase.rst.txt new file mode 100644 index 0000000..d0d402f --- /dev/null +++ b/docs/_build/html/_sources/2phase.rst.txt @@ -0,0 +1,11 @@ +2phase +============== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + twophase/lbm_solver_3d_2phase_sparse + twophase/lbm_solver_3d_2phase + + diff --git a/docs/_build/html/_sources/Convert_stl_to_binary.rst.txt b/docs/_build/html/_sources/Convert_stl_to_binary.rst.txt new file mode 100644 index 0000000..edf04e6 --- /dev/null +++ b/docs/_build/html/_sources/Convert_stl_to_binary.rst.txt @@ -0,0 +1,4 @@ +Convert_stl_to_binary +================================= + +This file reads the stl file and output to vtk file \ No newline at end of file diff --git a/docs/_build/html/_sources/Grey_Scale.rst.txt b/docs/_build/html/_sources/Grey_Scale.rst.txt new file mode 100644 index 0000000..ef21d69 --- /dev/null +++ b/docs/_build/html/_sources/Grey_Scale.rst.txt @@ -0,0 +1,10 @@ +Grey\_Scale +=================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Grey_scale/flow_domain_geo_generation + Grey_scale/lbm_solver_3d_Macro_Sukop + diff --git a/docs/_build/html/_sources/Grey_scale/flow_domain_geo_generation.rst.txt b/docs/_build/html/_sources/Grey_scale/flow_domain_geo_generation.rst.txt new file mode 100644 index 0000000..bf4c4a7 --- /dev/null +++ b/docs/_build/html/_sources/Grey_scale/flow_domain_geo_generation.rst.txt @@ -0,0 +1,34 @@ +flow_domain_geo_generation +================================= + +This file output geometry data + +.. code-block:: python + + #import numpy and math packahe + import numpy as np + import math + + + # INPUT STL FILE NAME + output_name = 'geo.dat' + + # POINT SEARCHING RESOLUTION IN X direction, Y,Z direction will be calculate by the code + # the bigger value ~ more points will be found inside STL + dnx, dny, dnz = 60, 60, 60 + + + #========================================================== + # DO NOT CHANGE BELOW + #========================================================== + #create np matrix with dnx*dny*dnz zero + out_dat = np.zeros((dnx,dny,dnz)) + + #=======Can define some geometry here to out_dat========= + #out_dat[1,:,:] = 1 + + #========================================================= + #reshape out_dat with column major + out_dat = out_dat.reshape(out_dat.size, order = 'F') + #save the file with the transfer of out_dat based on integer type + np.savetxt(output_name,out_dat.T,fmt='%d') \ No newline at end of file diff --git a/docs/_build/html/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt b/docs/_build/html/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt new file mode 100644 index 0000000..26eb0cc --- /dev/null +++ b/docs/_build/html/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt @@ -0,0 +1,70 @@ +lbm_solver_3d_Macro_Sukop +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. Some parameter is different + +.. code-block:: python + + #grid resolution + nx,ny,nz = 60,50,5 + #external force + fx,fy,fz = 1.0e-6,0.0,0.0 + #viscosity + niu = 0.1 + #import geometry + geo_name = './BC.dat' + #maximum timestep + max_timestep = 5000 + #output frequency + output_fre = 100 + #vtk file output frequency + vtk_fre = 500 + +2. There are two array for solid flag data. + +.. code-block:: python + + ns_np = init_geo(geo_name) + solid_np = ns_np.astype(int) + #solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + ns.from_numpy(ns_np) + +3. The streaming function is different + +.. code-block:: python + + @ti.kernel + def streaming0(): + for i in ti.grouped(rho): + if (solid[i] == 0): + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + #if it is fluid f2=f otherwise apply bounce-back f2[i,s]=f[ip,LR[s]] + f2[i,s] = f[i,s] + ns[i]*(f[ip,LR[s]] - f[i,s]) + + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + if (solid[i] == 0): + #if it is fluid apply streaming + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + F[ip,s] = f2[i,s] + + #if (solid[ip]==0): + # F[ip,s] = f[i,s] + #else: + # F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + #not used + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in ti.static(range(19)): + f[i,s] = F[i,s] + +``streaming3()`` calculates the macroscopic variable \ No newline at end of file diff --git a/docs/_build/html/_sources/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_build/html/_sources/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_build/html/_sources/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.x0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + if i[1]<0: iout[1] = ny-1 + if i[1]>ny-1: iout[1] = 0 + if i[2]<0: iout[2] = nz-1 + if i[2]>nz-1: iout[2] = 0 + + return iout + +this + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + if (solid[i] == 0): + for s in range(19): + ip = periodic_index(i+e[s]) + if (solid[ip]==0): + F[ip,s] = f[i,s] + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +this + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +this + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + +this + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +this \ No newline at end of file diff --git a/docs/_build/html/_sources/Single_phase.rst.txt b/docs/_build/html/_sources/Single_phase.rst.txt new file mode 100644 index 0000000..d66928e --- /dev/null +++ b/docs/_build/html/_sources/Single_phase.rst.txt @@ -0,0 +1,20 @@ +Single\_phase +===================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Single_phase/LBM_3D_SinglePhase_Solver + Single_phase/lbm_solver_3d + Single_phase/lbm_solver_3d_cavity + Single_phase/lbm_solver_3d_sparse + Single_phase/flow_domain_geo_generation_2D + Single_phase/example_cavity + Single_phase/example_porous_medium + Single_phase/Convert_stl_to_binary + + + + + diff --git a/docs/_build/html/_sources/Single_phase/Convert_stl_to_binary.rst.txt b/docs/_build/html/_sources/Single_phase/Convert_stl_to_binary.rst.txt new file mode 100644 index 0000000..edf04e6 --- /dev/null +++ b/docs/_build/html/_sources/Single_phase/Convert_stl_to_binary.rst.txt @@ -0,0 +1,4 @@ +Convert_stl_to_binary +================================= + +This file reads the stl file and output to vtk file \ No newline at end of file diff --git a/docs/_build/html/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_build/html/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_build/html/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = ny-1 + #y-right + if i[1]>ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = nz-1 + #z-right + if i[2]>nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming process of denisty distibution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + #if it is fluid + if (solid[i] == 0): + for s in range(19): + #the neighbour index + ip = periodic_index(i+e[s]) + #if neighbour index is fluid just streaming + if (solid[ip]==0): + F[ip,s] = f[i,s] + #if neighbour index is solid just bounce back + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +``streaming2()`` a simple streaming process without consideration of solid and boundary + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +``Boudary_condition()`` define the bounary condition of fixed pressure and fixed velocity + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + #pressure-boundary condtion x-left + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #if boundary is fluid but the neighbour is solid + #equilibrium density distribution function is calculated based on the neighbour velocity + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + #if boundary is fluid and the neighbour is also fluid + #equilibrium density distribution function is calculated based on the boundary velocity + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + #velocity-boundary conditon x-left + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #calculate density distribution fucntion based on equilibrium part and non-equilibrium part + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + #pressure boundary condition x-right similar to x-left + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + #velocity booundary condition x-right similar to x-left + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + + +``streaming3()`` calculate the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + #if it is fluid calculate density and velocity based on density distribution function + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + # if it is solid set denisty equals one and velocity equals zero + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +At the end of the file do the actual simulation and export the data + +.. code-block:: python + + #define some time varible + time_init = time.time() + time_now = time.time() + time_pre = time.time() + dt_count = 0 + + #import the solid flag data + #solid_np = init_geo('./BC.dat') + solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + + # do the initialization + static_init() + init() + + # do the actual simulation + for iter in range(50000+1): + colission() + streaming1() + Boundary_condition() + #streaming2() + streaming3() + # calculate every 1000 time step + if (iter%1000==0): + + time_pre = time_now + time_now = time.time() + #calculate the time difference between now and previous time step + diff_time = int(time_now-time_pre) + #calculate the time difference between now and the initial time + elap_time = int(time_now-time_init) + #divmod function return the quotient and the remainder + #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + + #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable + if (iter%10000==0): + gridToVTK( + "./structured"+str(iter), + x, + y, + z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()), + "rho": np.ascontiguousarray(rho.to_numpy()), + "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2])) + } + ) + # ti.sync() + # ti.profiler.print_kernel_profiler_info() + #print the profiler information of every kernel and task of taichi in this file + ti.profiler.print_scoped_profiler_info() diff --git a/docs/_build/html/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt b/docs/_build/html/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt new file mode 100644 index 0000000..08d16d9 --- /dev/null +++ b/docs/_build/html/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt @@ -0,0 +1,37 @@ +lbm_solver_3d_cavity +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. The Grid resolution in this solver is 50x50x50 +2. The viscosity in this solver is 0.16667 +3. The boundary condition in this solver is velocity solver on x-right as follows + +boundary condition of this solver + +.. code-block:: python + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + +x-right is implementated with velocity boundary condition + +4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary. + +.. code-block:: python + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left)) + + +5. Finally, the definition of the varible is slightly different from lbm_solver_3d \ No newline at end of file diff --git a/docs/_build/html/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt b/docs/_build/html/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt new file mode 100644 index 0000000..d76a344 --- /dev/null +++ b/docs/_build/html/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt @@ -0,0 +1,24 @@ +lbm_solver_3d_sparse +================================= + + +This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible: + +.. code-block:: python + + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse. \ No newline at end of file diff --git a/docs/_build/html/_sources/aaa.rst.txt b/docs/_build/html/_sources/aaa.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_build/html/_sources/aaa.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = ny-1 + #y-right + if i[1]>ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = nz-1 + #z-right + if i[2]>nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming process of denisty distibution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + #if it is fluid + if (solid[i] == 0): + for s in range(19): + #the neighbour index + ip = periodic_index(i+e[s]) + #if neighbour index is fluid just streaming + if (solid[ip]==0): + F[ip,s] = f[i,s] + #if neighbour index is solid just bounce back + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +``streaming2()`` a simple streaming process without consideration of solid and boundary + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +``Boudary_condition()`` define the bounary condition of fixed pressure and fixed velocity + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + #pressure-boundary condtion x-left + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #if boundary is fluid but the neighbour is solid + #equilibrium density distribution function is calculated based on the neighbour velocity + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + #if boundary is fluid and the neighbour is also fluid + #equilibrium density distribution function is calculated based on the boundary velocity + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + #velocity-boundary conditon x-left + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #calculate density distribution fucntion based on equilibrium part and non-equilibrium part + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + #pressure boundary condition x-right similar to x-left + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + #velocity booundary condition x-right similar to x-left + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + + +``streaming3()`` calculate the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + #if it is fluid calculate density and velocity based on density distribution function + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + # if it is solid set denisty equals one and velocity equals zero + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +At the end of the file do the actual simulation and export the data + +.. code-block:: python + + #define some time varible + time_init = time.time() + time_now = time.time() + time_pre = time.time() + dt_count = 0 + + #import the solid flag data + #solid_np = init_geo('./BC.dat') + solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + + # do the initialization + static_init() + init() + + # do the actual simulation + for iter in range(50000+1): + colission() + streaming1() + Boundary_condition() + #streaming2() + streaming3() + # calculate every 1000 time step + if (iter%1000==0): + + time_pre = time_now + time_now = time.time() + #calculate the time difference between now and previous time step + diff_time = int(time_now-time_pre) + #calculate the time difference between now and the initial time + elap_time = int(time_now-time_init) + #divmod function return the quotient and the remainder + #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + + #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable + if (iter%10000==0): + gridToVTK( + "./structured"+str(iter), + x, + y, + z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()), + "rho": np.ascontiguousarray(rho.to_numpy()), + "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2])) + } + ) + # ti.sync() + # ti.profiler.print_kernel_profiler_info() + #print the profiler information of every kernel and task of taichi in this file + ti.profiler.print_scoped_profiler_info() diff --git a/docs/_build/html/_sources/lbm_solver_3d_cavity.rst.txt b/docs/_build/html/_sources/lbm_solver_3d_cavity.rst.txt new file mode 100644 index 0000000..a1861dc --- /dev/null +++ b/docs/_build/html/_sources/lbm_solver_3d_cavity.rst.txt @@ -0,0 +1,38 @@ +lbm_solver_3d_cavity +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: +.. number:: lbm_solver_3d_cavity + +1. The Grid resolution in this solver is 50x50x50 +2. The viscosity in this solver is 0.16667 +3. The boundary condition in this solver is velocity solver on x-right as follows + +boundary condition of this solver + +.. code-block:: python + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + +x-right is implementated with velocity boundary condition + +4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary. + +.. code-block:: python + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left)) + + +5. Finally, the definition of the varible is slightly different from lbm_solver_3d \ No newline at end of file diff --git a/docs/_build/html/_sources/lbm_solver_3d_sparse.rst.txt b/docs/_build/html/_sources/lbm_solver_3d_sparse.rst.txt new file mode 100644 index 0000000..d76a344 --- /dev/null +++ b/docs/_build/html/_sources/lbm_solver_3d_sparse.rst.txt @@ -0,0 +1,24 @@ +lbm_solver_3d_sparse +================================= + + +This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible: + +.. code-block:: python + + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse. \ No newline at end of file diff --git a/docs/_build/html/_sources/modules.rst.txt b/docs/_build/html/_sources/modules.rst.txt new file mode 100644 index 0000000..b9bfd06 --- /dev/null +++ b/docs/_build/html/_sources/modules.rst.txt @@ -0,0 +1,10 @@ +taichi_LBM3D +============ + +.. toctree:: + :maxdepth: 4 + + Single_phase + Grey_Scale + 2phase + Phase_change diff --git a/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt b/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt new file mode 100644 index 0000000..04dbf54 --- /dev/null +++ b/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt @@ -0,0 +1,619 @@ +LBM_3D_SinglePhase_Solute_Solver +====================================== + +This file is the solver for solute transportation + +First import the certain package and define the class of ``LB3D_Solver_Single_Phase_Solute`` which inheritant from +``LB3D_Solver_Single_Phase_Solute`` + +.. code-block:: python + + from sympy import inverse_mellin_transform + import taichi as ti + import numpy as np + from pyevtk.hl import gridToVTK + import time + + #ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False) + import LBM_3D_SinglePhase_Solver as lb3d + + @ti.data_oriented + class LB3D_Solver_Single_Phase_Solute(lb3d.LB3D_Solver_Single_Phase): + def __init__(self, nx, ny, nz): + super(LB3D_Solver_Single_Phase_Solute, self).__init__(nx, ny, nz, sparse_storage = False) + #define solute boundary condition + self.solute_bc_x_left, self.solute_bcxl = 0, 0.0 + self.solute_bc_x_right, self.solute_bcxr = 0, 0.0 + self.solute_bc_y_left, self.solute_bcyl = 0, 0.0 + self.solute_bc_y_right, self.solute_bcyr = 0, 0.0 + self.solute_bc_z_left, self.solute_bczl = 0, 0.0 + self.solute_bc_z_right, self.solute_bczr = 0, 0.0 + + #define parameters for bouyancy force + self.buoyancy_parameter = 20.0 #Buoyancy Parameter (0= no buoyancy) + self.ref_T = 20.0 #reference_psi F=/rho*g+Bouyancy*(/psi-reference_psi)*g) + #define gravity + self.gravity = 5e-7 + + #define concentration distribution function + self.fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define another concentration distribution function + self.Fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define external force + self.forcexyz = ti.Vector.field(3,ti.f32,shape=(nx,ny,nz)) + #define entropy + self.rho_H = ti.field(ti.f32, shape=(nx,ny,nz)) + #define temperature + self.rho_T = ti.field(ti.f32, shape=(nx,ny,nz)) + #define liquid volumn fraction + self.rho_fl = ti.field(ti.f32, shape=(nx,ny,nz)) + + #define specific heat of liquid + self.Cp_l= 1.0 + #define specific heat of solid + self.Cp_s = 1.0 + #define latent heat + self.Lt = 1.0 + #define solid temperature + self.T_s = -10.0 + #define liquid temperature + self.T_l = -10.0 + #define viscosity of solid + self.niu_s = 0.002 + #define viscosity of liquid + self.niu_l = 0.002 + + #define energy of solid + self.H_s = None + #define energy of liquid + self.H_l = None + + #define rock thermal diffusivity + self.niu_solid = 0.001 + #define specific heat of rock + self.Cp_solid = 1.0 + +An then it sets these parameters with functions + +.. code-block:: python + + #set gravity + def set_gravity(self, gravity): + self.gravity = gravity + #set buoyancy force parameter + def set_buoyancy_parameter(self, buoyancy_param): + self.buoyancy_parameter = buoyancy_param + #set reference temperature + def set_ref_T(self, ref_t): + self.ref_T = ref_t + #set specific heat of solid + def set_specific_heat_solid(self, cps): + self.Cp_s = cps + #set specfic heat of liquid + def set_specific_heat_liquid(self, cpl): + self.Cp_l = cpl + #set specfic heat of rock + def set_specific_heat_rock(self, cprock): + self.Cp_solid = cprock + #set latent heat + def set_latent_heat(self, ltheat): + self.Lt = ltheat + #set solidus temperature + def set_solidus_temperature(self, ts): + self.T_s = ts + #set liquidus temperature + def set_liquidus_temperature(self, tl): + self.T_l = tl + #set solid thermal diffusivity + def set_solid_thermal_diffusivity(self, nius): + self.niu_s = nius + #set liquid thermal diffusivity + def set_liquid_thermal_diffusivity(self, niul): + self.niu_l = niul + #set rock thermal diffusivity + def set_rock_thermal_diffusivity(self, niurock): + self.niu_solid = niurock + #set adiabatic boundary on x-left + def set_bc_adiabatic_x_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_left = 2 + #set adiabatic boundary on x-right + def set_bc_adiabatic_x_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_right = 2 + #set adiabatic boundary on y-left + def set_bc_adiabatic_y_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_left = 2 + #set adiabatic boundary on y-right + def set_bc_adiabatic_y_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_right = 2 + #set adiabatic boundary on z-left + def set_bc_adiabatic_z_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_left = 2 + #set adiabatic boundary on z-right + def set_bc_adiabatic_z_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_right = 2 + #set constant temperature on x-left + def set_bc_constant_temperature_x_left(self,xl): + self.solute_bc_x_left = 1 + self.solute_bcxl = xl + #set constant temperature on x-right + def set_bc_constant_temperature_x_right(self,xr): + self.solute_bc_x_right = 1 + self.solute_bcxr = xr + #set constant temperature on y-left + def set_bc_constant_temperature_y_left(self,yl): + self.solute_bc_y_left = 1 + self.solute_bcyl = yl + #set constant temperature on y-right + def set_bc_constant_temperature_y_right(self,yr): + self.solute_bc_y_right = 1 + self.solute_bcyr = yr + #set constant temperature on z-left + def set_bc_constant_temperature_z_left(self,zl): + self.solute_bc_z_left = 1 + self.solute_bczl = zl + #set constant temperature on z-right + def set_bc_constant_temperature_z_right(self,zr): + self.solute_bc_y_right = 1 + self.solute_bczr = zr + + # update energy of solid and liquid + def update_H_sl(self): + #energy of solid + self.H_s = self.Cp_s*self.T_s + #energy of liquid + self.H_l = self.H_s+self.Lt + print('H_s',self.H_s) + print('H_l',self.H_l) + +Then it initialize some variable or function + +.. code-block:: python + + #intialize the energy + @ti.kernel + def init_H(self): + for I in ti.grouped(self.rho_T): + #calculate the energy, convert_T_H() define later + self.rho_H[I] = self.convert_T_H(self.rho_T[I]) + + #intialize the density distribiution function for solute concentration + @ti.kernel + def init_fg(self): + for I in ti.grouped(self.fg): + #calculate the overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + #intialize the density distribiution function for solute concentration equals equilibrium density distribiution function for solute concentration + for s in ti.static(range(19)): + self.fg[I][s] = self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]) + self.Fg[I][s] = self.fg[I][s] + + #intialize the volumn fraction of liquid + @ti.kernel + def init_fl(self): + for I in ti.grouped(self.rho_T): + #convert_T_fl define later + self.rho_fl[I] = self.convert_T_fl(self.rho_T[I]) + +``g_feq(self, k,local_T,local_H, Cp, u)`` calculate the equilibrium density distribiution function for thermal energy + +.. code-block:: python + + @ti.func + def g_feq(self, k,local_T,local_H, Cp, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + feqout = 0.0 + #calculating the zero-velocity equilibrium thermal distribution function + if (k==0): + feqout = local_H-Cp*local_T+self.w[k]*Cp*local_T*(1-1.5*uv) + else: + #calculating other directions equilibrium thermal distribution function + feqout = self.w[k]*Cp*local_T*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, self.w[k], feqout, Cp, local_T) + return feqout + +``cal_local_force(i, j, k)`` calculates buoyancy force + +.. code-block:: python + + #density is the function of temperture delat(rho)=-rho*beta*delta(T) + @ti.func + def cal_local_force(self, i, j, k): + f = ti.Vector([self.fx, self.fy, self.fz]) + f[1] += self.gravity*self.buoyancy_parameter*(self.rho_T[i,j,k]-self.ref_T) + #f= delta(rho)*delta(v)*g + f *= self.rho_fl[i,j,k] + return f + +``collision_g()`` defines the the collision of thermal distribution function + +.. code-block:: python + + @ti.kernel + def colission_g(self): + for I in ti.grouped(self.rho_T): + #overall relaxation time + tau_s = 3*(self.niu_s*(1.0-self.rho_fl[I])+self.niu_l*self.rho_fl[I])+0.5 + #overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + + #ROCK overall relaxation time and specific heat + if (self.solid[I] >0): + tau_s = 3.0*self.niu_solid+0.5 + Cp = self.Cp_solid + + #f=f-1/tau*(f-feq) + for s in ti.static(range(19)): + tmp_fg = -1.0/tau_s*(self.fg[I][s]-self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + #print(self.fg[I][s],tmp_fg,I,s,self.rho_H[I],self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + self.fg[I][s] += tmp_fg + +``collision()`` defines the the collision of density distribution function + +.. code-block:: python + + @ti.kernel + def colission(self): + for i,j,k in self.rho: + #if (self.solid[i,j,k] == 0): + m_temp = self.M[None]@self.F[i,j,k] + meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k]) + m_temp -= self.S_dig[None]*(m_temp-meq) + f = self.cal_local_force(i,j,k) + if (ti.static(self.force_flag==1)): + for s in ti.static(range(19)): + # m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s]) + #f = self.cal_local_force() + f_guo=0.0 + for l in ti.static(range(19)): + f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l] + #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force) + m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo + + self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + #calculate the denisty distribution function in momentum space here + self.f[i,j,k] += self.inv_M[None]@m_temp + #calculate the fluid density distribution function here + for s in ti.static(range(19)): + self.f[i,j,k][s] = self.f[i,j,k][s]*(self.rho_fl[i,j,k]) + self.w[s]*(1.0-self.rho_fl[i,j,k]) + +``streaming1()`` and ``streaming1_g()`` defines the fluid denisty distribiution function and +thermal density distribiution function + +.. code-block:: python + + @ti.kernel + def streaming1(self): + for i in ti.grouped(self.rho): + #if (self.solid[i] == 0): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.F[ip][s] = self.f[i][s] + + @ti.kernel + def streaming1_g(self): + for i in ti.grouped(self.rho_T): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.Fg[ip][s] = self.fg[i][s] + +this + +.. code-block:: python + + @ti.kernel + def BC_concentration(self): + #constant temperature boundary condition + if ti.static(self.solute_bc_x_left==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[0,j,k]*self.Cp_l + (1-self.rho_fl[0,j,k])*self.Cp_s + #the boundary's thermal distribution function equals the equilibrium thermal distribution function on the boundary + for s in ti.static(range(19)): + self.fg[0,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[0,j,k]) + self.Fg[0,j,k][s] = self.fg[0,j,k][s] + #adiabatic boundary condition + elif ti.static(self.solute_bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + #there is no thermal transfer between the boundaty and neighbouring cell + self.fg[0,j,k][s] = self.fg[1,j,k][s] + self.Fg[0,j,k][s] = self.fg[1,j,k][s] + + #x-right + if ti.static(self.solute_bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[self.nx-1,j,k]*self.Cp_l + (1-self.rho_fl[self.nx-1,j,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[self.nx-1,j,k]) + self.Fg[self.nx-1,j,k][s]= self.fg[self.nx-1,j,k][s] + elif ti.static(self.solute_bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + self.Fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + + #y-left + if ti.static(self.solute_bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,0,k]*self.Cp_l + (1-self.rho_fl[i,0,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,0,k]) + self.Fg[i,0,k][s] = self.fg[i,0,k][s] + elif ti.static(self.solute_bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.fg[i,1,k][s] + self.Fg[i,0,k][s] = self.fg[i,1,k][s] + + #y-right + if ti.static(self.solute_bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,self.ny-1,k]*self.Cp_l + (1-self.rho_fl[i,self.ny-1,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,self.ny-1,k]) + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-1,k][s] + elif ti.static(self.solute_bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + + #z-left + if ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,0]*self.Cp_l + (1-self.rho_fl[i,j,0])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,0]) + self.Fg[i,j,0][s] = self.fg[i,j,0][s] + elif ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.fg[i,j,1][s] + self.Fg[i,j,0][s] = self.fg[i,j,1][s] + + #z-right + if ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,self.nz-1]*self.Cp_l + (1-self.rho_fl[i,j,self.nz-1])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,self.nz-1]) + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-1][s] + elif ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + +``convert_H_T()`` calculate the temperature + +.. code-block:: python + + @ti.func + def convert_H_T(self,local_H): + new_T=0.0 + #if local enthalpy is less than solid enthalpy + #T= enthalpy/specific heat + if (local_Hself.H_l): + new_T = self.T_l+(local_H-self.H_l)/self.Cp_l + #if if temperature is greater than solid temperature + #T= Tsolid+(enthalpy-solid enthalpy)/(enthalpy of liquid-enthalpy of solid)*(temperature of liquid- temperature of solid) + elif (self.T_l>self.T_s): + new_T = self.T_s+(local_H-self.H_s)/(self.H_l-self.H_s)*(self.T_l-self.T_s) + else: + #else T= temperature of solid + new_T = self.T_s + + return new_T + +``convert_H_fl()`` calculate the volumn fraction of liquid + +.. code-block:: python + + @ti.func + def convert_H_fl(self,local_H): + new_fl=0.0 + #if enthalpy is less than solid enthalpy + #it is zero + if (local_Hself.H_l): + new_fl = 1.0 + #else + #it equals to (enthaply- soid enthaply)/(enthaply of liquid- enthalpy of solid) + else: + new_fl = (local_H-self.H_s)/(self.H_l-self.H_s) + + return new_fl + +``convert_T_H()`` calculate the enthaply from temperature + +.. code-block:: python + + @ti.func + def convert_T_H(self,local_T): + new_H = 0.0 + # calculate enthaply for three different conditions + if (local_T<=self.T_s): + new_H = self.Cp_s*local_T + elif (local_T>self.T_l): + new_H = (local_T-self.T_l)*self.Cp_l+self.H_l + else: + fluid_frc = (local_T-self.T_s)/(self.T_l-self.T_s) + new_H = self.H_s*(1-fluid_frc) + self.H_l*fluid_frc + return new_H + +``convert_T_fl()`` calculate volumn fraction from temperature + +.. code-block:: python + + @ti.func + def convert_T_fl(self,local_T): + new_fl = 0.0 + # calculate volumn fraction for three different conditions + if (local_T<=self.T_s): + new_fl = 0.0 + elif (local_T>=self.T_l): + new_fl = 1.0 + elif (self.T_l>self.T_s): + new_fl = (local_T-self.T_s)/(self.T_l-self.T_s) + else: + new_fl = 1.0 + + return new_fl + +``streaming3()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + self.forcexyz[i] = self.cal_local_force(i.x, i.y, i.z) + #print(i.x, i.y, i.z) + if ((self.solid[i]==0) or (self.rho_fl[i]>0.0)): + self.rho[i] = 0 + self.v[i] = ti.Vector([0,0,0]) + self.f[i] = self.F[i] + for s in ti.static(range(19)): + self.f[i][s] = self.f[i][s]*self.rho_fl[i]+self.w[s]*(1.0-self.rho_fl[i]) + #density for fluid + self.rho[i] += self.f[i].sum() + + for s in ti.static(range(19)): + self.v[i] += self.e_f[s]*self.f[i][s] + + f = self.cal_local_force(i.x, i.y, i.z) + #velocity for fluid + self.v[i] /= self.rho[i] + self.v[i] += (f/2)/self.rho[i] + + else: + #density and velocity for solid + self.rho[i] = 1.0 + self.v[i] = ti.Vector([0,0,0]) + +``streaming3()`` calculate enthalpy + +.. code-block:: python + + @ti.kernel + def streaming3_g(self): + for i in ti.grouped(self.rho_T): + self.rho_H[i] = 0.0 + #enthalpy here + self.rho_H[i] = self.Fg[i].sum() + #for s in ti.static(range(19)): + # self.rho_H[i] += self.Fg[i][s] + self.fg[i] = self.Fg[i] + +``update_T_fl()`` calculate volumn fraction and temperature + +.. code-block:: python + + @ti.kernel + def update_T_fl(self): + for I in ti.grouped(self.rho_T): + self.rho_T[I] = self.convert_H_T(self.rho_H[I]) + self.rho_fl[I] = self.convert_H_fl(self.rho_H[I]) + if (self.solid[I]>0): + self.rho_fl[I] = 0.0 + +``init_solute_simulation()`` initialize the solute simulation + +.. code-block:: python + + def init_solute_simulation(self): + + self.init_simulation() + self.update_H_sl() + #ethalpy + self.init_H() + #volumn fraction + self.init_fl() + #thermal distribution function + self.init_fg() + +``init_concentration(filename)`` import concentration data from file + +.. code-block:: python + + def init_concentration(self,filename): + in_dat = np.loadtxt(filename) + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + self.rho_T.from_numpy(in_dat) + +this + +.. code-block:: python + + def step(self): + self.colission() + self.colission_g() + + self.streaming1() + self.streaming1_g() + + self.Boundary_condition() + self.BC_concentration() + + self.streaming3_g() + self.streaming3() + self.streaming3_g() + + self.update_T_fl() + +this + +.. code-block:: python + + def export_VTK(self, n): + gridToVTK( + "./LB_SingelPhase_"+str(n), + self.x, + self.y, + self.z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()), + "rho": np.ascontiguousarray(self.rho.to_numpy()), + "Solid_Liquid": np.ascontiguousarray(self.rho_fl.to_numpy()), + "Tempreture": np.ascontiguousarray(self.rho_T.to_numpy()), + "Entropy": np.ascontiguousarray(self.rho_H.to_numpy()), + "velocity": ( np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])), + "Force": ( np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])) + } + ) + +this \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..4a6528d --- /dev/null +++ b/docs/_build/html/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,4 @@ +LBM_3D_SinglePhase_Solver +=========================== + +This file is the same as LBM_3D_SinglePhase_Solver in Single_phase folder \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/example_cavity_melting.rst.txt b/docs/_build/html/_sources/phasechange/example_cavity_melting.rst.txt new file mode 100644 index 0000000..eb279eb --- /dev/null +++ b/docs/_build/html/_sources/phasechange/example_cavity_melting.rst.txt @@ -0,0 +1,2 @@ +example_cavity_melting +============================= \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/example_phase_change.rst.txt b/docs/_build/html/_sources/phasechange/example_phase_change.rst.txt new file mode 100644 index 0000000..7e2842c --- /dev/null +++ b/docs/_build/html/_sources/phasechange/example_phase_change.rst.txt @@ -0,0 +1,2 @@ +example_phase_change +==================== \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt b/docs/_build/html/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt new file mode 100644 index 0000000..6ab6dde --- /dev/null +++ b/docs/_build/html/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt @@ -0,0 +1,2 @@ +read_img_solute_psi_generation_2D +================================== \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/solute_psi_generation_2D.rst.txt b/docs/_build/html/_sources/phasechange/solute_psi_generation_2D.rst.txt new file mode 100644 index 0000000..c8c1119 --- /dev/null +++ b/docs/_build/html/_sources/phasechange/solute_psi_generation_2D.rst.txt @@ -0,0 +1,2 @@ +solute_psi_generation_2D +============================ \ No newline at end of file diff --git a/docs/_build/html/_sources/phasechange/test1.rst.txt b/docs/_build/html/_sources/phasechange/test1.rst.txt new file mode 100644 index 0000000..0b1d2a0 --- /dev/null +++ b/docs/_build/html/_sources/phasechange/test1.rst.txt @@ -0,0 +1,2 @@ +test1 +=================== \ No newline at end of file diff --git a/docs/_build/html/_sources/twophase/lbm_solver_3d_2phase.rst.txt b/docs/_build/html/_sources/twophase/lbm_solver_3d_2phase.rst.txt new file mode 100644 index 0000000..1c42671 --- /dev/null +++ b/docs/_build/html/_sources/twophase/lbm_solver_3d_2phase.rst.txt @@ -0,0 +1,734 @@ +lbm_solver_3d_2phase +======================================== + +This solver is the multiphase model based on color gradient model +Firstly, it defines some parameters + +.. code-block:: python + + # NOTE: THIS CODE NEED taichi_glsl, so please use taichi version <=0.8.5 + #import taichi, numpy, pyevtk and time package + import taichi as ti + import numpy as np + #import taichi_glsl as ts + from pyevtk.hl import gridToVTK + import time + #from taichi_glsl import scalar + + #from taichi_glsl.scalar import isinf, isnan + #from taichi_glsl.vector import vecFill + #intialize taichi + ti.init(arch=ti.cpu) + #ti.init(arch=ti.gpu, dynamic_index=True,offline_cache=True) + + #enable projection + enable_projection = True + # 131*131*131 + nx,ny,nz = 131,131,131 + #nx,ny,nz = 131,131,131 + #external force in x,y,z direction + fx,fy,fz = 5.0e-5,-2e-5,0.0 + #niu = 0.1 + #liquid viscosity + niu_l = 0.1 #psi>0 + #gas viscosity + niu_g = 0.1 #psi<0 + #psi in color gradient calculation + psi_solid = 0.7 + #surface tension + CapA = 0.005 + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 0, 0.995, 0.0, 0.0, 0.0 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + + bc_psi_x_left, psi_x_left = 1, -1.0 # boundary condition for phase-field: 0 = periodic, + bc_psi_x_right, psi_x_right = 0, 1.0 # 1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2 + bc_psi_y_left, psi_y_left = 0, 1.0 + bc_psi_y_right, psi_y_right = 0, 1.0 + bc_psi_z_left, psi_z_left = 0, 1.0 + bc_psi_z_right, psi_z_right = 0, 1.0 + + # Non Sparse memory allocation + #density distribution function nx*ny*nz*19 + f = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density distribution function nx*ny*nz*19 + F = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density nx*ny*nz + rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #velocity nx*ny*nz vector + v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + #psi nx*ny*nz + psi = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rho_r = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rho_b = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rhor = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rhob = ti.field(ti.f32, shape=(nx,ny,nz)) + #lattice speed 19 dimensional vector + e = ti.Vector.field(3,ti.i32, shape=(19)) + #S_dig = ti.field(ti.f32,shape=(19)) + #lattice speed 19 dimensional vector + e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #weight parameter 19 dimensional vector + w = ti.field(ti.f32, shape=(19)) + #solid flag nx*ny*nz + solid = ti.field(ti.i32,shape=(nx,ny,nz)) + #streaming vector 19 dimensional vector + LR = ti.field(ti.i32,shape=(19)) + + #external force 3 dimensional vector + ext_f = ti.Vector.field(3,ti.f32,shape=()) + # x-left velocity 3 dimensional vector + bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=()) + # x-right velocity 3 dimensional vector + bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=()) + # y-left velocity 3 dimensional vector + bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=()) + # y-right velocity 3 dimensional vector + bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=()) + # z-left velocity 3 dimensional vector + bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=()) + # z-right velocity 3 dimensional vector + bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=()) + #transforming matrix 19*19 + M = ti.field(ti.f32, shape=(19,19)) + #inverse transforming matrix 19*19 + inv_M = ti.field(ti.f32, shape=(19,19)) + #parameters for calculating the parameter of s diagonal + #=======================================# + lg0, wl, wg = 0.0, 0.0, 0.0 + l1, l2, g1, g2 = 0.0, 0.0, 0.0, 0.0 + wl = 1.0/(niu_l/(1.0/3.0)+0.5) + wg = 1.0/(niu_g/(1.0/3.0)+0.5) + lg0 = 2*wl*wg/(wl+wg) + l1=2*(wl-lg0)*10 + l2=-l1/0.2 + g1=2*(lg0-wg)*10 + g2=g1/0.2 + #=======================================# + + #transformation matrix + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #inverde of transforming matrix + inv_M_np = np.linalg.inv(M_np) + #streaming array + LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]) + #M matrix from the numpy + M.from_numpy(M_np) + #inverse matrix from numpy + inv_M.from_numpy(inv_M_np) + + #steaming array from numpy + LR.from_numpy(LR_np) + #external force with vector three dimensional + ext_f[None] = ti.Vector([fx,fy,fz]) + #set transforming matrix, inverse matrix and streaming vector non-modified + ti.static(inv_M) + ti.static(M) + ti.static(LR) + + #set x,y,z array with nx*ny*nz + x = np.linspace(0, nx, nx) + y = np.linspace(0, ny, ny) + z = np.linspace(0, nz, nz) + #set meshgrid and return three meshgrid matrix X,Y,Z with non-cartesian indexing + X, Y, Z = np.meshgrid(x, y, z, indexing='ij') + +``feq(k,rho_local, u)`` calculate the equilibrium denisty distribution function + +.. code-block:: python + + @ti.func + def feq(k,rho_local, u): + # eu=ts.vector.dot(e[k],u) + # uv=ts.vector.dot(u,u) + eu = e[k].dot(u) + uv = u.dot(u) + #same as single phase equilibrium density distribution function + feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, w[k]) + return feqout + +``init()`` intialize some variable + +.. code-block:: python + + @ti.kernel + def init(): + for i,j,k in solid: + if (solid[i,j,k] == 0): + #if it is fluid intialize the density and velocity be one and zero + rho[i,j,k] = 1.0 + v[i,j,k] = ti.Vector([0,0,0]) + # set density r and density b based on psi + rho_r[i,j,k] = (psi[i,j,k]+1.0)/2.0 + rho_b[i,j,k] = 1.0 - rho_r[i,j,k] + #set another density r and density b + rhor[i,j,k] = 0.0 + rhob[i,j,k] = 0.0 + #set density distribution equals to equilibrium density distribution function + for s in ti.static(range(19)): + f[i,j,k,s] = feq(s,1.0,v[i,j,k]) + F[i,j,k,s] = feq(s,1.0,v[i,j,k]) + +``init_geo(filename, filename2)`` import the geometry data + +.. code-block:: python + + def init_geo(filename, filename2): + #read the solid flag data and set it as an column major array + in_dat = np.loadtxt(filename) + in_dat[in_dat>0] = 1 + in_dat = np.reshape(in_dat, (nx,ny,nz),order='F') + + #read the phase data from file + phase_in_dat = np.loadtxt(filename2) + #set the array from the file with colum major + phase_in_dat = np.reshape(phase_in_dat, (nx,ny,nz), order='F') + + return in_dat, phase_in_dat + +``static_init()`` initialize non-modified variable + +.. code-block:: python + + @ti.kernel + def static_init(): + if ti.static(enable_projection): # No runtime overhead + #define lattice speed + e[0] = ti.Vector([0,0,0]) + e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1]) + e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0]) + e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1]) + e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1]) + #define another lattice speed + e_f[0] = ti.Vector([0,0,0]) + e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1]) + e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0]) + e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1]) + e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1]) + #define a weight parameter + w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0; + w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0; + w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0; + #define the boundary velocity + bc_vel_x_left = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl]) + bc_vel_x_right = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr]) + bc_vel_y_left = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl]) + bc_vel_y_right = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr]) + bc_vel_z_left = ti.Vector([vx_bczl, vy_bczl, vz_bczl]) + bc_vel_z_right = ti.Vector([vx_bczr, vy_bczr, vz_bczr]) + +``multiply_M()`` calculate the density distribution function in momentum space + +.. code-block:: python + + @ti.func + def multiply_M(i,j,k): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + for index in ti.static(range(19)): + for s in ti.static(range(19)): + #calculate here + out[index] += M[index,s]*F[i,j,k,s] + #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s]) + return out + +``GuoF(i,j,k,s,u)`` calculate Guo's force term + +.. code-block:: python + + @ti.func + def GuoF(i,j,k,s,u): + out=0.0 + for l in ti.static(range(19)): + out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l] + + return out + +``meq_vec(rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``Compute_C()`` calculate the color gradient + +.. code-block:: python + + @ti.func + def Compute_C(i): + C = ti.Vector([0.0,0.0,0.0]) + ind_S = 0 + for s in ti.static(range(19)): + ip = periodic_index_for_psi(i+e[s]) + if (solid[ip] == 0): + #if it's fluid calculate the color gradient based on psi + C += 3.0*w[s]*e_f[s]*psi[ip] + else: + #if it is solid and abs(density r-density b) is less than 0.9 + ind_S = 1 + #calculate the color gradient based on psi_solid and set ind_s=1 + C += 3.0*w[s]*e_f[s]*psi_solid + + if (abs(rho_r[i]-rho_b[i]) > 0.9) and (ind_S == 1): + #if abs(density r-density b) is very large and it's solid set color gradient to be zero + C = ti.Vector([0.0,0.0,0.0]) + + return C + +``Compute_S_local`` calculate parameter of s diagonal + +.. code-block:: python + + @ti.func + def Compute_S_local(id): + sv=0.0; sother=0.0 + if (psi[id]>0): + if (psi[id]>0.1): + #if psi>0.1 + #sv=1.0/(niu_l/(1.0/3.0)+0.5) + sv=wl + else: + #if 0-0.1 + sv=lg0+g1*psi[id]+g2*psi[id]*psi[id] + #calculate s other + sother = 8.0*(2.0-sv)/(8.0-sv) + + #set s diagonal to be zero and set certain element to be relatie local parameter + S = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + S[1]=sv;S[2]=sv;S[4]=sother;S[6]=sother;S[8]=sother;S[9]=sv; + S[10]=sv;S[11]=sv;S[12]=sv;S[13]=sv;S[14]=sv;S[15]=sv;S[16]=sother; + S[17]=sother;S[18]=sother; + + + return S; + + +``collision()`` define the collision and recoloring process + +.. code-block:: python + + @ti.kernel + def colission(): + for i,j,k in rho: + #if it is inner fluid, calculate color gradient divided by norm of color gradient + if (i0 : + normal = C/cc + #calculate the M + m_temp = multiply_M(i,j,k) + meq = meq_vec(rho[i,j,k],v[i,j,k]) + #calculate surface tension term + meq[1] += CapA*cc + meq[9] += 0.5*CapA*cc*(2*normal.x*normal.x-normal.y*normal.y-normal.z*normal.z) + meq[11] += 0.5*CapA*cc*(normal.y*normal.y-normal.z*normal.z) + meq[13] += 0.5*CapA*cc*(normal.x*normal.y) + meq[14] += 0.5*CapA*cc*(normal.y*normal.z) + meq[15] += 0.5*CapA*cc*(normal.x*normal.z) + #calculate s local + S_local = Compute_S_local(ti.Vector([i,j,k])) + #calculate s*(m-meq) + for s in ti.static(range(19)): + m_temp[s] -= S_local[s]*(m_temp[s]-meq[s]) + m_temp[s] += (1-0.5*S_local[s])*GuoF(i,j,k,s,v[i,j,k]) + #calculte convection of density filed + g_r = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + g_b = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + + for s in ti.static(range(19)): + f[i,j,k,s] = 0 + for l in ti.static(range(19)): + # 1.single phase collision + f[i,j,k,s] += inv_M[s,l]*m_temp[l] + + g_r[s] = feq(s,rho_r[i,j,k],v[i,j,k]) + g_b[s] = feq(s,rho_b[i,j,k],v[i,j,k]) + + if (cc>0): + for kk in ti.static([1,3,5,7,9,11,13,15,17]): + # ef=ts.vector.dot(e[kk],C) + ef=e[kk].dot(C) + cospsi= g_r[kk] if (g_r[kk]nx-1: iout[0] = 0 + if i[1]<0: iout[1] = ny-1 + if i[1]>ny-1: iout[1] = 0 + if i[2]<0: iout[2] = nz-1 + if i[2]>nz-1: iout[2] = 0 + + return iout + +``periodic_index_for_psi(i)`` defines the index of boundary for psi if using periodic boundary condition + +.. code-block:: python + + @ti.func + def periodic_index_for_psi(i): + iout = i + if i[0]<0: + #if periodic boundary condition set index based on periodic boundary condition + if bc_psi_x_left == 0: + iout[0] = nx-1 + else: + #otherwise set neighbouring index, + #similar for other sides + iout[0] = 0 + + if i[0]>nx-1: + if bc_psi_x_right==0: + iout[0] = 0 + else: + iout[0] = nx-1 + + if i[1]<0: + if bc_psi_y_left == 0: + iout[1] = ny-1 + else: + iout[1] = 0 + + if i[1]>ny-1: + if bc_psi_y_right==0: + iout[1] = 0 + else: + iout[1] = ny-1 + + if i[2]<0: + if bc_psi_z_left==0: + iout[2] = nz-1 + else: + iout[2] = 0 + + if i[2]>nz-1: + if bc_psi_z_right==0: + iout[2] = 0 + else: + iout[2] = nz-1 + + return iout + + +``streaming1()`` defines steaming process of denisty distribution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i,j,k in rho: + #if (solid[i,j,k] == 0): + if (i0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) + + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) + + + # Direction Y + if ti.static(bc_y_left==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + if (solid[i,1,k]>0): + F[i,0,k,s]=feq(s, rho_bcyl, v[i,1,k]) + else: + F[i,0,k,s]=feq(s, rho_bcyl, v[i,0,k]) + + if ti.static(bc_y_left==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + F[i,0,k,s]=feq(LR[s], 1.0, bc_vel_y_left[None])-F[i,0,k,LR[s]]+feq(s,1.0,bc_vel_y_left[None]) + + if ti.static(bc_y_right==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + if (solid[i,ny-2,k]>0): + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-2,k]) + else: + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-1,k]) + + if ti.static(bc_y_right==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + F[i,ny-1,k,s]=feq(LR[s], 1.0, bc_vel_y_right[None])-F[i,ny-1,k,LR[s]]+feq(s,1.0,bc_vel_y_right[None]) + + # Z direction + if ti.static(bc_z_left==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + if (solid[i,j,1]>0): + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,1]) + else: + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,0]) + + if ti.static(bc_z_left==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + F[i,j,0,s]=feq(LR[s], 1.0, bc_vel_z_left[None])-F[i,j,0,LR[s]]+feq(s,1.0,bc_vel_z_left[None]) + + if ti.static(bc_z_right==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + if (solid[i,j,nz-2]>0): + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-2]) + else: + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-1]) + + if ti.static(bc_z_right==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + F[i,j,nz-1,s]=feq(LR[s], 1.0, bc_vel_z_right[None])-F[i,j,nz-1,LR[s]]+feq(s,1.0,bc_vel_z_right[None]) + +``Boundary_condition_psi()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i,j,k, in rho: + #if (solid[i,j,k] == 0): + if (i tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_build/html/_static/css/badge_only.css b/docs/_build/html/_static/css/badge_only.css new file mode 100644 index 0000000..c718cee --- /dev/null +++ b/docs/_build/html/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff b/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 b/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff b/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 b/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot b/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg b/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf b/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff b/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 b/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/lato-bold-italic.woff b/docs/_build/html/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000..88ad05b Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-bold-italic.woff differ diff --git a/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 b/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000..c4e3d80 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/lato-bold.woff b/docs/_build/html/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000..c6dff51 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-bold.woff differ diff --git a/docs/_build/html/_static/css/fonts/lato-bold.woff2 b/docs/_build/html/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000..bb19504 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-bold.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/lato-normal-italic.woff b/docs/_build/html/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000..76114bc Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-normal-italic.woff differ diff --git a/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 b/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000..3404f37 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/docs/_build/html/_static/css/fonts/lato-normal.woff b/docs/_build/html/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000..ae1307f Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-normal.woff differ diff --git a/docs/_build/html/_static/css/fonts/lato-normal.woff2 b/docs/_build/html/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000..3bf9843 Binary files /dev/null and b/docs/_build/html/_static/css/fonts/lato-normal.woff2 differ diff --git a/docs/_build/html/_static/css/theme.css b/docs/_build/html/_static/css/theme.css new file mode 100644 index 0000000..c03c88f --- /dev/null +++ b/docs/_build/html/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/docs/_build/html/_static/doctools.js b/docs/_build/html/_static/doctools.js new file mode 100644 index 0000000..d06a71d --- /dev/null +++ b/docs/_build/html/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js new file mode 100644 index 0000000..ac431ff --- /dev/null +++ b/docs/_build/html/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '0.0.1', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/docs/_build/html/_static/file.png b/docs/_build/html/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/docs/_build/html/_static/file.png differ diff --git a/docs/_build/html/_static/js/badge_only.js b/docs/_build/html/_static/js/badge_only.js new file mode 100644 index 0000000..526d723 --- /dev/null +++ b/docs/_build/html/_static/js/badge_only.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); \ No newline at end of file diff --git a/docs/_build/html/_static/js/html5shiv-printshiv.min.js b/docs/_build/html/_static/js/html5shiv-printshiv.min.js new file mode 100644 index 0000000..2b43bd0 --- /dev/null +++ b/docs/_build/html/_static/js/html5shiv-printshiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/docs/_build/html/_static/js/html5shiv.min.js b/docs/_build/html/_static/js/html5shiv.min.js new file mode 100644 index 0000000..cd1c674 --- /dev/null +++ b/docs/_build/html/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/docs/_build/html/_static/js/theme.js b/docs/_build/html/_static/js/theme.js new file mode 100644 index 0000000..1fddb6e --- /dev/null +++ b/docs/_build/html/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/docs/_build/html/_static/minus.png b/docs/_build/html/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/docs/_build/html/_static/minus.png differ diff --git a/docs/_build/html/_static/plus.png b/docs/_build/html/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/docs/_build/html/_static/plus.png differ diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/html/_static/pygments.css new file mode 100644 index 0000000..08bec68 --- /dev/null +++ b/docs/_build/html/_static/pygments.css @@ -0,0 +1,74 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js new file mode 100644 index 0000000..97d56a7 --- /dev/null +++ b/docs/_build/html/_static/searchtools.js @@ -0,0 +1,566 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = docUrlRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = docUrlRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/docs/_build/html/_static/sphinx_highlight.js b/docs/_build/html/_static/sphinx_highlight.js new file mode 100644 index 0000000..aae669d --- /dev/null +++ b/docs/_build/html/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/docs/_build/html/aaa.html b/docs/_build/html/aaa.html new file mode 100644 index 0000000..2a18f1c --- /dev/null +++ b/docs/_build/html/aaa.html @@ -0,0 +1,644 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/example_cavity.html b/docs/_build/html/example_cavity.html new file mode 100644 index 0000000..c2e4989 --- /dev/null +++ b/docs/_build/html/example_cavity.html @@ -0,0 +1,173 @@ + + + + + + + example_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity

+

This file use the LBM_3D_SinglePhase_Solver to simulate the cavity flow

+
#import certain packages
+import time
+import taichi as ti
+
+ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#set 50*50*50 cavity based on LB3D_Solver_Single_Phase solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=50,ny=50,nz=50, sparse_storage=False)
+
+#import geometry data
+lb3d.init_geo('./geo_cavity.dat')
+#set the x-right velocity
+lb3d.set_bc_vel_x1([0.0,0.0,0.1])
+#initialize
+lb3d.init_simulation()
+
+#simulation step
+for iter in range(2000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #get the maximum velocity
+        max_v = lb3d.get_max_v()
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the number of time steps, maxiumum force and the force scale=0
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, max_v,  0.0))
+        #every 1000 time steps export the vtk file
+        if (iter%1000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/example_porous_medium.html b/docs/_build/html/example_porous_medium.html new file mode 100644 index 0000000..844419e --- /dev/null +++ b/docs/_build/html/example_porous_medium.html @@ -0,0 +1,170 @@ + + + + + + + example_porous_medium — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_porous_medium

+

This file simulate the porous medium based on the LBM_3D_SinglePhase_Solver

+
#import time and taichi package
+import time
+import taichi as ti
+#taichi intialization
+ti.init(arch=ti.cpu)
+#import the LBM_3D_SinglePhase_Solver
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#create the 131*131*131 gird LBM_3D_SinglePhase_Solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=131,ny=131,nz=131)
+#import the porous medium geometry
+lb3d.init_geo('./img_ftb131.txt')
+#set x-left and x-right density
+lb3d.set_bc_rho_x1(0.99)
+lb3d.set_bc_rho_x0(1.0)
+#initialize the simulation
+lb3d.init_simulation()
+#simulation loop
+for iter in range(50000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the time step, max force=10, force_scale=10
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+        #export VTK every 2000 time step
+        if (iter%2000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/flow_domain_geo_generation_2D.html b/docs/_build/html/flow_domain_geo_generation_2D.html new file mode 100644 index 0000000..526eb37 --- /dev/null +++ b/docs/_build/html/flow_domain_geo_generation_2D.html @@ -0,0 +1,163 @@ + + + + + + + flow_domain_geo_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation_2D

+

This file generate geometry file for solver to read

+
#import certain module
+import numpy as np
+import math
+
+
+#define the input file name
+# INPUT STL FILE NAME
+output_name = 'geo_cavity.dat'
+
+#define the grid resolution
+dnx, dny, dnz = 50, 50, 50
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+
+#define an matrix dnx*dny*dnz with zero values
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#define the boundary to be solid
+out_dat[0,:,:] = 1
+#cout_dat[:,:,0] = 1
+out_dat[:,0,:] = 1
+out_dat[:,-1,:] = 1
+out_dat[:,:,0] = 1
+out_dat[:,:,-1] = 1
+
+#=========================================================
+#reshape the data to be column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+
+
+#output the transfer of out_dat to the file with integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html new file mode 100644 index 0000000..08506b6 --- /dev/null +++ b/docs/_build/html/genindex.html @@ -0,0 +1,103 @@ + + + + + + Index — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html new file mode 100644 index 0000000..f6256d7 --- /dev/null +++ b/docs/_build/html/index.html @@ -0,0 +1,151 @@ + + + + + + + Welcome to taichi-LBM3D’s documentation! — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/lbm_solver_3d.html b/docs/_build/html/lbm_solver_3d.html new file mode 100644 index 0000000..77ad6e0 --- /dev/null +++ b/docs/_build/html/lbm_solver_3d.html @@ -0,0 +1,530 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s Force scheme

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+    #calculate Guo's force here
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) calculate equilibrium density distribution function in momentum space

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

collison() define the prcoess of collision

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is fluid
+        if (solid[i,j,k] == 0):
+            #calculate m
+            m_temp = multiply_M(i,j,k)
+            #calculate meq
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                #calculate -s*(m-meq)
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #add Guo's force
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    #f=-M^-1*S(m-meq)
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

periodic_index(i) set the bounary index with periodic bounary condition

+
@ti.func
+def periodic_index(i):
+    #inner index
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = nx-1
+    #x-right
+    if i[0]>nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = ny-1
+    #y-right
+    if i[1]>ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = nz-1
+    #z-right
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming process of denisty distibution function

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        #if it is fluid
+        if (solid[i] == 0):
+            for s in range(19):
+                #the neighbour index
+                ip = periodic_index(i+e[s])
+                #if neighbour index is fluid just streaming
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                #if neighbour index is solid just bounce back
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

streaming2() a simple streaming process without consideration of solid and boundary

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

Boudary_condition() define the bounary condition of fixed pressure and fixed velocity

+
@ti.kernel
+def Boundary_condition():
+    #pressure-boundary condtion x-left
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #if boundary is fluid but the neighbour is solid
+                #equilibrium density distribution function is calculated based on the neighbour velocity
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                #if boundary is fluid and the neighbour is also fluid
+                #equilibrium density distribution function is calculated based on the boundary velocity
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    #velocity-boundary conditon x-left
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #calculate density distribution fucntion based on equilibrium part and non-equilibrium part
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    #pressure boundary condition x-right similar to x-left
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    #velocity booundary condition x-right similar to x-left
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

streaming3() calculate the macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        #if it is fluid calculate density and velocity based on density distribution function
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+        # if it is solid set denisty equals one and velocity equals zero
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

At the end of the file do the actual simulation and export the data

+
#define some time varible
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+#import the solid flag data
+#solid_np = init_geo('./BC.dat')
+solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+
+# do the initialization
+static_init()
+init()
+
+# do the actual simulation
+for iter in range(50000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    # calculate every 1000 time step
+    if (iter%1000==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        #calculate the time difference between now and previous time step
+        diff_time = int(time_now-time_pre)
+        #calculate the time difference between now and the initial time
+        elap_time = int(time_now-time_init)
+        #divmod function return the quotient and the remainder
+        #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2]))
+                            }
+            )
+# ti.sync()
+# ti.profiler.print_kernel_profiler_info()
+#print the profiler information of every kernel and task of taichi in this file
+ti.profiler.print_scoped_profiler_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/lbm_solver_3d_cavity.html b/docs/_build/html/lbm_solver_3d_cavity.html new file mode 100644 index 0000000..7e051cd --- /dev/null +++ b/docs/_build/html/lbm_solver_3d_cavity.html @@ -0,0 +1,156 @@ + + + + + + + lbm_solver_3d_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_cavity

+

This solver is almost similar to lbm_solver_3d expect several difference as follows: +.. number:: lbm_solver_3d_cavity

+
    +
  1. The Grid resolution in this solver is 50x50x50

  2. +
  3. The viscosity in this solver is 0.16667

  4. +
  5. The boundary condition in this solver is velocity solver on x-right as follows

  6. +
+

boundary condition of this solver

+
#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+
+

x-right is implementated with velocity boundary condition

+

4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary.

+
if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left))
+
+
+
    +
  1. Finally, the definition of the varible is slightly different from lbm_solver_3d

  2. +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/lbm_solver_3d_sparse.html b/docs/_build/html/lbm_solver_3d_sparse.html new file mode 100644 index 0000000..58c9363 --- /dev/null +++ b/docs/_build/html/lbm_solver_3d_sparse.html @@ -0,0 +1,143 @@ + + + + + + + lbm_solver_3d_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_sparse

+

This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible:

+
f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse.

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/modules.html b/docs/_build/html/modules.html new file mode 100644 index 0000000..139c882 --- /dev/null +++ b/docs/_build/html/modules.html @@ -0,0 +1,148 @@ + + + + + + + taichi_LBM3D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv new file mode 100644 index 0000000..8b79ea0 Binary files /dev/null and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solute_Solver.html b/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solute_Solver.html new file mode 100644 index 0000000..cae5168 --- /dev/null +++ b/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solute_Solver.html @@ -0,0 +1,699 @@ + + + + + + + LBM_3D_SinglePhase_Solute_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

LBM_3D_SinglePhase_Solute_Solver

+

This file is the solver for solute transportation

+

First import the certain package and define the class of LB3D_Solver_Single_Phase_Solute which inheritant from +LB3D_Solver_Single_Phase_Solute

+
from sympy import inverse_mellin_transform
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+
+#ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3d
+
+@ti.data_oriented
+class LB3D_Solver_Single_Phase_Solute(lb3d.LB3D_Solver_Single_Phase):
+    def __init__(self, nx, ny, nz):
+        super(LB3D_Solver_Single_Phase_Solute, self).__init__(nx, ny, nz, sparse_storage = False)
+        #define solute boundary condition
+        self.solute_bc_x_left, self.solute_bcxl = 0, 0.0
+        self.solute_bc_x_right, self.solute_bcxr = 0, 0.0
+        self.solute_bc_y_left, self.solute_bcyl = 0, 0.0
+        self.solute_bc_y_right, self.solute_bcyr = 0, 0.0
+        self.solute_bc_z_left, self.solute_bczl = 0, 0.0
+        self.solute_bc_z_right, self.solute_bczr = 0, 0.0
+
+        #define parameters for bouyancy force
+        self.buoyancy_parameter = 20.0   #Buoyancy Parameter (0= no buoyancy)
+        self.ref_T = 20.0              #reference_psi F=/rho*g+Bouyancy*(/psi-reference_psi)*g)
+        #define gravity
+        self.gravity = 5e-7
+
+        #define concentration distribution function
+        self.fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define another concentration distribution function
+        self.Fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define external force
+        self.forcexyz = ti.Vector.field(3,ti.f32,shape=(nx,ny,nz))
+        #define entropy
+        self.rho_H = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define temperature
+        self.rho_T = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define liquid volumn fraction
+        self.rho_fl = ti.field(ti.f32, shape=(nx,ny,nz))
+
+        #define specific heat of liquid
+        self.Cp_l= 1.0
+        #define specific heat of solid
+        self.Cp_s = 1.0
+        #define latent heat
+        self.Lt = 1.0
+        #define solid temperature
+        self.T_s = -10.0
+        #define liquid temperature
+        self.T_l = -10.0
+        #define viscosity of solid
+        self.niu_s = 0.002
+        #define viscosity of liquid
+        self.niu_l = 0.002
+
+        #define energy of solid
+        self.H_s = None
+        #define energy of liquid
+        self.H_l = None
+
+        #define rock thermal diffusivity
+        self.niu_solid = 0.001
+        #define specific heat of rock
+        self.Cp_solid = 1.0
+
+
+

An then it sets these parameters with functions

+
#set gravity
+def set_gravity(self, gravity):
+self.gravity = gravity
+#set buoyancy force parameter
+def set_buoyancy_parameter(self, buoyancy_param):
+    self.buoyancy_parameter = buoyancy_param
+#set reference temperature
+def set_ref_T(self, ref_t):
+    self.ref_T = ref_t
+#set specific heat of solid
+def set_specific_heat_solid(self, cps):
+    self.Cp_s = cps
+#set specfic heat of liquid
+def set_specific_heat_liquid(self, cpl):
+    self.Cp_l = cpl
+#set specfic heat of rock
+def set_specific_heat_rock(self, cprock):
+    self.Cp_solid = cprock
+#set latent heat
+def set_latent_heat(self, ltheat):
+    self.Lt = ltheat
+#set solidus temperature
+def set_solidus_temperature(self, ts):
+    self.T_s = ts
+#set liquidus temperature
+def set_liquidus_temperature(self, tl):
+    self.T_l = tl
+#set solid thermal diffusivity
+def set_solid_thermal_diffusivity(self, nius):
+    self.niu_s = nius
+#set liquid thermal diffusivity
+def set_liquid_thermal_diffusivity(self, niul):
+    self.niu_l = niul
+#set rock thermal diffusivity
+def set_rock_thermal_diffusivity(self, niurock):
+    self.niu_solid = niurock
+#set adiabatic boundary on x-left
+def set_bc_adiabatic_x_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_x_left = 2
+#set adiabatic boundary on x-right
+def set_bc_adiabatic_x_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_x_right = 2
+#set adiabatic boundary on y-left
+def set_bc_adiabatic_y_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_y_left = 2
+#set adiabatic boundary on y-right
+def set_bc_adiabatic_y_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_y_right = 2
+#set adiabatic boundary on z-left
+def set_bc_adiabatic_z_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_z_left = 2
+#set adiabatic boundary on z-right
+def set_bc_adiabatic_z_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_z_right = 2
+#set constant temperature on x-left
+def set_bc_constant_temperature_x_left(self,xl):
+    self.solute_bc_x_left = 1
+    self.solute_bcxl = xl
+#set constant temperature on x-right
+def set_bc_constant_temperature_x_right(self,xr):
+    self.solute_bc_x_right = 1
+    self.solute_bcxr = xr
+#set constant temperature on y-left
+def set_bc_constant_temperature_y_left(self,yl):
+    self.solute_bc_y_left = 1
+    self.solute_bcyl = yl
+#set constant temperature on y-right
+def set_bc_constant_temperature_y_right(self,yr):
+    self.solute_bc_y_right = 1
+    self.solute_bcyr = yr
+#set constant temperature on z-left
+def set_bc_constant_temperature_z_left(self,zl):
+    self.solute_bc_z_left = 1
+    self.solute_bczl = zl
+#set constant temperature on z-right
+def set_bc_constant_temperature_z_right(self,zr):
+    self.solute_bc_y_right = 1
+    self.solute_bczr = zr
+
+# update energy of solid and liquid
+def update_H_sl(self):
+    #energy of solid
+    self.H_s = self.Cp_s*self.T_s
+    #energy of liquid
+    self.H_l = self.H_s+self.Lt
+    print('H_s',self.H_s)
+    print('H_l',self.H_l)
+
+
+

Then it initialize some variable or function

+
#intialize the energy
+@ti.kernel
+def init_H(self):
+    for I in ti.grouped(self.rho_T):
+        #calculate the energy, convert_T_H() define later
+        self.rho_H[I] = self.convert_T_H(self.rho_T[I])
+
+#intialize the density distribiution function for solute concentration
+@ti.kernel
+def init_fg(self):
+    for I in ti.grouped(self.fg):
+        #calculate the overall specific heat
+        Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s
+        #intialize the density distribiution function for solute concentration equals equilibrium density distribiution function for solute concentration
+        for s in ti.static(range(19)):
+            self.fg[I][s] = self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])
+            self.Fg[I][s] = self.fg[I][s]
+
+#intialize the volumn fraction of liquid
+@ti.kernel
+def init_fl(self):
+    for I in ti.grouped(self.rho_T):
+        #convert_T_fl define later
+        self.rho_fl[I] = self.convert_T_fl(self.rho_T[I])
+
+
+

g_feq(self, k,local_T,local_H, Cp, u) calculate the equilibrium density distribiution function for thermal energy

+
@ti.func
+def g_feq(self, k,local_T,local_H, Cp, u):
+    eu = self.e[k].dot(u)
+    uv = u.dot(u)
+    feqout = 0.0
+    #calculating the zero-velocity equilibrium thermal distribution function
+    if (k==0):
+        feqout = local_H-Cp*local_T+self.w[k]*Cp*local_T*(1-1.5*uv)
+    else:
+    #calculating other directions equilibrium thermal distribution function
+        feqout = self.w[k]*Cp*local_T*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, self.w[k], feqout, Cp, local_T)
+    return feqout
+
+
+

cal_local_force(i, j, k) calculates buoyancy force

+
#density is the function of temperture delat(rho)=-rho*beta*delta(T)
+@ti.func
+def cal_local_force(self, i, j, k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    f[1] += self.gravity*self.buoyancy_parameter*(self.rho_T[i,j,k]-self.ref_T)
+    #f= delta(rho)*delta(v)*g
+    f *= self.rho_fl[i,j,k]
+    return f
+
+
+

collision_g() defines the the collision of thermal distribution function

+
@ti.kernel
+def colission_g(self):
+    for I in ti.grouped(self.rho_T):
+        #overall relaxation time
+        tau_s = 3*(self.niu_s*(1.0-self.rho_fl[I])+self.niu_l*self.rho_fl[I])+0.5
+        #overall specific heat
+        Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s
+
+        #ROCK overall relaxation time and specific heat
+        if (self.solid[I] >0):
+            tau_s = 3.0*self.niu_solid+0.5
+            Cp = self.Cp_solid
+
+        #f=f-1/tau*(f-feq)
+        for s in ti.static(range(19)):
+            tmp_fg = -1.0/tau_s*(self.fg[I][s]-self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]))
+            #print(self.fg[I][s],tmp_fg,I,s,self.rho_H[I],self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]))
+            self.fg[I][s] += tmp_fg
+
+
+

collision() defines the the collision of density distribution function

+
@ti.kernel
+def colission(self):
+    for i,j,k in self.rho:
+        #if (self.solid[i,j,k] == 0):
+        m_temp = self.M[None]@self.F[i,j,k]
+        meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+        m_temp -= self.S_dig[None]*(m_temp-meq)
+        f = self.cal_local_force(i,j,k)
+        if (ti.static(self.force_flag==1)):
+            for s in ti.static(range(19)):
+            #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #f = self.cal_local_force()
+                f_guo=0.0
+                for l in ti.static(range(19)):
+                    f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+
+        self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+        #calculate the denisty distribution function in momentum space here
+        self.f[i,j,k] += self.inv_M[None]@m_temp
+        #calculate the fluid density distribution function here
+        for s in ti.static(range(19)):
+            self.f[i,j,k][s] = self.f[i,j,k][s]*(self.rho_fl[i,j,k]) + self.w[s]*(1.0-self.rho_fl[i,j,k])
+
+
+

streaming1() and streaming1_g() defines the fluid denisty distribiution function and +thermal density distribiution function

+
@ti.kernel
+def streaming1(self):
+    for i in ti.grouped(self.rho):
+        #if (self.solid[i] == 0):
+        for s in ti.static(range(19)):
+            ip = self.periodic_index(i+self.e[s])
+            self.F[ip][s] = self.f[i][s]
+
+@ti.kernel
+def streaming1_g(self):
+    for i in ti.grouped(self.rho_T):
+        for s in ti.static(range(19)):
+            ip = self.periodic_index(i+self.e[s])
+            self.Fg[ip][s] = self.fg[i][s]
+
+
+

this

+
@ti.kernel
+def BC_concentration(self):
+    #constant temperature boundary condition
+    if ti.static(self.solute_bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            local_T = self.solute_bcxl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[0,j,k]*self.Cp_l + (1-self.rho_fl[0,j,k])*self.Cp_s
+            #the boundary's thermal distribution function equals the equilibrium thermal distribution function on the boundary
+            for s in ti.static(range(19)):
+                self.fg[0,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[0,j,k])
+                self.Fg[0,j,k][s] = self.fg[0,j,k][s]
+    #adiabatic boundary condition
+    elif ti.static(self.solute_bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            for s in ti.static(range(19)):
+            #there is no thermal transfer between the boundaty and neighbouring cell
+                self.fg[0,j,k][s] = self.fg[1,j,k][s]
+                self.Fg[0,j,k][s] = self.fg[1,j,k][s]
+
+    #x-right
+    if ti.static(self.solute_bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            local_T = self.solute_bcxr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[self.nx-1,j,k]*self.Cp_l + (1-self.rho_fl[self.nx-1,j,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[self.nx-1,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[self.nx-1,j,k])
+                self.Fg[self.nx-1,j,k][s]= self.fg[self.nx-1,j,k][s]
+    elif ti.static(self.solute_bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s]
+                self.Fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s]
+
+    #y-left
+    if ti.static(self.solute_bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            local_T = self.solute_bcyl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,0,k]*self.Cp_l + (1-self.rho_fl[i,0,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,0,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,0,k])
+                self.Fg[i,0,k][s] = self.fg[i,0,k][s]
+    elif ti.static(self.solute_bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[i,0,k][s] = self.fg[i,1,k][s]
+                self.Fg[i,0,k][s] = self.fg[i,1,k][s]
+
+    #y-right
+    if ti.static(self.solute_bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            local_T = self.solute_bcyr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,self.ny-1,k]*self.Cp_l + (1-self.rho_fl[i,self.ny-1,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,self.ny-1,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,self.ny-1,k])
+                self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-1,k][s]
+    elif ti.static(self.solute_bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s]
+                self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s]
+
+    #z-left
+    if ti.static(self.solute_bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            local_T = self.solute_bczl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,j,0]*self.Cp_l + (1-self.rho_fl[i,j,0])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,j,0][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,0])
+                self.Fg[i,j,0][s] = self.fg[i,j,0][s]
+    elif ti.static(self.solute_bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            for s in ti.static(range(19)):
+                self.fg[i,j,0][s] = self.fg[i,j,1][s]
+                self.Fg[i,j,0][s] = self.fg[i,j,1][s]
+
+    #z-right
+    if ti.static(self.solute_bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            local_T = self.solute_bczr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,j,self.nz-1]*self.Cp_l + (1-self.rho_fl[i,j,self.nz-1])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,j,self.nz-1][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,self.nz-1])
+                self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-1][s]
+    elif ti.static(self.solute_bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            for s in ti.static(range(19)):
+                self.fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s]
+                self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s]
+
+
+

convert_H_T() calculate the temperature

+
@ti.func
+def convert_H_T(self,local_H):
+    new_T=0.0
+    #if local enthalpy is less than solid enthalpy
+    #T= enthalpy/specific heat
+    if (local_H<self.H_s):
+        new_T = local_H/self.Cp_s
+    #if if local enthalpy is greater than liquid enthalpy
+    #T= Tliquid+(enthalpy-liquid enthalpy)/speific heat of liquid
+    elif (local_H>self.H_l):
+        new_T = self.T_l+(local_H-self.H_l)/self.Cp_l
+    #if if temperature is greater than solid temperature
+    #T= Tsolid+(enthalpy-solid enthalpy)/(enthalpy of liquid-enthalpy of solid)*(temperature of liquid- temperature of solid)
+    elif (self.T_l>self.T_s):
+        new_T = self.T_s+(local_H-self.H_s)/(self.H_l-self.H_s)*(self.T_l-self.T_s)
+    else:
+    #else T= temperature of solid
+        new_T = self.T_s
+
+    return new_T
+
+
+

convert_H_fl() calculate the volumn fraction of liquid

+
@ti.func
+def convert_H_fl(self,local_H):
+    new_fl=0.0
+    #if enthalpy is less than solid enthalpy
+    #it is zero
+    if (local_H<self.H_s):
+        new_fl = 0.0
+    #if it is greater than liquid enthalpy
+    #it is one
+    elif (local_H>self.H_l):
+        new_fl = 1.0
+    #else
+    #it equals to (enthaply- soid enthaply)/(enthaply of liquid- enthalpy of solid)
+    else:
+        new_fl = (local_H-self.H_s)/(self.H_l-self.H_s)
+
+    return new_fl
+
+
+

convert_T_H() calculate the enthaply from temperature

+
@ti.func
+def convert_T_H(self,local_T):
+    new_H = 0.0
+    # calculate enthaply for three different conditions
+    if (local_T<=self.T_s):
+        new_H = self.Cp_s*local_T
+    elif (local_T>self.T_l):
+        new_H = (local_T-self.T_l)*self.Cp_l+self.H_l
+    else:
+        fluid_frc = (local_T-self.T_s)/(self.T_l-self.T_s)
+        new_H = self.H_s*(1-fluid_frc) + self.H_l*fluid_frc
+    return new_H
+
+
+

convert_T_fl() calculate volumn fraction from temperature

+
@ti.func
+def convert_T_fl(self,local_T):
+    new_fl = 0.0
+    # calculate volumn fraction for three different conditions
+    if (local_T<=self.T_s):
+        new_fl = 0.0
+    elif (local_T>=self.T_l):
+        new_fl = 1.0
+    elif (self.T_l>self.T_s):
+        new_fl = (local_T-self.T_s)/(self.T_l-self.T_s)
+    else:
+        new_fl = 1.0
+
+    return new_fl
+
+
+

streaming3() calculate macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        self.forcexyz[i] = self.cal_local_force(i.x, i.y, i.z)
+        #print(i.x, i.y, i.z)
+        if ((self.solid[i]==0) or (self.rho_fl[i]>0.0)):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            for s in ti.static(range(19)):
+                self.f[i][s] = self.f[i][s]*self.rho_fl[i]+self.w[s]*(1.0-self.rho_fl[i])
+            #density for fluid
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+            #velocity for fluid
+            self.v[i] /= self.rho[i]
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        #density and velocity for solid
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

streaming3() calculate enthalpy

+
@ti.kernel
+def streaming3_g(self):
+    for i in ti.grouped(self.rho_T):
+        self.rho_H[i] = 0.0
+        #enthalpy here
+        self.rho_H[i] = self.Fg[i].sum()
+        #for s in ti.static(range(19)):
+        #    self.rho_H[i] += self.Fg[i][s]
+        self.fg[i] = self.Fg[i]
+
+
+

update_T_fl() calculate volumn fraction and temperature

+
@ti.kernel
+def update_T_fl(self):
+    for I in ti.grouped(self.rho_T):
+        self.rho_T[I] = self.convert_H_T(self.rho_H[I])
+        self.rho_fl[I] = self.convert_H_fl(self.rho_H[I])
+        if (self.solid[I]>0):
+            self.rho_fl[I] = 0.0
+
+
+

init_solute_simulation() initialize the solute simulation

+
def init_solute_simulation(self):
+
+    self.init_simulation()
+    self.update_H_sl()
+    #ethalpy
+    self.init_H()
+    #volumn fraction
+    self.init_fl()
+    #thermal distribution function
+    self.init_fg()
+
+
+

init_concentration(filename) import concentration data from file

+
def init_concentration(self,filename):
+    in_dat = np.loadtxt(filename)
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    self.rho_T.from_numpy(in_dat)
+
+
+

this

+
def step(self):
+    self.colission()
+    self.colission_g()
+
+    self.streaming1()
+    self.streaming1_g()
+
+    self.Boundary_condition()
+    self.BC_concentration()
+
+    self.streaming3_g()
+    self.streaming3()
+    self.streaming3_g()
+
+    self.update_T_fl()
+
+
+

this

+
def export_VTK(self, n):
+    gridToVTK(
+            "./LB_SingelPhase_"+str(n),
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "Solid_Liquid": np.ascontiguousarray(self.rho_fl.to_numpy()),
+                        "Tempreture": np.ascontiguousarray(self.rho_T.to_numpy()),
+                        "Entropy": np.ascontiguousarray(self.rho_H.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])),
+                        "Force": (      np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

this

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solver.html b/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..2ee3a59 --- /dev/null +++ b/docs/_build/html/phasechange/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,125 @@ + + + + + + + LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

LBM_3D_SinglePhase_Solver

+

This file is the same as LBM_3D_SinglePhase_Solver in Single_phase folder

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/example_cavity_melting.html b/docs/_build/html/phasechange/example_cavity_melting.html new file mode 100644 index 0000000..ae9d24d --- /dev/null +++ b/docs/_build/html/phasechange/example_cavity_melting.html @@ -0,0 +1,124 @@ + + + + + + + example_cavity_melting — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity_melting

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/example_phase_change.html b/docs/_build/html/phasechange/example_phase_change.html new file mode 100644 index 0000000..90da0ca --- /dev/null +++ b/docs/_build/html/phasechange/example_phase_change.html @@ -0,0 +1,124 @@ + + + + + + + example_phase_change — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_phase_change

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/read_img_solute_psi_generation_2D.html b/docs/_build/html/phasechange/read_img_solute_psi_generation_2D.html new file mode 100644 index 0000000..1bf9ec6 --- /dev/null +++ b/docs/_build/html/phasechange/read_img_solute_psi_generation_2D.html @@ -0,0 +1,124 @@ + + + + + + + read_img_solute_psi_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

read_img_solute_psi_generation_2D

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/solute_psi_generation_2D.html b/docs/_build/html/phasechange/solute_psi_generation_2D.html new file mode 100644 index 0000000..7f736fb --- /dev/null +++ b/docs/_build/html/phasechange/solute_psi_generation_2D.html @@ -0,0 +1,124 @@ + + + + + + + solute_psi_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

solute_psi_generation_2D

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/phasechange/test1.html b/docs/_build/html/phasechange/test1.html new file mode 100644 index 0000000..9141c6e --- /dev/null +++ b/docs/_build/html/phasechange/test1.html @@ -0,0 +1,122 @@ + + + + + + + test1 — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
+ +
+

test1

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html new file mode 100644 index 0000000..1eb12ca --- /dev/null +++ b/docs/_build/html/search.html @@ -0,0 +1,118 @@ + + + + + + Search — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js new file mode 100644 index 0000000..ee84f2a --- /dev/null +++ b/docs/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["2phase", "Grey_Scale", "Grey_scale/flow_domain_geo_generation", "Grey_scale/lbm_solver_3d_Macro_Sukop", "Phase_change", "Single_phase", "Single_phase/Convert_stl_to_binary", "Single_phase/LBM_3D_SinglePhase_Solver", "Single_phase/example_cavity", "Single_phase/example_porous_medium", "Single_phase/flow_domain_geo_generation_2D", "Single_phase/lbm_solver_3d", "Single_phase/lbm_solver_3d_cavity", "Single_phase/lbm_solver_3d_sparse", "index", "modules", "phasechange/LBM_3D_SinglePhase_Solute_Solver", "phasechange/LBM_3D_SinglePhase_Solver", "phasechange/example_cavity_melting", "phasechange/example_phase_change", "phasechange/read_img_solute_psi_generation_2D", "phasechange/solute_psi_generation_2D", "phasechange/test1", "twophase/lbm_solver_3d_2phase", "twophase/lbm_solver_3d_2phase_sparse"], "filenames": ["2phase.rst", "Grey_Scale.rst", "Grey_scale/flow_domain_geo_generation.rst", "Grey_scale/lbm_solver_3d_Macro_Sukop.rst", "Phase_change.rst", "Single_phase.rst", "Single_phase/Convert_stl_to_binary.rst", "Single_phase/LBM_3D_SinglePhase_Solver.rst", "Single_phase/example_cavity.rst", "Single_phase/example_porous_medium.rst", "Single_phase/flow_domain_geo_generation_2D.rst", "Single_phase/lbm_solver_3d.rst", "Single_phase/lbm_solver_3d_cavity.rst", "Single_phase/lbm_solver_3d_sparse.rst", "index.rst", "modules.rst", "phasechange/LBM_3D_SinglePhase_Solute_Solver.rst", "phasechange/LBM_3D_SinglePhase_Solver.rst", "phasechange/example_cavity_melting.rst", "phasechange/example_phase_change.rst", "phasechange/read_img_solute_psi_generation_2D.rst", "phasechange/solute_psi_generation_2D.rst", "phasechange/test1.rst", "twophase/lbm_solver_3d_2phase.rst", "twophase/lbm_solver_3d_2phase_sparse.rst"], "titles": ["2phase", "Grey_Scale", "flow_domain_geo_generation", "lbm_solver_3d_Macro_Sukop", "Phase_change", "Single_phase", "Convert_stl_to_binary", "Single_phase.LBM_3D_SinglePhase_Solver", "example_cavity", "example_porous_medium", "flow_domain_geo_generation_2D", "Single_phase.lbm_solver_3d", "lbm_solver_3d_cavity", "lbm_solver_3d_sparse", "Welcome to taichi-LBM3D\u2019s documentation!", "taichi_LBM3D", "LBM_3D_SinglePhase_Solute_Solver", "LBM_3D_SinglePhase_Solver", "example_cavity_melting", "example_phase_change", "read_img_solute_psi_generation_2D", "solute_psi_generation_2D", "test1", "lbm_solver_3d_2phase", "lbm_solver_3d_2phase_sparse"], "terms": {"taichi_lbm3d": 14, "2phase": [14, 15], "packag": [7, 8, 9, 11, 16, 23], "grey_scal": [14, 15], "phase_chang": [14, 15], "single_phas": [14, 15, 17, 23], "index": [7, 11, 14, 23], "modul": 10, "search": [2, 14], "page": 14, "submodul": [], "lbm_solver_3d_2phas": [0, 14, 15, 24], "lbm_solver_3d_2phase_spars": [0, 14, 15], "content": [], "flow_domain_geo_gener": [1, 14, 15], "lbm_solver_3d_macro_sukop": [1, 14, 15], "lbm_3d_singlephase_solute_solv": [4, 14, 15], "lbm_3d_singlephase_solv": [4, 5, 8, 9, 14, 15, 16], "example_cavity_melt": [4, 14, 15], "example_phase_chang": [4, 14, 15], "read_img_solute_psi_generation_2d": [4, 14, 15], "solute_psi_generation_2d": [4, 14, 15], "test1": [4, 14, 15], "example_cav": [5, 14, 15], "example_porous_medium": [5, 14, 15], "flow_domain_geo_generation_2d": [5, 14, 15], "lbm_solver_3d": [3, 5, 12, 13, 14, 15], "lbm_solver_3d_cav": [5, 14, 15], "lbm_solver_3d_spars": [5, 14, 15], "thi": [2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 23, 24], "i": [3, 7, 8, 9, 11, 12, 13, 16, 17, 23, 24], "d3q19": 7, "mrt": 7, "multi": 7, "relax": [7, 11, 16], "time": [7, 8, 9, 11, 16, 23], "solver": [3, 7, 8, 10, 11, 12, 13, 16, 23], "singl": [7, 11, 23], "phase": [7, 23], "It": [7, 13, 23], "defin": [2, 7, 10, 11, 16, 23, 24], "class": [7, 11, 16], "call": 7, "lb3d_solver_single_phas": [7, 8, 9, 16], "The": [3, 7, 8, 9, 11, 12, 23], "ha": 7, "default": 7, "function": [3, 7, 11, 12, 16, 23], "__init__": [7, 16], "normal": [7, 23], "python": 7, "code": [2, 23, 24], "block": 13, "def": [3, 7, 11, 16, 23], "self": [7, 16], "nx": [3, 7, 8, 9, 11, 13, 16, 23, 24], "ny": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "nz": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "sparse_storag": [7, 8, 16], "fals": [7, 8, 11, 16], "enable_project": [7, 11, 23], "true": [7, 11, 16, 23], "120": 7, "fx": [3, 7, 11, 16, 23], "fy": [3, 7, 11, 16, 23], "fz": [3, 7, 11, 16, 23], "0": [3, 7, 8, 9, 10, 11, 12, 16, 23], "0e": [3, 7, 11, 12, 23], "6": [3, 7, 11, 23], "niu": [3, 7, 11, 16, 23], "16667": [7, 12], "max_v": [7, 8], "ti": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "field": [7, 11, 13, 16, 23, 24], "f32": [7, 11, 13, 16, 23, 24], "shape": [7, 11, 16, 23], "boundari": [7, 10, 11, 12, 16, 23], "condit": [7, 11, 12, 16, 23], "mode": [7, 11, 12, 23], "period": [7, 11, 12, 23], "1": [2, 3, 7, 8, 9, 10, 11, 12, 13, 16, 23, 24], "fix": [7, 11, 12, 23], "pressur": [7, 11, 12, 16, 23], "2": [7, 11, 12, 16, 23], "veloc": [7, 8, 11, 12, 16, 23], "valu": [2, 7, 10, 11, 12, 23], "rho": [3, 7, 11, 12, 13, 16, 23, 24], "vx": [7, 11, 12, 23], "vy": [7, 11, 12, 23], "vz": [7, 11, 12, 23], "bc_x_left": [7, 11, 12, 23], "rho_bcxl": [7, 11, 12, 23], "vx_bcxl": [7, 11, 12, 23], "vy_bcxl": [7, 11, 12, 23], "vz_bcxl": [7, 11, 12, 23], "5": [3, 7, 11, 12, 16, 23], "x": [2, 7, 8, 9, 11, 12, 16, 23], "axi": [7, 11, 12, 23], "left": [7, 9, 11, 12, 16, 23], "side": [7, 11, 12, 23], "bc_x_right": [7, 11, 12, 23], "rho_bcxr": [7, 11, 12, 23], "vx_bcxr": [7, 11, 12, 23], "vy_bcxr": [7, 11, 12, 23], "vz_bcxr": [7, 11, 12, 23], "bc_y_left": [7, 11, 12, 23], "rho_bcyl": [7, 11, 12, 23], "vx_bcyl": [7, 11, 12, 23], "vy_bcyl": [7, 11, 12, 23], "vz_bcyl": [7, 11, 12, 23], "bc_y_right": [7, 11, 12, 23], "rho_bcyr": [7, 11, 12, 23], "vx_bcyr": [7, 11, 12, 23], "vy_bcyr": [7, 11, 12, 23], "vz_bcyr": [7, 11, 12, 23], "bc_z_left": [7, 11, 12, 23], "rho_bczl": [7, 11, 12, 23], "vx_bczl": [7, 11, 12, 23], "vy_bczl": [7, 11, 12, 23], "vz_bczl": [7, 11, 12, 23], "bc_z_right": [7, 11, 12, 23], "rho_bczr": [7, 11, 12, 23], "vx_bczr": [7, 11, 12, 23], "vy_bczr": [7, 11, 12, 23], "vz_bczr": [7, 11, 12, 23], "f": [2, 3, 7, 8, 9, 10, 11, 12, 13, 16, 23, 24], "vector": [7, 11, 12, 13, 16, 23, 24], "19": [3, 7, 11, 12, 13, 16, 23, 24], "v": [7, 11, 13, 16, 23, 24], "3": [7, 11, 13, 16, 23, 24], "els": [3, 7, 11, 16, 23], "n_mem_partit": [7, 13, 24], "cell1": [7, 13, 24], "root": [7, 13, 24], "pointer": [7, 13, 24], "ijk": [7, 13, 24], "dens": [7, 13, 24], "place": [7, 13, 24], "cell2": [13, 24], "e": [3, 7, 11, 16, 23], "i32": [7, 11, 23], "s_dig": [7, 11, 16, 23], "e_f": [7, 11, 16, 23], "w": [7, 11, 16, 23], "solid": [3, 7, 10, 11, 12, 16, 23], "i8": 7, "ext_f": [7, 11, 23], "m": [7, 11, 16, 23], "matrix": [2, 7, 10, 11, 23], "inv_m": [7, 11, 16, 23], "m_np": [7, 11, 23], "np": [2, 7, 10, 11, 16, 23], "arrai": [3, 7, 11, 23], "inv_m_np": [7, 11, 23], "linalg": [7, 11, 23], "inv": [7, 11, 23], "lr": [3, 7, 11, 12, 23], "4": [7, 11, 12, 16, 23], "8": [7, 11, 23], "7": [7, 11, 16, 23], "10": [7, 9, 11, 16, 23], "9": [7, 11, 23], "12": [7, 11, 23], "11": [7, 11, 23], "14": [7, 11, 23], "13": [7, 11, 23], "16": [7, 11, 23], "15": [7, 11, 23], "18": [7, 11, 23], "17": [7, 11, 23], "none": [7, 11, 12, 16, 23], "linspac": [7, 11, 23], "y": [2, 7, 11, 12, 16, 23], "z": [2, 7, 11, 12, 16, 23], "meshgrid": [7, 11, 23], "ij": [7, 11, 23], "output": [2, 3, 6, 7, 8, 9, 10, 11, 23], "line": [], "space": [7, 11, 16, 23], "begin": 11, "try": [], "open": [], "path": [], "file": [2, 3, 6, 7, 8, 9, 10, 11, 16, 17, 23, 24], "r": 23, "print": [3, 7, 8, 9, 11, 16, 23], "read": [6, 10, 23], "final": 12, "close": [], "user": [], "michael": [], "gbk": [], "txt": [3, 9, 11, 23], "encod": [], "error": [], "ignor": [], "enabl": [7, 11, 23], "project": [7, 11, 23], "flag": [3, 7, 11, 23], "grid": [3, 7, 10, 12], "simul": [7, 8, 9, 11, 16, 23], "three": [7, 16, 23], "direct": [2, 7, 11, 16, 23], "densiti": [7, 9, 11, 12, 16, 23], "distribut": [7, 11, 12, 16, 23], "kinemat": 7, "viscos": [3, 7, 11, 12, 16, 23], "lattic": [7, 11, 23], "unit": 7, "taichi": [7, 8, 9, 11, 16, 23], "float": 7, "scalar": [7, 23], "which": [7, 13, 16], "maximum": [3, 7, 8], "right": [7, 8, 9, 11, 12, 16, 23], "element": [7, 23], "each": 7, "dimension": [7, 11, 23], "one": [7, 11, 16, 23], "spars": [7, 13, 23, 24], "storag": [7, 13, 24], "variabl": [3, 7, 11, 16, 23], "partit": 7, "equal": [7, 11, 16, 23], "everi": [7, 8, 9, 11], "four": 7, "speed": [7, 11, 23], "3x19": 7, "weight": [7, 11, 23], "paramet": [3, 7, 11, 16, 23], "when": 7, "fluid": [3, 7, 11, 16, 23], "extern": [3, 7, 11, 16, 23], "forc": [3, 7, 8, 9, 11, 16, 23], "": [3, 7, 11, 12, 16, 23], "diagnol": 7, "transform": [7, 11, 23], "19x19": 7, "dimens": [7, 11], "invers": [7, 11, 23], "numpi": [2, 7, 10, 11, 16, 23], "version": [7, 11, 23], "node": 7, "from": [7, 11, 12, 16, 23], "nearest": [], "farthest": [], "coordin": [7, 11], "follow": [3, 7, 12], "init_simul": [7, 8, 9, 16], "bc_vel_x_left": [7, 11, 12, 23], "bc_vel_x_right": [7, 11, 23], "bc_vel_y_left": [7, 11, 23], "bc_vel_y_right": [7, 11, 23], "bc_vel_z_left": [7, 11, 23], "bc_vel_z_right": [7, 11, 23], "tau_f": [7, 11], "s_v": [7, 11], "s_other": [7, 11], "ab": [7, 23], "force_flag": [7, 16], "static": [3, 7, 11, 12, 16, 23], "static_init": [7, 11, 23], "init": [7, 8, 9, 11, 16, 23], "initi": [7, 8, 9, 11, 16, 23], "some": [2, 3, 7, 10, 11, 13, 16, 23, 24], "tau": [7, 16], "frequenc": [3, 7, 11], "other": [7, 11, 16, 23], "diagon": [7, 11, 23], "greater": [7, 16], "than": [7, 16, 23], "zero": [2, 7, 10, 11, 16, 23], "wise": 7, "been": 7, "modifi": [7, 11, 23], "func": [7, 11, 16, 23], "feq": [7, 11, 12, 16, 23], "k": [7, 11, 12, 16, 23], "rho_loc": [7, 11, 23], "u": [7, 11, 16, 23], "eu": [7, 11, 16, 23], "dot": [7, 11, 16, 23], "uv": [7, 11, 16, 23], "feqout": [7, 11, 16, 23], "return": [7, 11, 16, 23], "calcul": [2, 3, 7, 8, 9, 11, 12, 16, 23], "equilibrium": [7, 11, 16, 23], "kernel": [3, 7, 11, 16, 23], "j": [7, 11, 12, 16, 23], "rang": [3, 7, 8, 9, 11, 12, 16, 23], "all": 7, "denisti": [7, 11, 16, 23], "init_geo": [3, 7, 8, 9, 11, 23], "import": [2, 3, 7, 8, 9, 10, 11, 16, 23], "data": [2, 3, 7, 8, 10, 11, 16, 23], "filenam": [7, 11, 16, 23], "in_dat": [7, 11, 16, 23], "loadtxt": [7, 11, 16, 23], "reshap": [2, 7, 10, 11, 16, 23], "order": [2, 7, 10, 11, 16, 23], "from_numpi": [3, 7, 11, 16, 23], "load": [7, 11], "set": [7, 8, 9, 11, 16, 23], "ani": 7, "posit": 7, "column": [2, 7, 10, 11, 23], "major": [2, 7, 10, 11, 23], "assign": [7, 11], "varibl": [7, 11, 12, 13, 24], "No": [7, 11, 23], "runtim": [7, 11, 23], "overhead": [7, 11, 23], "36": [7, 11, 23], "speeed": 7, "These": 7, "dure": 7, "paral": 7, "meq_vec": [7, 11, 16, 23], "momentum": [7, 11, 16, 23], "out": [7, 11, 23], "cal_local_forc": [7, 16], "transfer": [2, 7, 10, 16], "collis": [7, 11, 16, 23], "lbm": 7, "process": [7, 11, 23], "coliss": [7, 11, 16, 23], "m_temp": [7, 11, 16, 23], "meq": [7, 11, 16, 23], "f_guo": [7, 16], "l": [7, 11, 16, 23], "guof": [7, 11, 16, 23], "outer": 7, "loop": [7, 9], "add": [7, 11], "here": [2, 7, 10, 11, 16, 23], "us": [3, 7, 8, 11, 13, 23], "guo": [7, 11, 23], "scheme": [7, 11], "after": 7, "periodic_index": [3, 7, 11, 16, 23], "iout": [7, 11, 23], "streaming1": [3, 7, 11, 16, 23], "group": [3, 7, 11, 16], "ip": [3, 7, 11, 16, 23], "boundary_condit": [7, 11, 16, 23], "ndrang": [7, 11, 12, 16, 23], "chang": [2, 7, 10, 11, 12], "streaming3": [3, 7, 11, 16, 23], "sum": [7, 16], "get_max_v": [7, 8], "1e10": 7, "cal_max_v": 7, "atomic_max": 7, "norm": [7, 23], "set_bc_vel_x1": [7, 8], "vel": 7, "set_bc_vel_x0": 7, "set_bc_vel_y1": 7, "set_bc_vel_y0": 7, "set_bc_vel_z1": 7, "set_bc_vel_z0": 7, "set_bc_rho_x0": [7, 9], "set_bc_rho_x1": [7, 9], "set_bc_rho_y0": 7, "set_bc_rho_y1": 7, "set_bc_rho_z0": 7, "set_bc_rho_z1": 7, "set_viscos": 7, "set_forc": 7, "export_vtk": [7, 8, 9, 16], "n": [3, 7, 8, 9, 11, 16, 23], "gridtovtk": [7, 11, 16, 23], "lb_singelphase_": [7, 16], "str": [7, 11, 16, 23], "celldata": [7, 11, 16, 23], "pointdata": [7, 11, 16, 23], "ascontiguousarrai": [7, 11, 16, 23], "to_numpi": [7, 11, 16, 23], "step": [7, 8, 9, 11, 16], "single_phase_exampl": [], "includ": [], "old": [7, 11], "new": [7, 11], "bounc": [3, 7, 11, 23], "back": [3, 7, 11, 23], "stream": [3, 7, 11, 23], "prcoess": [7, 11], "non": [7, 11, 23], "accord": [7, 23], "fuction": 7, "bounari": [7, 11], "neighbour": [7, 11, 16, 23], "velciti": 7, "fucntion": [7, 11], "distibut": [7, 11], "similar": [3, 7, 11, 12, 13, 23], "boubndari": 7, "calculatet": 7, "macroscop": [3, 7, 11, 16, 23], "bnoundari": 7, "get": [7, 8], "maxium": 7, "export": [7, 8, 9, 11, 23], "result": [7, 23], "vtk": [3, 6, 7, 8, 9, 11], "pyevtk": [7, 11, 16, 23], "take": 7, "argument": 7, "system": 7, "dictionari": 7, "reuslt": 7, "name": [2, 7, 10], "kei": 7, "anoth": [7, 11, 16, 23], "object": 11, "orient": 11, "singlephas": 11, "without": 11, "hl": [11, 16, 23], "arch": [8, 9, 11, 16, 23], "cpu": [8, 9, 11, 16, 23], "dynamic_index": [8, 11, 16, 23], "kernel_profil": [8, 11, 16], "print_ir": [8, 11, 16], "100": [3, 11], "50": [3, 8, 10, 11], "131": [9, 11, 23], "995": [11, 23], "At": 11, "first": [11, 16], "dunam": 11, "disabl": 11, "profil": 11, "intermedi": 11, "represent": 11, "131x131x131": 11, "funciton": 11, "dimesnion": 11, "s_np": 11, "s_dig_np": 11, "lr_np": [11, 23], "versio": 11, "diagnal": 11, "make": [11, 13], "creat": [2, 9, 11], "mesh": 11, "1d": 11, "3d": 11, "multiply_m": [11, 23], "streaming2": [3, 11, 23], "geometri": [2, 3, 8, 9, 10, 11, 23], "lattix": 11, "intial": [9, 11, 16, 23], "calcult": [11, 23], "collison": 11, "inner": [11, 23], "just": 11, "simpl": 11, "consider": 11, "boudary_condit": 11, "end": 11, "do": [2, 10, 11, 23], "actual": 11, "time_init": [8, 9, 11, 23], "time_now": [8, 9, 11, 23], "time_pr": [8, 9, 11, 23], "dt_count": [11, 23], "solid_np": [3, 11, 23], "bc": [3, 11], "dat": [2, 3, 8, 10, 11, 23], "img_ftb131": [3, 9, 11, 23], "iter": [8, 9, 11, 23], "50000": [9, 11], "1000": [8, 11], "diff_tim": [8, 9, 11, 23], "int": [3, 8, 9, 11, 23], "elap_tim": [8, 9, 11, 23], "m_diff": [8, 9, 11, 23], "s_diff": [8, 9, 11, 23], "divmod": [8, 9, 11, 23], "60": [2, 3, 8, 9, 11, 23], "h_diff": [8, 9, 11, 23], "m_elap": [8, 9, 11, 23], "s_elap": [8, 9, 11, 23], "h_elap": [8, 9, 11, 23], "between": [8, 9, 11, 16, 23], "two": [3, 8, 9, 11, 23], "dh": [8, 9, 11, 23], "dm": [8, 9, 11, 23], "d": [2, 8, 9, 10, 11, 23], "elaps": [8, 9, 11, 23], "dth": [8, 9, 11, 23], "max": [8, 9, 11, 23], "force_scal": [8, 9, 11, 23], "10000": [11, 23], "structur": [11, 23], "sync": 11, "print_kernel_profiler_info": 11, "print_scoped_profiler_info": 11, "condtion": 11, "base": [2, 8, 9, 11, 12, 23], "also": 11, "conditon": 11, "part": 11, "booundari": 11, "differ": [3, 11, 12, 13, 16], "now": 11, "previou": 11, "quotient": 11, "remaind": 11, "so": [11, 23], "repres": 11, "hour": 11, "minut": 11, "second": 11, "same": [11, 17, 23, 24], "timestep": [3, 11], "inform": 11, "task": 11, "convert_stl_to_binari": [5, 14, 15], "almost": [3, 12, 13, 23, 24], "expect": [3, 12, 13], "sever": [3, 12], "resolut": [2, 3, 10, 12], "50x50x50": 12, "dddd": [], "ddddd": [], "implement": 12, "definit": [12, 13, 24], "slightli": 12, "text": [], "number": 8, "ijkl": [13, 24], "certain": [8, 10, 13, 16, 23], "divid": [13, 23], "region": 13, "gener": 10, "math": [2, 10], "input": [2, 10, 23], "stl": [2, 6, 10], "output_nam": [2, 10], "geo_cav": [8, 10], "dnx": [2, 10], "dny": [2, 10], "dnz": [2, 10], "NOT": [2, 10], "below": [2, 10, 23], "an": [10, 16, 23], "out_dat": [2, 10], "can": [2, 10], "cout_dat": 10, "size": [2, 10], "integ": [2, 10], "type": [2, 10], "savetxt": [2, 10], "t": [2, 10, 16, 23], "fmt": [2, 10], "caviti": 8, "flow": 8, "lb3dsp": [8, 9], "lb3d": [8, 9, 16], "2000": [8, 9], "500": [3, 8, 9, 23], "maxiumum": 8, "scale": 8, "porou": 9, "medium": 9, "gird": 9, "99": 9, "packah": 2, "geo": 2, "point": 2, "IN": 2, "bigger": 2, "more": 2, "found": 2, "insid": 2, "save": 2, "geo_nam": 3, "max_timestep": 3, "5000": 3, "output_fr": 3, "vtk_fre": 3, "There": 3, "ar": 3, "ns_np": 3, "astyp": 3, "streaming0": 3, "f2": 3, "otherwis": [3, 23], "appli": 3, "multiphas": 23, "model": 23, "color": 23, "gradient": 23, "firstli": 23, "note": 23, "need": 23, "taichi_glsl": 23, "pleas": 23, "isinf": 23, "isnan": 23, "vecfil": 23, "gpu": 23, "offline_cach": 23, "2e": 23, "liquid": [16, 23], "niu_l": [16, 23], "psi": [16, 23], "ga": 23, "niu_g": 23, "psi_solid": 23, "surfac": 23, "tension": 23, "capa": 23, "005": 23, "bc_psi_x_left": 23, "psi_x_left": 23, "bc_psi_x_right": 23, "psi_x_right": 23, "constant": [16, 23], "phase1": 23, "bc_psi_y_left": 23, "psi_y_left": 23, "bc_psi_y_right": 23, "psi_y_right": 23, "bc_psi_z_left": 23, "psi_z_left": 23, "bc_psi_z_right": 23, "psi_z_right": 23, "memori": [23, 24], "alloc": [23, 24], "rho_r": [23, 24], "b": 23, "rho_b": [23, 24], "rhor": [23, 24], "rhob": [23, 24], "lg0": 23, "wl": 23, "wg": 23, "l1": 23, "l2": 23, "g1": 23, "g2": 23, "inverd": 23, "steam": 23, "cartesian": 23, "filename2": 23, "phase_in_dat": 23, "colum": 23, "term": 23, "compute_c": 23, "c": 23, "ind_": 23, "periodic_index_for_psi": 23, "less": [16, 23], "veri": 23, "larg": 23, "compute_s_loc": 23, "id": 23, "sv": 23, "sother": 23, "relati": 23, "local": [16, 23], "recolor": 23, "uu": 23, "norm_sqr": 23, "cc": 23, "s_local": 23, "convect": 23, "g_r": 23, "g_b": 23, "kk": 23, "ef": 23, "cospsi": 23, "perturb": 23, "ci": 23, "along": 23, "opposit": 23, "boundary_condition_psi": 23, "snippt": [23, 24], "except": 23, "phase_np": 23, "phase_ftb131": 23, "80000": 23, "print_kernel_profile_info": 23, "print_profile_info": 23, "py": 24, "execpt": 24, "abov": 24, "folder": 17, "solut": 16, "transport": 16, "lb3d_solver_single_phase_solut": 16, "inherit": 16, "sympi": 16, "inverse_mellin_transform": 16, "data_ori": 16, "super": 16, "solute_bc_x_left": 16, "solute_bcxl": 16, "solute_bc_x_right": 16, "solute_bcxr": 16, "solute_bc_y_left": 16, "solute_bcyl": 16, "solute_bc_y_right": 16, "solute_bcyr": 16, "solute_bc_z_left": 16, "solute_bczl": 16, "solute_bc_z_right": 16, "solute_bczr": 16, "bouyanc": 16, "buoyancy_paramet": 16, "20": 16, "buoyanc": 16, "ref_t": 16, "reference_psi": 16, "g": 16, "graviti": 16, "5e": 16, "concentr": 16, "fg": 16, "forcexyz": 16, "entropi": 16, "rho_h": 16, "temperatur": 16, "rho_t": 16, "volumn": 16, "fraction": 16, "rho_fl": 16, "cp_l": 16, "cp_": 16, "lt": 16, "t_": 16, "t_l": 16, "niu_": 16, "002": 16, "h_": 16, "h_l": 16, "niu_solid": 16, "001": 16, "cp_solid": 16, "specif": 16, "heat": 16, "latent": 16, "energi": 16, "rock": 16, "thermal": 16, "diffus": 16, "set_grav": 16, "set_buoyancy_paramet": 16, "buoyancy_param": 16, "refer": 16, "set_ref_t": 16, "set_specific_heat_solid": 16, "cp": 16, "specfic": 16, "set_specific_heat_liquid": 16, "cpl": 16, "set_specific_heat_rock": 16, "cprock": 16, "set_latent_heat": 16, "ltheat": 16, "solidu": 16, "set_solidus_temperatur": 16, "liquidu": 16, "set_liquidus_temperatur": 16, "tl": 16, "set_solid_thermal_diffus": 16, "set_liquid_thermal_diffus": 16, "niul": 16, "set_rock_thermal_diffus": 16, "niurock": 16, "adiabat": 16, "set_bc_adiabatic_x_left": 16, "bc_ad": 16, "set_bc_adiabatic_x_right": 16, "set_bc_adiabatic_y_left": 16, "set_bc_adiabatic_y_right": 16, "set_bc_adiabatic_z_left": 16, "set_bc_adiabatic_z_right": 16, "set_bc_constant_temperature_x_left": 16, "xl": 16, "set_bc_constant_temperature_x_right": 16, "xr": 16, "set_bc_constant_temperature_y_left": 16, "yl": 16, "set_bc_constant_temperature_y_right": 16, "yr": 16, "set_bc_constant_temperature_z_left": 16, "zl": 16, "set_bc_constant_temperature_z_right": 16, "zr": 16, "updat": 16, "update_h_sl": 16, "Then": 16, "init_h": 16, "convert_t_h": 16, "later": 16, "init_fg": 16, "g_feq": 16, "init_fl": 16, "convert_t_fl": 16, "distribiut": 16, "overal": 16, "local_t": 16, "local_h": 16, "tempertur": 16, "delat": 16, "beta": 16, "delta": 16, "collision_g": 16, "colission_g": 16, "tau_": 16, "tmp_fg": 16, "streaming1_g": 16, "bc_concentr": 16, "elif": 16, "boundati": 16, "cell": 16, "convert_h_t": 16, "new_t": 16, "enthalpi": 16, "tliquid": 16, "speific": 16, "tsolid": 16, "convert_h_fl": 16, "new_fl": 16, "enthapli": 16, "soid": 16, "new_h": 16, "fluid_frc": 16, "streaming3_g": 16, "update_t_fl": 16, "init_solute_simul": 16, "ethalpi": 16, "init_concentr": 16, "solid_liquid": 16, "tempretur": 16}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"2phase": 0, "packag": [], "submodul": [], "lbm_solver_3d_2phas": 23, "modul": [], "lbm_solver_3d_2phase_spars": 24, "content": [0, 1, 4, 5, 14], "grey_scal": 1, "flow_domain_geo_gener": 2, "lbm_solver_3d_macro_sukop": 3, "phase_chang": 4, "lbm_3d_singlephase_solute_solv": 16, "lbm_3d_singlephase_solv": [7, 17], "example_cavity_melt": 18, "example_phase_chang": 19, "read_img_solute_psi_generation_2d": 20, "solute_psi_generation_2d": 21, "test1": 22, "single_phas": [5, 7, 11], "example_cav": 8, "example_porous_medium": 9, "flow_domain_geo_generation_2d": 10, "lbm_solver_3d": 11, "lbm_solver_3d_cav": 12, "lbm_solver_3d_spars": 13, "welcom": 14, "taichi": 14, "lbm3d": 14, "": 14, "document": 14, "indic": 14, "tabl": 14, "taichi_lbm3d": 15, "single_phase_exampl": [], "convert_stl_to_binari": 6}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"taichi_LBM3D": [[15, "taichi-lbm3d"]], "Welcome to taichi-LBM3D\u2019s documentation!": [[14, "welcome-to-taichi-lbm3d-s-documentation"]], "Contents:": [[14, null], [1, null], [5, null], [0, null], [4, null]], "Indices and tables": [[14, "indices-and-tables"]], "Grey_Scale": [[1, "grey-scale"]], "Single_phase": [[5, "single-phase"]], "Convert_stl_to_binary": [[6, "convert-stl-to-binary"]], "Single_phase.LBM_3D_SinglePhase_Solver": [[7, "single-phase-lbm-3d-singlephase-solver"]], "example_cavity": [[8, "example-cavity"]], "example_porous_medium": [[9, "example-porous-medium"]], "flow_domain_geo_generation_2D": [[10, "flow-domain-geo-generation-2d"]], "Single_phase.lbm_solver_3d": [[11, "single-phase-lbm-solver-3d"]], "lbm_solver_3d_sparse": [[13, "lbm-solver-3d-sparse"]], "flow_domain_geo_generation": [[2, "flow-domain-geo-generation"]], "lbm_solver_3d_cavity": [[12, "lbm-solver-3d-cavity"]], "lbm_solver_3d_Macro_Sukop": [[3, "lbm-solver-3d-macro-sukop"]], "2phase": [[0, "phase"]], "example_cavity_melting": [[18, "example-cavity-melting"]], "example_phase_change": [[19, "example-phase-change"]], "read_img_solute_psi_generation_2D": [[20, "read-img-solute-psi-generation-2d"]], "solute_psi_generation_2D": [[21, "solute-psi-generation-2d"]], "test1": [[22, "test1"]], "lbm_solver_3d_2phase": [[23, "lbm-solver-3d-2phase"]], "lbm_solver_3d_2phase_sparse": [[24, "lbm-solver-3d-2phase-sparse"]], "Phase_change": [[4, "phase-change"]], "LBM_3D_SinglePhase_Solver": [[17, "lbm-3d-singlephase-solver"]], "LBM_3D_SinglePhase_Solute_Solver": [[16, "lbm-3d-singlephase-solute-solver"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/docs/_build/html/twophase/lbm_solver_3d_2phase.html b/docs/_build/html/twophase/lbm_solver_3d_2phase.html new file mode 100644 index 0000000..65b85a2 --- /dev/null +++ b/docs/_build/html/twophase/lbm_solver_3d_2phase.html @@ -0,0 +1,813 @@ + + + + + + + lbm_solver_3d_2phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_2phase

+

This solver is the multiphase model based on color gradient model +Firstly, it defines some parameters

+
# NOTE: THIS CODE NEED taichi_glsl, so please use taichi version <=0.8.5
+#import taichi, numpy, pyevtk and time package
+import taichi as ti
+import numpy as np
+#import taichi_glsl as ts
+from pyevtk.hl import gridToVTK
+import time
+#from taichi_glsl import scalar
+
+#from taichi_glsl.scalar import isinf, isnan
+#from taichi_glsl.vector import vecFill
+#intialize taichi
+ti.init(arch=ti.cpu)
+#ti.init(arch=ti.gpu, dynamic_index=True,offline_cache=True)
+
+#enable projection
+enable_projection = True
+# 131*131*131
+nx,ny,nz = 131,131,131
+#nx,ny,nz = 131,131,131
+#external force in x,y,z direction
+fx,fy,fz = 5.0e-5,-2e-5,0.0
+#niu = 0.1
+#liquid viscosity
+niu_l = 0.1         #psi>0
+#gas viscosity
+niu_g = 0.1         #psi<0
+#psi in color gradient calculation
+psi_solid = 0.7
+#surface tension
+CapA = 0.005
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 0, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+bc_psi_x_left, psi_x_left = 1, -1.0          #   boundary condition for phase-field: 0 = periodic,
+bc_psi_x_right, psi_x_right = 0, 1.0        #   1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2
+bc_psi_y_left, psi_y_left = 0, 1.0
+bc_psi_y_right, psi_y_right = 0, 1.0
+bc_psi_z_left, psi_z_left = 0, 1.0
+bc_psi_z_right, psi_z_right = 0, 1.0
+
+# Non Sparse memory allocation
+#density distribution function nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#velocity nx*ny*nz vector
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#psi nx*ny*nz
+psi = ti.field(ti.f32, shape=(nx,ny,nz))
+#density r nx*ny*nz
+rho_r = ti.field(ti.f32, shape=(nx,ny,nz))
+#density b nx*ny*nz
+rho_b = ti.field(ti.f32, shape=(nx,ny,nz))
+#density r nx*ny*nz
+rhor = ti.field(ti.f32, shape=(nx,ny,nz))
+#density b nx*ny*nz
+rhob = ti.field(ti.f32, shape=(nx,ny,nz))
+#lattice speed 19 dimensional vector
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#S_dig = ti.field(ti.f32,shape=(19))
+#lattice speed 19 dimensional vector
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#weight parameter 19 dimensional vector
+w = ti.field(ti.f32, shape=(19))
+#solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#streaming vector 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+
+#external force 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+# x-left velocity 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+# x-right velocity 3 dimensional vector
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+# y-left velocity 3 dimensional vector
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+# y-right velocity 3 dimensional vector
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+# z-left velocity 3 dimensional vector
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+# z-right velocity 3 dimensional vector
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#inverse transforming matrix 19*19
+inv_M = ti.field(ti.f32, shape=(19,19))
+#parameters for calculating the parameter of s diagonal
+#=======================================#
+lg0, wl, wg = 0.0, 0.0, 0.0
+l1, l2, g1, g2 = 0.0, 0.0, 0.0, 0.0
+wl = 1.0/(niu_l/(1.0/3.0)+0.5)
+wg = 1.0/(niu_g/(1.0/3.0)+0.5)
+lg0 = 2*wl*wg/(wl+wg)
+l1=2*(wl-lg0)*10
+l2=-l1/0.2
+g1=2*(lg0-wg)*10
+g2=g1/0.2
+#=======================================#
+
+#transformation matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#inverde of transforming matrix
+inv_M_np = np.linalg.inv(M_np)
+#streaming array
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#M matrix from the numpy
+M.from_numpy(M_np)
+#inverse matrix from numpy
+inv_M.from_numpy(inv_M_np)
+
+#steaming array from numpy
+LR.from_numpy(LR_np)
+#external force with vector three dimensional
+ext_f[None] = ti.Vector([fx,fy,fz])
+#set transforming matrix, inverse matrix and streaming vector non-modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+
+#set x,y,z array with nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#set meshgrid and return three meshgrid matrix X,Y,Z with non-cartesian indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local, u) calculate the equilibrium denisty distribution function

+
@ti.func
+def feq(k,rho_local, u):
+    # eu=ts.vector.dot(e[k],u)
+    # uv=ts.vector.dot(u,u)
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #same as single phase equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() intialize some variable

+
@ti.kernel
+def init():
+    for i,j,k in solid:
+        if (solid[i,j,k] == 0):
+        #if it is fluid intialize the density and velocity be one and zero
+            rho[i,j,k] = 1.0
+            v[i,j,k] = ti.Vector([0,0,0])
+            # set density r and density b based on psi
+            rho_r[i,j,k] = (psi[i,j,k]+1.0)/2.0
+            rho_b[i,j,k] = 1.0 - rho_r[i,j,k]
+            #set another density r and density b
+            rhor[i,j,k] = 0.0
+            rhob[i,j,k] = 0.0
+            #set density distribution equals to equilibrium density distribution function
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+                F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+
+
+

init_geo(filename, filename2) import the geometry data

+
def init_geo(filename, filename2):
+    #read the solid flag data and set it as an column major array
+    in_dat = np.loadtxt(filename)
+    in_dat[in_dat>0] = 1
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+
+    #read the phase data from file
+    phase_in_dat = np.loadtxt(filename2)
+    #set the array from the file with colum major
+    phase_in_dat = np.reshape(phase_in_dat, (nx,ny,nz), order='F')
+
+    return in_dat, phase_in_dat
+
+
+

static_init() initialize non-modified variable

+
@ti.kernel
+def static_init():
+    if ti.static(enable_projection): # No runtime overhead
+    #define lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #define another lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #define a weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #define the boundary velocity
+    bc_vel_x_left = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M() calculate the density distribution function in momentum space

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in ti.static(range(19)):
+        for s in ti.static(range(19)):
+            #calculate here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s force term

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in ti.static(range(19)):
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

Compute_C() calculate the color gradient

+
@ti.func
+def Compute_C(i):
+    C = ti.Vector([0.0,0.0,0.0])
+    ind_S = 0
+    for s in ti.static(range(19)):
+        ip = periodic_index_for_psi(i+e[s])
+        if (solid[ip] == 0):
+            #if it's fluid calculate the color gradient based on psi
+            C += 3.0*w[s]*e_f[s]*psi[ip]
+        else:
+            #if it is solid and abs(density r-density b) is less than 0.9
+            ind_S = 1
+            #calculate the color gradient based on psi_solid and set ind_s=1
+            C += 3.0*w[s]*e_f[s]*psi_solid
+
+    if (abs(rho_r[i]-rho_b[i]) > 0.9) and (ind_S == 1):
+        #if abs(density r-density b) is very large and it's solid set color gradient to be zero
+        C = ti.Vector([0.0,0.0,0.0])
+
+    return C
+
+
+

Compute_S_local calculate parameter of s diagonal

+
@ti.func
+def Compute_S_local(id):
+    sv=0.0; sother=0.0
+    if (psi[id]>0):
+        if (psi[id]>0.1):
+        #if psi>0.1
+        #sv=1.0/(niu_l/(1.0/3.0)+0.5)
+            sv=wl
+        else:
+        #if 0<psi<0.1   calculate sv
+            sv=lg0+l1*psi[id]+l2*psi[id]*psi[id]
+    else:
+        #if psi <-0.1
+        if (psi[id]<-0.1):
+        #calculate sv
+            sv=wg
+        else:
+        #if psi >-0.1
+            sv=lg0+g1*psi[id]+g2*psi[id]*psi[id]
+    #calculate s other
+    sother = 8.0*(2.0-sv)/(8.0-sv)
+
+    #set s diagonal to be zero and set certain element to be relatie local parameter
+    S = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    S[1]=sv;S[2]=sv;S[4]=sother;S[6]=sother;S[8]=sother;S[9]=sv;
+    S[10]=sv;S[11]=sv;S[12]=sv;S[13]=sv;S[14]=sv;S[15]=sv;S[16]=sother;
+    S[17]=sother;S[18]=sother;
+
+
+    return S;
+
+
+

collision() define the collision and recoloring process

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is inner fluid, calculate color gradient divided by norm of color gradient
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            uu = v[i,j,k].norm_sqr()
+            C = Compute_C(ti.Vector([i,j,k]))
+            cc = C.norm()
+            normal = ti.Vector([0.0,0.0,0.0])
+            if cc>0 :
+                normal = C/cc
+            #calculate the M
+            m_temp = multiply_M(i,j,k)
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            #calculate surface tension term
+            meq[1] += CapA*cc
+            meq[9] += 0.5*CapA*cc*(2*normal.x*normal.x-normal.y*normal.y-normal.z*normal.z)
+            meq[11] += 0.5*CapA*cc*(normal.y*normal.y-normal.z*normal.z)
+            meq[13] += 0.5*CapA*cc*(normal.x*normal.y)
+            meq[14] += 0.5*CapA*cc*(normal.y*normal.z)
+            meq[15] += 0.5*CapA*cc*(normal.x*normal.z)
+            #calculate s local
+            S_local = Compute_S_local(ti.Vector([i,j,k]))
+            #calculate s*(m-meq)
+            for s in ti.static(range(19)):
+                m_temp[s] -= S_local[s]*(m_temp[s]-meq[s])
+                m_temp[s] += (1-0.5*S_local[s])*GuoF(i,j,k,s,v[i,j,k])
+            #calculte convection of density filed
+            g_r = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            g_b = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = 0
+                for l in ti.static(range(19)):
+                # 1.single phase collision
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+                g_r[s] = feq(s,rho_r[i,j,k],v[i,j,k])
+                g_b[s] = feq(s,rho_b[i,j,k],v[i,j,k])
+
+            if (cc>0):
+                for kk in ti.static([1,3,5,7,9,11,13,15,17]):
+                    # ef=ts.vector.dot(e[kk],C)
+                    ef=e[kk].dot(C)
+                    cospsi= g_r[kk] if (g_r[kk]<g_r[kk+1]) else g_r[kk+1]
+                    cospsi= cospsi if (cospsi<g_b[kk]) else g_b[kk]
+                    cospsi=cospsi if (cospsi<g_b[kk+1]) else g_b[kk+1]
+                    cospsi*=ef/cc
+                    #2.surface tension perturbation
+                    g_r[kk]+=cospsi
+                    g_r[kk+1]-=cospsi
+                    g_b[kk]-=cospsi
+                    g_b[kk+1]+=cospsi
+            # recoloring
+            for s in ti.static(range(19)):
+                ip = periodic_index(ti.Vector([i,j,k])+e[s])
+                if (solid[ip]==0):
+                    rhor[ip] += g_r[s]
+                    rhob[ip] += g_b[s]
+                else:
+                    rhor[i,j,k] += g_r[s]
+                    rhob[i,j,k] += g_b[s]
+
+
+

periodic_index() defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(i):
+    iout = i
+    if i[0]<0:     iout[0] = nx-1
+    if i[0]>nx-1:  iout[0] = 0
+    if i[1]<0:     iout[1] = ny-1
+    if i[1]>ny-1:  iout[1] = 0
+    if i[2]<0:     iout[2] = nz-1
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

periodic_index_for_psi(i) defines the index of boundary for psi if using periodic boundary condition

+
@ti.func
+def periodic_index_for_psi(i):
+    iout = i
+    if i[0]<0:
+    #if periodic boundary condition set index based on periodic boundary condition
+        if bc_psi_x_left == 0:
+            iout[0] = nx-1
+        else:
+    #otherwise set neighbouring index,
+    #similar for other sides
+            iout[0] = 0
+
+    if i[0]>nx-1:
+        if bc_psi_x_right==0:
+            iout[0] = 0
+        else:
+            iout[0] = nx-1
+
+    if i[1]<0:
+        if bc_psi_y_left == 0:
+            iout[1] = ny-1
+        else:
+            iout[1] = 0
+
+    if i[1]>ny-1:
+        if bc_psi_y_right==0:
+            iout[1] = 0
+        else:
+            iout[1] = ny-1
+
+    if i[2]<0:
+        if bc_psi_z_left==0:
+            iout[2] = nz-1
+        else:
+            iout[2] = 0
+
+    if i[2]>nz-1:
+        if bc_psi_z_right==0:
+            iout[2] = 0
+        else:
+            iout[2] = nz-1
+
+    return iout
+
+
+

streaming1() defines steaming process of denisty distribution function

+
@ti.kernel
+def streaming1():
+    for i,j,k in rho:
+        #if (solid[i,j,k] == 0):
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            ci = ti.Vector([i,j,k])
+            for s in ti.static(range(19)):
+                ip = periodic_index(ci+e[s])
+                if (solid[ip]==0):
+                #if it is fluid,streaming along certain direction
+                    F[ip,s] = f[ci,s]
+                else:
+                #if it is on the solid, bounce back to the opposite
+                    F[ci,LR[s]] = f[ci,s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition_psi() defines boundary condition for psi

+
@ti.kernel
+def Boundary_condition_psi():
+    if bc_psi_x_left == 1:
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+            #if it is fluid the value of psi equals to the psi_x_left
+                psi[0,j,k] = psi_x_left
+            #calculate density according to psi
+            #similar for other sides
+                rho_r[0,j,k] = (psi_x_left + 1.0)/2.0
+                rho_b[0,j,k] = 1.0 - rho_r[0,j,k]
+
+    if bc_psi_x_right == 1:
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                psi[nx-1,j,k] = psi_x_right
+                rho_r[nx-1,j,k] = (psi_x_right + 1.0)/2.0
+                rho_b[nx-1,j,k] = 1.0 - rho_r[nx-1,j,k]
+
+    if bc_psi_y_left == 1:
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                psi[i,0,k] = psi_y_left
+                rho_r[i,0,k] = (psi_y_left + 1.0)/2.0
+                rho_b[i,0,k] = 1.0 - rho_r[i,0,k]
+
+    if bc_psi_y_right == 1:
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                psi[i,ny-1,k] = psi_y_right
+                rho_r[i,ny-1,k] = (psi_y_right + 1.0)/2.0
+                rho_b[i,ny-1,k] = 1.0 - rho_r[i,ny-1,k]
+
+    if bc_psi_z_left == 1:
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                psi[i,j,0] = psi_z_left
+                rho_r[i,j,0] = (psi_z_left + 1.0)/2.0
+                rho_b[i,j,0] = 1.0 - rho_r[i,j,0]
+
+    if bc_psi_z_right == 1:
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                psi[i,j,nz-1] = psi_z_right
+                rho_r[i,j,nz-1] = (psi_z_right + 1.0)/2.0
+                rho_b[i,j,nz-1] = 1.0 - rho_r[i,j,nz-1]
+
+
+

Boundary_condition defines boundary condition and the same as single_phase solver

+
@ti.kernel
+def Boundary_condition():
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])
+
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])
+
+
+    # Direction Y
+    if ti.static(bc_y_left==1):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,1,k]>0):
+                        F[i,0,k,s]=feq(s, rho_bcyl, v[i,1,k])
+                    else:
+                        F[i,0,k,s]=feq(s, rho_bcyl, v[i,0,k])
+
+    if ti.static(bc_y_left==2):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    F[i,0,k,s]=feq(LR[s], 1.0, bc_vel_y_left[None])-F[i,0,k,LR[s]]+feq(s,1.0,bc_vel_y_left[None])
+
+    if ti.static(bc_y_right==1):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,ny-2,k]>0):
+                        F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-2,k])
+                    else:
+                        F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-1,k])
+
+    if ti.static(bc_y_right==2):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    F[i,ny-1,k,s]=feq(LR[s], 1.0, bc_vel_y_right[None])-F[i,ny-1,k,LR[s]]+feq(s,1.0,bc_vel_y_right[None])
+
+    # Z direction
+    if ti.static(bc_z_left==1):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,j,1]>0):
+                        F[i,j,0,s]=feq(s, rho_bczl, v[i,j,1])
+                    else:
+                        F[i,j,0,s]=feq(s, rho_bczl, v[i,j,0])
+
+    if ti.static(bc_z_left==2):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    F[i,j,0,s]=feq(LR[s], 1.0, bc_vel_z_left[None])-F[i,j,0,LR[s]]+feq(s,1.0,bc_vel_z_left[None])
+
+    if ti.static(bc_z_right==1):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,j,nz-2]>0):
+                        F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-2])
+                    else:
+                        F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-1])
+
+    if ti.static(bc_z_right==2):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                for s in ti.static(range(19)):
+                    F[i,j,nz-1,s]=feq(LR[s], 1.0, bc_vel_z_right[None])-F[i,j,nz-1,LR[s]]+feq(s,1.0,bc_vel_z_right[None])
+
+
+

Boundary_condition_psi() calculate macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i,j,k, in rho:
+        #if (solid[i,j,k] == 0):
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            rho[i,j,k] = 0
+            v[i,j,k] = ti.Vector([0,0,0])
+            #define denisty r and density b
+            rho_r[i,j,k] = rhor[i,j,k]
+            rho_b[i,j,k] = rhob[i,j,k]
+            rhor[i,j,k] = 0.0; rhob[i,j,k] = 0.0
+
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = F[i,j,k,s]
+                rho[i,j,k] += f[i,j,k,s]
+                v[i,j,k] += e_f[s]*f[i,j,k,s]
+            #calculate velocity and psi
+            v[i,j,k] /= rho[i,j,k]
+            v[i,j,k] += (ext_f[None]/2)/rho[i,j,k]
+            psi[i,j,k] = rho_r[i,j,k]-rho_b[i,j,k]/(rho_r[i,j,k] + rho_b[i,j,k])
+
+
+

The code snippts below define time, read file do the simulation and export results +It is almost the same as the single-phase solver except two input file and export phase variable

+
time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+
+solid_np, phase_np = init_geo('./img_ftb131.txt','./phase_ftb131.dat')
+
+#solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+psi.from_numpy(phase_np)
+
+static_init()
+init()
+
+#print(wl,wg, lg0, l1, l2,'~@@@@@~@~@~@~@')
+
+for iter in range(80000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    Boundary_condition_psi()
+
+
+    if (iter%500==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()[0:nx,0:ny,0:nz]),
+                            "phase": np.ascontiguousarray(psi.to_numpy()[0:nx,0:ny,0:nz]),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,0]), np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,1]),np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,2]))
+                            }
+            )
+
+#ti.print_kernel_profile_info()
+#ti.print_profile_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/twophase/lbm_solver_3d_2phase_sparse.html b/docs/_build/html/twophase/lbm_solver_3d_2phase_sparse.html new file mode 100644 index 0000000..6fe7cea --- /dev/null +++ b/docs/_build/html/twophase/lbm_solver_3d_2phase_sparse.html @@ -0,0 +1,146 @@ + + + + + + + lbm_solver_3d_2phase_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_2phase_sparse

+

This file is almost the same as the lbm_solver_3d_2phase.py file execpt sparse storage definition of some varibles

+
# Sparse Storage memory allocation
+f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+rhor = ti.field(ti.f32)
+rhob = ti.field(ti.f32)
+rho_r = ti.field(ti.f32)
+rho_b = ti.field(ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhor)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhob)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_r)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_b)
+
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

Above code snippts define the sparse storage of some varibles

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_sources/2phase.rst.txt b/docs/_sources/2phase.rst.txt new file mode 100644 index 0000000..d0d402f --- /dev/null +++ b/docs/_sources/2phase.rst.txt @@ -0,0 +1,11 @@ +2phase +============== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + twophase/lbm_solver_3d_2phase_sparse + twophase/lbm_solver_3d_2phase + + diff --git a/docs/_sources/Convert_stl_to_binary.rst.txt b/docs/_sources/Convert_stl_to_binary.rst.txt new file mode 100644 index 0000000..edf04e6 --- /dev/null +++ b/docs/_sources/Convert_stl_to_binary.rst.txt @@ -0,0 +1,4 @@ +Convert_stl_to_binary +================================= + +This file reads the stl file and output to vtk file \ No newline at end of file diff --git a/docs/_sources/Grey_Scale.rst.txt b/docs/_sources/Grey_Scale.rst.txt new file mode 100644 index 0000000..ef21d69 --- /dev/null +++ b/docs/_sources/Grey_Scale.rst.txt @@ -0,0 +1,10 @@ +Grey\_Scale +=================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Grey_scale/flow_domain_geo_generation + Grey_scale/lbm_solver_3d_Macro_Sukop + diff --git a/docs/_sources/Grey_scale/flow_domain_geo_generation.rst.txt b/docs/_sources/Grey_scale/flow_domain_geo_generation.rst.txt new file mode 100644 index 0000000..bf4c4a7 --- /dev/null +++ b/docs/_sources/Grey_scale/flow_domain_geo_generation.rst.txt @@ -0,0 +1,34 @@ +flow_domain_geo_generation +================================= + +This file output geometry data + +.. code-block:: python + + #import numpy and math packahe + import numpy as np + import math + + + # INPUT STL FILE NAME + output_name = 'geo.dat' + + # POINT SEARCHING RESOLUTION IN X direction, Y,Z direction will be calculate by the code + # the bigger value ~ more points will be found inside STL + dnx, dny, dnz = 60, 60, 60 + + + #========================================================== + # DO NOT CHANGE BELOW + #========================================================== + #create np matrix with dnx*dny*dnz zero + out_dat = np.zeros((dnx,dny,dnz)) + + #=======Can define some geometry here to out_dat========= + #out_dat[1,:,:] = 1 + + #========================================================= + #reshape out_dat with column major + out_dat = out_dat.reshape(out_dat.size, order = 'F') + #save the file with the transfer of out_dat based on integer type + np.savetxt(output_name,out_dat.T,fmt='%d') \ No newline at end of file diff --git a/docs/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt b/docs/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt new file mode 100644 index 0000000..26eb0cc --- /dev/null +++ b/docs/_sources/Grey_scale/lbm_solver_3d_Macro_Sukop.rst.txt @@ -0,0 +1,70 @@ +lbm_solver_3d_Macro_Sukop +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. Some parameter is different + +.. code-block:: python + + #grid resolution + nx,ny,nz = 60,50,5 + #external force + fx,fy,fz = 1.0e-6,0.0,0.0 + #viscosity + niu = 0.1 + #import geometry + geo_name = './BC.dat' + #maximum timestep + max_timestep = 5000 + #output frequency + output_fre = 100 + #vtk file output frequency + vtk_fre = 500 + +2. There are two array for solid flag data. + +.. code-block:: python + + ns_np = init_geo(geo_name) + solid_np = ns_np.astype(int) + #solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + ns.from_numpy(ns_np) + +3. The streaming function is different + +.. code-block:: python + + @ti.kernel + def streaming0(): + for i in ti.grouped(rho): + if (solid[i] == 0): + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + #if it is fluid f2=f otherwise apply bounce-back f2[i,s]=f[ip,LR[s]] + f2[i,s] = f[i,s] + ns[i]*(f[ip,LR[s]] - f[i,s]) + + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + if (solid[i] == 0): + #if it is fluid apply streaming + for s in ti.static(range(19)): + ip = periodic_index(i+e[s]) + F[ip,s] = f2[i,s] + + #if (solid[ip]==0): + # F[ip,s] = f[i,s] + #else: + # F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + #not used + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in ti.static(range(19)): + f[i,s] = F[i,s] + +``streaming3()`` calculates the macroscopic variable \ No newline at end of file diff --git a/docs/_sources/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_sources/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_sources/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.x0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + if i[1]<0: iout[1] = ny-1 + if i[1]>ny-1: iout[1] = 0 + if i[2]<0: iout[2] = nz-1 + if i[2]>nz-1: iout[2] = 0 + + return iout + +this + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + if (solid[i] == 0): + for s in range(19): + ip = periodic_index(i+e[s]) + if (solid[ip]==0): + F[ip,s] = f[i,s] + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +this + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +this + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + +this + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +this \ No newline at end of file diff --git a/docs/_sources/Single_phase.rst.txt b/docs/_sources/Single_phase.rst.txt new file mode 100644 index 0000000..d66928e --- /dev/null +++ b/docs/_sources/Single_phase.rst.txt @@ -0,0 +1,20 @@ +Single\_phase +===================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + Single_phase/LBM_3D_SinglePhase_Solver + Single_phase/lbm_solver_3d + Single_phase/lbm_solver_3d_cavity + Single_phase/lbm_solver_3d_sparse + Single_phase/flow_domain_geo_generation_2D + Single_phase/example_cavity + Single_phase/example_porous_medium + Single_phase/Convert_stl_to_binary + + + + + diff --git a/docs/_sources/Single_phase/Convert_stl_to_binary.rst.txt b/docs/_sources/Single_phase/Convert_stl_to_binary.rst.txt new file mode 100644 index 0000000..edf04e6 --- /dev/null +++ b/docs/_sources/Single_phase/Convert_stl_to_binary.rst.txt @@ -0,0 +1,4 @@ +Convert_stl_to_binary +================================= + +This file reads the stl file and output to vtk file \ No newline at end of file diff --git a/docs/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_sources/Single_phase/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = ny-1 + #y-right + if i[1]>ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = nz-1 + #z-right + if i[2]>nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming process of denisty distibution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + #if it is fluid + if (solid[i] == 0): + for s in range(19): + #the neighbour index + ip = periodic_index(i+e[s]) + #if neighbour index is fluid just streaming + if (solid[ip]==0): + F[ip,s] = f[i,s] + #if neighbour index is solid just bounce back + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +``streaming2()`` a simple streaming process without consideration of solid and boundary + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +``Boudary_condition()`` define the bounary condition of fixed pressure and fixed velocity + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + #pressure-boundary condtion x-left + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #if boundary is fluid but the neighbour is solid + #equilibrium density distribution function is calculated based on the neighbour velocity + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + #if boundary is fluid and the neighbour is also fluid + #equilibrium density distribution function is calculated based on the boundary velocity + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + #velocity-boundary conditon x-left + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #calculate density distribution fucntion based on equilibrium part and non-equilibrium part + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + #pressure boundary condition x-right similar to x-left + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + #velocity booundary condition x-right similar to x-left + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + + +``streaming3()`` calculate the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + #if it is fluid calculate density and velocity based on density distribution function + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + # if it is solid set denisty equals one and velocity equals zero + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +At the end of the file do the actual simulation and export the data + +.. code-block:: python + + #define some time varible + time_init = time.time() + time_now = time.time() + time_pre = time.time() + dt_count = 0 + + #import the solid flag data + #solid_np = init_geo('./BC.dat') + solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + + # do the initialization + static_init() + init() + + # do the actual simulation + for iter in range(50000+1): + colission() + streaming1() + Boundary_condition() + #streaming2() + streaming3() + # calculate every 1000 time step + if (iter%1000==0): + + time_pre = time_now + time_now = time.time() + #calculate the time difference between now and previous time step + diff_time = int(time_now-time_pre) + #calculate the time difference between now and the initial time + elap_time = int(time_now-time_init) + #divmod function return the quotient and the remainder + #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + + #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable + if (iter%10000==0): + gridToVTK( + "./structured"+str(iter), + x, + y, + z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()), + "rho": np.ascontiguousarray(rho.to_numpy()), + "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2])) + } + ) + # ti.sync() + # ti.profiler.print_kernel_profiler_info() + #print the profiler information of every kernel and task of taichi in this file + ti.profiler.print_scoped_profiler_info() diff --git a/docs/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt b/docs/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt new file mode 100644 index 0000000..08d16d9 --- /dev/null +++ b/docs/_sources/Single_phase/lbm_solver_3d_cavity.rst.txt @@ -0,0 +1,37 @@ +lbm_solver_3d_cavity +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: + +1. The Grid resolution in this solver is 50x50x50 +2. The viscosity in this solver is 0.16667 +3. The boundary condition in this solver is velocity solver on x-right as follows + +boundary condition of this solver + +.. code-block:: python + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + +x-right is implementated with velocity boundary condition + +4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary. + +.. code-block:: python + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left)) + + +5. Finally, the definition of the varible is slightly different from lbm_solver_3d \ No newline at end of file diff --git a/docs/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt b/docs/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt new file mode 100644 index 0000000..d76a344 --- /dev/null +++ b/docs/_sources/Single_phase/lbm_solver_3d_sparse.rst.txt @@ -0,0 +1,24 @@ +lbm_solver_3d_sparse +================================= + + +This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible: + +.. code-block:: python + + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse. \ No newline at end of file diff --git a/docs/_sources/aaa.rst.txt b/docs/_sources/aaa.rst.txt new file mode 100644 index 0000000..d136b12 --- /dev/null +++ b/docs/_sources/aaa.rst.txt @@ -0,0 +1,575 @@ +Single\_phase.LBM\_3D\_SinglePhase\_Solver +============================================== +This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called ``LB3D_Solver_Single_Phase``. The Class has a default function +``__init__()`` as normal python class. + +.. code-block:: python + + class LB3D_Solver_Single_Phase: + def __init__(self, nx, ny, nz, sparse_storage = False): + #enable projection, define a sparse_storage flag + self.enable_projection = True + self.sparse_storage = sparse_storage + #the grid of the simulation in three direction + self.nx,self.ny,self.nz = nx,ny,nz + #nx,ny,nz = 120,120,120 + #density distribution function in three direction + self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0 + #kinematic viscosity in lattice unit + self.niu = 0.16667 + #define a taichi field of float scalar which is the maximum velocity + self.max_v=ti.field(ti.f32,shape=()) + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary x-axis right side + self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + if sparse_storage == False: + #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define density with taichi field which has nx*ny*nz element and each element is a scalar + self.rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector + self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + else: + #sparse storage the variable + #define old density distribution function by taichi field with one element and which is a 19 dimensional vector + self.f = ti.Vector.field(19, ti.f32) + #define new density distribution function by taichi field with one element and which is a 19 dimensional vector + self.F = ti.Vector.field(19,ti.f32) + #define density by taichi field with one element which is a scalar + self.rho = ti.field(ti.f32) + #define velocity by taichi field with one element which is a scalar + self.v = ti.Vector.field(3, ti.f32) + #define partition equals 3 + n_mem_partition = 3 + #every index has four variable rho, v, f, F + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F) + #define lattice speed 3x19 + self.e = ti.Vector.field(3,ti.i32, shape=(19)) + #define s diagnol vector + self.S_dig = ti.Vector.field(19,ti.f32,shape=()) + #define another lattice speed 3x19 + self.e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #define weight parameter + self.w = ti.field(ti.f32, shape=(19)) + #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid + self.solid = ti.field(ti.i8,shape=(nx,ny,nz)) + #define external force which is a three dimensional vector + self.ext_f = ti.Vector.field(3,ti.f32,shape=()) + #define transforming matrix M which is a 19x19 dimension matrix + self.M = ti.Matrix.field(19, 19, ti.f32, shape=()) + #define the inverse transforming matrix M^-1 + self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=()) + #define the numpy version of M. + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define the numpy version of M^-1 + inv_M_np = np.linalg.inv(M_np) + #define the index of 19 lattice node for bounce back + self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17] + #define taichi field version of M + self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #define taichi field version of M^-1 + self.inv_M[None] = ti.Matrix(inv_M_np) + #define coordinate nx*ny*nz + self.x = np.linspace(0, nx, nx) + self.y = np.linspace(0, ny, ny) + self.z = np.linspace(0, nz, nz) + #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij') + +Following is the ``init_simulation()`` function which initialize some simulation parameter + +.. code-block:: python + + def init_simulation(self): + #x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl + self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl] + self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr] + self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl] + self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr] + self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl] + self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr] + #define single relaxation time tau + self.tau_f=3.0*self.niu+0.5 + #define single relaxation frequency + self.s_v=1.0/self.tau_f + #define other parameter in the s diagonal + self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v) + #define the s diagonal + self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other]) + #define external force + #self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz]) + self.ext_f[None][0] = self.fx + self.ext_f[None][1] = self.fy + self.ext_f[None][2] = self.fz + #if external force greater than zero define force_flag equals 1 + #other wise force_flag equals 0 + if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)): + self.force_flag = 1 + else: + self.force_flag = 0 + + #define M M^-1 S diagonal not been modified. + ti.static(self.inv_M) + ti.static(self.M) + #ti.static(LR) + ti.static(self.S_dig) + #statically initialize + self.static_init() + self.init() + +``feq()`` calculate the equilibrium density distribution function in velocity space + +.. code-block:: python + + #taichi function + @ti.func + def feq(self, k,rho_local, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + #calculate the equilibrium density distribution function + feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, self.w[k]) + return feqout + +``init()`` initialize density velocity and density distribution function + +.. code-block:: python + + @ti.kernel + def init(self): + for i,j,k in self.solid: + #print(i,j,k) + if (self.sparse_storage==False or self.solid[i,j,k]==0): + #if it is fluid then initialize density equals one + self.rho[i,j,k] = 1.0 + #initialize the velocity to be zero in all the direction + self.v[i,j,k] = ti.Vector([0,0,0]) + for s in ti.static(range(19)): + #initialize 19 denisty distribution function equals the equilibrium density distribution function + self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k]) + #print(F[i,j,k,s], feq(s,1.0,v[i,j,k])) + +``init_geo()`` import data from a file + +.. code-block:: python + + def init_geo(self,filename): + #load data from a file + in_dat = np.loadtxt(filename) + #set any positive value to be one + in_dat[in_dat>0] = 1 + #reshape it as a nx*ny*nz vector with column major + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + #assign it to solid varible + self.solid.from_numpy(in_dat) + +``static_init()`` initialize lattice speeed and weight parameter. These parameter is not modified during the simulation + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def static_init(self): + if ti.static(self.enable_projection): # No runtime overhead + #initialize the lattice speed + self.e[0] = ti.Vector([0,0,0]) + self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1]) + self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0]) + self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1]) + self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1]) + + self.e_f[0] = ti.Vector([0,0,0]) + self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1]) + self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0]) + self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1]) + self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1]) + #initialize the weight parameter + self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0; + self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0; + self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0; + +``meq_vec(self, rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(self, rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``cal_local_force(self,i,j,k)`` transfer the external force to a vector + +.. code-block:: python + + @ti.func + def cal_local_force(self,i,j,k): + f = ti.Vector([self.fx, self.fy, self.fz]) + return f + +``collision()`` defines the collision of LBM process + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def colission(self): + #outer loop for every index in rho field + for i,j,k in self.rho: + #if is not solid and it is not on the boundary + if (self.solid[i,j,k] == 0 and iself.nx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = self.ny-1 + #y-right + if i[1]>self.ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = self.nz-1 + #z-right + if i[2]>self.nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming prcoess of denisty distribution function + +.. code-block:: python + + #taichi kernel for parallization + @ti.kernel + def streaming1(self): + #grouped index which loop the index of rho + for i in ti.grouped(self.rho): + # streaming for fluid and non-boundary + if (self.solid[i] == 0 and i.x0): + # if the boundary is fluid but the neighbour is solid then the density distribution + #function equals to the solid velcity equilibrium density distribution fucntion + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k]) + else: + # if the boundary is fluid and the neighbour is fluid then the density distribution + #function equals to equilibrium density distribution fucntion on the boundary + self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k]) + #fixed velocity boundary condition + if ti.static(self.bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + # if the boundary is fluid new density distribution fucntion equals to equilibrium density + #distibution function with fixed velocity + if (self.solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left)) + # fixed pressure boundary condition on x-right similar for x-left + if ti.static(self.bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + if (self.solid[self.nx-2,j,k]>0): + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k]) + else: + self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k]) + # fixed velocity boubndary condition on x-right similar for x-left + if ti.static(self.bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + if (self.solid[self.nx-1,j,k]==0): + for s in ti.static(range(19)): + #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right)) + + # Direction Y + #fixed pressure boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,1,k]>0): + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k]) + else: + self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k]) + #fixed velocity boundary condition on y-left similar for x direction + if ti.static(self.bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,0,k]==0): + for s in ti.static(range(19)): + #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None]) + self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left)) + #fixed pressure boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + if (self.solid[i,self.ny-2,k]>0): + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k]) + else: + self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k]) + #fixed velocity boundary condition on y-right similar for x direction + if ti.static(self.bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + if (self.solid[i,self.ny-1,k]==0): + for s in ti.static(range(19)): + #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None]) + self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right)) + + # Z direction + #fixed pressure boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,1]>0): + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1]) + else: + self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0]) + #fixed velocity boundary condition on z-left similar for x direction + if ti.static(self.bc_z_left==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,0]==0): + for s in ti.static(range(19)): + #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None]) + self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left)) + #fixed pressure boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + if (self.solid[i,j,self.nz-2]>0): + self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2]) + else: + self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1]) + #fixed velocity boundary condition on z-right similar for x direction + if ti.static(self.bc_z_right==2): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + if (self.solid[i,j,self.nz-1]==0): + for s in ti.static(range(19)): + #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None]) + self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right)) + +``streaming3()`` calculatet the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + #print(i.x, i.y, i.z) + #if it is fluid and not on the boundary + if (self.solid[i]==0 and i.xnx-1: iout[0] = 0 + #y-left + if i[1]<0: iout[1] = ny-1 + #y-right + if i[1]>ny-1: iout[1] = 0 + #z-left + if i[2]<0: iout[2] = nz-1 + #z-right + if i[2]>nz-1: iout[2] = 0 + + return iout + +``streaming1()`` defines the streaming process of denisty distibution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i in ti.grouped(rho): + #if it is fluid + if (solid[i] == 0): + for s in range(19): + #the neighbour index + ip = periodic_index(i+e[s]) + #if neighbour index is fluid just streaming + if (solid[ip]==0): + F[ip,s] = f[i,s] + #if neighbour index is solid just bounce back + else: + F[i,LR[s]] = f[i,s] + #print(i, ip, "@@@") + +``streaming2()`` a simple streaming process without consideration of solid and boundary + +.. code-block:: python + + @ti.kernel + def streaming2(): + for i in ti.grouped(rho): + for s in range(19): + f[i,s] = F[i,s] + +``Boudary_condition()`` define the bounary condition of fixed pressure and fixed velocity + +.. code-block:: python + + @ti.kernel + def Boundary_condition(): + #pressure-boundary condtion x-left + if ti.static(bc_x_left==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #if boundary is fluid but the neighbour is solid + #equilibrium density distribution function is calculated based on the neighbour velocity + if (solid[1,j,k]>0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + #if boundary is fluid and the neighbour is also fluid + #equilibrium density distribution function is calculated based on the boundary velocity + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + #velocity-boundary conditon x-left + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in range(19): + #calculate density distribution fucntion based on equilibrium part and non-equilibrium part + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + + #pressure boundary condition x-right similar to x-left + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + #velocity booundary condition x-right similar to x-left + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in range(19): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) #!!!!!!change velocity in feq into vector + + +``streaming3()`` calculate the macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i in ti.grouped(rho): + #if it is fluid calculate density and velocity based on density distribution function + if (solid[i]==0): + rho[i] = 0 + v[i] = ti.Vector([0,0,0]) + for s in range(19): + f[i,s] = F[i,s] + rho[i] += f[i,s] + v[i] += e_f[s]*f[i,s] + + v[i] /= rho[i] + v[i] += (ext_f[None]/2)/rho[i] + # if it is solid set denisty equals one and velocity equals zero + else: + rho[i] = 1.0 + v[i] = ti.Vector([0,0,0]) + +At the end of the file do the actual simulation and export the data + +.. code-block:: python + + #define some time varible + time_init = time.time() + time_now = time.time() + time_pre = time.time() + dt_count = 0 + + #import the solid flag data + #solid_np = init_geo('./BC.dat') + solid_np = init_geo('./img_ftb131.txt') + solid.from_numpy(solid_np) + + # do the initialization + static_init() + init() + + # do the actual simulation + for iter in range(50000+1): + colission() + streaming1() + Boundary_condition() + #streaming2() + streaming3() + # calculate every 1000 time step + if (iter%1000==0): + + time_pre = time_now + time_now = time.time() + #calculate the time difference between now and previous time step + diff_time = int(time_now-time_pre) + #calculate the time difference between now and the initial time + elap_time = int(time_now-time_init) + #divmod function return the quotient and the remainder + #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap + m_diff, s_diff = divmod(diff_time, 60) + h_diff, m_diff = divmod(m_diff, 60) + m_elap, s_elap = divmod(elap_time, 60) + h_elap, m_elap = divmod(m_elap, 60) + + print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap)) + print('The %dth iteration, Max Force = %f, force_scale = %f\n\n ' %(iter, 10.0, 10.0)) + + #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable + if (iter%10000==0): + gridToVTK( + "./structured"+str(iter), + x, + y, + z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()), + "rho": np.ascontiguousarray(rho.to_numpy()), + "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2])) + } + ) + # ti.sync() + # ti.profiler.print_kernel_profiler_info() + #print the profiler information of every kernel and task of taichi in this file + ti.profiler.print_scoped_profiler_info() diff --git a/docs/_sources/lbm_solver_3d_cavity.rst.txt b/docs/_sources/lbm_solver_3d_cavity.rst.txt new file mode 100644 index 0000000..a1861dc --- /dev/null +++ b/docs/_sources/lbm_solver_3d_cavity.rst.txt @@ -0,0 +1,38 @@ +lbm_solver_3d_cavity +================================= + +This solver is almost similar to lbm_solver_3d expect several difference as follows: +.. number:: lbm_solver_3d_cavity + +1. The Grid resolution in this solver is 50x50x50 +2. The viscosity in this solver is 0.16667 +3. The boundary condition in this solver is velocity solver on x-right as follows + +boundary condition of this solver + +.. code-block:: python + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + +x-right is implementated with velocity boundary condition + +4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary. + +.. code-block:: python + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) #!!!!!!change velocity in feq into vector + F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left)) + + +5. Finally, the definition of the varible is slightly different from lbm_solver_3d \ No newline at end of file diff --git a/docs/_sources/lbm_solver_3d_sparse.rst.txt b/docs/_sources/lbm_solver_3d_sparse.rst.txt new file mode 100644 index 0000000..d76a344 --- /dev/null +++ b/docs/_sources/lbm_solver_3d_sparse.rst.txt @@ -0,0 +1,24 @@ +lbm_solver_3d_sparse +================================= + + +This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible: + +.. code-block:: python + + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse. \ No newline at end of file diff --git a/docs/_sources/modules.rst.txt b/docs/_sources/modules.rst.txt new file mode 100644 index 0000000..b9bfd06 --- /dev/null +++ b/docs/_sources/modules.rst.txt @@ -0,0 +1,10 @@ +taichi_LBM3D +============ + +.. toctree:: + :maxdepth: 4 + + Single_phase + Grey_Scale + 2phase + Phase_change diff --git a/docs/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt b/docs/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt new file mode 100644 index 0000000..04dbf54 --- /dev/null +++ b/docs/_sources/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst.txt @@ -0,0 +1,619 @@ +LBM_3D_SinglePhase_Solute_Solver +====================================== + +This file is the solver for solute transportation + +First import the certain package and define the class of ``LB3D_Solver_Single_Phase_Solute`` which inheritant from +``LB3D_Solver_Single_Phase_Solute`` + +.. code-block:: python + + from sympy import inverse_mellin_transform + import taichi as ti + import numpy as np + from pyevtk.hl import gridToVTK + import time + + #ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False) + import LBM_3D_SinglePhase_Solver as lb3d + + @ti.data_oriented + class LB3D_Solver_Single_Phase_Solute(lb3d.LB3D_Solver_Single_Phase): + def __init__(self, nx, ny, nz): + super(LB3D_Solver_Single_Phase_Solute, self).__init__(nx, ny, nz, sparse_storage = False) + #define solute boundary condition + self.solute_bc_x_left, self.solute_bcxl = 0, 0.0 + self.solute_bc_x_right, self.solute_bcxr = 0, 0.0 + self.solute_bc_y_left, self.solute_bcyl = 0, 0.0 + self.solute_bc_y_right, self.solute_bcyr = 0, 0.0 + self.solute_bc_z_left, self.solute_bczl = 0, 0.0 + self.solute_bc_z_right, self.solute_bczr = 0, 0.0 + + #define parameters for bouyancy force + self.buoyancy_parameter = 20.0 #Buoyancy Parameter (0= no buoyancy) + self.ref_T = 20.0 #reference_psi F=/rho*g+Bouyancy*(/psi-reference_psi)*g) + #define gravity + self.gravity = 5e-7 + + #define concentration distribution function + self.fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define another concentration distribution function + self.Fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define external force + self.forcexyz = ti.Vector.field(3,ti.f32,shape=(nx,ny,nz)) + #define entropy + self.rho_H = ti.field(ti.f32, shape=(nx,ny,nz)) + #define temperature + self.rho_T = ti.field(ti.f32, shape=(nx,ny,nz)) + #define liquid volumn fraction + self.rho_fl = ti.field(ti.f32, shape=(nx,ny,nz)) + + #define specific heat of liquid + self.Cp_l= 1.0 + #define specific heat of solid + self.Cp_s = 1.0 + #define latent heat + self.Lt = 1.0 + #define solid temperature + self.T_s = -10.0 + #define liquid temperature + self.T_l = -10.0 + #define viscosity of solid + self.niu_s = 0.002 + #define viscosity of liquid + self.niu_l = 0.002 + + #define energy of solid + self.H_s = None + #define energy of liquid + self.H_l = None + + #define rock thermal diffusivity + self.niu_solid = 0.001 + #define specific heat of rock + self.Cp_solid = 1.0 + +An then it sets these parameters with functions + +.. code-block:: python + + #set gravity + def set_gravity(self, gravity): + self.gravity = gravity + #set buoyancy force parameter + def set_buoyancy_parameter(self, buoyancy_param): + self.buoyancy_parameter = buoyancy_param + #set reference temperature + def set_ref_T(self, ref_t): + self.ref_T = ref_t + #set specific heat of solid + def set_specific_heat_solid(self, cps): + self.Cp_s = cps + #set specfic heat of liquid + def set_specific_heat_liquid(self, cpl): + self.Cp_l = cpl + #set specfic heat of rock + def set_specific_heat_rock(self, cprock): + self.Cp_solid = cprock + #set latent heat + def set_latent_heat(self, ltheat): + self.Lt = ltheat + #set solidus temperature + def set_solidus_temperature(self, ts): + self.T_s = ts + #set liquidus temperature + def set_liquidus_temperature(self, tl): + self.T_l = tl + #set solid thermal diffusivity + def set_solid_thermal_diffusivity(self, nius): + self.niu_s = nius + #set liquid thermal diffusivity + def set_liquid_thermal_diffusivity(self, niul): + self.niu_l = niul + #set rock thermal diffusivity + def set_rock_thermal_diffusivity(self, niurock): + self.niu_solid = niurock + #set adiabatic boundary on x-left + def set_bc_adiabatic_x_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_left = 2 + #set adiabatic boundary on x-right + def set_bc_adiabatic_x_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_right = 2 + #set adiabatic boundary on y-left + def set_bc_adiabatic_y_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_left = 2 + #set adiabatic boundary on y-right + def set_bc_adiabatic_y_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_right = 2 + #set adiabatic boundary on z-left + def set_bc_adiabatic_z_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_left = 2 + #set adiabatic boundary on z-right + def set_bc_adiabatic_z_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_right = 2 + #set constant temperature on x-left + def set_bc_constant_temperature_x_left(self,xl): + self.solute_bc_x_left = 1 + self.solute_bcxl = xl + #set constant temperature on x-right + def set_bc_constant_temperature_x_right(self,xr): + self.solute_bc_x_right = 1 + self.solute_bcxr = xr + #set constant temperature on y-left + def set_bc_constant_temperature_y_left(self,yl): + self.solute_bc_y_left = 1 + self.solute_bcyl = yl + #set constant temperature on y-right + def set_bc_constant_temperature_y_right(self,yr): + self.solute_bc_y_right = 1 + self.solute_bcyr = yr + #set constant temperature on z-left + def set_bc_constant_temperature_z_left(self,zl): + self.solute_bc_z_left = 1 + self.solute_bczl = zl + #set constant temperature on z-right + def set_bc_constant_temperature_z_right(self,zr): + self.solute_bc_y_right = 1 + self.solute_bczr = zr + + # update energy of solid and liquid + def update_H_sl(self): + #energy of solid + self.H_s = self.Cp_s*self.T_s + #energy of liquid + self.H_l = self.H_s+self.Lt + print('H_s',self.H_s) + print('H_l',self.H_l) + +Then it initialize some variable or function + +.. code-block:: python + + #intialize the energy + @ti.kernel + def init_H(self): + for I in ti.grouped(self.rho_T): + #calculate the energy, convert_T_H() define later + self.rho_H[I] = self.convert_T_H(self.rho_T[I]) + + #intialize the density distribiution function for solute concentration + @ti.kernel + def init_fg(self): + for I in ti.grouped(self.fg): + #calculate the overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + #intialize the density distribiution function for solute concentration equals equilibrium density distribiution function for solute concentration + for s in ti.static(range(19)): + self.fg[I][s] = self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]) + self.Fg[I][s] = self.fg[I][s] + + #intialize the volumn fraction of liquid + @ti.kernel + def init_fl(self): + for I in ti.grouped(self.rho_T): + #convert_T_fl define later + self.rho_fl[I] = self.convert_T_fl(self.rho_T[I]) + +``g_feq(self, k,local_T,local_H, Cp, u)`` calculate the equilibrium density distribiution function for thermal energy + +.. code-block:: python + + @ti.func + def g_feq(self, k,local_T,local_H, Cp, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + feqout = 0.0 + #calculating the zero-velocity equilibrium thermal distribution function + if (k==0): + feqout = local_H-Cp*local_T+self.w[k]*Cp*local_T*(1-1.5*uv) + else: + #calculating other directions equilibrium thermal distribution function + feqout = self.w[k]*Cp*local_T*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, self.w[k], feqout, Cp, local_T) + return feqout + +``cal_local_force(i, j, k)`` calculates buoyancy force + +.. code-block:: python + + #density is the function of temperture delat(rho)=-rho*beta*delta(T) + @ti.func + def cal_local_force(self, i, j, k): + f = ti.Vector([self.fx, self.fy, self.fz]) + f[1] += self.gravity*self.buoyancy_parameter*(self.rho_T[i,j,k]-self.ref_T) + #f= delta(rho)*delta(v)*g + f *= self.rho_fl[i,j,k] + return f + +``collision_g()`` defines the the collision of thermal distribution function + +.. code-block:: python + + @ti.kernel + def colission_g(self): + for I in ti.grouped(self.rho_T): + #overall relaxation time + tau_s = 3*(self.niu_s*(1.0-self.rho_fl[I])+self.niu_l*self.rho_fl[I])+0.5 + #overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + + #ROCK overall relaxation time and specific heat + if (self.solid[I] >0): + tau_s = 3.0*self.niu_solid+0.5 + Cp = self.Cp_solid + + #f=f-1/tau*(f-feq) + for s in ti.static(range(19)): + tmp_fg = -1.0/tau_s*(self.fg[I][s]-self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + #print(self.fg[I][s],tmp_fg,I,s,self.rho_H[I],self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + self.fg[I][s] += tmp_fg + +``collision()`` defines the the collision of density distribution function + +.. code-block:: python + + @ti.kernel + def colission(self): + for i,j,k in self.rho: + #if (self.solid[i,j,k] == 0): + m_temp = self.M[None]@self.F[i,j,k] + meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k]) + m_temp -= self.S_dig[None]*(m_temp-meq) + f = self.cal_local_force(i,j,k) + if (ti.static(self.force_flag==1)): + for s in ti.static(range(19)): + # m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s]) + #f = self.cal_local_force() + f_guo=0.0 + for l in ti.static(range(19)): + f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l] + #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force) + m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo + + self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + #calculate the denisty distribution function in momentum space here + self.f[i,j,k] += self.inv_M[None]@m_temp + #calculate the fluid density distribution function here + for s in ti.static(range(19)): + self.f[i,j,k][s] = self.f[i,j,k][s]*(self.rho_fl[i,j,k]) + self.w[s]*(1.0-self.rho_fl[i,j,k]) + +``streaming1()`` and ``streaming1_g()`` defines the fluid denisty distribiution function and +thermal density distribiution function + +.. code-block:: python + + @ti.kernel + def streaming1(self): + for i in ti.grouped(self.rho): + #if (self.solid[i] == 0): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.F[ip][s] = self.f[i][s] + + @ti.kernel + def streaming1_g(self): + for i in ti.grouped(self.rho_T): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.Fg[ip][s] = self.fg[i][s] + +this + +.. code-block:: python + + @ti.kernel + def BC_concentration(self): + #constant temperature boundary condition + if ti.static(self.solute_bc_x_left==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[0,j,k]*self.Cp_l + (1-self.rho_fl[0,j,k])*self.Cp_s + #the boundary's thermal distribution function equals the equilibrium thermal distribution function on the boundary + for s in ti.static(range(19)): + self.fg[0,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[0,j,k]) + self.Fg[0,j,k][s] = self.fg[0,j,k][s] + #adiabatic boundary condition + elif ti.static(self.solute_bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + #there is no thermal transfer between the boundaty and neighbouring cell + self.fg[0,j,k][s] = self.fg[1,j,k][s] + self.Fg[0,j,k][s] = self.fg[1,j,k][s] + + #x-right + if ti.static(self.solute_bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[self.nx-1,j,k]*self.Cp_l + (1-self.rho_fl[self.nx-1,j,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[self.nx-1,j,k]) + self.Fg[self.nx-1,j,k][s]= self.fg[self.nx-1,j,k][s] + elif ti.static(self.solute_bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + self.Fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + + #y-left + if ti.static(self.solute_bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,0,k]*self.Cp_l + (1-self.rho_fl[i,0,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,0,k]) + self.Fg[i,0,k][s] = self.fg[i,0,k][s] + elif ti.static(self.solute_bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.fg[i,1,k][s] + self.Fg[i,0,k][s] = self.fg[i,1,k][s] + + #y-right + if ti.static(self.solute_bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,self.ny-1,k]*self.Cp_l + (1-self.rho_fl[i,self.ny-1,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,self.ny-1,k]) + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-1,k][s] + elif ti.static(self.solute_bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + + #z-left + if ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,0]*self.Cp_l + (1-self.rho_fl[i,j,0])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,0]) + self.Fg[i,j,0][s] = self.fg[i,j,0][s] + elif ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.fg[i,j,1][s] + self.Fg[i,j,0][s] = self.fg[i,j,1][s] + + #z-right + if ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,self.nz-1]*self.Cp_l + (1-self.rho_fl[i,j,self.nz-1])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,self.nz-1]) + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-1][s] + elif ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + +``convert_H_T()`` calculate the temperature + +.. code-block:: python + + @ti.func + def convert_H_T(self,local_H): + new_T=0.0 + #if local enthalpy is less than solid enthalpy + #T= enthalpy/specific heat + if (local_Hself.H_l): + new_T = self.T_l+(local_H-self.H_l)/self.Cp_l + #if if temperature is greater than solid temperature + #T= Tsolid+(enthalpy-solid enthalpy)/(enthalpy of liquid-enthalpy of solid)*(temperature of liquid- temperature of solid) + elif (self.T_l>self.T_s): + new_T = self.T_s+(local_H-self.H_s)/(self.H_l-self.H_s)*(self.T_l-self.T_s) + else: + #else T= temperature of solid + new_T = self.T_s + + return new_T + +``convert_H_fl()`` calculate the volumn fraction of liquid + +.. code-block:: python + + @ti.func + def convert_H_fl(self,local_H): + new_fl=0.0 + #if enthalpy is less than solid enthalpy + #it is zero + if (local_Hself.H_l): + new_fl = 1.0 + #else + #it equals to (enthaply- soid enthaply)/(enthaply of liquid- enthalpy of solid) + else: + new_fl = (local_H-self.H_s)/(self.H_l-self.H_s) + + return new_fl + +``convert_T_H()`` calculate the enthaply from temperature + +.. code-block:: python + + @ti.func + def convert_T_H(self,local_T): + new_H = 0.0 + # calculate enthaply for three different conditions + if (local_T<=self.T_s): + new_H = self.Cp_s*local_T + elif (local_T>self.T_l): + new_H = (local_T-self.T_l)*self.Cp_l+self.H_l + else: + fluid_frc = (local_T-self.T_s)/(self.T_l-self.T_s) + new_H = self.H_s*(1-fluid_frc) + self.H_l*fluid_frc + return new_H + +``convert_T_fl()`` calculate volumn fraction from temperature + +.. code-block:: python + + @ti.func + def convert_T_fl(self,local_T): + new_fl = 0.0 + # calculate volumn fraction for three different conditions + if (local_T<=self.T_s): + new_fl = 0.0 + elif (local_T>=self.T_l): + new_fl = 1.0 + elif (self.T_l>self.T_s): + new_fl = (local_T-self.T_s)/(self.T_l-self.T_s) + else: + new_fl = 1.0 + + return new_fl + +``streaming3()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + self.forcexyz[i] = self.cal_local_force(i.x, i.y, i.z) + #print(i.x, i.y, i.z) + if ((self.solid[i]==0) or (self.rho_fl[i]>0.0)): + self.rho[i] = 0 + self.v[i] = ti.Vector([0,0,0]) + self.f[i] = self.F[i] + for s in ti.static(range(19)): + self.f[i][s] = self.f[i][s]*self.rho_fl[i]+self.w[s]*(1.0-self.rho_fl[i]) + #density for fluid + self.rho[i] += self.f[i].sum() + + for s in ti.static(range(19)): + self.v[i] += self.e_f[s]*self.f[i][s] + + f = self.cal_local_force(i.x, i.y, i.z) + #velocity for fluid + self.v[i] /= self.rho[i] + self.v[i] += (f/2)/self.rho[i] + + else: + #density and velocity for solid + self.rho[i] = 1.0 + self.v[i] = ti.Vector([0,0,0]) + +``streaming3()`` calculate enthalpy + +.. code-block:: python + + @ti.kernel + def streaming3_g(self): + for i in ti.grouped(self.rho_T): + self.rho_H[i] = 0.0 + #enthalpy here + self.rho_H[i] = self.Fg[i].sum() + #for s in ti.static(range(19)): + # self.rho_H[i] += self.Fg[i][s] + self.fg[i] = self.Fg[i] + +``update_T_fl()`` calculate volumn fraction and temperature + +.. code-block:: python + + @ti.kernel + def update_T_fl(self): + for I in ti.grouped(self.rho_T): + self.rho_T[I] = self.convert_H_T(self.rho_H[I]) + self.rho_fl[I] = self.convert_H_fl(self.rho_H[I]) + if (self.solid[I]>0): + self.rho_fl[I] = 0.0 + +``init_solute_simulation()`` initialize the solute simulation + +.. code-block:: python + + def init_solute_simulation(self): + + self.init_simulation() + self.update_H_sl() + #ethalpy + self.init_H() + #volumn fraction + self.init_fl() + #thermal distribution function + self.init_fg() + +``init_concentration(filename)`` import concentration data from file + +.. code-block:: python + + def init_concentration(self,filename): + in_dat = np.loadtxt(filename) + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + self.rho_T.from_numpy(in_dat) + +this + +.. code-block:: python + + def step(self): + self.colission() + self.colission_g() + + self.streaming1() + self.streaming1_g() + + self.Boundary_condition() + self.BC_concentration() + + self.streaming3_g() + self.streaming3() + self.streaming3_g() + + self.update_T_fl() + +this + +.. code-block:: python + + def export_VTK(self, n): + gridToVTK( + "./LB_SingelPhase_"+str(n), + self.x, + self.y, + self.z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()), + "rho": np.ascontiguousarray(self.rho.to_numpy()), + "Solid_Liquid": np.ascontiguousarray(self.rho_fl.to_numpy()), + "Tempreture": np.ascontiguousarray(self.rho_T.to_numpy()), + "Entropy": np.ascontiguousarray(self.rho_H.to_numpy()), + "velocity": ( np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])), + "Force": ( np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])) + } + ) + +this \ No newline at end of file diff --git a/docs/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt b/docs/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt new file mode 100644 index 0000000..4a6528d --- /dev/null +++ b/docs/_sources/phasechange/LBM_3D_SinglePhase_Solver.rst.txt @@ -0,0 +1,4 @@ +LBM_3D_SinglePhase_Solver +=========================== + +This file is the same as LBM_3D_SinglePhase_Solver in Single_phase folder \ No newline at end of file diff --git a/docs/_sources/phasechange/example_cavity_melting.rst.txt b/docs/_sources/phasechange/example_cavity_melting.rst.txt new file mode 100644 index 0000000..eb279eb --- /dev/null +++ b/docs/_sources/phasechange/example_cavity_melting.rst.txt @@ -0,0 +1,2 @@ +example_cavity_melting +============================= \ No newline at end of file diff --git a/docs/_sources/phasechange/example_phase_change.rst.txt b/docs/_sources/phasechange/example_phase_change.rst.txt new file mode 100644 index 0000000..7e2842c --- /dev/null +++ b/docs/_sources/phasechange/example_phase_change.rst.txt @@ -0,0 +1,2 @@ +example_phase_change +==================== \ No newline at end of file diff --git a/docs/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt b/docs/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt new file mode 100644 index 0000000..6ab6dde --- /dev/null +++ b/docs/_sources/phasechange/read_img_solute_psi_generation_2D.rst.txt @@ -0,0 +1,2 @@ +read_img_solute_psi_generation_2D +================================== \ No newline at end of file diff --git a/docs/_sources/phasechange/solute_psi_generation_2D.rst.txt b/docs/_sources/phasechange/solute_psi_generation_2D.rst.txt new file mode 100644 index 0000000..c8c1119 --- /dev/null +++ b/docs/_sources/phasechange/solute_psi_generation_2D.rst.txt @@ -0,0 +1,2 @@ +solute_psi_generation_2D +============================ \ No newline at end of file diff --git a/docs/_sources/phasechange/test1.rst.txt b/docs/_sources/phasechange/test1.rst.txt new file mode 100644 index 0000000..0b1d2a0 --- /dev/null +++ b/docs/_sources/phasechange/test1.rst.txt @@ -0,0 +1,2 @@ +test1 +=================== \ No newline at end of file diff --git a/docs/_sources/twophase/lbm_solver_3d_2phase.rst.txt b/docs/_sources/twophase/lbm_solver_3d_2phase.rst.txt new file mode 100644 index 0000000..1c42671 --- /dev/null +++ b/docs/_sources/twophase/lbm_solver_3d_2phase.rst.txt @@ -0,0 +1,734 @@ +lbm_solver_3d_2phase +======================================== + +This solver is the multiphase model based on color gradient model +Firstly, it defines some parameters + +.. code-block:: python + + # NOTE: THIS CODE NEED taichi_glsl, so please use taichi version <=0.8.5 + #import taichi, numpy, pyevtk and time package + import taichi as ti + import numpy as np + #import taichi_glsl as ts + from pyevtk.hl import gridToVTK + import time + #from taichi_glsl import scalar + + #from taichi_glsl.scalar import isinf, isnan + #from taichi_glsl.vector import vecFill + #intialize taichi + ti.init(arch=ti.cpu) + #ti.init(arch=ti.gpu, dynamic_index=True,offline_cache=True) + + #enable projection + enable_projection = True + # 131*131*131 + nx,ny,nz = 131,131,131 + #nx,ny,nz = 131,131,131 + #external force in x,y,z direction + fx,fy,fz = 5.0e-5,-2e-5,0.0 + #niu = 0.1 + #liquid viscosity + niu_l = 0.1 #psi>0 + #gas viscosity + niu_g = 0.1 #psi<0 + #psi in color gradient calculation + psi_solid = 0.7 + #surface tension + CapA = 0.005 + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 0, 0.995, 0.0, 0.0, 0.0 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + + bc_psi_x_left, psi_x_left = 1, -1.0 # boundary condition for phase-field: 0 = periodic, + bc_psi_x_right, psi_x_right = 0, 1.0 # 1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2 + bc_psi_y_left, psi_y_left = 0, 1.0 + bc_psi_y_right, psi_y_right = 0, 1.0 + bc_psi_z_left, psi_z_left = 0, 1.0 + bc_psi_z_right, psi_z_right = 0, 1.0 + + # Non Sparse memory allocation + #density distribution function nx*ny*nz*19 + f = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density distribution function nx*ny*nz*19 + F = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density nx*ny*nz + rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #velocity nx*ny*nz vector + v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + #psi nx*ny*nz + psi = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rho_r = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rho_b = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rhor = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rhob = ti.field(ti.f32, shape=(nx,ny,nz)) + #lattice speed 19 dimensional vector + e = ti.Vector.field(3,ti.i32, shape=(19)) + #S_dig = ti.field(ti.f32,shape=(19)) + #lattice speed 19 dimensional vector + e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #weight parameter 19 dimensional vector + w = ti.field(ti.f32, shape=(19)) + #solid flag nx*ny*nz + solid = ti.field(ti.i32,shape=(nx,ny,nz)) + #streaming vector 19 dimensional vector + LR = ti.field(ti.i32,shape=(19)) + + #external force 3 dimensional vector + ext_f = ti.Vector.field(3,ti.f32,shape=()) + # x-left velocity 3 dimensional vector + bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=()) + # x-right velocity 3 dimensional vector + bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=()) + # y-left velocity 3 dimensional vector + bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=()) + # y-right velocity 3 dimensional vector + bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=()) + # z-left velocity 3 dimensional vector + bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=()) + # z-right velocity 3 dimensional vector + bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=()) + #transforming matrix 19*19 + M = ti.field(ti.f32, shape=(19,19)) + #inverse transforming matrix 19*19 + inv_M = ti.field(ti.f32, shape=(19,19)) + #parameters for calculating the parameter of s diagonal + #=======================================# + lg0, wl, wg = 0.0, 0.0, 0.0 + l1, l2, g1, g2 = 0.0, 0.0, 0.0, 0.0 + wl = 1.0/(niu_l/(1.0/3.0)+0.5) + wg = 1.0/(niu_g/(1.0/3.0)+0.5) + lg0 = 2*wl*wg/(wl+wg) + l1=2*(wl-lg0)*10 + l2=-l1/0.2 + g1=2*(lg0-wg)*10 + g2=g1/0.2 + #=======================================# + + #transformation matrix + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #inverde of transforming matrix + inv_M_np = np.linalg.inv(M_np) + #streaming array + LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]) + #M matrix from the numpy + M.from_numpy(M_np) + #inverse matrix from numpy + inv_M.from_numpy(inv_M_np) + + #steaming array from numpy + LR.from_numpy(LR_np) + #external force with vector three dimensional + ext_f[None] = ti.Vector([fx,fy,fz]) + #set transforming matrix, inverse matrix and streaming vector non-modified + ti.static(inv_M) + ti.static(M) + ti.static(LR) + + #set x,y,z array with nx*ny*nz + x = np.linspace(0, nx, nx) + y = np.linspace(0, ny, ny) + z = np.linspace(0, nz, nz) + #set meshgrid and return three meshgrid matrix X,Y,Z with non-cartesian indexing + X, Y, Z = np.meshgrid(x, y, z, indexing='ij') + +``feq(k,rho_local, u)`` calculate the equilibrium denisty distribution function + +.. code-block:: python + + @ti.func + def feq(k,rho_local, u): + # eu=ts.vector.dot(e[k],u) + # uv=ts.vector.dot(u,u) + eu = e[k].dot(u) + uv = u.dot(u) + #same as single phase equilibrium density distribution function + feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, w[k]) + return feqout + +``init()`` intialize some variable + +.. code-block:: python + + @ti.kernel + def init(): + for i,j,k in solid: + if (solid[i,j,k] == 0): + #if it is fluid intialize the density and velocity be one and zero + rho[i,j,k] = 1.0 + v[i,j,k] = ti.Vector([0,0,0]) + # set density r and density b based on psi + rho_r[i,j,k] = (psi[i,j,k]+1.0)/2.0 + rho_b[i,j,k] = 1.0 - rho_r[i,j,k] + #set another density r and density b + rhor[i,j,k] = 0.0 + rhob[i,j,k] = 0.0 + #set density distribution equals to equilibrium density distribution function + for s in ti.static(range(19)): + f[i,j,k,s] = feq(s,1.0,v[i,j,k]) + F[i,j,k,s] = feq(s,1.0,v[i,j,k]) + +``init_geo(filename, filename2)`` import the geometry data + +.. code-block:: python + + def init_geo(filename, filename2): + #read the solid flag data and set it as an column major array + in_dat = np.loadtxt(filename) + in_dat[in_dat>0] = 1 + in_dat = np.reshape(in_dat, (nx,ny,nz),order='F') + + #read the phase data from file + phase_in_dat = np.loadtxt(filename2) + #set the array from the file with colum major + phase_in_dat = np.reshape(phase_in_dat, (nx,ny,nz), order='F') + + return in_dat, phase_in_dat + +``static_init()`` initialize non-modified variable + +.. code-block:: python + + @ti.kernel + def static_init(): + if ti.static(enable_projection): # No runtime overhead + #define lattice speed + e[0] = ti.Vector([0,0,0]) + e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1]) + e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0]) + e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1]) + e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1]) + #define another lattice speed + e_f[0] = ti.Vector([0,0,0]) + e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1]) + e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0]) + e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1]) + e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1]) + #define a weight parameter + w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0; + w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0; + w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0; + #define the boundary velocity + bc_vel_x_left = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl]) + bc_vel_x_right = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr]) + bc_vel_y_left = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl]) + bc_vel_y_right = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr]) + bc_vel_z_left = ti.Vector([vx_bczl, vy_bczl, vz_bczl]) + bc_vel_z_right = ti.Vector([vx_bczr, vy_bczr, vz_bczr]) + +``multiply_M()`` calculate the density distribution function in momentum space + +.. code-block:: python + + @ti.func + def multiply_M(i,j,k): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + for index in ti.static(range(19)): + for s in ti.static(range(19)): + #calculate here + out[index] += M[index,s]*F[i,j,k,s] + #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s]) + return out + +``GuoF(i,j,k,s,u)`` calculate Guo's force term + +.. code-block:: python + + @ti.func + def GuoF(i,j,k,s,u): + out=0.0 + for l in ti.static(range(19)): + out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l] + + return out + +``meq_vec(rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``Compute_C()`` calculate the color gradient + +.. code-block:: python + + @ti.func + def Compute_C(i): + C = ti.Vector([0.0,0.0,0.0]) + ind_S = 0 + for s in ti.static(range(19)): + ip = periodic_index_for_psi(i+e[s]) + if (solid[ip] == 0): + #if it's fluid calculate the color gradient based on psi + C += 3.0*w[s]*e_f[s]*psi[ip] + else: + #if it is solid and abs(density r-density b) is less than 0.9 + ind_S = 1 + #calculate the color gradient based on psi_solid and set ind_s=1 + C += 3.0*w[s]*e_f[s]*psi_solid + + if (abs(rho_r[i]-rho_b[i]) > 0.9) and (ind_S == 1): + #if abs(density r-density b) is very large and it's solid set color gradient to be zero + C = ti.Vector([0.0,0.0,0.0]) + + return C + +``Compute_S_local`` calculate parameter of s diagonal + +.. code-block:: python + + @ti.func + def Compute_S_local(id): + sv=0.0; sother=0.0 + if (psi[id]>0): + if (psi[id]>0.1): + #if psi>0.1 + #sv=1.0/(niu_l/(1.0/3.0)+0.5) + sv=wl + else: + #if 0-0.1 + sv=lg0+g1*psi[id]+g2*psi[id]*psi[id] + #calculate s other + sother = 8.0*(2.0-sv)/(8.0-sv) + + #set s diagonal to be zero and set certain element to be relatie local parameter + S = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + S[1]=sv;S[2]=sv;S[4]=sother;S[6]=sother;S[8]=sother;S[9]=sv; + S[10]=sv;S[11]=sv;S[12]=sv;S[13]=sv;S[14]=sv;S[15]=sv;S[16]=sother; + S[17]=sother;S[18]=sother; + + + return S; + + +``collision()`` define the collision and recoloring process + +.. code-block:: python + + @ti.kernel + def colission(): + for i,j,k in rho: + #if it is inner fluid, calculate color gradient divided by norm of color gradient + if (i0 : + normal = C/cc + #calculate the M + m_temp = multiply_M(i,j,k) + meq = meq_vec(rho[i,j,k],v[i,j,k]) + #calculate surface tension term + meq[1] += CapA*cc + meq[9] += 0.5*CapA*cc*(2*normal.x*normal.x-normal.y*normal.y-normal.z*normal.z) + meq[11] += 0.5*CapA*cc*(normal.y*normal.y-normal.z*normal.z) + meq[13] += 0.5*CapA*cc*(normal.x*normal.y) + meq[14] += 0.5*CapA*cc*(normal.y*normal.z) + meq[15] += 0.5*CapA*cc*(normal.x*normal.z) + #calculate s local + S_local = Compute_S_local(ti.Vector([i,j,k])) + #calculate s*(m-meq) + for s in ti.static(range(19)): + m_temp[s] -= S_local[s]*(m_temp[s]-meq[s]) + m_temp[s] += (1-0.5*S_local[s])*GuoF(i,j,k,s,v[i,j,k]) + #calculte convection of density filed + g_r = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + g_b = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + + for s in ti.static(range(19)): + f[i,j,k,s] = 0 + for l in ti.static(range(19)): + # 1.single phase collision + f[i,j,k,s] += inv_M[s,l]*m_temp[l] + + g_r[s] = feq(s,rho_r[i,j,k],v[i,j,k]) + g_b[s] = feq(s,rho_b[i,j,k],v[i,j,k]) + + if (cc>0): + for kk in ti.static([1,3,5,7,9,11,13,15,17]): + # ef=ts.vector.dot(e[kk],C) + ef=e[kk].dot(C) + cospsi= g_r[kk] if (g_r[kk]nx-1: iout[0] = 0 + if i[1]<0: iout[1] = ny-1 + if i[1]>ny-1: iout[1] = 0 + if i[2]<0: iout[2] = nz-1 + if i[2]>nz-1: iout[2] = 0 + + return iout + +``periodic_index_for_psi(i)`` defines the index of boundary for psi if using periodic boundary condition + +.. code-block:: python + + @ti.func + def periodic_index_for_psi(i): + iout = i + if i[0]<0: + #if periodic boundary condition set index based on periodic boundary condition + if bc_psi_x_left == 0: + iout[0] = nx-1 + else: + #otherwise set neighbouring index, + #similar for other sides + iout[0] = 0 + + if i[0]>nx-1: + if bc_psi_x_right==0: + iout[0] = 0 + else: + iout[0] = nx-1 + + if i[1]<0: + if bc_psi_y_left == 0: + iout[1] = ny-1 + else: + iout[1] = 0 + + if i[1]>ny-1: + if bc_psi_y_right==0: + iout[1] = 0 + else: + iout[1] = ny-1 + + if i[2]<0: + if bc_psi_z_left==0: + iout[2] = nz-1 + else: + iout[2] = 0 + + if i[2]>nz-1: + if bc_psi_z_right==0: + iout[2] = 0 + else: + iout[2] = nz-1 + + return iout + + +``streaming1()`` defines steaming process of denisty distribution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i,j,k in rho: + #if (solid[i,j,k] == 0): + if (i0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) + + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) + + + # Direction Y + if ti.static(bc_y_left==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + if (solid[i,1,k]>0): + F[i,0,k,s]=feq(s, rho_bcyl, v[i,1,k]) + else: + F[i,0,k,s]=feq(s, rho_bcyl, v[i,0,k]) + + if ti.static(bc_y_left==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + F[i,0,k,s]=feq(LR[s], 1.0, bc_vel_y_left[None])-F[i,0,k,LR[s]]+feq(s,1.0,bc_vel_y_left[None]) + + if ti.static(bc_y_right==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + if (solid[i,ny-2,k]>0): + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-2,k]) + else: + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-1,k]) + + if ti.static(bc_y_right==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + F[i,ny-1,k,s]=feq(LR[s], 1.0, bc_vel_y_right[None])-F[i,ny-1,k,LR[s]]+feq(s,1.0,bc_vel_y_right[None]) + + # Z direction + if ti.static(bc_z_left==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + if (solid[i,j,1]>0): + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,1]) + else: + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,0]) + + if ti.static(bc_z_left==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + F[i,j,0,s]=feq(LR[s], 1.0, bc_vel_z_left[None])-F[i,j,0,LR[s]]+feq(s,1.0,bc_vel_z_left[None]) + + if ti.static(bc_z_right==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + if (solid[i,j,nz-2]>0): + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-2]) + else: + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-1]) + + if ti.static(bc_z_right==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + F[i,j,nz-1,s]=feq(LR[s], 1.0, bc_vel_z_right[None])-F[i,j,nz-1,LR[s]]+feq(s,1.0,bc_vel_z_right[None]) + +``Boundary_condition_psi()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i,j,k, in rho: + #if (solid[i,j,k] == 0): + if (i tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_static/css/badge_only.css b/docs/_static/css/badge_only.css new file mode 100644 index 0000000..c718cee --- /dev/null +++ b/docs/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} \ No newline at end of file diff --git a/docs/_static/css/fonts/Roboto-Slab-Bold.woff b/docs/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 0000000..6cb6000 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 b/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 0000000..7059e23 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Regular.woff b/docs/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 0000000..f815f63 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 b/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 0000000..f2c76e5 Binary files /dev/null and b/docs/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.eot b/docs/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.svg b/docs/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/docs/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/_static/css/fonts/fontawesome-webfont.ttf b/docs/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.woff b/docs/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/docs/_static/css/fonts/fontawesome-webfont.woff2 b/docs/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/docs/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/docs/_static/css/fonts/lato-bold-italic.woff b/docs/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 0000000..88ad05b Binary files /dev/null and b/docs/_static/css/fonts/lato-bold-italic.woff differ diff --git a/docs/_static/css/fonts/lato-bold-italic.woff2 b/docs/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 0000000..c4e3d80 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/docs/_static/css/fonts/lato-bold.woff b/docs/_static/css/fonts/lato-bold.woff new file mode 100644 index 0000000..c6dff51 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold.woff differ diff --git a/docs/_static/css/fonts/lato-bold.woff2 b/docs/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 0000000..bb19504 Binary files /dev/null and b/docs/_static/css/fonts/lato-bold.woff2 differ diff --git a/docs/_static/css/fonts/lato-normal-italic.woff b/docs/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 0000000..76114bc Binary files /dev/null and b/docs/_static/css/fonts/lato-normal-italic.woff differ diff --git a/docs/_static/css/fonts/lato-normal-italic.woff2 b/docs/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 0000000..3404f37 Binary files /dev/null and b/docs/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/docs/_static/css/fonts/lato-normal.woff b/docs/_static/css/fonts/lato-normal.woff new file mode 100644 index 0000000..ae1307f Binary files /dev/null and b/docs/_static/css/fonts/lato-normal.woff differ diff --git a/docs/_static/css/fonts/lato-normal.woff2 b/docs/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 0000000..3bf9843 Binary files /dev/null and b/docs/_static/css/fonts/lato-normal.woff2 differ diff --git a/docs/_static/css/theme.css b/docs/_static/css/theme.css new file mode 100644 index 0000000..c03c88f --- /dev/null +++ b/docs/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search>a:hover{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.version{margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel{border:1px solid #7fbbe3;background:#e7f2fa;font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js new file mode 100644 index 0000000..d06a71d --- /dev/null +++ b/docs/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js new file mode 100644 index 0000000..ac431ff --- /dev/null +++ b/docs/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '0.0.1', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/docs/_static/file.png b/docs/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/docs/_static/file.png differ diff --git a/docs/_static/js/badge_only.js b/docs/_static/js/badge_only.js new file mode 100644 index 0000000..526d723 --- /dev/null +++ b/docs/_static/js/badge_only.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); \ No newline at end of file diff --git a/docs/_static/js/html5shiv-printshiv.min.js b/docs/_static/js/html5shiv-printshiv.min.js new file mode 100644 index 0000000..2b43bd0 --- /dev/null +++ b/docs/_static/js/html5shiv-printshiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/docs/_static/js/html5shiv.min.js b/docs/_static/js/html5shiv.min.js new file mode 100644 index 0000000..cd1c674 --- /dev/null +++ b/docs/_static/js/html5shiv.min.js @@ -0,0 +1,4 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); \ No newline at end of file diff --git a/docs/_static/js/theme.js b/docs/_static/js/theme.js new file mode 100644 index 0000000..1fddb6e --- /dev/null +++ b/docs/_static/js/theme.js @@ -0,0 +1 @@ +!function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/docs/_static/minus.png b/docs/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/docs/_static/minus.png differ diff --git a/docs/_static/plus.png b/docs/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/docs/_static/plus.png differ diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css new file mode 100644 index 0000000..08bec68 --- /dev/null +++ b/docs/_static/pygments.css @@ -0,0 +1,74 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #9C6500 } /* Comment.Preproc */ +.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #E40000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #008400 } /* Generic.Inserted */ +.highlight .go { color: #717171 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #687822 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #767600 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mb { color: #666666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sa { color: #BA2121 } /* Literal.String.Affix */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #A45A77 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .vm { color: #19177C } /* Name.Variable.Magic */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js new file mode 100644 index 0000000..97d56a7 --- /dev/null +++ b/docs/_static/searchtools.js @@ -0,0 +1,566 @@ +/* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + + const [docName, title, anchor, descr, score, _filename] = item; + + let listItem = document.createElement("li"); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = docUrlRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = docUrlRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms) + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent !== undefined) return docContent.textContent; + console.warn( + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + // array of [docname, title, anchor, descr, score, filename] + let results = []; + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + let score = Math.round(100 * queryLower.length / title.length) + results.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + ]); + } + } + } + + // lookup as object + objectTerms.forEach((term) => + results.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); + + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + results = results.reverse(); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/docs/_static/sphinx_highlight.js b/docs/_static/sphinx_highlight.js new file mode 100644 index 0000000..aae669d --- /dev/null +++ b/docs/_static/sphinx_highlight.js @@ -0,0 +1,144 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + parent.insertBefore( + span, + parent.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/docs/aaa.html b/docs/aaa.html new file mode 100644 index 0000000..2a18f1c --- /dev/null +++ b/docs/aaa.html @@ -0,0 +1,644 @@ + + + + + + + Single_phase.LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.LBM_3D_SinglePhase_Solver

+

This is a D3Q19 MRT(multi-relaxation-time) solver for single phase. It defines a class called LB3D_Solver_Single_Phase. The Class has a default function +__init__() as normal python class.

+
class LB3D_Solver_Single_Phase:
+    def __init__(self, nx, ny, nz, sparse_storage = False):
+    #enable projection, define a sparse_storage flag
+    self.enable_projection = True
+    self.sparse_storage = sparse_storage
+    #the grid of the simulation in three direction
+    self.nx,self.ny,self.nz = nx,ny,nz
+    #nx,ny,nz = 120,120,120
+    #density distribution function in three direction
+    self.fx,self.fy,self.fz = 0.0e-6,0.0,0.0
+    #kinematic viscosity in lattice unit
+    self.niu = 0.16667
+    #define a taichi field of float scalar which is the maximum velocity
+    self.max_v=ti.field(ti.f32,shape=())
+    #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+    self.bc_x_left, self.rho_bcxl, self.vx_bcxl, self.vy_bcxl, self.vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+    self.bc_x_right, self.rho_bcxr, self.vx_bcxr, self.vy_bcxr, self.vz_bcxr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary x-axis right side
+    self.bc_y_left, self.rho_bcyl, self.vx_bcyl, self.vy_bcyl, self.vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+    self.bc_y_right, self.rho_bcyr, self.vx_bcyr, self.vy_bcyr, self.vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+    self.bc_z_left, self.rho_bczl, self.vx_bczl, self.vy_bczl, self.vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+    self.bc_z_right, self.rho_bczr, self.vx_bczr, self.vy_bczr, self.vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+    if sparse_storage == False:
+        #define old density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.f = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define new density distribution function with taichi field which has nx*ny*nz element and each element is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define density with taichi field which has nx*ny*nz element and each element is a scalar
+        self.rho = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define velocity with taichi field which has nx*ny*nz element and each element is a three dimensional vector
+        self.v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+    else:
+        #sparse storage the variable
+        #define old density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.f = ti.Vector.field(19, ti.f32)
+        #define new density distribution function by taichi field with one element and which is a 19 dimensional vector
+        self.F = ti.Vector.field(19,ti.f32)
+        #define density by taichi field with one element which is a scalar
+        self.rho = ti.field(ti.f32)
+        #define velocity by taichi field with one element which is a scalar
+        self.v = ti.Vector.field(3, ti.f32)
+        #define partition equals 3
+        n_mem_partition = 3
+        #every index has four variable rho, v, f, F
+        cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+        cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(self.rho, self.v, self.f, self.F)
+    #define lattice speed 3x19
+    self.e = ti.Vector.field(3,ti.i32, shape=(19))
+    #define s diagnol vector
+    self.S_dig = ti.Vector.field(19,ti.f32,shape=())
+    #define another lattice speed 3x19
+    self.e_f = ti.Vector.field(3,ti.f32, shape=(19))
+    #define weight parameter
+    self.w = ti.field(ti.f32, shape=(19))
+    #define solid which is a flag when equals 0 it is fluid, when it is 1 it is solid
+    self.solid = ti.field(ti.i8,shape=(nx,ny,nz))
+    #define external force which is a three dimensional vector
+    self.ext_f = ti.Vector.field(3,ti.f32,shape=())
+    #define transforming matrix M which is a 19x19 dimension matrix
+    self.M = ti.Matrix.field(19, 19, ti.f32, shape=())
+    #define the inverse transforming matrix M^-1
+    self.inv_M = ti.Matrix.field(19,19,ti.f32, shape=())
+    #define the numpy version of M.
+    M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define the numpy version of M^-1
+    inv_M_np = np.linalg.inv(M_np)
+    #define the index of 19 lattice node for bounce back
+    self.LR = [0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]
+    #define taichi field version of M
+    self.M[None] = ti.Matrix([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+    [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+    [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+    [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+    [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+    [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+    [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+    [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+    [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+    [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+    [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+    #define taichi field version of M^-1
+    self.inv_M[None] = ti.Matrix(inv_M_np)
+    #define coordinate nx*ny*nz
+    self.x = np.linspace(0, nx, nx)
+    self.y = np.linspace(0, ny, ny)
+    self.z = np.linspace(0, nz, nz)
+    #X, Y, Z = np.meshgrid(self.x, self.y, self.z, indexing='ij')
+
+
+

Following is the init_simulation() function which initialize some simulation parameter

+
def init_simulation(self):
+#x,y,z velocity vector from vx_bcxl,vy_bcxl and vz_bcxl
+self.bc_vel_x_left = [self.vx_bcxl, self.vy_bcxl, self.vz_bcxl]
+self.bc_vel_x_right = [self.vx_bcxr, self.vy_bcxr, self.vz_bcxr]
+self.bc_vel_y_left = [self.vx_bcyl, self.vy_bcyl, self.vz_bcyl]
+self.bc_vel_y_right = [self.vx_bcyr, self.vy_bcyr, self.vz_bcyr]
+self.bc_vel_z_left = [self.vx_bczl, self.vy_bczl, self.vz_bczl]
+self.bc_vel_z_right = [self.vx_bczr, self.vy_bczr, self.vz_bczr]
+#define single relaxation time tau
+self.tau_f=3.0*self.niu+0.5
+#define single relaxation frequency
+self.s_v=1.0/self.tau_f
+#define other parameter in the s diagonal
+self.s_other=8.0*(2.0-self.s_v)/(8.0-self.s_v)
+#define the s diagonal
+self.S_dig[None] = ti.Vector([0,self.s_v,self.s_v,0,self.s_other,0,self.s_other,0,self.s_other, self.s_v, self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_v,self.s_other,self.s_other,self.s_other])
+#define external force
+#self.ext_f[None] = ti.Vector([self.fx,self.fy,self.fz])
+self.ext_f[None][0] = self.fx
+self.ext_f[None][1] = self.fy
+self.ext_f[None][2] = self.fz
+#if external force greater than zero define force_flag equals 1
+#other wise force_flag equals 0
+if ((abs(self.fx)>0) or (abs(self.fy)>0) or (abs(self.fz)>0)):
+    self.force_flag = 1
+else:
+    self.force_flag = 0
+
+#define M M^-1 S diagonal not been modified.
+ti.static(self.inv_M)
+ti.static(self.M)
+#ti.static(LR)
+ti.static(self.S_dig)
+#statically initialize
+self.static_init()
+self.init()
+
+
+

feq() calculate the equilibrium density distribution function in velocity space

+
#taichi function
+@ti.func
+    def feq(self, k,rho_local, u):
+        eu = self.e[k].dot(u)
+        uv = u.dot(u)
+        #calculate the equilibrium density distribution function
+        feqout = self.w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+        #print(k, rho_local, self.w[k])
+        return feqout
+
+
+

init() initialize density velocity and density distribution function

+
@ti.kernel
+def init(self):
+    for i,j,k in self.solid:
+        #print(i,j,k)
+        if (self.sparse_storage==False or self.solid[i,j,k]==0):
+            #if it is fluid then initialize density equals one
+            self.rho[i,j,k] = 1.0
+            #initialize the velocity to be zero in all the direction
+            self.v[i,j,k] = ti.Vector([0,0,0])
+            for s in ti.static(range(19)):
+                #initialize 19 denisty distribution function equals the equilibrium density distribution function
+                self.f[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                self.F[i,j,k][s] = self.feq(s,1.0,self.v[i,j,k])
+                #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() import data from a file

+
def init_geo(self,filename):
+    #load data from a file
+    in_dat = np.loadtxt(filename)
+    #set any positive value to be one
+    in_dat[in_dat>0] = 1
+    #reshape it as a nx*ny*nz vector with column major
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    #assign it to solid varible
+    self.solid.from_numpy(in_dat)
+
+
+

static_init() initialize lattice speeed and weight parameter. These parameter is not modified during the simulation

+
#taichi kernel for parallization
+@ti.kernel
+def static_init(self):
+    if ti.static(self.enable_projection): # No runtime overhead
+        #initialize the lattice speed
+        self.e[0] = ti.Vector([0,0,0])
+        self.e[1] = ti.Vector([1,0,0]); self.e[2] = ti.Vector([-1,0,0]); self.e[3] = ti.Vector([0,1,0]); self.e[4] = ti.Vector([0,-1,0]);self.e[5] = ti.Vector([0,0,1]); self.e[6] = ti.Vector([0,0,-1])
+        self.e[7] = ti.Vector([1,1,0]); self.e[8] = ti.Vector([-1,-1,0]); self.e[9] = ti.Vector([1,-1,0]); self.e[10] = ti.Vector([-1,1,0])
+        self.e[11] = ti.Vector([1,0,1]); self.e[12] = ti.Vector([-1,0,-1]); self.e[13] = ti.Vector([1,0,-1]); self.e[14] = ti.Vector([-1,0,1])
+        self.e[15] = ti.Vector([0,1,1]); self.e[16] = ti.Vector([0,-1,-1]); self.e[17] = ti.Vector([0,1,-1]); self.e[18] = ti.Vector([0,-1,1])
+
+        self.e_f[0] = ti.Vector([0,0,0])
+        self.e_f[1] = ti.Vector([1,0,0]); self.e_f[2] = ti.Vector([-1,0,0]); self.e_f[3] = ti.Vector([0,1,0]); self.e_f[4] = ti.Vector([0,-1,0]);self.e_f[5] = ti.Vector([0,0,1]); self.e_f[6] = ti.Vector([0,0,-1])
+        self.e_f[7] = ti.Vector([1,1,0]); self.e_f[8] = ti.Vector([-1,-1,0]); self.e_f[9] = ti.Vector([1,-1,0]); self.e_f[10] = ti.Vector([-1,1,0])
+        self.e_f[11] = ti.Vector([1,0,1]); self.e_f[12] = ti.Vector([-1,0,-1]); self.e_f[13] = ti.Vector([1,0,-1]); self.e_f[14] = ti.Vector([-1,0,1])
+        self.e_f[15] = ti.Vector([0,1,1]); self.e_f[16] = ti.Vector([0,-1,-1]); self.e_f[17] = ti.Vector([0,1,-1]); self.e_f[18] = ti.Vector([0,-1,1])
+        #initialize the weight parameter
+        self.w[0] = 1.0/3.0; self.w[1] = 1.0/18.0; self.w[2] = 1.0/18.0; self.w[3] = 1.0/18.0; self.w[4] = 1.0/18.0; self.w[5] = 1.0/18.0; self.w[6] = 1.0/18.0;
+        self.w[7] = 1.0/36.0; self.w[8] = 1.0/36.0; self.w[9] = 1.0/36.0; self.w[10] = 1.0/36.0; self.w[11] = 1.0/36.0; self.w[12] = 1.0/36.0;
+        self.w[13] = 1.0/36.0; self.w[14] = 1.0/36.0; self.w[15] = 1.0/36.0; self.w[16] = 1.0/36.0; self.w[17] = 1.0/36.0; self.w[18] = 1.0/36.0;
+
+
+

meq_vec(self, rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(self, rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

cal_local_force(self,i,j,k) transfer the external force to a vector

+
@ti.func
+def cal_local_force(self,i,j,k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    return f
+
+
+

collision() defines the collision of LBM process

+
#taichi kernel for parallization
+@ti.kernel
+def colission(self):
+    #outer loop for every index in rho field
+    for i,j,k in self.rho:
+        #if is not solid and it is not on the boundary
+        if (self.solid[i,j,k] == 0 and i<self.nx and j<self.ny and k<self.nz):
+            #calculate S*(m-meq)
+            m_temp = self.M[None]@self.F[i,j,k]
+            meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+            m_temp -= self.S_dig[None]*(m_temp-meq)
+            #add force if there is force, here use Guo's force scheme
+            f = self.cal_local_force(i,j,k)
+            if (ti.static(self.force_flag==1)):
+                for s in ti.static(range(19)):
+                #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                    #f = self.cal_local_force()
+                    f_guo=0.0
+                    for l in ti.static(range(19)):
+                        f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                    #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                    m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+            #calculate density distribution function after collision f=M^-1*S*(m-meq)
+            self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            self.f[i,j,k] += self.inv_M[None]@m_temp
+
+
+

periodic_index(self,i) defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(self,i):
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = self.nx-1
+    #x-right
+    if i[0]>self.nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = self.ny-1
+    #y-right
+    if i[1]>self.ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = self.nz-1
+    #z-right
+    if i[2]>self.nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming prcoess of denisty distribution function

+
#taichi kernel for parallization
+@ti.kernel
+def streaming1(self):
+    #grouped index which loop the index of rho
+    for i in ti.grouped(self.rho):
+    # streaming for fluid and non-boundary
+        if (self.solid[i] == 0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            for s in ti.static(range(19)):
+            # streaming according to the lattice speed and on boundary with periodic index
+                ip = self.periodic_index(i+self.e[s])
+                if (self.solid[ip]==0):
+                # fluid new density distribution function equals the streaming of old density distribution fuction
+                    self.F[ip][s] = self.f[i][s]
+                else:
+                #solid bounce back scheme
+                    self.F[i][self.LR[s]] = self.f[i][s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition() define three direction fixed pressure or fixed velocity bounary condition

+
@ti.kernel
+def Boundary_condition(self):
+#fixed pressure boundary condition
+    if ti.static(self.bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[1,j,k]>0):
+                    # if the boundary is fluid but the neighbour is solid then the density distribution
+                    #function equals to the solid velcity equilibrium density distribution fucntion
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[1,j,k])
+                    else:
+                    # if the boundary is fluid and the neighbour is fluid then the density distribution
+                    #function equals to equilibrium density distribution fucntion on the boundary
+                        self.F[0,j,k][s]=self.feq(s, self.rho_bcxl, self.v[0,j,k])
+    #fixed velocity boundary condition
+    if ti.static(self.bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+        # if the boundary is fluid new density distribution fucntion equals to equilibrium density
+        #distibution function with fixed velocity
+            if (self.solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    self.F[0,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_left))
+    # fixed pressure boundary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[self.nx-2,j,k]>0):
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-2,j,k])
+                    else:
+                        self.F[self.nx-1,j,k][s]=self.feq(s, self.rho_bcxr, self.v[self.nx-1,j,k])
+    # fixed velocity boubndary condition on x-right similar for x-left
+    if ti.static(self.bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            if (self.solid[self.nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[nx-1,j,k][s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+                    self.F[self.nx-1,j,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_x_right))
+
+     # Direction Y
+     #fixed pressure boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,1,k]>0):
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,1,k])
+                    else:
+                        self.F[i,0,k][s]=self.feq(s, self.rho_bcyl, self.v[i,0,k])
+    #fixed velocity boundary condition on y-left similar for x direction
+    if ti.static(self.bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,0,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_left[None])-self.F[i,0,k][LR[s]]+self.feq(s,1.0,self.bc_vel_y_left[None])
+                    self.F[i,0,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_left))
+    #fixed pressure boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,self.ny-2,k]>0):
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-2,k])
+                    else:
+                        self.F[i,self.ny-1,k][s]=self.feq(s, self.rho_bcyr, self.v[i,self.ny-1,k])
+    #fixed velocity boundary condition on y-right similar for x direction
+    if ti.static(self.bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            if (self.solid[i,self.ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,self.ny-1,k][s]=self.feq(self.LR[s], 1.0, self.bc_vel_y_right[None])-self.F[i,self.ny-1,k][self.LR[s]]+self.feq(s,1.0,self.bc_vel_y_right[None])
+                    self.F[i,self.ny-1,k][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_y_right))
+
+    # Z direction
+    #fixed pressure boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,1]>0):
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,1])
+                    else:
+                        self.F[i,j,0][s]=self.feq(s, self.rho_bczl, self.v[i,j,0])
+    #fixed velocity boundary condition on z-left similar for x direction
+    if ti.static(self.bc_z_left==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,0][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_left[None])-self.F[i,j,0][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_left[None])
+                    self.F[i,j,0][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_left))
+    #fixed pressure boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (self.solid[i,j,self.nz-2]>0):
+                        self.F[i,j,self.nz-1,s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-2])
+                    else:
+                        self.F[i,j,self.nz-1][s]=self.feq(s, self.rho_bczr, self.v[i,j,self.nz-1])
+    #fixed velocity boundary condition on z-right similar for x direction
+    if ti.static(self.bc_z_right==2):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            if (self.solid[i,j,self.nz-1]==0):
+                for s in ti.static(range(19)):
+                    #self.F[i,j,self.nz-1][s]=self.feq(self.LR[s], 1.0, self.bc_vel_z_right[None])-self.F[i,j,self.nz-1][self.LR[s]]+self.feq(s,1.0,self.bc_vel_z_right[None])
+                    self.F[i,j,self.nz-1][s]=self.feq(s,1.0,ti.Vector(self.bc_vel_z_right))
+
+
+

streaming3() calculatet the macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        #print(i.x, i.y, i.z)
+        #if it is fluid and not on the boundary
+        if (self.solid[i]==0 and i.x<self.nx and i.y<self.ny and i.z<self.nz):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            #calculate density
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+
+            self.v[i] /= self.rho[i]
+            #calculate velocity
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        # if it is solid the velocity is zero and the density equals one
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

these function set bnoundary velocity, set viscosity,force and get and calculate maximum velocity

+
#get maxium velocity
+def get_max_v(self):
+    self.max_v[None] = -1e10
+    self.cal_max_v()
+    return self.max_v[None]
+
+#calculate maximum velocity with taichi kernel
+@ti.kernel
+def cal_max_v(self):
+    for I in ti.grouped(self.rho):
+        ti.atomic_max(self.max_v[None], self.v[I].norm())
+
+#set x-right velocity
+def set_bc_vel_x1(self, vel):
+    self.bc_x_right = 2
+    self.vx_bcxr = vel[0]; self.vy_bcxr = vel[1]; self.vz_bcxr = vel[2];
+#set x-left velocity
+def set_bc_vel_x0(self, vel):
+    self.bc_x_left = 2
+    self.vx_bcxl = vel[0]; self.vy_bcxl = vel[1]; self.vz_bcxl = vel[2];
+#set y-right velocity
+def set_bc_vel_y1(self, vel):
+    self.bc_y_right = 2
+    self.vx_bcyr = vel[0]; self.vy_bcyr = vel[1]; self.vz_bcyr = vel[2];
+#set y-left velocity
+def set_bc_vel_y0(self, vel):
+    self.bc_y_left = 2
+    self.vx_bcyl = vel[0]; self.vy_bcyl = vel[1]; self.vz_bcyl = vel[2];
+#set z-right velocity
+def set_bc_vel_z1(self, vel):
+    self.bc_z_right = 2
+    self.vx_bczr = vel[0]; self.vy_bczr = vel[1]; self.vz_bczr = vel[2];
+#set z-left velocity
+def set_bc_vel_z0(self, vel):
+    self.bc_z_left = 2
+    self.vx_bczl = vel[0]; self.vy_bczl = vel[1]; self.vz_bczl = vel[2];
+#set x-left density
+def set_bc_rho_x0(self, rho):
+    self.bc_x_left = 1
+    self.rho_bcxl = rho
+#set x-right density
+def set_bc_rho_x1(self, rho):
+    self.bc_x_right = 1
+    self.rho_bcxr = rho
+#set y-left density
+def set_bc_rho_y0(self, rho):
+    self.bc_y_left = 1
+    self.rho_bcyl = rho
+#set y-right density
+def set_bc_rho_y1(self, rho):
+    self.bc_y_right = 1
+    self.rho_bcyr = rho
+#set z-left density
+def set_bc_rho_z0(self, rho):
+    self.bc_z_left = 1
+    self.rho_bczl = rho
+#set z-right density
+def set_bc_rho_z1(self, rho):
+    self.bc_z_right = 1
+    self.rho_bczr = rho
+
+#set viscosity
+def set_viscosity(self,niu):
+    self.niu = niu
+#set external force
+def set_force(self,force):
+    self.fx = force[0]; self.fy = force[1]; self.fz = force[2];
+
+
+

export_VTK(self, n) function export results to vtk file use the package pyevtk

+
def export_VTK(self, n):
+#the function takes three arguments: the filename,coordinate system and the dictionary for reuslts
+    gridToVTK(
+        #file name
+            "./LB_SingelPhase_"+str(n),
+        #coordinate
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+        #the three dictionary which the key is solid,rho,velocity and it will be output to the vtk file
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

step() function define the simulation process of this solver

+
def step(self):
+    self.colission()
+    self.streaming1()
+    self.Boundary_condition()
+    self.streaming3()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..aec4621 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,35 @@ +# Configuration file for the Sphinx documentation builder. +# +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os +import sys +sys.path.insert(0, os.path.abspath('..')) +project = 'taichi-LBM3D' +copyright = '2023, xiongxin' +author = 'xiongxin' +release = '0.0.1' + +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration + +extensions = [ + # 'sphinx.ext.autodoc', + # 'sphinx.ext.napoleon', + # 'sphinx.ext.viewcode', + +] + +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + + + +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output + +html_theme = 'sphinx_rtd_theme' +html_static_path = ['_static'] diff --git a/docs/example_cavity.html b/docs/example_cavity.html new file mode 100644 index 0000000..c2e4989 --- /dev/null +++ b/docs/example_cavity.html @@ -0,0 +1,173 @@ + + + + + + + example_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity

+

This file use the LBM_3D_SinglePhase_Solver to simulate the cavity flow

+
#import certain packages
+import time
+import taichi as ti
+
+ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#set 50*50*50 cavity based on LB3D_Solver_Single_Phase solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=50,ny=50,nz=50, sparse_storage=False)
+
+#import geometry data
+lb3d.init_geo('./geo_cavity.dat')
+#set the x-right velocity
+lb3d.set_bc_vel_x1([0.0,0.0,0.1])
+#initialize
+lb3d.init_simulation()
+
+#simulation step
+for iter in range(2000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #get the maximum velocity
+        max_v = lb3d.get_max_v()
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the number of time steps, maxiumum force and the force scale=0
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, max_v,  0.0))
+        #every 1000 time steps export the vtk file
+        if (iter%1000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/example_porous_medium.html b/docs/example_porous_medium.html new file mode 100644 index 0000000..844419e --- /dev/null +++ b/docs/example_porous_medium.html @@ -0,0 +1,170 @@ + + + + + + + example_porous_medium — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_porous_medium

+

This file simulate the porous medium based on the LBM_3D_SinglePhase_Solver

+
#import time and taichi package
+import time
+import taichi as ti
+#taichi intialization
+ti.init(arch=ti.cpu)
+#import the LBM_3D_SinglePhase_Solver
+import LBM_3D_SinglePhase_Solver as lb3dsp
+#set the time
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+
+#create the 131*131*131 gird LBM_3D_SinglePhase_Solver
+lb3d = lb3dsp.LB3D_Solver_Single_Phase(nx=131,ny=131,nz=131)
+#import the porous medium geometry
+lb3d.init_geo('./img_ftb131.txt')
+#set x-left and x-right density
+lb3d.set_bc_rho_x1(0.99)
+lb3d.set_bc_rho_x0(1.0)
+#initialize the simulation
+lb3d.init_simulation()
+#simulation loop
+for iter in range(50000+1):
+    lb3d.step()
+
+    if (iter%500==0):
+        #calculate the time
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+        #print the time
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        #print the time step, max force=10, force_scale=10
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+        #export VTK every 2000 time step
+        if (iter%2000==0):
+            lb3d.export_VTK(iter)
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/flow_domain_geo_generation_2D.html b/docs/flow_domain_geo_generation_2D.html new file mode 100644 index 0000000..526eb37 --- /dev/null +++ b/docs/flow_domain_geo_generation_2D.html @@ -0,0 +1,163 @@ + + + + + + + flow_domain_geo_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

flow_domain_geo_generation_2D

+

This file generate geometry file for solver to read

+
#import certain module
+import numpy as np
+import math
+
+
+#define the input file name
+# INPUT STL FILE NAME
+output_name = 'geo_cavity.dat'
+
+#define the grid resolution
+dnx, dny, dnz = 50, 50, 50
+
+#==========================================================
+#           DO NOT CHANGE BELOW
+#==========================================================
+
+#define an matrix dnx*dny*dnz with zero values
+out_dat = np.zeros((dnx,dny,dnz))
+
+#=======Can define some geometry here to out_dat=========
+#define the boundary to be solid
+out_dat[0,:,:] = 1
+#cout_dat[:,:,0] = 1
+out_dat[:,0,:] = 1
+out_dat[:,-1,:] = 1
+out_dat[:,:,0] = 1
+out_dat[:,:,-1] = 1
+
+#=========================================================
+#reshape the data to be column major
+out_dat = out_dat.reshape(out_dat.size, order = 'F')
+
+
+#output the transfer of out_dat to the file with integer type
+np.savetxt(output_name,out_dat.T,fmt='%d')
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/genindex.html b/docs/genindex.html new file mode 100644 index 0000000..08506b6 --- /dev/null +++ b/docs/genindex.html @@ -0,0 +1,103 @@ + + + + + + Index — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Index

+ +
+ +
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/geo.dat b/docs/geo.dat new file mode 100644 index 0000000..1de297f --- /dev/null +++ b/docs/geo.dat @@ -0,0 +1,110592 @@ +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0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0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..f6256d7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,151 @@ + + + + + + + Welcome to taichi-LBM3D’s documentation! — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..ce297ea --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,19 @@ +.. taichi-LBM3D documentation master file, created by + sphinx-quickstart on Tue Apr 11 17:00:17 2023. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to taichi-LBM3D's documentation! +======================================== + +.. toctree:: + :maxdepth: 4 + :caption: Contents: + + modules + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/docs/lbm_solver_3d.html b/docs/lbm_solver_3d.html new file mode 100644 index 0000000..77ad6e0 --- /dev/null +++ b/docs/lbm_solver_3d.html @@ -0,0 +1,530 @@ + + + + + + + Single_phase.lbm_solver_3d — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Single_phase.lbm_solver_3d

+

This file is the non-objective oriented version of singlephase solver without using class. +At the begining of the this file it define some variable first.

+
#import some package
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+#initialize taichi with cpu, dunamic index, disable profiler and disables printing the intermediate representation
+ti.init(arch=ti.cpu, dynamic_index=True, kernel_profiler=False, print_ir=False)
+#enable projection
+enable_projection = True
+#nx,ny,nz = 100,50,5
+#define 131x131x131 and zero external force
+nx,ny,nz = 131,131,131
+fx,fy,fz = 0.0e-6,0.0,0.0
+#viscosity=0.1
+niu = 0.1
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 1, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 1, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+#define old density distribution funciton nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define new density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#define density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#define velocity nx*ny*nz
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#define lattice speed 3*19
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#define s diagonal 19 dimension vector
+S_dig = ti.field(ti.f32,shape=(19))
+#define another lattice speed 3*19
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#define weight parameter 19 dimesnion vector
+w = ti.field(ti.f32, shape=(19))
+#define solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#define vector for streaming 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+#define external force with a 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+#define velocity in x,y,z direction with 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#define transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#define inverse of transforming matrix
+inv_M = ti.field(ti.f32, shape=(19,19))
+#define single relaxation parameter
+tau_f=3.0*niu+0.5
+#define single relaxation frequency
+s_v=1.0/tau_f
+#define other parameter in the s diagonal
+s_other=8.0*(2.0-s_v)/(8.0-s_v)
+#define s matrix but not used
+S_np = np.zeros((19,19))
+S_np[0,0]=0;        S_np[1,1]=s_v;          S_np[2,2]=s_v;          S_np[3,3]=0;        S_np[4,4]=s_other;      S_np[5,5]=0;
+S_np[6,6]=s_other;  S_np[7,7]=0;            S_np[8,8]=s_other;      S_np[9,9]=s_v;      S_np[10,10]=s_v;        S_np[11,11]=s_v;
+S_np[12,12]=s_v;    S_np[13,13]=s_v;        S_np[14,14]=s_v;        S_np[15,15]=s_v;    S_np[16,16]=s_other;    S_np[17,17]=s_other;
+S_np[18,18]=s_other
+#define numpy array version of s diagonal.
+S_dig_np = np.array([0,s_v,s_v,0,s_other,0,s_other,0,s_other, s_v, s_v,s_v,s_v,s_v,s_v,s_v,s_other,s_other,s_other])
+#define numpy version of transforming matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#define inverse of transforming matrix using inv function in linalg package
+inv_M_np = np.linalg.inv(M_np)
+#define index for streaming
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#assign numpy version to M.np to M
+M.from_numpy(M_np)
+#assign numpy version of inverser matrix inv_M_np to inv_M
+inv_M.from_numpy(inv_M_np)
+#assign numpy versio of LR array  to LR
+LR.from_numpy(LR_np)
+#assign fx,fy,fz to vector external force
+ext_f[None] = ti.Vector([fx,fy,fz])
+#assign numpy version of S diagnal S_dig_np to S_dig
+S_dig.from_numpy(S_dig_np)
+#make inv_M,M,LR,S_dig not modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+ti.static(S_dig)
+
+#create mesh nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#numpy meshgrid from x,y,z 1d array to 3d array X,Y,Z here use ij indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local,u) calculate the equilibrium density distribution function in velocity space

+
# taichi funciton
+@ti.func
+def feq(k,rho_local, u):
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #calculate the equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() initialize velocity=0, density=1 and denisty distribution function= equilibrium density distribution function

+
@ti.kernel
+def init():
+    for i,j,k in rho:
+        rho[i,j,k] = 1.0
+        v[i,j,k] = ti.Vector([0,0,0])
+        for s in range(19):
+            f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+            #print(F[i,j,k,s], feq(s,1.0,v[i,j,k]))
+
+
+

init_geo() load geometry file

+
def init_geo(filename):
+    #load data
+    in_dat = np.loadtxt(filename)
+    #reshape it with column major
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+    return in_dat
+
+
+

static_init() initialize lattixe speed weight parameter and boundary velocity

+
@ti.kernel
+def static_init():
+if ti.static(enable_projection): # No runtime overhead
+    #initialize lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #initialize lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #intialize weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #intialize boundary velocity
+    bc_vel_x_left[None] = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right[None] = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left[None] = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right[None] = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left[None] = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right[None] = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M calculate denisty distribution function in momentum space M*f=m

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in range(19):
+        for s in range(19):
+            #calculte m=M*f here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s Force scheme

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in range(19):
+    #calculate Guo's force here
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) calculate equilibrium density distribution function in momentum space

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

collison() define the prcoess of collision

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is fluid
+        if (solid[i,j,k] == 0):
+            #calculate m
+            m_temp = multiply_M(i,j,k)
+            #calculate meq
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            for s in range(19):
+                #calculate -s*(m-meq)
+                m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #add Guo's force
+                m_temp[s] += (1-0.5*S_dig[s])*GuoF(i,j,k,s,v[i,j,k])
+
+            for s in range(19):
+                f[i,j,k,s] = 0
+                for l in range(19):
+                    #f=-M^-1*S(m-meq)
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+
+

periodic_index(i) set the bounary index with periodic bounary condition

+
@ti.func
+def periodic_index(i):
+    #inner index
+    iout = i
+    #x-left
+    if i[0]<0:     iout[0] = nx-1
+    #x-right
+    if i[0]>nx-1:  iout[0] = 0
+    #y-left
+    if i[1]<0:     iout[1] = ny-1
+    #y-right
+    if i[1]>ny-1:  iout[1] = 0
+    #z-left
+    if i[2]<0:     iout[2] = nz-1
+    #z-right
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

streaming1() defines the streaming process of denisty distibution function

+
@ti.kernel
+def streaming1():
+    for i in ti.grouped(rho):
+        #if it is fluid
+        if (solid[i] == 0):
+            for s in range(19):
+                #the neighbour index
+                ip = periodic_index(i+e[s])
+                #if neighbour index is fluid just streaming
+                if (solid[ip]==0):
+                    F[ip,s] = f[i,s]
+                #if neighbour index is solid just bounce back
+                else:
+                    F[i,LR[s]] = f[i,s]
+                    #print(i, ip, "@@@")
+
+
+

streaming2() a simple streaming process without consideration of solid and boundary

+
@ti.kernel
+def streaming2():
+    for i in ti.grouped(rho):
+        for s in range(19):
+            f[i,s] = F[i,s]
+
+
+

Boudary_condition() define the bounary condition of fixed pressure and fixed velocity

+
@ti.kernel
+def Boundary_condition():
+    #pressure-boundary condtion x-left
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #if boundary is fluid but the neighbour is solid
+                #equilibrium density distribution function is calculated based on the neighbour velocity
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                #if boundary is fluid and the neighbour is also fluid
+                #equilibrium density distribution function is calculated based on the boundary velocity
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    #velocity-boundary conditon x-left
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in range(19):
+                #calculate density distribution fucntion based on equilibrium part and non-equilibrium part
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+
+    #pressure boundary condition x-right similar to x-left
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    #velocity booundary condition x-right similar to x-left
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in range(19):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])  #!!!!!!change velocity in feq into vector
+
+
+

streaming3() calculate the macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i in ti.grouped(rho):
+        #if it is fluid calculate density and velocity based on density distribution function
+        if (solid[i]==0):
+            rho[i] = 0
+            v[i] = ti.Vector([0,0,0])
+            for s in range(19):
+                f[i,s] = F[i,s]
+                rho[i] += f[i,s]
+                v[i] += e_f[s]*f[i,s]
+
+            v[i] /= rho[i]
+            v[i] += (ext_f[None]/2)/rho[i]
+        # if it is solid set denisty equals one and velocity equals zero
+        else:
+            rho[i] = 1.0
+            v[i] = ti.Vector([0,0,0])
+
+
+

At the end of the file do the actual simulation and export the data

+
#define some time varible
+time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+#import the solid flag data
+#solid_np = init_geo('./BC.dat')
+solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+
+# do the initialization
+static_init()
+init()
+
+# do the actual simulation
+for iter in range(50000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    # calculate every 1000 time step
+    if (iter%1000==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        #calculate the time difference between now and previous time step
+        diff_time = int(time_now-time_pre)
+        #calculate the time difference between now and the initial time
+        elap_time = int(time_now-time_init)
+        #divmod function return the quotient and the remainder
+        #so that h_diff,m_diff and s_diff represent the hour, minute and second. the same as the h_elap,m_elap and s_elap
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        #export every 1000 timestep to vtk with x,y,z coordinate and solid,density and velocity variable
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[:,:,:,0]), np.ascontiguousarray(v.to_numpy()[:,:,:,1]),np.ascontiguousarray(v.to_numpy()[:,:,:,2]))
+                            }
+            )
+# ti.sync()
+# ti.profiler.print_kernel_profiler_info()
+#print the profiler information of every kernel and task of taichi in this file
+ti.profiler.print_scoped_profiler_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/lbm_solver_3d_cavity.html b/docs/lbm_solver_3d_cavity.html new file mode 100644 index 0000000..7e051cd --- /dev/null +++ b/docs/lbm_solver_3d_cavity.html @@ -0,0 +1,156 @@ + + + + + + + lbm_solver_3d_cavity — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_cavity

+

This solver is almost similar to lbm_solver_3d expect several difference as follows: +.. number:: lbm_solver_3d_cavity

+
    +
  1. The Grid resolution in this solver is 50x50x50

  2. +
  3. The viscosity in this solver is 0.16667

  4. +
  5. The boundary condition in this solver is velocity solver on x-right as follows

  6. +
+

boundary condition of this solver

+
#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 2, 1.0, 0.0, 0.0, 0.1  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+
+

x-right is implementated with velocity boundary condition

+

4. The boundary condition implementation is different from lbm_solver_3d, in this solver, the density distribution +function is calculated based on velocity on the boundary.

+
if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    #F[0,j,k][s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])  #!!!!!!change velocity in feq into vector
+                    F[0,j,k][s]=feq(s,1.0,ti.Vector(bc_vel_x_left))
+
+
+
    +
  1. Finally, the definition of the varible is slightly different from lbm_solver_3d

  2. +
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/lbm_solver_3d_sparse.html b/docs/lbm_solver_3d_sparse.html new file mode 100644 index 0000000..58c9363 --- /dev/null +++ b/docs/lbm_solver_3d_sparse.html @@ -0,0 +1,143 @@ + + + + + + + lbm_solver_3d_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_sparse

+

This solver is almost similar to lbm_solver_3d expect the sparse definition of some varible:

+
f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

It use a pointer and certain block to divide the region and then place different varible on the block which make the storage +sparse.

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..32bb245 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs/modules.html b/docs/modules.html new file mode 100644 index 0000000..139c882 --- /dev/null +++ b/docs/modules.html @@ -0,0 +1,148 @@ + + + + + + + taichi_LBM3D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..b9bfd06 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,10 @@ +taichi_LBM3D +============ + +.. toctree:: + :maxdepth: 4 + + Single_phase + Grey_Scale + 2phase + Phase_change diff --git a/docs/objects.inv b/docs/objects.inv new file mode 100644 index 0000000..8b79ea0 Binary files /dev/null and b/docs/objects.inv differ diff --git a/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.html b/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.html new file mode 100644 index 0000000..cae5168 --- /dev/null +++ b/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.html @@ -0,0 +1,699 @@ + + + + + + + LBM_3D_SinglePhase_Solute_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

LBM_3D_SinglePhase_Solute_Solver

+

This file is the solver for solute transportation

+

First import the certain package and define the class of LB3D_Solver_Single_Phase_Solute which inheritant from +LB3D_Solver_Single_Phase_Solute

+
from sympy import inverse_mellin_transform
+import taichi as ti
+import numpy as np
+from pyevtk.hl import gridToVTK
+import time
+
+#ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False)
+import LBM_3D_SinglePhase_Solver as lb3d
+
+@ti.data_oriented
+class LB3D_Solver_Single_Phase_Solute(lb3d.LB3D_Solver_Single_Phase):
+    def __init__(self, nx, ny, nz):
+        super(LB3D_Solver_Single_Phase_Solute, self).__init__(nx, ny, nz, sparse_storage = False)
+        #define solute boundary condition
+        self.solute_bc_x_left, self.solute_bcxl = 0, 0.0
+        self.solute_bc_x_right, self.solute_bcxr = 0, 0.0
+        self.solute_bc_y_left, self.solute_bcyl = 0, 0.0
+        self.solute_bc_y_right, self.solute_bcyr = 0, 0.0
+        self.solute_bc_z_left, self.solute_bczl = 0, 0.0
+        self.solute_bc_z_right, self.solute_bczr = 0, 0.0
+
+        #define parameters for bouyancy force
+        self.buoyancy_parameter = 20.0   #Buoyancy Parameter (0= no buoyancy)
+        self.ref_T = 20.0              #reference_psi F=/rho*g+Bouyancy*(/psi-reference_psi)*g)
+        #define gravity
+        self.gravity = 5e-7
+
+        #define concentration distribution function
+        self.fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define another concentration distribution function
+        self.Fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz))
+        #define external force
+        self.forcexyz = ti.Vector.field(3,ti.f32,shape=(nx,ny,nz))
+        #define entropy
+        self.rho_H = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define temperature
+        self.rho_T = ti.field(ti.f32, shape=(nx,ny,nz))
+        #define liquid volumn fraction
+        self.rho_fl = ti.field(ti.f32, shape=(nx,ny,nz))
+
+        #define specific heat of liquid
+        self.Cp_l= 1.0
+        #define specific heat of solid
+        self.Cp_s = 1.0
+        #define latent heat
+        self.Lt = 1.0
+        #define solid temperature
+        self.T_s = -10.0
+        #define liquid temperature
+        self.T_l = -10.0
+        #define viscosity of solid
+        self.niu_s = 0.002
+        #define viscosity of liquid
+        self.niu_l = 0.002
+
+        #define energy of solid
+        self.H_s = None
+        #define energy of liquid
+        self.H_l = None
+
+        #define rock thermal diffusivity
+        self.niu_solid = 0.001
+        #define specific heat of rock
+        self.Cp_solid = 1.0
+
+
+

An then it sets these parameters with functions

+
#set gravity
+def set_gravity(self, gravity):
+self.gravity = gravity
+#set buoyancy force parameter
+def set_buoyancy_parameter(self, buoyancy_param):
+    self.buoyancy_parameter = buoyancy_param
+#set reference temperature
+def set_ref_T(self, ref_t):
+    self.ref_T = ref_t
+#set specific heat of solid
+def set_specific_heat_solid(self, cps):
+    self.Cp_s = cps
+#set specfic heat of liquid
+def set_specific_heat_liquid(self, cpl):
+    self.Cp_l = cpl
+#set specfic heat of rock
+def set_specific_heat_rock(self, cprock):
+    self.Cp_solid = cprock
+#set latent heat
+def set_latent_heat(self, ltheat):
+    self.Lt = ltheat
+#set solidus temperature
+def set_solidus_temperature(self, ts):
+    self.T_s = ts
+#set liquidus temperature
+def set_liquidus_temperature(self, tl):
+    self.T_l = tl
+#set solid thermal diffusivity
+def set_solid_thermal_diffusivity(self, nius):
+    self.niu_s = nius
+#set liquid thermal diffusivity
+def set_liquid_thermal_diffusivity(self, niul):
+    self.niu_l = niul
+#set rock thermal diffusivity
+def set_rock_thermal_diffusivity(self, niurock):
+    self.niu_solid = niurock
+#set adiabatic boundary on x-left
+def set_bc_adiabatic_x_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_x_left = 2
+#set adiabatic boundary on x-right
+def set_bc_adiabatic_x_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_x_right = 2
+#set adiabatic boundary on y-left
+def set_bc_adiabatic_y_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_y_left = 2
+#set adiabatic boundary on y-right
+def set_bc_adiabatic_y_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_y_right = 2
+#set adiabatic boundary on z-left
+def set_bc_adiabatic_z_left(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_z_left = 2
+#set adiabatic boundary on z-right
+def set_bc_adiabatic_z_right(self, bc_ad):
+    if (bc_ad==True):
+        self.solute_bc_z_right = 2
+#set constant temperature on x-left
+def set_bc_constant_temperature_x_left(self,xl):
+    self.solute_bc_x_left = 1
+    self.solute_bcxl = xl
+#set constant temperature on x-right
+def set_bc_constant_temperature_x_right(self,xr):
+    self.solute_bc_x_right = 1
+    self.solute_bcxr = xr
+#set constant temperature on y-left
+def set_bc_constant_temperature_y_left(self,yl):
+    self.solute_bc_y_left = 1
+    self.solute_bcyl = yl
+#set constant temperature on y-right
+def set_bc_constant_temperature_y_right(self,yr):
+    self.solute_bc_y_right = 1
+    self.solute_bcyr = yr
+#set constant temperature on z-left
+def set_bc_constant_temperature_z_left(self,zl):
+    self.solute_bc_z_left = 1
+    self.solute_bczl = zl
+#set constant temperature on z-right
+def set_bc_constant_temperature_z_right(self,zr):
+    self.solute_bc_y_right = 1
+    self.solute_bczr = zr
+
+# update energy of solid and liquid
+def update_H_sl(self):
+    #energy of solid
+    self.H_s = self.Cp_s*self.T_s
+    #energy of liquid
+    self.H_l = self.H_s+self.Lt
+    print('H_s',self.H_s)
+    print('H_l',self.H_l)
+
+
+

Then it initialize some variable or function

+
#intialize the energy
+@ti.kernel
+def init_H(self):
+    for I in ti.grouped(self.rho_T):
+        #calculate the energy, convert_T_H() define later
+        self.rho_H[I] = self.convert_T_H(self.rho_T[I])
+
+#intialize the density distribiution function for solute concentration
+@ti.kernel
+def init_fg(self):
+    for I in ti.grouped(self.fg):
+        #calculate the overall specific heat
+        Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s
+        #intialize the density distribiution function for solute concentration equals equilibrium density distribiution function for solute concentration
+        for s in ti.static(range(19)):
+            self.fg[I][s] = self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])
+            self.Fg[I][s] = self.fg[I][s]
+
+#intialize the volumn fraction of liquid
+@ti.kernel
+def init_fl(self):
+    for I in ti.grouped(self.rho_T):
+        #convert_T_fl define later
+        self.rho_fl[I] = self.convert_T_fl(self.rho_T[I])
+
+
+

g_feq(self, k,local_T,local_H, Cp, u) calculate the equilibrium density distribiution function for thermal energy

+
@ti.func
+def g_feq(self, k,local_T,local_H, Cp, u):
+    eu = self.e[k].dot(u)
+    uv = u.dot(u)
+    feqout = 0.0
+    #calculating the zero-velocity equilibrium thermal distribution function
+    if (k==0):
+        feqout = local_H-Cp*local_T+self.w[k]*Cp*local_T*(1-1.5*uv)
+    else:
+    #calculating other directions equilibrium thermal distribution function
+        feqout = self.w[k]*Cp*local_T*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, self.w[k], feqout, Cp, local_T)
+    return feqout
+
+
+

cal_local_force(i, j, k) calculates buoyancy force

+
#density is the function of temperture delat(rho)=-rho*beta*delta(T)
+@ti.func
+def cal_local_force(self, i, j, k):
+    f = ti.Vector([self.fx, self.fy, self.fz])
+    f[1] += self.gravity*self.buoyancy_parameter*(self.rho_T[i,j,k]-self.ref_T)
+    #f= delta(rho)*delta(v)*g
+    f *= self.rho_fl[i,j,k]
+    return f
+
+
+

collision_g() defines the the collision of thermal distribution function

+
@ti.kernel
+def colission_g(self):
+    for I in ti.grouped(self.rho_T):
+        #overall relaxation time
+        tau_s = 3*(self.niu_s*(1.0-self.rho_fl[I])+self.niu_l*self.rho_fl[I])+0.5
+        #overall specific heat
+        Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s
+
+        #ROCK overall relaxation time and specific heat
+        if (self.solid[I] >0):
+            tau_s = 3.0*self.niu_solid+0.5
+            Cp = self.Cp_solid
+
+        #f=f-1/tau*(f-feq)
+        for s in ti.static(range(19)):
+            tmp_fg = -1.0/tau_s*(self.fg[I][s]-self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]))
+            #print(self.fg[I][s],tmp_fg,I,s,self.rho_H[I],self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]))
+            self.fg[I][s] += tmp_fg
+
+
+

collision() defines the the collision of density distribution function

+
@ti.kernel
+def colission(self):
+    for i,j,k in self.rho:
+        #if (self.solid[i,j,k] == 0):
+        m_temp = self.M[None]@self.F[i,j,k]
+        meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k])
+        m_temp -= self.S_dig[None]*(m_temp-meq)
+        f = self.cal_local_force(i,j,k)
+        if (ti.static(self.force_flag==1)):
+            for s in ti.static(range(19)):
+            #    m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s])
+                #f = self.cal_local_force()
+                f_guo=0.0
+                for l in ti.static(range(19)):
+                    f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l]
+                #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force)
+                m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo
+
+        self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+        #calculate the denisty distribution function in momentum space here
+        self.f[i,j,k] += self.inv_M[None]@m_temp
+        #calculate the fluid density distribution function here
+        for s in ti.static(range(19)):
+            self.f[i,j,k][s] = self.f[i,j,k][s]*(self.rho_fl[i,j,k]) + self.w[s]*(1.0-self.rho_fl[i,j,k])
+
+
+

streaming1() and streaming1_g() defines the fluid denisty distribiution function and +thermal density distribiution function

+
@ti.kernel
+def streaming1(self):
+    for i in ti.grouped(self.rho):
+        #if (self.solid[i] == 0):
+        for s in ti.static(range(19)):
+            ip = self.periodic_index(i+self.e[s])
+            self.F[ip][s] = self.f[i][s]
+
+@ti.kernel
+def streaming1_g(self):
+    for i in ti.grouped(self.rho_T):
+        for s in ti.static(range(19)):
+            ip = self.periodic_index(i+self.e[s])
+            self.Fg[ip][s] = self.fg[i][s]
+
+
+

this

+
@ti.kernel
+def BC_concentration(self):
+    #constant temperature boundary condition
+    if ti.static(self.solute_bc_x_left==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            local_T = self.solute_bcxl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[0,j,k]*self.Cp_l + (1-self.rho_fl[0,j,k])*self.Cp_s
+            #the boundary's thermal distribution function equals the equilibrium thermal distribution function on the boundary
+            for s in ti.static(range(19)):
+                self.fg[0,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[0,j,k])
+                self.Fg[0,j,k][s] = self.fg[0,j,k][s]
+    #adiabatic boundary condition
+    elif ti.static(self.solute_bc_x_left==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            for s in ti.static(range(19)):
+            #there is no thermal transfer between the boundaty and neighbouring cell
+                self.fg[0,j,k][s] = self.fg[1,j,k][s]
+                self.Fg[0,j,k][s] = self.fg[1,j,k][s]
+
+    #x-right
+    if ti.static(self.solute_bc_x_right==1):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            local_T = self.solute_bcxr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[self.nx-1,j,k]*self.Cp_l + (1-self.rho_fl[self.nx-1,j,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[self.nx-1,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[self.nx-1,j,k])
+                self.Fg[self.nx-1,j,k][s]= self.fg[self.nx-1,j,k][s]
+    elif ti.static(self.solute_bc_x_right==2):
+        for j,k in ti.ndrange((0,self.ny),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s]
+                self.Fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s]
+
+    #y-left
+    if ti.static(self.solute_bc_y_left==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            local_T = self.solute_bcyl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,0,k]*self.Cp_l + (1-self.rho_fl[i,0,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,0,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,0,k])
+                self.Fg[i,0,k][s] = self.fg[i,0,k][s]
+    elif ti.static(self.solute_bc_y_left==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[i,0,k][s] = self.fg[i,1,k][s]
+                self.Fg[i,0,k][s] = self.fg[i,1,k][s]
+
+    #y-right
+    if ti.static(self.solute_bc_y_right==1):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            local_T = self.solute_bcyr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,self.ny-1,k]*self.Cp_l + (1-self.rho_fl[i,self.ny-1,k])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,self.ny-1,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,self.ny-1,k])
+                self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-1,k][s]
+    elif ti.static(self.solute_bc_y_right==2):
+        for i,k in ti.ndrange((0,self.nx),(0,self.nz)):
+            for s in ti.static(range(19)):
+                self.fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s]
+                self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s]
+
+    #z-left
+    if ti.static(self.solute_bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            local_T = self.solute_bczl
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,j,0]*self.Cp_l + (1-self.rho_fl[i,j,0])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,j,0][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,0])
+                self.Fg[i,j,0][s] = self.fg[i,j,0][s]
+    elif ti.static(self.solute_bc_z_left==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            for s in ti.static(range(19)):
+                self.fg[i,j,0][s] = self.fg[i,j,1][s]
+                self.Fg[i,j,0][s] = self.fg[i,j,1][s]
+
+    #z-right
+    if ti.static(self.solute_bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            local_T = self.solute_bczr
+            local_H = self.convert_T_H(local_T)
+            Cp = self.rho_fl[i,j,self.nz-1]*self.Cp_l + (1-self.rho_fl[i,j,self.nz-1])*self.Cp_s
+
+            for s in ti.static(range(19)):
+                self.fg[i,j,self.nz-1][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,self.nz-1])
+                self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-1][s]
+    elif ti.static(self.solute_bc_z_right==1):
+        for i,j in ti.ndrange((0,self.nx),(0,self.ny)):
+            for s in ti.static(range(19)):
+                self.fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s]
+                self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s]
+
+
+

convert_H_T() calculate the temperature

+
@ti.func
+def convert_H_T(self,local_H):
+    new_T=0.0
+    #if local enthalpy is less than solid enthalpy
+    #T= enthalpy/specific heat
+    if (local_H<self.H_s):
+        new_T = local_H/self.Cp_s
+    #if if local enthalpy is greater than liquid enthalpy
+    #T= Tliquid+(enthalpy-liquid enthalpy)/speific heat of liquid
+    elif (local_H>self.H_l):
+        new_T = self.T_l+(local_H-self.H_l)/self.Cp_l
+    #if if temperature is greater than solid temperature
+    #T= Tsolid+(enthalpy-solid enthalpy)/(enthalpy of liquid-enthalpy of solid)*(temperature of liquid- temperature of solid)
+    elif (self.T_l>self.T_s):
+        new_T = self.T_s+(local_H-self.H_s)/(self.H_l-self.H_s)*(self.T_l-self.T_s)
+    else:
+    #else T= temperature of solid
+        new_T = self.T_s
+
+    return new_T
+
+
+

convert_H_fl() calculate the volumn fraction of liquid

+
@ti.func
+def convert_H_fl(self,local_H):
+    new_fl=0.0
+    #if enthalpy is less than solid enthalpy
+    #it is zero
+    if (local_H<self.H_s):
+        new_fl = 0.0
+    #if it is greater than liquid enthalpy
+    #it is one
+    elif (local_H>self.H_l):
+        new_fl = 1.0
+    #else
+    #it equals to (enthaply- soid enthaply)/(enthaply of liquid- enthalpy of solid)
+    else:
+        new_fl = (local_H-self.H_s)/(self.H_l-self.H_s)
+
+    return new_fl
+
+
+

convert_T_H() calculate the enthaply from temperature

+
@ti.func
+def convert_T_H(self,local_T):
+    new_H = 0.0
+    # calculate enthaply for three different conditions
+    if (local_T<=self.T_s):
+        new_H = self.Cp_s*local_T
+    elif (local_T>self.T_l):
+        new_H = (local_T-self.T_l)*self.Cp_l+self.H_l
+    else:
+        fluid_frc = (local_T-self.T_s)/(self.T_l-self.T_s)
+        new_H = self.H_s*(1-fluid_frc) + self.H_l*fluid_frc
+    return new_H
+
+
+

convert_T_fl() calculate volumn fraction from temperature

+
@ti.func
+def convert_T_fl(self,local_T):
+    new_fl = 0.0
+    # calculate volumn fraction for three different conditions
+    if (local_T<=self.T_s):
+        new_fl = 0.0
+    elif (local_T>=self.T_l):
+        new_fl = 1.0
+    elif (self.T_l>self.T_s):
+        new_fl = (local_T-self.T_s)/(self.T_l-self.T_s)
+    else:
+        new_fl = 1.0
+
+    return new_fl
+
+
+

streaming3() calculate macroscopic variable

+
@ti.kernel
+def streaming3(self):
+    for i in ti.grouped(self.rho):
+        self.forcexyz[i] = self.cal_local_force(i.x, i.y, i.z)
+        #print(i.x, i.y, i.z)
+        if ((self.solid[i]==0) or (self.rho_fl[i]>0.0)):
+            self.rho[i] = 0
+            self.v[i] = ti.Vector([0,0,0])
+            self.f[i] = self.F[i]
+            for s in ti.static(range(19)):
+                self.f[i][s] = self.f[i][s]*self.rho_fl[i]+self.w[s]*(1.0-self.rho_fl[i])
+            #density for fluid
+            self.rho[i] += self.f[i].sum()
+
+            for s in ti.static(range(19)):
+                self.v[i] += self.e_f[s]*self.f[i][s]
+
+            f = self.cal_local_force(i.x, i.y, i.z)
+            #velocity for fluid
+            self.v[i] /= self.rho[i]
+            self.v[i] += (f/2)/self.rho[i]
+
+        else:
+        #density and velocity for solid
+            self.rho[i] = 1.0
+            self.v[i] = ti.Vector([0,0,0])
+
+
+

streaming3() calculate enthalpy

+
@ti.kernel
+def streaming3_g(self):
+    for i in ti.grouped(self.rho_T):
+        self.rho_H[i] = 0.0
+        #enthalpy here
+        self.rho_H[i] = self.Fg[i].sum()
+        #for s in ti.static(range(19)):
+        #    self.rho_H[i] += self.Fg[i][s]
+        self.fg[i] = self.Fg[i]
+
+
+

update_T_fl() calculate volumn fraction and temperature

+
@ti.kernel
+def update_T_fl(self):
+    for I in ti.grouped(self.rho_T):
+        self.rho_T[I] = self.convert_H_T(self.rho_H[I])
+        self.rho_fl[I] = self.convert_H_fl(self.rho_H[I])
+        if (self.solid[I]>0):
+            self.rho_fl[I] = 0.0
+
+
+

init_solute_simulation() initialize the solute simulation

+
def init_solute_simulation(self):
+
+    self.init_simulation()
+    self.update_H_sl()
+    #ethalpy
+    self.init_H()
+    #volumn fraction
+    self.init_fl()
+    #thermal distribution function
+    self.init_fg()
+
+
+

init_concentration(filename) import concentration data from file

+
def init_concentration(self,filename):
+    in_dat = np.loadtxt(filename)
+    in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F')
+    self.rho_T.from_numpy(in_dat)
+
+
+

this

+
def step(self):
+    self.colission()
+    self.colission_g()
+
+    self.streaming1()
+    self.streaming1_g()
+
+    self.Boundary_condition()
+    self.BC_concentration()
+
+    self.streaming3_g()
+    self.streaming3()
+    self.streaming3_g()
+
+    self.update_T_fl()
+
+
+

this

+
def export_VTK(self, n):
+    gridToVTK(
+            "./LB_SingelPhase_"+str(n),
+            self.x,
+            self.y,
+            self.z,
+            #cellData={"pressure": pressure},
+            pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()),
+                        "rho": np.ascontiguousarray(self.rho.to_numpy()),
+                        "Solid_Liquid": np.ascontiguousarray(self.rho_fl.to_numpy()),
+                        "Tempreture": np.ascontiguousarray(self.rho_T.to_numpy()),
+                        "Entropy": np.ascontiguousarray(self.rho_H.to_numpy()),
+                        "velocity": (   np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])),
+                        "Force": (      np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]),
+                                        np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]),
+                                        np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2]))
+                        }
+        )
+
+
+

this

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst b/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst new file mode 100644 index 0000000..04dbf54 --- /dev/null +++ b/docs/phasechange/LBM_3D_SinglePhase_Solute_Solver.rst @@ -0,0 +1,619 @@ +LBM_3D_SinglePhase_Solute_Solver +====================================== + +This file is the solver for solute transportation + +First import the certain package and define the class of ``LB3D_Solver_Single_Phase_Solute`` which inheritant from +``LB3D_Solver_Single_Phase_Solute`` + +.. code-block:: python + + from sympy import inverse_mellin_transform + import taichi as ti + import numpy as np + from pyevtk.hl import gridToVTK + import time + + #ti.init(arch=ti.cpu, dynamic_index=False, kernel_profiler=False, print_ir=False) + import LBM_3D_SinglePhase_Solver as lb3d + + @ti.data_oriented + class LB3D_Solver_Single_Phase_Solute(lb3d.LB3D_Solver_Single_Phase): + def __init__(self, nx, ny, nz): + super(LB3D_Solver_Single_Phase_Solute, self).__init__(nx, ny, nz, sparse_storage = False) + #define solute boundary condition + self.solute_bc_x_left, self.solute_bcxl = 0, 0.0 + self.solute_bc_x_right, self.solute_bcxr = 0, 0.0 + self.solute_bc_y_left, self.solute_bcyl = 0, 0.0 + self.solute_bc_y_right, self.solute_bcyr = 0, 0.0 + self.solute_bc_z_left, self.solute_bczl = 0, 0.0 + self.solute_bc_z_right, self.solute_bczr = 0, 0.0 + + #define parameters for bouyancy force + self.buoyancy_parameter = 20.0 #Buoyancy Parameter (0= no buoyancy) + self.ref_T = 20.0 #reference_psi F=/rho*g+Bouyancy*(/psi-reference_psi)*g) + #define gravity + self.gravity = 5e-7 + + #define concentration distribution function + self.fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define another concentration distribution function + self.Fg = ti.Vector.field(19,ti.f32,shape=(nx,ny,nz)) + #define external force + self.forcexyz = ti.Vector.field(3,ti.f32,shape=(nx,ny,nz)) + #define entropy + self.rho_H = ti.field(ti.f32, shape=(nx,ny,nz)) + #define temperature + self.rho_T = ti.field(ti.f32, shape=(nx,ny,nz)) + #define liquid volumn fraction + self.rho_fl = ti.field(ti.f32, shape=(nx,ny,nz)) + + #define specific heat of liquid + self.Cp_l= 1.0 + #define specific heat of solid + self.Cp_s = 1.0 + #define latent heat + self.Lt = 1.0 + #define solid temperature + self.T_s = -10.0 + #define liquid temperature + self.T_l = -10.0 + #define viscosity of solid + self.niu_s = 0.002 + #define viscosity of liquid + self.niu_l = 0.002 + + #define energy of solid + self.H_s = None + #define energy of liquid + self.H_l = None + + #define rock thermal diffusivity + self.niu_solid = 0.001 + #define specific heat of rock + self.Cp_solid = 1.0 + +An then it sets these parameters with functions + +.. code-block:: python + + #set gravity + def set_gravity(self, gravity): + self.gravity = gravity + #set buoyancy force parameter + def set_buoyancy_parameter(self, buoyancy_param): + self.buoyancy_parameter = buoyancy_param + #set reference temperature + def set_ref_T(self, ref_t): + self.ref_T = ref_t + #set specific heat of solid + def set_specific_heat_solid(self, cps): + self.Cp_s = cps + #set specfic heat of liquid + def set_specific_heat_liquid(self, cpl): + self.Cp_l = cpl + #set specfic heat of rock + def set_specific_heat_rock(self, cprock): + self.Cp_solid = cprock + #set latent heat + def set_latent_heat(self, ltheat): + self.Lt = ltheat + #set solidus temperature + def set_solidus_temperature(self, ts): + self.T_s = ts + #set liquidus temperature + def set_liquidus_temperature(self, tl): + self.T_l = tl + #set solid thermal diffusivity + def set_solid_thermal_diffusivity(self, nius): + self.niu_s = nius + #set liquid thermal diffusivity + def set_liquid_thermal_diffusivity(self, niul): + self.niu_l = niul + #set rock thermal diffusivity + def set_rock_thermal_diffusivity(self, niurock): + self.niu_solid = niurock + #set adiabatic boundary on x-left + def set_bc_adiabatic_x_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_left = 2 + #set adiabatic boundary on x-right + def set_bc_adiabatic_x_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_x_right = 2 + #set adiabatic boundary on y-left + def set_bc_adiabatic_y_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_left = 2 + #set adiabatic boundary on y-right + def set_bc_adiabatic_y_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_y_right = 2 + #set adiabatic boundary on z-left + def set_bc_adiabatic_z_left(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_left = 2 + #set adiabatic boundary on z-right + def set_bc_adiabatic_z_right(self, bc_ad): + if (bc_ad==True): + self.solute_bc_z_right = 2 + #set constant temperature on x-left + def set_bc_constant_temperature_x_left(self,xl): + self.solute_bc_x_left = 1 + self.solute_bcxl = xl + #set constant temperature on x-right + def set_bc_constant_temperature_x_right(self,xr): + self.solute_bc_x_right = 1 + self.solute_bcxr = xr + #set constant temperature on y-left + def set_bc_constant_temperature_y_left(self,yl): + self.solute_bc_y_left = 1 + self.solute_bcyl = yl + #set constant temperature on y-right + def set_bc_constant_temperature_y_right(self,yr): + self.solute_bc_y_right = 1 + self.solute_bcyr = yr + #set constant temperature on z-left + def set_bc_constant_temperature_z_left(self,zl): + self.solute_bc_z_left = 1 + self.solute_bczl = zl + #set constant temperature on z-right + def set_bc_constant_temperature_z_right(self,zr): + self.solute_bc_y_right = 1 + self.solute_bczr = zr + + # update energy of solid and liquid + def update_H_sl(self): + #energy of solid + self.H_s = self.Cp_s*self.T_s + #energy of liquid + self.H_l = self.H_s+self.Lt + print('H_s',self.H_s) + print('H_l',self.H_l) + +Then it initialize some variable or function + +.. code-block:: python + + #intialize the energy + @ti.kernel + def init_H(self): + for I in ti.grouped(self.rho_T): + #calculate the energy, convert_T_H() define later + self.rho_H[I] = self.convert_T_H(self.rho_T[I]) + + #intialize the density distribiution function for solute concentration + @ti.kernel + def init_fg(self): + for I in ti.grouped(self.fg): + #calculate the overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + #intialize the density distribiution function for solute concentration equals equilibrium density distribiution function for solute concentration + for s in ti.static(range(19)): + self.fg[I][s] = self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I]) + self.Fg[I][s] = self.fg[I][s] + + #intialize the volumn fraction of liquid + @ti.kernel + def init_fl(self): + for I in ti.grouped(self.rho_T): + #convert_T_fl define later + self.rho_fl[I] = self.convert_T_fl(self.rho_T[I]) + +``g_feq(self, k,local_T,local_H, Cp, u)`` calculate the equilibrium density distribiution function for thermal energy + +.. code-block:: python + + @ti.func + def g_feq(self, k,local_T,local_H, Cp, u): + eu = self.e[k].dot(u) + uv = u.dot(u) + feqout = 0.0 + #calculating the zero-velocity equilibrium thermal distribution function + if (k==0): + feqout = local_H-Cp*local_T+self.w[k]*Cp*local_T*(1-1.5*uv) + else: + #calculating other directions equilibrium thermal distribution function + feqout = self.w[k]*Cp*local_T*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, self.w[k], feqout, Cp, local_T) + return feqout + +``cal_local_force(i, j, k)`` calculates buoyancy force + +.. code-block:: python + + #density is the function of temperture delat(rho)=-rho*beta*delta(T) + @ti.func + def cal_local_force(self, i, j, k): + f = ti.Vector([self.fx, self.fy, self.fz]) + f[1] += self.gravity*self.buoyancy_parameter*(self.rho_T[i,j,k]-self.ref_T) + #f= delta(rho)*delta(v)*g + f *= self.rho_fl[i,j,k] + return f + +``collision_g()`` defines the the collision of thermal distribution function + +.. code-block:: python + + @ti.kernel + def colission_g(self): + for I in ti.grouped(self.rho_T): + #overall relaxation time + tau_s = 3*(self.niu_s*(1.0-self.rho_fl[I])+self.niu_l*self.rho_fl[I])+0.5 + #overall specific heat + Cp = self.rho_fl[I]*self.Cp_l + (1-self.rho_fl[I])*self.Cp_s + + #ROCK overall relaxation time and specific heat + if (self.solid[I] >0): + tau_s = 3.0*self.niu_solid+0.5 + Cp = self.Cp_solid + + #f=f-1/tau*(f-feq) + for s in ti.static(range(19)): + tmp_fg = -1.0/tau_s*(self.fg[I][s]-self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + #print(self.fg[I][s],tmp_fg,I,s,self.rho_H[I],self.g_feq(s,self.rho_T[I],self.rho_H[I], Cp, self.v[I])) + self.fg[I][s] += tmp_fg + +``collision()`` defines the the collision of density distribution function + +.. code-block:: python + + @ti.kernel + def colission(self): + for i,j,k in self.rho: + #if (self.solid[i,j,k] == 0): + m_temp = self.M[None]@self.F[i,j,k] + meq = self.meq_vec(self.rho[i,j,k],self.v[i,j,k]) + m_temp -= self.S_dig[None]*(m_temp-meq) + f = self.cal_local_force(i,j,k) + if (ti.static(self.force_flag==1)): + for s in ti.static(range(19)): + # m_temp[s] -= S_dig[s]*(m_temp[s]-meq[s]) + #f = self.cal_local_force() + f_guo=0.0 + for l in ti.static(range(19)): + f_guo += self.w[l]*((self.e_f[l]-self.v[i,j,k]).dot(f)+(self.e_f[l].dot(self.v[i,j,k])*(self.e_f[l].dot(f))))*self.M[None][s,l] + #m_temp[s] += (1-0.5*self.S_dig[None][s])*self.GuoF(i,j,k,s,self.v[i,j,k],force) + m_temp[s] += (1-0.5*self.S_dig[None][s])*f_guo + + self.f[i,j,k] = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + #calculate the denisty distribution function in momentum space here + self.f[i,j,k] += self.inv_M[None]@m_temp + #calculate the fluid density distribution function here + for s in ti.static(range(19)): + self.f[i,j,k][s] = self.f[i,j,k][s]*(self.rho_fl[i,j,k]) + self.w[s]*(1.0-self.rho_fl[i,j,k]) + +``streaming1()`` and ``streaming1_g()`` defines the fluid denisty distribiution function and +thermal density distribiution function + +.. code-block:: python + + @ti.kernel + def streaming1(self): + for i in ti.grouped(self.rho): + #if (self.solid[i] == 0): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.F[ip][s] = self.f[i][s] + + @ti.kernel + def streaming1_g(self): + for i in ti.grouped(self.rho_T): + for s in ti.static(range(19)): + ip = self.periodic_index(i+self.e[s]) + self.Fg[ip][s] = self.fg[i][s] + +this + +.. code-block:: python + + @ti.kernel + def BC_concentration(self): + #constant temperature boundary condition + if ti.static(self.solute_bc_x_left==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[0,j,k]*self.Cp_l + (1-self.rho_fl[0,j,k])*self.Cp_s + #the boundary's thermal distribution function equals the equilibrium thermal distribution function on the boundary + for s in ti.static(range(19)): + self.fg[0,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[0,j,k]) + self.Fg[0,j,k][s] = self.fg[0,j,k][s] + #adiabatic boundary condition + elif ti.static(self.solute_bc_x_left==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + #there is no thermal transfer between the boundaty and neighbouring cell + self.fg[0,j,k][s] = self.fg[1,j,k][s] + self.Fg[0,j,k][s] = self.fg[1,j,k][s] + + #x-right + if ti.static(self.solute_bc_x_right==1): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + local_T = self.solute_bcxr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[self.nx-1,j,k]*self.Cp_l + (1-self.rho_fl[self.nx-1,j,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[self.nx-1,j,k]) + self.Fg[self.nx-1,j,k][s]= self.fg[self.nx-1,j,k][s] + elif ti.static(self.solute_bc_x_right==2): + for j,k in ti.ndrange((0,self.ny),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + self.Fg[self.nx-1,j,k][s] = self.fg[self.nx-2,j,k][s] + + #y-left + if ti.static(self.solute_bc_y_left==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,0,k]*self.Cp_l + (1-self.rho_fl[i,0,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,0,k]) + self.Fg[i,0,k][s] = self.fg[i,0,k][s] + elif ti.static(self.solute_bc_y_left==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,0,k][s] = self.fg[i,1,k][s] + self.Fg[i,0,k][s] = self.fg[i,1,k][s] + + #y-right + if ti.static(self.solute_bc_y_right==1): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + local_T = self.solute_bcyr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,self.ny-1,k]*self.Cp_l + (1-self.rho_fl[i,self.ny-1,k])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,self.ny-1,k]) + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-1,k][s] + elif ti.static(self.solute_bc_y_right==2): + for i,k in ti.ndrange((0,self.nx),(0,self.nz)): + for s in ti.static(range(19)): + self.fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + self.Fg[i,self.ny-1,k][s] = self.fg[i,self.ny-2,k][s] + + #z-left + if ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczl + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,0]*self.Cp_l + (1-self.rho_fl[i,j,0])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,0]) + self.Fg[i,j,0][s] = self.fg[i,j,0][s] + elif ti.static(self.solute_bc_z_left==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,0][s] = self.fg[i,j,1][s] + self.Fg[i,j,0][s] = self.fg[i,j,1][s] + + #z-right + if ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + local_T = self.solute_bczr + local_H = self.convert_T_H(local_T) + Cp = self.rho_fl[i,j,self.nz-1]*self.Cp_l + (1-self.rho_fl[i,j,self.nz-1])*self.Cp_s + + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.g_feq(s,local_T, local_H, Cp, self.v[i,j,self.nz-1]) + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-1][s] + elif ti.static(self.solute_bc_z_right==1): + for i,j in ti.ndrange((0,self.nx),(0,self.ny)): + for s in ti.static(range(19)): + self.fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + self.Fg[i,j,self.nz-1][s] = self.fg[i,j,self.nz-2][s] + +``convert_H_T()`` calculate the temperature + +.. code-block:: python + + @ti.func + def convert_H_T(self,local_H): + new_T=0.0 + #if local enthalpy is less than solid enthalpy + #T= enthalpy/specific heat + if (local_Hself.H_l): + new_T = self.T_l+(local_H-self.H_l)/self.Cp_l + #if if temperature is greater than solid temperature + #T= Tsolid+(enthalpy-solid enthalpy)/(enthalpy of liquid-enthalpy of solid)*(temperature of liquid- temperature of solid) + elif (self.T_l>self.T_s): + new_T = self.T_s+(local_H-self.H_s)/(self.H_l-self.H_s)*(self.T_l-self.T_s) + else: + #else T= temperature of solid + new_T = self.T_s + + return new_T + +``convert_H_fl()`` calculate the volumn fraction of liquid + +.. code-block:: python + + @ti.func + def convert_H_fl(self,local_H): + new_fl=0.0 + #if enthalpy is less than solid enthalpy + #it is zero + if (local_Hself.H_l): + new_fl = 1.0 + #else + #it equals to (enthaply- soid enthaply)/(enthaply of liquid- enthalpy of solid) + else: + new_fl = (local_H-self.H_s)/(self.H_l-self.H_s) + + return new_fl + +``convert_T_H()`` calculate the enthaply from temperature + +.. code-block:: python + + @ti.func + def convert_T_H(self,local_T): + new_H = 0.0 + # calculate enthaply for three different conditions + if (local_T<=self.T_s): + new_H = self.Cp_s*local_T + elif (local_T>self.T_l): + new_H = (local_T-self.T_l)*self.Cp_l+self.H_l + else: + fluid_frc = (local_T-self.T_s)/(self.T_l-self.T_s) + new_H = self.H_s*(1-fluid_frc) + self.H_l*fluid_frc + return new_H + +``convert_T_fl()`` calculate volumn fraction from temperature + +.. code-block:: python + + @ti.func + def convert_T_fl(self,local_T): + new_fl = 0.0 + # calculate volumn fraction for three different conditions + if (local_T<=self.T_s): + new_fl = 0.0 + elif (local_T>=self.T_l): + new_fl = 1.0 + elif (self.T_l>self.T_s): + new_fl = (local_T-self.T_s)/(self.T_l-self.T_s) + else: + new_fl = 1.0 + + return new_fl + +``streaming3()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(self): + for i in ti.grouped(self.rho): + self.forcexyz[i] = self.cal_local_force(i.x, i.y, i.z) + #print(i.x, i.y, i.z) + if ((self.solid[i]==0) or (self.rho_fl[i]>0.0)): + self.rho[i] = 0 + self.v[i] = ti.Vector([0,0,0]) + self.f[i] = self.F[i] + for s in ti.static(range(19)): + self.f[i][s] = self.f[i][s]*self.rho_fl[i]+self.w[s]*(1.0-self.rho_fl[i]) + #density for fluid + self.rho[i] += self.f[i].sum() + + for s in ti.static(range(19)): + self.v[i] += self.e_f[s]*self.f[i][s] + + f = self.cal_local_force(i.x, i.y, i.z) + #velocity for fluid + self.v[i] /= self.rho[i] + self.v[i] += (f/2)/self.rho[i] + + else: + #density and velocity for solid + self.rho[i] = 1.0 + self.v[i] = ti.Vector([0,0,0]) + +``streaming3()`` calculate enthalpy + +.. code-block:: python + + @ti.kernel + def streaming3_g(self): + for i in ti.grouped(self.rho_T): + self.rho_H[i] = 0.0 + #enthalpy here + self.rho_H[i] = self.Fg[i].sum() + #for s in ti.static(range(19)): + # self.rho_H[i] += self.Fg[i][s] + self.fg[i] = self.Fg[i] + +``update_T_fl()`` calculate volumn fraction and temperature + +.. code-block:: python + + @ti.kernel + def update_T_fl(self): + for I in ti.grouped(self.rho_T): + self.rho_T[I] = self.convert_H_T(self.rho_H[I]) + self.rho_fl[I] = self.convert_H_fl(self.rho_H[I]) + if (self.solid[I]>0): + self.rho_fl[I] = 0.0 + +``init_solute_simulation()`` initialize the solute simulation + +.. code-block:: python + + def init_solute_simulation(self): + + self.init_simulation() + self.update_H_sl() + #ethalpy + self.init_H() + #volumn fraction + self.init_fl() + #thermal distribution function + self.init_fg() + +``init_concentration(filename)`` import concentration data from file + +.. code-block:: python + + def init_concentration(self,filename): + in_dat = np.loadtxt(filename) + in_dat = np.reshape(in_dat, (self.nx,self.ny,self.nz),order='F') + self.rho_T.from_numpy(in_dat) + +this + +.. code-block:: python + + def step(self): + self.colission() + self.colission_g() + + self.streaming1() + self.streaming1_g() + + self.Boundary_condition() + self.BC_concentration() + + self.streaming3_g() + self.streaming3() + self.streaming3_g() + + self.update_T_fl() + +this + +.. code-block:: python + + def export_VTK(self, n): + gridToVTK( + "./LB_SingelPhase_"+str(n), + self.x, + self.y, + self.z, + #cellData={"pressure": pressure}, + pointData={ "Solid": np.ascontiguousarray(self.solid.to_numpy()), + "rho": np.ascontiguousarray(self.rho.to_numpy()), + "Solid_Liquid": np.ascontiguousarray(self.rho_fl.to_numpy()), + "Tempreture": np.ascontiguousarray(self.rho_T.to_numpy()), + "Entropy": np.ascontiguousarray(self.rho_H.to_numpy()), + "velocity": ( np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.v.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])), + "Force": ( np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,0]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,1]), + np.ascontiguousarray(self.forcexyz.to_numpy()[0:self.nx,0:self.ny,0:self.nz,2])) + } + ) + +this \ No newline at end of file diff --git a/docs/phasechange/LBM_3D_SinglePhase_Solver.html b/docs/phasechange/LBM_3D_SinglePhase_Solver.html new file mode 100644 index 0000000..2ee3a59 --- /dev/null +++ b/docs/phasechange/LBM_3D_SinglePhase_Solver.html @@ -0,0 +1,125 @@ + + + + + + + LBM_3D_SinglePhase_Solver — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

LBM_3D_SinglePhase_Solver

+

This file is the same as LBM_3D_SinglePhase_Solver in Single_phase folder

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/LBM_3D_SinglePhase_Solver.rst b/docs/phasechange/LBM_3D_SinglePhase_Solver.rst new file mode 100644 index 0000000..4a6528d --- /dev/null +++ b/docs/phasechange/LBM_3D_SinglePhase_Solver.rst @@ -0,0 +1,4 @@ +LBM_3D_SinglePhase_Solver +=========================== + +This file is the same as LBM_3D_SinglePhase_Solver in Single_phase folder \ No newline at end of file diff --git a/docs/phasechange/example_cavity_melting.html b/docs/phasechange/example_cavity_melting.html new file mode 100644 index 0000000..ae9d24d --- /dev/null +++ b/docs/phasechange/example_cavity_melting.html @@ -0,0 +1,124 @@ + + + + + + + example_cavity_melting — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_cavity_melting

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/example_cavity_melting.rst b/docs/phasechange/example_cavity_melting.rst new file mode 100644 index 0000000..eb279eb --- /dev/null +++ b/docs/phasechange/example_cavity_melting.rst @@ -0,0 +1,2 @@ +example_cavity_melting +============================= \ No newline at end of file diff --git a/docs/phasechange/example_phase_change.html b/docs/phasechange/example_phase_change.html new file mode 100644 index 0000000..90da0ca --- /dev/null +++ b/docs/phasechange/example_phase_change.html @@ -0,0 +1,124 @@ + + + + + + + example_phase_change — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

example_phase_change

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/example_phase_change.rst b/docs/phasechange/example_phase_change.rst new file mode 100644 index 0000000..7e2842c --- /dev/null +++ b/docs/phasechange/example_phase_change.rst @@ -0,0 +1,2 @@ +example_phase_change +==================== \ No newline at end of file diff --git a/docs/phasechange/read_img_solute_psi_generation_2D.html b/docs/phasechange/read_img_solute_psi_generation_2D.html new file mode 100644 index 0000000..1bf9ec6 --- /dev/null +++ b/docs/phasechange/read_img_solute_psi_generation_2D.html @@ -0,0 +1,124 @@ + + + + + + + read_img_solute_psi_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

read_img_solute_psi_generation_2D

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/read_img_solute_psi_generation_2D.rst b/docs/phasechange/read_img_solute_psi_generation_2D.rst new file mode 100644 index 0000000..6ab6dde --- /dev/null +++ b/docs/phasechange/read_img_solute_psi_generation_2D.rst @@ -0,0 +1,2 @@ +read_img_solute_psi_generation_2D +================================== \ No newline at end of file diff --git a/docs/phasechange/solute_psi_generation_2D.html b/docs/phasechange/solute_psi_generation_2D.html new file mode 100644 index 0000000..7f736fb --- /dev/null +++ b/docs/phasechange/solute_psi_generation_2D.html @@ -0,0 +1,124 @@ + + + + + + + solute_psi_generation_2D — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

solute_psi_generation_2D

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/solute_psi_generation_2D.rst b/docs/phasechange/solute_psi_generation_2D.rst new file mode 100644 index 0000000..c8c1119 --- /dev/null +++ b/docs/phasechange/solute_psi_generation_2D.rst @@ -0,0 +1,2 @@ +solute_psi_generation_2D +============================ \ No newline at end of file diff --git a/docs/phasechange/test1.html b/docs/phasechange/test1.html new file mode 100644 index 0000000..9141c6e --- /dev/null +++ b/docs/phasechange/test1.html @@ -0,0 +1,122 @@ + + + + + + + test1 — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+
+ +
+

test1

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/phasechange/test1.rst b/docs/phasechange/test1.rst new file mode 100644 index 0000000..0b1d2a0 --- /dev/null +++ b/docs/phasechange/test1.rst @@ -0,0 +1,2 @@ +test1 +=================== \ No newline at end of file diff --git a/docs/search.html b/docs/search.html new file mode 100644 index 0000000..1eb12ca --- /dev/null +++ b/docs/search.html @@ -0,0 +1,118 @@ + + + + + + Search — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+ +
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/docs/searchindex.js b/docs/searchindex.js new file mode 100644 index 0000000..ee84f2a --- /dev/null +++ b/docs/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["2phase", "Grey_Scale", "Grey_scale/flow_domain_geo_generation", "Grey_scale/lbm_solver_3d_Macro_Sukop", "Phase_change", "Single_phase", "Single_phase/Convert_stl_to_binary", "Single_phase/LBM_3D_SinglePhase_Solver", "Single_phase/example_cavity", "Single_phase/example_porous_medium", "Single_phase/flow_domain_geo_generation_2D", "Single_phase/lbm_solver_3d", "Single_phase/lbm_solver_3d_cavity", "Single_phase/lbm_solver_3d_sparse", "index", "modules", "phasechange/LBM_3D_SinglePhase_Solute_Solver", "phasechange/LBM_3D_SinglePhase_Solver", "phasechange/example_cavity_melting", "phasechange/example_phase_change", "phasechange/read_img_solute_psi_generation_2D", "phasechange/solute_psi_generation_2D", "phasechange/test1", "twophase/lbm_solver_3d_2phase", "twophase/lbm_solver_3d_2phase_sparse"], "filenames": ["2phase.rst", "Grey_Scale.rst", "Grey_scale/flow_domain_geo_generation.rst", "Grey_scale/lbm_solver_3d_Macro_Sukop.rst", "Phase_change.rst", "Single_phase.rst", "Single_phase/Convert_stl_to_binary.rst", "Single_phase/LBM_3D_SinglePhase_Solver.rst", "Single_phase/example_cavity.rst", "Single_phase/example_porous_medium.rst", "Single_phase/flow_domain_geo_generation_2D.rst", "Single_phase/lbm_solver_3d.rst", "Single_phase/lbm_solver_3d_cavity.rst", "Single_phase/lbm_solver_3d_sparse.rst", "index.rst", "modules.rst", "phasechange/LBM_3D_SinglePhase_Solute_Solver.rst", "phasechange/LBM_3D_SinglePhase_Solver.rst", "phasechange/example_cavity_melting.rst", "phasechange/example_phase_change.rst", "phasechange/read_img_solute_psi_generation_2D.rst", "phasechange/solute_psi_generation_2D.rst", "phasechange/test1.rst", "twophase/lbm_solver_3d_2phase.rst", "twophase/lbm_solver_3d_2phase_sparse.rst"], "titles": ["2phase", "Grey_Scale", "flow_domain_geo_generation", "lbm_solver_3d_Macro_Sukop", "Phase_change", "Single_phase", "Convert_stl_to_binary", "Single_phase.LBM_3D_SinglePhase_Solver", "example_cavity", "example_porous_medium", "flow_domain_geo_generation_2D", "Single_phase.lbm_solver_3d", "lbm_solver_3d_cavity", "lbm_solver_3d_sparse", "Welcome to taichi-LBM3D\u2019s documentation!", "taichi_LBM3D", "LBM_3D_SinglePhase_Solute_Solver", "LBM_3D_SinglePhase_Solver", "example_cavity_melting", "example_phase_change", "read_img_solute_psi_generation_2D", "solute_psi_generation_2D", "test1", "lbm_solver_3d_2phase", "lbm_solver_3d_2phase_sparse"], "terms": {"taichi_lbm3d": 14, "2phase": [14, 15], "packag": [7, 8, 9, 11, 16, 23], "grey_scal": [14, 15], "phase_chang": [14, 15], "single_phas": [14, 15, 17, 23], "index": [7, 11, 14, 23], "modul": 10, "search": [2, 14], "page": 14, "submodul": [], "lbm_solver_3d_2phas": [0, 14, 15, 24], "lbm_solver_3d_2phase_spars": [0, 14, 15], "content": [], "flow_domain_geo_gener": [1, 14, 15], "lbm_solver_3d_macro_sukop": [1, 14, 15], "lbm_3d_singlephase_solute_solv": [4, 14, 15], "lbm_3d_singlephase_solv": [4, 5, 8, 9, 14, 15, 16], "example_cavity_melt": [4, 14, 15], "example_phase_chang": [4, 14, 15], "read_img_solute_psi_generation_2d": [4, 14, 15], "solute_psi_generation_2d": [4, 14, 15], "test1": [4, 14, 15], "example_cav": [5, 14, 15], "example_porous_medium": [5, 14, 15], "flow_domain_geo_generation_2d": [5, 14, 15], "lbm_solver_3d": [3, 5, 12, 13, 14, 15], "lbm_solver_3d_cav": [5, 14, 15], "lbm_solver_3d_spars": [5, 14, 15], "thi": [2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 23, 24], "i": [3, 7, 8, 9, 11, 12, 13, 16, 17, 23, 24], "d3q19": 7, "mrt": 7, "multi": 7, "relax": [7, 11, 16], "time": [7, 8, 9, 11, 16, 23], "solver": [3, 7, 8, 10, 11, 12, 13, 16, 23], "singl": [7, 11, 23], "phase": [7, 23], "It": [7, 13, 23], "defin": [2, 7, 10, 11, 16, 23, 24], "class": [7, 11, 16], "call": 7, "lb3d_solver_single_phas": [7, 8, 9, 16], "The": [3, 7, 8, 9, 11, 12, 23], "ha": 7, "default": 7, "function": [3, 7, 11, 12, 16, 23], "__init__": [7, 16], "normal": [7, 23], "python": 7, "code": [2, 23, 24], "block": 13, "def": [3, 7, 11, 16, 23], "self": [7, 16], "nx": [3, 7, 8, 9, 11, 13, 16, 23, 24], "ny": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "nz": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "sparse_storag": [7, 8, 16], "fals": [7, 8, 11, 16], "enable_project": [7, 11, 23], "true": [7, 11, 16, 23], "120": 7, "fx": [3, 7, 11, 16, 23], "fy": [3, 7, 11, 16, 23], "fz": [3, 7, 11, 16, 23], "0": [3, 7, 8, 9, 10, 11, 12, 16, 23], "0e": [3, 7, 11, 12, 23], "6": [3, 7, 11, 23], "niu": [3, 7, 11, 16, 23], "16667": [7, 12], "max_v": [7, 8], "ti": [3, 7, 8, 9, 11, 12, 13, 16, 23, 24], "field": [7, 11, 13, 16, 23, 24], "f32": [7, 11, 13, 16, 23, 24], "shape": [7, 11, 16, 23], "boundari": [7, 10, 11, 12, 16, 23], "condit": [7, 11, 12, 16, 23], "mode": [7, 11, 12, 23], "period": [7, 11, 12, 23], "1": [2, 3, 7, 8, 9, 10, 11, 12, 13, 16, 23, 24], "fix": [7, 11, 12, 23], "pressur": [7, 11, 12, 16, 23], "2": [7, 11, 12, 16, 23], "veloc": [7, 8, 11, 12, 16, 23], "valu": [2, 7, 10, 11, 12, 23], "rho": [3, 7, 11, 12, 13, 16, 23, 24], "vx": [7, 11, 12, 23], "vy": [7, 11, 12, 23], "vz": [7, 11, 12, 23], "bc_x_left": [7, 11, 12, 23], "rho_bcxl": [7, 11, 12, 23], "vx_bcxl": [7, 11, 12, 23], "vy_bcxl": [7, 11, 12, 23], "vz_bcxl": [7, 11, 12, 23], "5": [3, 7, 11, 12, 16, 23], "x": [2, 7, 8, 9, 11, 12, 16, 23], "axi": [7, 11, 12, 23], "left": [7, 9, 11, 12, 16, 23], "side": [7, 11, 12, 23], "bc_x_right": [7, 11, 12, 23], "rho_bcxr": [7, 11, 12, 23], "vx_bcxr": [7, 11, 12, 23], "vy_bcxr": [7, 11, 12, 23], "vz_bcxr": [7, 11, 12, 23], "bc_y_left": [7, 11, 12, 23], "rho_bcyl": [7, 11, 12, 23], "vx_bcyl": [7, 11, 12, 23], "vy_bcyl": [7, 11, 12, 23], "vz_bcyl": [7, 11, 12, 23], "bc_y_right": [7, 11, 12, 23], "rho_bcyr": [7, 11, 12, 23], "vx_bcyr": [7, 11, 12, 23], "vy_bcyr": [7, 11, 12, 23], "vz_bcyr": [7, 11, 12, 23], "bc_z_left": [7, 11, 12, 23], "rho_bczl": [7, 11, 12, 23], "vx_bczl": [7, 11, 12, 23], "vy_bczl": [7, 11, 12, 23], "vz_bczl": [7, 11, 12, 23], "bc_z_right": [7, 11, 12, 23], "rho_bczr": [7, 11, 12, 23], "vx_bczr": [7, 11, 12, 23], "vy_bczr": [7, 11, 12, 23], "vz_bczr": [7, 11, 12, 23], "f": [2, 3, 7, 8, 9, 10, 11, 12, 13, 16, 23, 24], "vector": [7, 11, 12, 13, 16, 23, 24], "19": [3, 7, 11, 12, 13, 16, 23, 24], "v": [7, 11, 13, 16, 23, 24], "3": [7, 11, 13, 16, 23, 24], "els": [3, 7, 11, 16, 23], "n_mem_partit": [7, 13, 24], "cell1": [7, 13, 24], "root": [7, 13, 24], "pointer": [7, 13, 24], "ijk": [7, 13, 24], "dens": [7, 13, 24], "place": [7, 13, 24], "cell2": [13, 24], "e": [3, 7, 11, 16, 23], "i32": [7, 11, 23], "s_dig": [7, 11, 16, 23], "e_f": [7, 11, 16, 23], "w": [7, 11, 16, 23], "solid": [3, 7, 10, 11, 12, 16, 23], "i8": 7, "ext_f": [7, 11, 23], "m": [7, 11, 16, 23], "matrix": [2, 7, 10, 11, 23], "inv_m": [7, 11, 16, 23], "m_np": [7, 11, 23], "np": [2, 7, 10, 11, 16, 23], "arrai": [3, 7, 11, 23], "inv_m_np": [7, 11, 23], "linalg": [7, 11, 23], "inv": [7, 11, 23], "lr": [3, 7, 11, 12, 23], "4": [7, 11, 12, 16, 23], "8": [7, 11, 23], "7": [7, 11, 16, 23], "10": [7, 9, 11, 16, 23], "9": [7, 11, 23], "12": [7, 11, 23], "11": [7, 11, 23], "14": [7, 11, 23], "13": [7, 11, 23], "16": [7, 11, 23], "15": [7, 11, 23], "18": [7, 11, 23], "17": [7, 11, 23], "none": [7, 11, 12, 16, 23], "linspac": [7, 11, 23], "y": [2, 7, 11, 12, 16, 23], "z": [2, 7, 11, 12, 16, 23], "meshgrid": [7, 11, 23], "ij": [7, 11, 23], "output": [2, 3, 6, 7, 8, 9, 10, 11, 23], "line": [], "space": [7, 11, 16, 23], "begin": 11, "try": [], "open": [], "path": [], "file": [2, 3, 6, 7, 8, 9, 10, 11, 16, 17, 23, 24], "r": 23, "print": [3, 7, 8, 9, 11, 16, 23], "read": [6, 10, 23], "final": 12, "close": [], "user": [], "michael": [], "gbk": [], "txt": [3, 9, 11, 23], "encod": [], "error": [], "ignor": [], "enabl": [7, 11, 23], "project": [7, 11, 23], "flag": [3, 7, 11, 23], "grid": [3, 7, 10, 12], "simul": [7, 8, 9, 11, 16, 23], "three": [7, 16, 23], "direct": [2, 7, 11, 16, 23], "densiti": [7, 9, 11, 12, 16, 23], "distribut": [7, 11, 12, 16, 23], "kinemat": 7, "viscos": [3, 7, 11, 12, 16, 23], "lattic": [7, 11, 23], "unit": 7, "taichi": [7, 8, 9, 11, 16, 23], "float": 7, "scalar": [7, 23], "which": [7, 13, 16], "maximum": [3, 7, 8], "right": [7, 8, 9, 11, 12, 16, 23], "element": [7, 23], "each": 7, "dimension": [7, 11, 23], "one": [7, 11, 16, 23], "spars": [7, 13, 23, 24], "storag": [7, 13, 24], "variabl": [3, 7, 11, 16, 23], "partit": 7, "equal": [7, 11, 16, 23], "everi": [7, 8, 9, 11], "four": 7, "speed": [7, 11, 23], "3x19": 7, "weight": [7, 11, 23], "paramet": [3, 7, 11, 16, 23], "when": 7, "fluid": [3, 7, 11, 16, 23], "extern": [3, 7, 11, 16, 23], "forc": [3, 7, 8, 9, 11, 16, 23], "": [3, 7, 11, 12, 16, 23], "diagnol": 7, "transform": [7, 11, 23], "19x19": 7, "dimens": [7, 11], "invers": [7, 11, 23], "numpi": [2, 7, 10, 11, 16, 23], "version": [7, 11, 23], "node": 7, "from": [7, 11, 12, 16, 23], "nearest": [], "farthest": [], "coordin": [7, 11], "follow": [3, 7, 12], "init_simul": [7, 8, 9, 16], "bc_vel_x_left": [7, 11, 12, 23], "bc_vel_x_right": [7, 11, 23], "bc_vel_y_left": [7, 11, 23], "bc_vel_y_right": [7, 11, 23], "bc_vel_z_left": [7, 11, 23], "bc_vel_z_right": [7, 11, 23], "tau_f": [7, 11], "s_v": [7, 11], "s_other": [7, 11], "ab": [7, 23], "force_flag": [7, 16], "static": [3, 7, 11, 12, 16, 23], "static_init": [7, 11, 23], "init": [7, 8, 9, 11, 16, 23], "initi": [7, 8, 9, 11, 16, 23], "some": [2, 3, 7, 10, 11, 13, 16, 23, 24], "tau": [7, 16], "frequenc": [3, 7, 11], "other": [7, 11, 16, 23], "diagon": [7, 11, 23], "greater": [7, 16], "than": [7, 16, 23], "zero": [2, 7, 10, 11, 16, 23], "wise": 7, "been": 7, "modifi": [7, 11, 23], "func": [7, 11, 16, 23], "feq": [7, 11, 12, 16, 23], "k": [7, 11, 12, 16, 23], "rho_loc": [7, 11, 23], "u": [7, 11, 16, 23], "eu": [7, 11, 16, 23], "dot": [7, 11, 16, 23], "uv": [7, 11, 16, 23], "feqout": [7, 11, 16, 23], "return": [7, 11, 16, 23], "calcul": [2, 3, 7, 8, 9, 11, 12, 16, 23], "equilibrium": [7, 11, 16, 23], "kernel": [3, 7, 11, 16, 23], "j": [7, 11, 12, 16, 23], "rang": [3, 7, 8, 9, 11, 12, 16, 23], "all": 7, "denisti": [7, 11, 16, 23], "init_geo": [3, 7, 8, 9, 11, 23], "import": [2, 3, 7, 8, 9, 10, 11, 16, 23], "data": [2, 3, 7, 8, 10, 11, 16, 23], "filenam": [7, 11, 16, 23], "in_dat": [7, 11, 16, 23], "loadtxt": [7, 11, 16, 23], "reshap": [2, 7, 10, 11, 16, 23], "order": [2, 7, 10, 11, 16, 23], "from_numpi": [3, 7, 11, 16, 23], "load": [7, 11], "set": [7, 8, 9, 11, 16, 23], "ani": 7, "posit": 7, "column": [2, 7, 10, 11, 23], "major": [2, 7, 10, 11, 23], "assign": [7, 11], "varibl": [7, 11, 12, 13, 24], "No": [7, 11, 23], "runtim": [7, 11, 23], "overhead": [7, 11, 23], "36": [7, 11, 23], "speeed": 7, "These": 7, "dure": 7, "paral": 7, "meq_vec": [7, 11, 16, 23], "momentum": [7, 11, 16, 23], "out": [7, 11, 23], "cal_local_forc": [7, 16], "transfer": [2, 7, 10, 16], "collis": [7, 11, 16, 23], "lbm": 7, "process": [7, 11, 23], "coliss": [7, 11, 16, 23], "m_temp": [7, 11, 16, 23], "meq": [7, 11, 16, 23], "f_guo": [7, 16], "l": [7, 11, 16, 23], "guof": [7, 11, 16, 23], "outer": 7, "loop": [7, 9], "add": [7, 11], "here": [2, 7, 10, 11, 16, 23], "us": [3, 7, 8, 11, 13, 23], "guo": [7, 11, 23], "scheme": [7, 11], "after": 7, "periodic_index": [3, 7, 11, 16, 23], "iout": [7, 11, 23], "streaming1": [3, 7, 11, 16, 23], "group": [3, 7, 11, 16], "ip": [3, 7, 11, 16, 23], "boundary_condit": [7, 11, 16, 23], "ndrang": [7, 11, 12, 16, 23], "chang": [2, 7, 10, 11, 12], "streaming3": [3, 7, 11, 16, 23], "sum": [7, 16], "get_max_v": [7, 8], "1e10": 7, "cal_max_v": 7, "atomic_max": 7, "norm": [7, 23], "set_bc_vel_x1": [7, 8], "vel": 7, "set_bc_vel_x0": 7, "set_bc_vel_y1": 7, "set_bc_vel_y0": 7, "set_bc_vel_z1": 7, "set_bc_vel_z0": 7, "set_bc_rho_x0": [7, 9], "set_bc_rho_x1": [7, 9], "set_bc_rho_y0": 7, "set_bc_rho_y1": 7, "set_bc_rho_z0": 7, "set_bc_rho_z1": 7, "set_viscos": 7, "set_forc": 7, "export_vtk": [7, 8, 9, 16], "n": [3, 7, 8, 9, 11, 16, 23], "gridtovtk": [7, 11, 16, 23], "lb_singelphase_": [7, 16], "str": [7, 11, 16, 23], "celldata": [7, 11, 16, 23], "pointdata": [7, 11, 16, 23], "ascontiguousarrai": [7, 11, 16, 23], "to_numpi": [7, 11, 16, 23], "step": [7, 8, 9, 11, 16], "single_phase_exampl": [], "includ": [], "old": [7, 11], "new": [7, 11], "bounc": [3, 7, 11, 23], "back": [3, 7, 11, 23], "stream": [3, 7, 11, 23], "prcoess": [7, 11], "non": [7, 11, 23], "accord": [7, 23], "fuction": 7, "bounari": [7, 11], "neighbour": [7, 11, 16, 23], "velciti": 7, "fucntion": [7, 11], "distibut": [7, 11], "similar": [3, 7, 11, 12, 13, 23], "boubndari": 7, "calculatet": 7, "macroscop": [3, 7, 11, 16, 23], "bnoundari": 7, "get": [7, 8], "maxium": 7, "export": [7, 8, 9, 11, 23], "result": [7, 23], "vtk": [3, 6, 7, 8, 9, 11], "pyevtk": [7, 11, 16, 23], "take": 7, "argument": 7, "system": 7, "dictionari": 7, "reuslt": 7, "name": [2, 7, 10], "kei": 7, "anoth": [7, 11, 16, 23], "object": 11, "orient": 11, "singlephas": 11, "without": 11, "hl": [11, 16, 23], "arch": [8, 9, 11, 16, 23], "cpu": [8, 9, 11, 16, 23], "dynamic_index": [8, 11, 16, 23], "kernel_profil": [8, 11, 16], "print_ir": [8, 11, 16], "100": [3, 11], "50": [3, 8, 10, 11], "131": [9, 11, 23], "995": [11, 23], "At": 11, "first": [11, 16], "dunam": 11, "disabl": 11, "profil": 11, "intermedi": 11, "represent": 11, "131x131x131": 11, "funciton": 11, "dimesnion": 11, "s_np": 11, "s_dig_np": 11, "lr_np": [11, 23], "versio": 11, "diagnal": 11, "make": [11, 13], "creat": [2, 9, 11], "mesh": 11, "1d": 11, "3d": 11, "multiply_m": [11, 23], "streaming2": [3, 11, 23], "geometri": [2, 3, 8, 9, 10, 11, 23], "lattix": 11, "intial": [9, 11, 16, 23], "calcult": [11, 23], "collison": 11, "inner": [11, 23], "just": 11, "simpl": 11, "consider": 11, "boudary_condit": 11, "end": 11, "do": [2, 10, 11, 23], "actual": 11, "time_init": [8, 9, 11, 23], "time_now": [8, 9, 11, 23], "time_pr": [8, 9, 11, 23], "dt_count": [11, 23], "solid_np": [3, 11, 23], "bc": [3, 11], "dat": [2, 3, 8, 10, 11, 23], "img_ftb131": [3, 9, 11, 23], "iter": [8, 9, 11, 23], "50000": [9, 11], "1000": [8, 11], "diff_tim": [8, 9, 11, 23], "int": [3, 8, 9, 11, 23], "elap_tim": [8, 9, 11, 23], "m_diff": [8, 9, 11, 23], "s_diff": [8, 9, 11, 23], "divmod": [8, 9, 11, 23], "60": [2, 3, 8, 9, 11, 23], "h_diff": [8, 9, 11, 23], "m_elap": [8, 9, 11, 23], "s_elap": [8, 9, 11, 23], "h_elap": [8, 9, 11, 23], "between": [8, 9, 11, 16, 23], "two": [3, 8, 9, 11, 23], "dh": [8, 9, 11, 23], "dm": [8, 9, 11, 23], "d": [2, 8, 9, 10, 11, 23], "elaps": [8, 9, 11, 23], "dth": [8, 9, 11, 23], "max": [8, 9, 11, 23], "force_scal": [8, 9, 11, 23], "10000": [11, 23], "structur": [11, 23], "sync": 11, "print_kernel_profiler_info": 11, "print_scoped_profiler_info": 11, "condtion": 11, "base": [2, 8, 9, 11, 12, 23], "also": 11, "conditon": 11, "part": 11, "booundari": 11, "differ": [3, 11, 12, 13, 16], "now": 11, "previou": 11, "quotient": 11, "remaind": 11, "so": [11, 23], "repres": 11, "hour": 11, "minut": 11, "second": 11, "same": [11, 17, 23, 24], "timestep": [3, 11], "inform": 11, "task": 11, "convert_stl_to_binari": [5, 14, 15], "almost": [3, 12, 13, 23, 24], "expect": [3, 12, 13], "sever": [3, 12], "resolut": [2, 3, 10, 12], "50x50x50": 12, "dddd": [], "ddddd": [], "implement": 12, "definit": [12, 13, 24], "slightli": 12, "text": [], "number": 8, "ijkl": [13, 24], "certain": [8, 10, 13, 16, 23], "divid": [13, 23], "region": 13, "gener": 10, "math": [2, 10], "input": [2, 10, 23], "stl": [2, 6, 10], "output_nam": [2, 10], "geo_cav": [8, 10], "dnx": [2, 10], "dny": [2, 10], "dnz": [2, 10], "NOT": [2, 10], "below": [2, 10, 23], "an": [10, 16, 23], "out_dat": [2, 10], "can": [2, 10], "cout_dat": 10, "size": [2, 10], "integ": [2, 10], "type": [2, 10], "savetxt": [2, 10], "t": [2, 10, 16, 23], "fmt": [2, 10], "caviti": 8, "flow": 8, "lb3dsp": [8, 9], "lb3d": [8, 9, 16], "2000": [8, 9], "500": [3, 8, 9, 23], "maxiumum": 8, "scale": 8, "porou": 9, "medium": 9, "gird": 9, "99": 9, "packah": 2, "geo": 2, "point": 2, "IN": 2, "bigger": 2, "more": 2, "found": 2, "insid": 2, "save": 2, "geo_nam": 3, "max_timestep": 3, "5000": 3, "output_fr": 3, "vtk_fre": 3, "There": 3, "ar": 3, "ns_np": 3, "astyp": 3, "streaming0": 3, "f2": 3, "otherwis": [3, 23], "appli": 3, "multiphas": 23, "model": 23, "color": 23, "gradient": 23, "firstli": 23, "note": 23, "need": 23, "taichi_glsl": 23, "pleas": 23, "isinf": 23, "isnan": 23, "vecfil": 23, "gpu": 23, "offline_cach": 23, "2e": 23, "liquid": [16, 23], "niu_l": [16, 23], "psi": [16, 23], "ga": 23, "niu_g": 23, "psi_solid": 23, "surfac": 23, "tension": 23, "capa": 23, "005": 23, "bc_psi_x_left": 23, "psi_x_left": 23, "bc_psi_x_right": 23, "psi_x_right": 23, "constant": [16, 23], "phase1": 23, "bc_psi_y_left": 23, "psi_y_left": 23, "bc_psi_y_right": 23, "psi_y_right": 23, "bc_psi_z_left": 23, "psi_z_left": 23, "bc_psi_z_right": 23, "psi_z_right": 23, "memori": [23, 24], "alloc": [23, 24], "rho_r": [23, 24], "b": 23, "rho_b": [23, 24], "rhor": [23, 24], "rhob": [23, 24], "lg0": 23, "wl": 23, "wg": 23, "l1": 23, "l2": 23, "g1": 23, "g2": 23, "inverd": 23, "steam": 23, "cartesian": 23, "filename2": 23, "phase_in_dat": 23, "colum": 23, "term": 23, "compute_c": 23, "c": 23, "ind_": 23, "periodic_index_for_psi": 23, "less": [16, 23], "veri": 23, "larg": 23, "compute_s_loc": 23, "id": 23, "sv": 23, "sother": 23, "relati": 23, "local": [16, 23], "recolor": 23, "uu": 23, "norm_sqr": 23, "cc": 23, "s_local": 23, "convect": 23, "g_r": 23, "g_b": 23, "kk": 23, "ef": 23, "cospsi": 23, "perturb": 23, "ci": 23, "along": 23, "opposit": 23, "boundary_condition_psi": 23, "snippt": [23, 24], "except": 23, "phase_np": 23, "phase_ftb131": 23, "80000": 23, "print_kernel_profile_info": 23, "print_profile_info": 23, "py": 24, "execpt": 24, "abov": 24, "folder": 17, "solut": 16, "transport": 16, "lb3d_solver_single_phase_solut": 16, "inherit": 16, "sympi": 16, "inverse_mellin_transform": 16, "data_ori": 16, "super": 16, "solute_bc_x_left": 16, "solute_bcxl": 16, "solute_bc_x_right": 16, "solute_bcxr": 16, "solute_bc_y_left": 16, "solute_bcyl": 16, "solute_bc_y_right": 16, "solute_bcyr": 16, "solute_bc_z_left": 16, "solute_bczl": 16, "solute_bc_z_right": 16, "solute_bczr": 16, "bouyanc": 16, "buoyancy_paramet": 16, "20": 16, "buoyanc": 16, "ref_t": 16, "reference_psi": 16, "g": 16, "graviti": 16, "5e": 16, "concentr": 16, "fg": 16, "forcexyz": 16, "entropi": 16, "rho_h": 16, "temperatur": 16, "rho_t": 16, "volumn": 16, "fraction": 16, "rho_fl": 16, "cp_l": 16, "cp_": 16, "lt": 16, "t_": 16, "t_l": 16, "niu_": 16, "002": 16, "h_": 16, "h_l": 16, "niu_solid": 16, "001": 16, "cp_solid": 16, "specif": 16, "heat": 16, "latent": 16, "energi": 16, "rock": 16, "thermal": 16, "diffus": 16, "set_grav": 16, "set_buoyancy_paramet": 16, "buoyancy_param": 16, "refer": 16, "set_ref_t": 16, "set_specific_heat_solid": 16, "cp": 16, "specfic": 16, "set_specific_heat_liquid": 16, "cpl": 16, "set_specific_heat_rock": 16, "cprock": 16, "set_latent_heat": 16, "ltheat": 16, "solidu": 16, "set_solidus_temperatur": 16, "liquidu": 16, "set_liquidus_temperatur": 16, "tl": 16, "set_solid_thermal_diffus": 16, "set_liquid_thermal_diffus": 16, "niul": 16, "set_rock_thermal_diffus": 16, "niurock": 16, "adiabat": 16, "set_bc_adiabatic_x_left": 16, "bc_ad": 16, "set_bc_adiabatic_x_right": 16, "set_bc_adiabatic_y_left": 16, "set_bc_adiabatic_y_right": 16, "set_bc_adiabatic_z_left": 16, "set_bc_adiabatic_z_right": 16, "set_bc_constant_temperature_x_left": 16, "xl": 16, "set_bc_constant_temperature_x_right": 16, "xr": 16, "set_bc_constant_temperature_y_left": 16, "yl": 16, "set_bc_constant_temperature_y_right": 16, "yr": 16, "set_bc_constant_temperature_z_left": 16, "zl": 16, "set_bc_constant_temperature_z_right": 16, "zr": 16, "updat": 16, "update_h_sl": 16, "Then": 16, "init_h": 16, "convert_t_h": 16, "later": 16, "init_fg": 16, "g_feq": 16, "init_fl": 16, "convert_t_fl": 16, "distribiut": 16, "overal": 16, "local_t": 16, "local_h": 16, "tempertur": 16, "delat": 16, "beta": 16, "delta": 16, "collision_g": 16, "colission_g": 16, "tau_": 16, "tmp_fg": 16, "streaming1_g": 16, "bc_concentr": 16, "elif": 16, "boundati": 16, "cell": 16, "convert_h_t": 16, "new_t": 16, "enthalpi": 16, "tliquid": 16, "speific": 16, "tsolid": 16, "convert_h_fl": 16, "new_fl": 16, "enthapli": 16, "soid": 16, "new_h": 16, "fluid_frc": 16, "streaming3_g": 16, "update_t_fl": 16, "init_solute_simul": 16, "ethalpi": 16, "init_concentr": 16, "solid_liquid": 16, "tempretur": 16}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"2phase": 0, "packag": [], "submodul": [], "lbm_solver_3d_2phas": 23, "modul": [], "lbm_solver_3d_2phase_spars": 24, "content": [0, 1, 4, 5, 14], "grey_scal": 1, "flow_domain_geo_gener": 2, "lbm_solver_3d_macro_sukop": 3, "phase_chang": 4, "lbm_3d_singlephase_solute_solv": 16, "lbm_3d_singlephase_solv": [7, 17], "example_cavity_melt": 18, "example_phase_chang": 19, "read_img_solute_psi_generation_2d": 20, "solute_psi_generation_2d": 21, "test1": 22, "single_phas": [5, 7, 11], "example_cav": 8, "example_porous_medium": 9, "flow_domain_geo_generation_2d": 10, "lbm_solver_3d": 11, "lbm_solver_3d_cav": 12, "lbm_solver_3d_spars": 13, "welcom": 14, "taichi": 14, "lbm3d": 14, "": 14, "document": 14, "indic": 14, "tabl": 14, "taichi_lbm3d": 15, "single_phase_exampl": [], "convert_stl_to_binari": 6}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"taichi_LBM3D": [[15, "taichi-lbm3d"]], "Welcome to taichi-LBM3D\u2019s documentation!": [[14, "welcome-to-taichi-lbm3d-s-documentation"]], "Contents:": [[14, null], [1, null], [5, null], [0, null], [4, null]], "Indices and tables": [[14, "indices-and-tables"]], "Grey_Scale": [[1, "grey-scale"]], "Single_phase": [[5, "single-phase"]], "Convert_stl_to_binary": [[6, "convert-stl-to-binary"]], "Single_phase.LBM_3D_SinglePhase_Solver": [[7, "single-phase-lbm-3d-singlephase-solver"]], "example_cavity": [[8, "example-cavity"]], "example_porous_medium": [[9, "example-porous-medium"]], "flow_domain_geo_generation_2D": [[10, "flow-domain-geo-generation-2d"]], "Single_phase.lbm_solver_3d": [[11, "single-phase-lbm-solver-3d"]], "lbm_solver_3d_sparse": [[13, "lbm-solver-3d-sparse"]], "flow_domain_geo_generation": [[2, "flow-domain-geo-generation"]], "lbm_solver_3d_cavity": [[12, "lbm-solver-3d-cavity"]], "lbm_solver_3d_Macro_Sukop": [[3, "lbm-solver-3d-macro-sukop"]], "2phase": [[0, "phase"]], "example_cavity_melting": [[18, "example-cavity-melting"]], "example_phase_change": [[19, "example-phase-change"]], "read_img_solute_psi_generation_2D": [[20, "read-img-solute-psi-generation-2d"]], "solute_psi_generation_2D": [[21, "solute-psi-generation-2d"]], "test1": [[22, "test1"]], "lbm_solver_3d_2phase": [[23, "lbm-solver-3d-2phase"]], "lbm_solver_3d_2phase_sparse": [[24, "lbm-solver-3d-2phase-sparse"]], "Phase_change": [[4, "phase-change"]], "LBM_3D_SinglePhase_Solver": [[17, "lbm-3d-singlephase-solver"]], "LBM_3D_SinglePhase_Solute_Solver": [[16, "lbm-3d-singlephase-solute-solver"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/docs/twophase/lbm_solver_3d_2phase.html b/docs/twophase/lbm_solver_3d_2phase.html new file mode 100644 index 0000000..65b85a2 --- /dev/null +++ b/docs/twophase/lbm_solver_3d_2phase.html @@ -0,0 +1,813 @@ + + + + + + + lbm_solver_3d_2phase — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_2phase

+

This solver is the multiphase model based on color gradient model +Firstly, it defines some parameters

+
# NOTE: THIS CODE NEED taichi_glsl, so please use taichi version <=0.8.5
+#import taichi, numpy, pyevtk and time package
+import taichi as ti
+import numpy as np
+#import taichi_glsl as ts
+from pyevtk.hl import gridToVTK
+import time
+#from taichi_glsl import scalar
+
+#from taichi_glsl.scalar import isinf, isnan
+#from taichi_glsl.vector import vecFill
+#intialize taichi
+ti.init(arch=ti.cpu)
+#ti.init(arch=ti.gpu, dynamic_index=True,offline_cache=True)
+
+#enable projection
+enable_projection = True
+# 131*131*131
+nx,ny,nz = 131,131,131
+#nx,ny,nz = 131,131,131
+#external force in x,y,z direction
+fx,fy,fz = 5.0e-5,-2e-5,0.0
+#niu = 0.1
+#liquid viscosity
+niu_l = 0.1         #psi>0
+#gas viscosity
+niu_g = 0.1         #psi<0
+#psi in color gradient calculation
+psi_solid = 0.7
+#surface tension
+CapA = 0.005
+
+#Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz
+bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0  #Boundary x-axis left side
+bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 0, 0.995, 0.0, 0.0, 0.0  #Boundary x-axis right side
+bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis left side
+bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary y-axis right side
+bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis left side
+bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0  #Boundary z-axis right side
+
+bc_psi_x_left, psi_x_left = 1, -1.0          #   boundary condition for phase-field: 0 = periodic,
+bc_psi_x_right, psi_x_right = 0, 1.0        #   1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2
+bc_psi_y_left, psi_y_left = 0, 1.0
+bc_psi_y_right, psi_y_right = 0, 1.0
+bc_psi_z_left, psi_z_left = 0, 1.0
+bc_psi_z_right, psi_z_right = 0, 1.0
+
+# Non Sparse memory allocation
+#density distribution function nx*ny*nz*19
+f = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#density distribution function nx*ny*nz*19
+F = ti.field(ti.f32,shape=(nx,ny,nz,19))
+#density nx*ny*nz
+rho = ti.field(ti.f32, shape=(nx,ny,nz))
+#velocity nx*ny*nz vector
+v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz))
+#psi nx*ny*nz
+psi = ti.field(ti.f32, shape=(nx,ny,nz))
+#density r nx*ny*nz
+rho_r = ti.field(ti.f32, shape=(nx,ny,nz))
+#density b nx*ny*nz
+rho_b = ti.field(ti.f32, shape=(nx,ny,nz))
+#density r nx*ny*nz
+rhor = ti.field(ti.f32, shape=(nx,ny,nz))
+#density b nx*ny*nz
+rhob = ti.field(ti.f32, shape=(nx,ny,nz))
+#lattice speed 19 dimensional vector
+e = ti.Vector.field(3,ti.i32, shape=(19))
+#S_dig = ti.field(ti.f32,shape=(19))
+#lattice speed 19 dimensional vector
+e_f = ti.Vector.field(3,ti.f32, shape=(19))
+#weight parameter 19 dimensional vector
+w = ti.field(ti.f32, shape=(19))
+#solid flag nx*ny*nz
+solid = ti.field(ti.i32,shape=(nx,ny,nz))
+#streaming vector 19 dimensional vector
+LR = ti.field(ti.i32,shape=(19))
+
+#external force 3 dimensional vector
+ext_f = ti.Vector.field(3,ti.f32,shape=())
+# x-left velocity 3 dimensional vector
+bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=())
+# x-right velocity 3 dimensional vector
+bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=())
+# y-left velocity 3 dimensional vector
+bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=())
+# y-right velocity 3 dimensional vector
+bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=())
+# z-left velocity 3 dimensional vector
+bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=())
+# z-right velocity 3 dimensional vector
+bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=())
+#transforming matrix 19*19
+M = ti.field(ti.f32, shape=(19,19))
+#inverse transforming matrix 19*19
+inv_M = ti.field(ti.f32, shape=(19,19))
+#parameters for calculating the parameter of s diagonal
+#=======================================#
+lg0, wl, wg = 0.0, 0.0, 0.0
+l1, l2, g1, g2 = 0.0, 0.0, 0.0, 0.0
+wl = 1.0/(niu_l/(1.0/3.0)+0.5)
+wg = 1.0/(niu_g/(1.0/3.0)+0.5)
+lg0 = 2*wl*wg/(wl+wg)
+l1=2*(wl-lg0)*10
+l2=-l1/0.2
+g1=2*(lg0-wg)*10
+g2=g1/0.2
+#=======================================#
+
+#transformation matrix
+M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
+[-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1],
+[1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1],
+[0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0],
+[0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1],
+[0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2],
+[0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0],
+[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0],
+[0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0],
+[0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1],
+[0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]])
+#inverde of transforming matrix
+inv_M_np = np.linalg.inv(M_np)
+#streaming array
+LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17])
+#M matrix from the numpy
+M.from_numpy(M_np)
+#inverse matrix from numpy
+inv_M.from_numpy(inv_M_np)
+
+#steaming array from numpy
+LR.from_numpy(LR_np)
+#external force with vector three dimensional
+ext_f[None] = ti.Vector([fx,fy,fz])
+#set transforming matrix, inverse matrix and streaming vector non-modified
+ti.static(inv_M)
+ti.static(M)
+ti.static(LR)
+
+#set x,y,z array with nx*ny*nz
+x = np.linspace(0, nx, nx)
+y = np.linspace(0, ny, ny)
+z = np.linspace(0, nz, nz)
+#set meshgrid and return three meshgrid matrix X,Y,Z with non-cartesian indexing
+X, Y, Z = np.meshgrid(x, y, z, indexing='ij')
+
+
+

feq(k,rho_local, u) calculate the equilibrium denisty distribution function

+
@ti.func
+def feq(k,rho_local, u):
+    # eu=ts.vector.dot(e[k],u)
+    # uv=ts.vector.dot(u,u)
+    eu = e[k].dot(u)
+    uv = u.dot(u)
+    #same as single phase equilibrium density distribution function
+    feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv)
+    #print(k, rho_local, w[k])
+    return feqout
+
+
+

init() intialize some variable

+
@ti.kernel
+def init():
+    for i,j,k in solid:
+        if (solid[i,j,k] == 0):
+        #if it is fluid intialize the density and velocity be one and zero
+            rho[i,j,k] = 1.0
+            v[i,j,k] = ti.Vector([0,0,0])
+            # set density r and density b based on psi
+            rho_r[i,j,k] = (psi[i,j,k]+1.0)/2.0
+            rho_b[i,j,k] = 1.0 - rho_r[i,j,k]
+            #set another density r and density b
+            rhor[i,j,k] = 0.0
+            rhob[i,j,k] = 0.0
+            #set density distribution equals to equilibrium density distribution function
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = feq(s,1.0,v[i,j,k])
+                F[i,j,k,s] = feq(s,1.0,v[i,j,k])
+
+
+

init_geo(filename, filename2) import the geometry data

+
def init_geo(filename, filename2):
+    #read the solid flag data and set it as an column major array
+    in_dat = np.loadtxt(filename)
+    in_dat[in_dat>0] = 1
+    in_dat = np.reshape(in_dat, (nx,ny,nz),order='F')
+
+    #read the phase data from file
+    phase_in_dat = np.loadtxt(filename2)
+    #set the array from the file with colum major
+    phase_in_dat = np.reshape(phase_in_dat, (nx,ny,nz), order='F')
+
+    return in_dat, phase_in_dat
+
+
+

static_init() initialize non-modified variable

+
@ti.kernel
+def static_init():
+    if ti.static(enable_projection): # No runtime overhead
+    #define lattice speed
+    e[0] = ti.Vector([0,0,0])
+    e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1])
+    e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0])
+    e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1])
+    e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1])
+    #define another lattice speed
+    e_f[0] = ti.Vector([0,0,0])
+    e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1])
+    e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0])
+    e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1])
+    e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1])
+    #define a weight parameter
+    w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0;
+    w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0;
+    w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0;
+    #define the boundary velocity
+    bc_vel_x_left = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl])
+    bc_vel_x_right = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr])
+    bc_vel_y_left = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl])
+    bc_vel_y_right = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr])
+    bc_vel_z_left = ti.Vector([vx_bczl, vy_bczl, vz_bczl])
+    bc_vel_z_right = ti.Vector([vx_bczr, vy_bczr, vz_bczr])
+
+
+

multiply_M() calculate the density distribution function in momentum space

+
@ti.func
+def multiply_M(i,j,k):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    for index in ti.static(range(19)):
+        for s in ti.static(range(19)):
+            #calculate here
+            out[index] += M[index,s]*F[i,j,k,s]
+            #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s])
+    return out
+
+
+

GuoF(i,j,k,s,u) calculate Guo’s force term

+
@ti.func
+def GuoF(i,j,k,s,u):
+    out=0.0
+    for l in ti.static(range(19)):
+        out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l]
+
+    return out
+
+
+

meq_vec(rho_local,u) defines the equilibrium momentum

+
@ti.func
+def meq_vec(rho_local,u):
+    out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    out[0] = rho_local;             out[3] = u[0];    out[5] = u[1];    out[7] = u[2];
+    out[1] = u.dot(u);    out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z;         out[11] = u.y*u.y-u.z*u.z
+    out[13] = u.x*u.y;    out[14] = u.y*u.z;                            out[15] = u.x*u.z
+    return out
+
+
+

Compute_C() calculate the color gradient

+
@ti.func
+def Compute_C(i):
+    C = ti.Vector([0.0,0.0,0.0])
+    ind_S = 0
+    for s in ti.static(range(19)):
+        ip = periodic_index_for_psi(i+e[s])
+        if (solid[ip] == 0):
+            #if it's fluid calculate the color gradient based on psi
+            C += 3.0*w[s]*e_f[s]*psi[ip]
+        else:
+            #if it is solid and abs(density r-density b) is less than 0.9
+            ind_S = 1
+            #calculate the color gradient based on psi_solid and set ind_s=1
+            C += 3.0*w[s]*e_f[s]*psi_solid
+
+    if (abs(rho_r[i]-rho_b[i]) > 0.9) and (ind_S == 1):
+        #if abs(density r-density b) is very large and it's solid set color gradient to be zero
+        C = ti.Vector([0.0,0.0,0.0])
+
+    return C
+
+
+

Compute_S_local calculate parameter of s diagonal

+
@ti.func
+def Compute_S_local(id):
+    sv=0.0; sother=0.0
+    if (psi[id]>0):
+        if (psi[id]>0.1):
+        #if psi>0.1
+        #sv=1.0/(niu_l/(1.0/3.0)+0.5)
+            sv=wl
+        else:
+        #if 0<psi<0.1   calculate sv
+            sv=lg0+l1*psi[id]+l2*psi[id]*psi[id]
+    else:
+        #if psi <-0.1
+        if (psi[id]<-0.1):
+        #calculate sv
+            sv=wg
+        else:
+        #if psi >-0.1
+            sv=lg0+g1*psi[id]+g2*psi[id]*psi[id]
+    #calculate s other
+    sother = 8.0*(2.0-sv)/(8.0-sv)
+
+    #set s diagonal to be zero and set certain element to be relatie local parameter
+    S = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+    S[1]=sv;S[2]=sv;S[4]=sother;S[6]=sother;S[8]=sother;S[9]=sv;
+    S[10]=sv;S[11]=sv;S[12]=sv;S[13]=sv;S[14]=sv;S[15]=sv;S[16]=sother;
+    S[17]=sother;S[18]=sother;
+
+
+    return S;
+
+
+

collision() define the collision and recoloring process

+
@ti.kernel
+def colission():
+    for i,j,k in rho:
+        #if it is inner fluid, calculate color gradient divided by norm of color gradient
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            uu = v[i,j,k].norm_sqr()
+            C = Compute_C(ti.Vector([i,j,k]))
+            cc = C.norm()
+            normal = ti.Vector([0.0,0.0,0.0])
+            if cc>0 :
+                normal = C/cc
+            #calculate the M
+            m_temp = multiply_M(i,j,k)
+            meq = meq_vec(rho[i,j,k],v[i,j,k])
+            #calculate surface tension term
+            meq[1] += CapA*cc
+            meq[9] += 0.5*CapA*cc*(2*normal.x*normal.x-normal.y*normal.y-normal.z*normal.z)
+            meq[11] += 0.5*CapA*cc*(normal.y*normal.y-normal.z*normal.z)
+            meq[13] += 0.5*CapA*cc*(normal.x*normal.y)
+            meq[14] += 0.5*CapA*cc*(normal.y*normal.z)
+            meq[15] += 0.5*CapA*cc*(normal.x*normal.z)
+            #calculate s local
+            S_local = Compute_S_local(ti.Vector([i,j,k]))
+            #calculate s*(m-meq)
+            for s in ti.static(range(19)):
+                m_temp[s] -= S_local[s]*(m_temp[s]-meq[s])
+                m_temp[s] += (1-0.5*S_local[s])*GuoF(i,j,k,s,v[i,j,k])
+            #calculte convection of density filed
+            g_r = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+            g_b = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0])
+
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = 0
+                for l in ti.static(range(19)):
+                # 1.single phase collision
+                    f[i,j,k,s] += inv_M[s,l]*m_temp[l]
+
+                g_r[s] = feq(s,rho_r[i,j,k],v[i,j,k])
+                g_b[s] = feq(s,rho_b[i,j,k],v[i,j,k])
+
+            if (cc>0):
+                for kk in ti.static([1,3,5,7,9,11,13,15,17]):
+                    # ef=ts.vector.dot(e[kk],C)
+                    ef=e[kk].dot(C)
+                    cospsi= g_r[kk] if (g_r[kk]<g_r[kk+1]) else g_r[kk+1]
+                    cospsi= cospsi if (cospsi<g_b[kk]) else g_b[kk]
+                    cospsi=cospsi if (cospsi<g_b[kk+1]) else g_b[kk+1]
+                    cospsi*=ef/cc
+                    #2.surface tension perturbation
+                    g_r[kk]+=cospsi
+                    g_r[kk+1]-=cospsi
+                    g_b[kk]-=cospsi
+                    g_b[kk+1]+=cospsi
+            # recoloring
+            for s in ti.static(range(19)):
+                ip = periodic_index(ti.Vector([i,j,k])+e[s])
+                if (solid[ip]==0):
+                    rhor[ip] += g_r[s]
+                    rhob[ip] += g_b[s]
+                else:
+                    rhor[i,j,k] += g_r[s]
+                    rhob[i,j,k] += g_b[s]
+
+
+

periodic_index() defines the index of boundary if using periodic boundary condition

+
@ti.func
+def periodic_index(i):
+    iout = i
+    if i[0]<0:     iout[0] = nx-1
+    if i[0]>nx-1:  iout[0] = 0
+    if i[1]<0:     iout[1] = ny-1
+    if i[1]>ny-1:  iout[1] = 0
+    if i[2]<0:     iout[2] = nz-1
+    if i[2]>nz-1:  iout[2] = 0
+
+    return iout
+
+
+

periodic_index_for_psi(i) defines the index of boundary for psi if using periodic boundary condition

+
@ti.func
+def periodic_index_for_psi(i):
+    iout = i
+    if i[0]<0:
+    #if periodic boundary condition set index based on periodic boundary condition
+        if bc_psi_x_left == 0:
+            iout[0] = nx-1
+        else:
+    #otherwise set neighbouring index,
+    #similar for other sides
+            iout[0] = 0
+
+    if i[0]>nx-1:
+        if bc_psi_x_right==0:
+            iout[0] = 0
+        else:
+            iout[0] = nx-1
+
+    if i[1]<0:
+        if bc_psi_y_left == 0:
+            iout[1] = ny-1
+        else:
+            iout[1] = 0
+
+    if i[1]>ny-1:
+        if bc_psi_y_right==0:
+            iout[1] = 0
+        else:
+            iout[1] = ny-1
+
+    if i[2]<0:
+        if bc_psi_z_left==0:
+            iout[2] = nz-1
+        else:
+            iout[2] = 0
+
+    if i[2]>nz-1:
+        if bc_psi_z_right==0:
+            iout[2] = 0
+        else:
+            iout[2] = nz-1
+
+    return iout
+
+
+

streaming1() defines steaming process of denisty distribution function

+
@ti.kernel
+def streaming1():
+    for i,j,k in rho:
+        #if (solid[i,j,k] == 0):
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            ci = ti.Vector([i,j,k])
+            for s in ti.static(range(19)):
+                ip = periodic_index(ci+e[s])
+                if (solid[ip]==0):
+                #if it is fluid,streaming along certain direction
+                    F[ip,s] = f[ci,s]
+                else:
+                #if it is on the solid, bounce back to the opposite
+                    F[ci,LR[s]] = f[ci,s]
+                    #print(i, ip, "@@@")
+
+
+

Boundary_condition_psi() defines boundary condition for psi

+
@ti.kernel
+def Boundary_condition_psi():
+    if bc_psi_x_left == 1:
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+            #if it is fluid the value of psi equals to the psi_x_left
+                psi[0,j,k] = psi_x_left
+            #calculate density according to psi
+            #similar for other sides
+                rho_r[0,j,k] = (psi_x_left + 1.0)/2.0
+                rho_b[0,j,k] = 1.0 - rho_r[0,j,k]
+
+    if bc_psi_x_right == 1:
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                psi[nx-1,j,k] = psi_x_right
+                rho_r[nx-1,j,k] = (psi_x_right + 1.0)/2.0
+                rho_b[nx-1,j,k] = 1.0 - rho_r[nx-1,j,k]
+
+    if bc_psi_y_left == 1:
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                psi[i,0,k] = psi_y_left
+                rho_r[i,0,k] = (psi_y_left + 1.0)/2.0
+                rho_b[i,0,k] = 1.0 - rho_r[i,0,k]
+
+    if bc_psi_y_right == 1:
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                psi[i,ny-1,k] = psi_y_right
+                rho_r[i,ny-1,k] = (psi_y_right + 1.0)/2.0
+                rho_b[i,ny-1,k] = 1.0 - rho_r[i,ny-1,k]
+
+    if bc_psi_z_left == 1:
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                psi[i,j,0] = psi_z_left
+                rho_r[i,j,0] = (psi_z_left + 1.0)/2.0
+                rho_b[i,j,0] = 1.0 - rho_r[i,j,0]
+
+    if bc_psi_z_right == 1:
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                psi[i,j,nz-1] = psi_z_right
+                rho_r[i,j,nz-1] = (psi_z_right + 1.0)/2.0
+                rho_b[i,j,nz-1] = 1.0 - rho_r[i,j,nz-1]
+
+
+

Boundary_condition defines boundary condition and the same as single_phase solver

+
@ti.kernel
+def Boundary_condition():
+    if ti.static(bc_x_left==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[1,j,k]>0):
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k])
+                    else:
+                        F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k])
+
+    if ti.static(bc_x_left==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[0,j,k]==0):
+                for s in ti.static(range(19)):
+                    F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None])
+
+    if ti.static(bc_x_right==1):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[nx-2,j,k]>0):
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k])
+                    else:
+                        F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k])
+
+    if ti.static(bc_x_right==2):
+        for j,k in ti.ndrange((0,ny),(0,nz)):
+            if (solid[nx-1,j,k]==0):
+                for s in ti.static(range(19)):
+                    F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None])
+
+
+    # Direction Y
+    if ti.static(bc_y_left==1):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,1,k]>0):
+                        F[i,0,k,s]=feq(s, rho_bcyl, v[i,1,k])
+                    else:
+                        F[i,0,k,s]=feq(s, rho_bcyl, v[i,0,k])
+
+    if ti.static(bc_y_left==2):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,0,k]==0):
+                for s in ti.static(range(19)):
+                    F[i,0,k,s]=feq(LR[s], 1.0, bc_vel_y_left[None])-F[i,0,k,LR[s]]+feq(s,1.0,bc_vel_y_left[None])
+
+    if ti.static(bc_y_right==1):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,ny-2,k]>0):
+                        F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-2,k])
+                    else:
+                        F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-1,k])
+
+    if ti.static(bc_y_right==2):
+        for i,k in ti.ndrange((0,nx),(0,nz)):
+            if (solid[i,ny-1,k]==0):
+                for s in ti.static(range(19)):
+                    F[i,ny-1,k,s]=feq(LR[s], 1.0, bc_vel_y_right[None])-F[i,ny-1,k,LR[s]]+feq(s,1.0,bc_vel_y_right[None])
+
+    # Z direction
+    if ti.static(bc_z_left==1):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,j,1]>0):
+                        F[i,j,0,s]=feq(s, rho_bczl, v[i,j,1])
+                    else:
+                        F[i,j,0,s]=feq(s, rho_bczl, v[i,j,0])
+
+    if ti.static(bc_z_left==2):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,0]==0):
+                for s in ti.static(range(19)):
+                    F[i,j,0,s]=feq(LR[s], 1.0, bc_vel_z_left[None])-F[i,j,0,LR[s]]+feq(s,1.0,bc_vel_z_left[None])
+
+    if ti.static(bc_z_right==1):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                for s in ti.static(range(19)):
+                    if (solid[i,j,nz-2]>0):
+                        F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-2])
+                    else:
+                        F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-1])
+
+    if ti.static(bc_z_right==2):
+        for i,j in ti.ndrange((0,nx),(0,ny)):
+            if (solid[i,j,nz-1]==0):
+                for s in ti.static(range(19)):
+                    F[i,j,nz-1,s]=feq(LR[s], 1.0, bc_vel_z_right[None])-F[i,j,nz-1,LR[s]]+feq(s,1.0,bc_vel_z_right[None])
+
+
+

Boundary_condition_psi() calculate macroscopic variable

+
@ti.kernel
+def streaming3():
+    for i,j,k, in rho:
+        #if (solid[i,j,k] == 0):
+        if (i<nx and j<ny and k<nz and solid[i,j,k] == 0):
+            rho[i,j,k] = 0
+            v[i,j,k] = ti.Vector([0,0,0])
+            #define denisty r and density b
+            rho_r[i,j,k] = rhor[i,j,k]
+            rho_b[i,j,k] = rhob[i,j,k]
+            rhor[i,j,k] = 0.0; rhob[i,j,k] = 0.0
+
+            for s in ti.static(range(19)):
+                f[i,j,k,s] = F[i,j,k,s]
+                rho[i,j,k] += f[i,j,k,s]
+                v[i,j,k] += e_f[s]*f[i,j,k,s]
+            #calculate velocity and psi
+            v[i,j,k] /= rho[i,j,k]
+            v[i,j,k] += (ext_f[None]/2)/rho[i,j,k]
+            psi[i,j,k] = rho_r[i,j,k]-rho_b[i,j,k]/(rho_r[i,j,k] + rho_b[i,j,k])
+
+
+

The code snippts below define time, read file do the simulation and export results +It is almost the same as the single-phase solver except two input file and export phase variable

+
time_init = time.time()
+time_now = time.time()
+time_pre = time.time()
+dt_count = 0
+
+
+solid_np, phase_np = init_geo('./img_ftb131.txt','./phase_ftb131.dat')
+
+#solid_np = init_geo('./img_ftb131.txt')
+solid.from_numpy(solid_np)
+psi.from_numpy(phase_np)
+
+static_init()
+init()
+
+#print(wl,wg, lg0, l1, l2,'~@@@@@~@~@~@~@')
+
+for iter in range(80000+1):
+    colission()
+    streaming1()
+    Boundary_condition()
+    #streaming2()
+    streaming3()
+    Boundary_condition_psi()
+
+
+    if (iter%500==0):
+
+        time_pre = time_now
+        time_now = time.time()
+        diff_time = int(time_now-time_pre)
+        elap_time = int(time_now-time_init)
+        m_diff, s_diff = divmod(diff_time, 60)
+        h_diff, m_diff = divmod(m_diff, 60)
+        m_elap, s_elap = divmod(elap_time, 60)
+        h_elap, m_elap = divmod(m_elap, 60)
+
+        print('----------Time between two outputs is %dh %dm %ds; elapsed time is %dh %dm %ds----------------------' %(h_diff, m_diff, s_diff,h_elap,m_elap,s_elap))
+        print('The %dth iteration, Max Force = %f,  force_scale = %f\n\n ' %(iter, 10.0,  10.0))
+
+        if (iter%10000==0):
+            gridToVTK(
+                "./structured"+str(iter),
+                x,
+                y,
+                z,
+                #cellData={"pressure": pressure},
+                pointData={ "Solid": np.ascontiguousarray(solid.to_numpy()),
+                            "rho": np.ascontiguousarray(rho.to_numpy()[0:nx,0:ny,0:nz]),
+                            "phase": np.ascontiguousarray(psi.to_numpy()[0:nx,0:ny,0:nz]),
+                            "velocity": (np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,0]), np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,1]),np.ascontiguousarray(v.to_numpy()[0:nx,0:ny,0:nz,2]))
+                            }
+            )
+
+#ti.print_kernel_profile_info()
+#ti.print_profile_info()
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/twophase/lbm_solver_3d_2phase.rst b/docs/twophase/lbm_solver_3d_2phase.rst new file mode 100644 index 0000000..1c42671 --- /dev/null +++ b/docs/twophase/lbm_solver_3d_2phase.rst @@ -0,0 +1,734 @@ +lbm_solver_3d_2phase +======================================== + +This solver is the multiphase model based on color gradient model +Firstly, it defines some parameters + +.. code-block:: python + + # NOTE: THIS CODE NEED taichi_glsl, so please use taichi version <=0.8.5 + #import taichi, numpy, pyevtk and time package + import taichi as ti + import numpy as np + #import taichi_glsl as ts + from pyevtk.hl import gridToVTK + import time + #from taichi_glsl import scalar + + #from taichi_glsl.scalar import isinf, isnan + #from taichi_glsl.vector import vecFill + #intialize taichi + ti.init(arch=ti.cpu) + #ti.init(arch=ti.gpu, dynamic_index=True,offline_cache=True) + + #enable projection + enable_projection = True + # 131*131*131 + nx,ny,nz = 131,131,131 + #nx,ny,nz = 131,131,131 + #external force in x,y,z direction + fx,fy,fz = 5.0e-5,-2e-5,0.0 + #niu = 0.1 + #liquid viscosity + niu_l = 0.1 #psi>0 + #gas viscosity + niu_g = 0.1 #psi<0 + #psi in color gradient calculation + psi_solid = 0.7 + #surface tension + CapA = 0.005 + + #Boundary condition mode: 0=periodic, 1= fix pressure, 2=fix velocity; boundary pressure value (rho); boundary velocity value for vx,vy,vz + bc_x_left, rho_bcxl, vx_bcxl, vy_bcxl, vz_bcxl = 0, 1.0, 0.0e-5, 0.0, 0.0 #Boundary x-axis left side + bc_x_right, rho_bcxr, vx_bcxr, vy_bcxr, vz_bcxr = 0, 0.995, 0.0, 0.0, 0.0 #Boundary x-axis right side + bc_y_left, rho_bcyl, vx_bcyl, vy_bcyl, vz_bcyl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis left side + bc_y_right, rho_bcyr, vx_bcyr, vy_bcyr, vz_bcyr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary y-axis right side + bc_z_left, rho_bczl, vx_bczl, vy_bczl, vz_bczl = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis left side + bc_z_right, rho_bczr, vx_bczr, vy_bczr, vz_bczr = 0, 1.0, 0.0, 0.0, 0.0 #Boundary z-axis right side + + bc_psi_x_left, psi_x_left = 1, -1.0 # boundary condition for phase-field: 0 = periodic, + bc_psi_x_right, psi_x_right = 0, 1.0 # 1 = constant value on the boundary, value = -1.0 phase1 or 1.0 = phase 2 + bc_psi_y_left, psi_y_left = 0, 1.0 + bc_psi_y_right, psi_y_right = 0, 1.0 + bc_psi_z_left, psi_z_left = 0, 1.0 + bc_psi_z_right, psi_z_right = 0, 1.0 + + # Non Sparse memory allocation + #density distribution function nx*ny*nz*19 + f = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density distribution function nx*ny*nz*19 + F = ti.field(ti.f32,shape=(nx,ny,nz,19)) + #density nx*ny*nz + rho = ti.field(ti.f32, shape=(nx,ny,nz)) + #velocity nx*ny*nz vector + v = ti.Vector.field(3,ti.f32, shape=(nx,ny,nz)) + #psi nx*ny*nz + psi = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rho_r = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rho_b = ti.field(ti.f32, shape=(nx,ny,nz)) + #density r nx*ny*nz + rhor = ti.field(ti.f32, shape=(nx,ny,nz)) + #density b nx*ny*nz + rhob = ti.field(ti.f32, shape=(nx,ny,nz)) + #lattice speed 19 dimensional vector + e = ti.Vector.field(3,ti.i32, shape=(19)) + #S_dig = ti.field(ti.f32,shape=(19)) + #lattice speed 19 dimensional vector + e_f = ti.Vector.field(3,ti.f32, shape=(19)) + #weight parameter 19 dimensional vector + w = ti.field(ti.f32, shape=(19)) + #solid flag nx*ny*nz + solid = ti.field(ti.i32,shape=(nx,ny,nz)) + #streaming vector 19 dimensional vector + LR = ti.field(ti.i32,shape=(19)) + + #external force 3 dimensional vector + ext_f = ti.Vector.field(3,ti.f32,shape=()) + # x-left velocity 3 dimensional vector + bc_vel_x_left = ti.Vector.field(3,ti.f32, shape=()) + # x-right velocity 3 dimensional vector + bc_vel_x_right = ti.Vector.field(3,ti.f32, shape=()) + # y-left velocity 3 dimensional vector + bc_vel_y_left = ti.Vector.field(3,ti.f32, shape=()) + # y-right velocity 3 dimensional vector + bc_vel_y_right = ti.Vector.field(3,ti.f32, shape=()) + # z-left velocity 3 dimensional vector + bc_vel_z_left = ti.Vector.field(3,ti.f32, shape=()) + # z-right velocity 3 dimensional vector + bc_vel_z_right = ti.Vector.field(3,ti.f32, shape=()) + #transforming matrix 19*19 + M = ti.field(ti.f32, shape=(19,19)) + #inverse transforming matrix 19*19 + inv_M = ti.field(ti.f32, shape=(19,19)) + #parameters for calculating the parameter of s diagonal + #=======================================# + lg0, wl, wg = 0.0, 0.0, 0.0 + l1, l2, g1, g2 = 0.0, 0.0, 0.0, 0.0 + wl = 1.0/(niu_l/(1.0/3.0)+0.5) + wg = 1.0/(niu_g/(1.0/3.0)+0.5) + lg0 = 2*wl*wg/(wl+wg) + l1=2*(wl-lg0)*10 + l2=-l1/0.2 + g1=2*(lg0-wg)*10 + g2=g1/0.2 + #=======================================# + + #transformation matrix + M_np = np.array([[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1], + [-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1], + [1,-2,-2,-2,-2,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1], + [0,1,-1,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,-2,2,0,0,0,0,1,-1,1,-1,1,-1,1,-1,0,0,0,0], + [0,0,0,1,-1,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,-2,2,0,0,1,-1,-1,1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,1,-1,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,0,0,0,0,-2,2,0,0,0,0,1,-1,-1,1,1,-1,-1,1], + [0,2,2,-1,-1,-1,-1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,-2,-2,1,1,1,1,1,1,1,1,1,1,1,1,-2,-2,-2,-2], + [0,0,0,1,1,-1,-1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,-1,-1,1,1,1,1,1,1,-1,-1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0,0,0,0,0], + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,1,-1,-1,0,0,0,0], + [0,0,0,0,0,0,0,1,-1,1,-1,-1,1,-1,1,0,0,0,0], + [0,0,0,0,0,0,0,-1,1,1,-1,0,0,0,0,1,-1,1,-1], + [0,0,0,0,0,0,0,0,0,0,0,1,-1,-1,1,-1,1,1,-1]]) + #inverde of transforming matrix + inv_M_np = np.linalg.inv(M_np) + #streaming array + LR_np = np.array([0,2,1,4,3,6,5,8,7,10,9,12,11,14,13,16,15,18,17]) + #M matrix from the numpy + M.from_numpy(M_np) + #inverse matrix from numpy + inv_M.from_numpy(inv_M_np) + + #steaming array from numpy + LR.from_numpy(LR_np) + #external force with vector three dimensional + ext_f[None] = ti.Vector([fx,fy,fz]) + #set transforming matrix, inverse matrix and streaming vector non-modified + ti.static(inv_M) + ti.static(M) + ti.static(LR) + + #set x,y,z array with nx*ny*nz + x = np.linspace(0, nx, nx) + y = np.linspace(0, ny, ny) + z = np.linspace(0, nz, nz) + #set meshgrid and return three meshgrid matrix X,Y,Z with non-cartesian indexing + X, Y, Z = np.meshgrid(x, y, z, indexing='ij') + +``feq(k,rho_local, u)`` calculate the equilibrium denisty distribution function + +.. code-block:: python + + @ti.func + def feq(k,rho_local, u): + # eu=ts.vector.dot(e[k],u) + # uv=ts.vector.dot(u,u) + eu = e[k].dot(u) + uv = u.dot(u) + #same as single phase equilibrium density distribution function + feqout = w[k]*rho_local*(1.0+3.0*eu+4.5*eu*eu-1.5*uv) + #print(k, rho_local, w[k]) + return feqout + +``init()`` intialize some variable + +.. code-block:: python + + @ti.kernel + def init(): + for i,j,k in solid: + if (solid[i,j,k] == 0): + #if it is fluid intialize the density and velocity be one and zero + rho[i,j,k] = 1.0 + v[i,j,k] = ti.Vector([0,0,0]) + # set density r and density b based on psi + rho_r[i,j,k] = (psi[i,j,k]+1.0)/2.0 + rho_b[i,j,k] = 1.0 - rho_r[i,j,k] + #set another density r and density b + rhor[i,j,k] = 0.0 + rhob[i,j,k] = 0.0 + #set density distribution equals to equilibrium density distribution function + for s in ti.static(range(19)): + f[i,j,k,s] = feq(s,1.0,v[i,j,k]) + F[i,j,k,s] = feq(s,1.0,v[i,j,k]) + +``init_geo(filename, filename2)`` import the geometry data + +.. code-block:: python + + def init_geo(filename, filename2): + #read the solid flag data and set it as an column major array + in_dat = np.loadtxt(filename) + in_dat[in_dat>0] = 1 + in_dat = np.reshape(in_dat, (nx,ny,nz),order='F') + + #read the phase data from file + phase_in_dat = np.loadtxt(filename2) + #set the array from the file with colum major + phase_in_dat = np.reshape(phase_in_dat, (nx,ny,nz), order='F') + + return in_dat, phase_in_dat + +``static_init()`` initialize non-modified variable + +.. code-block:: python + + @ti.kernel + def static_init(): + if ti.static(enable_projection): # No runtime overhead + #define lattice speed + e[0] = ti.Vector([0,0,0]) + e[1] = ti.Vector([1,0,0]); e[2] = ti.Vector([-1,0,0]); e[3] = ti.Vector([0,1,0]); e[4] = ti.Vector([0,-1,0]);e[5] = ti.Vector([0,0,1]); e[6] = ti.Vector([0,0,-1]) + e[7] = ti.Vector([1,1,0]); e[8] = ti.Vector([-1,-1,0]); e[9] = ti.Vector([1,-1,0]); e[10] = ti.Vector([-1,1,0]) + e[11] = ti.Vector([1,0,1]); e[12] = ti.Vector([-1,0,-1]); e[13] = ti.Vector([1,0,-1]); e[14] = ti.Vector([-1,0,1]) + e[15] = ti.Vector([0,1,1]); e[16] = ti.Vector([0,-1,-1]); e[17] = ti.Vector([0,1,-1]); e[18] = ti.Vector([0,-1,1]) + #define another lattice speed + e_f[0] = ti.Vector([0,0,0]) + e_f[1] = ti.Vector([1,0,0]); e_f[2] = ti.Vector([-1,0,0]); e_f[3] = ti.Vector([0,1,0]); e_f[4] = ti.Vector([0,-1,0]);e_f[5] = ti.Vector([0,0,1]); e_f[6] = ti.Vector([0,0,-1]) + e_f[7] = ti.Vector([1,1,0]); e_f[8] = ti.Vector([-1,-1,0]); e_f[9] = ti.Vector([1,-1,0]); e_f[10] = ti.Vector([-1,1,0]) + e_f[11] = ti.Vector([1,0,1]); e_f[12] = ti.Vector([-1,0,-1]); e_f[13] = ti.Vector([1,0,-1]); e_f[14] = ti.Vector([-1,0,1]) + e_f[15] = ti.Vector([0,1,1]); e_f[16] = ti.Vector([0,-1,-1]); e_f[17] = ti.Vector([0,1,-1]); e_f[18] = ti.Vector([0,-1,1]) + #define a weight parameter + w[0] = 1.0/3.0; w[1] = 1.0/18.0; w[2] = 1.0/18.0; w[3] = 1.0/18.0; w[4] = 1.0/18.0; w[5] = 1.0/18.0; w[6] = 1.0/18.0; + w[7] = 1.0/36.0; w[8] = 1.0/36.0; w[9] = 1.0/36.0; w[10] = 1.0/36.0; w[11] = 1.0/36.0; w[12] = 1.0/36.0; + w[13] = 1.0/36.0; w[14] = 1.0/36.0; w[15] = 1.0/36.0; w[16] = 1.0/36.0; w[17] = 1.0/36.0; w[18] = 1.0/36.0; + #define the boundary velocity + bc_vel_x_left = ti.Vector([vx_bcxl, vy_bcxl, vz_bcxl]) + bc_vel_x_right = ti.Vector([vx_bcxr, vy_bcxr, vz_bcxr]) + bc_vel_y_left = ti.Vector([vx_bcyl, vy_bcyl, vz_bcyl]) + bc_vel_y_right = ti.Vector([vx_bcyr, vy_bcyr, vz_bcyr]) + bc_vel_z_left = ti.Vector([vx_bczl, vy_bczl, vz_bczl]) + bc_vel_z_right = ti.Vector([vx_bczr, vy_bczr, vz_bczr]) + +``multiply_M()`` calculate the density distribution function in momentum space + +.. code-block:: python + + @ti.func + def multiply_M(i,j,k): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + for index in ti.static(range(19)): + for s in ti.static(range(19)): + #calculate here + out[index] += M[index,s]*F[i,j,k,s] + #print(i,j,k, index, s, out[index], M[index,s], F[i,j,k,s]) + return out + +``GuoF(i,j,k,s,u)`` calculate Guo's force term + +.. code-block:: python + + @ti.func + def GuoF(i,j,k,s,u): + out=0.0 + for l in ti.static(range(19)): + out += w[l]*((e_f[l]-u).dot(ext_f[None])+(e_f[l].dot(u)*(e_f[l].dot(ext_f[None]))))*M[s,l] + + return out + +``meq_vec(rho_local,u)`` defines the equilibrium momentum + +.. code-block:: python + + @ti.func + def meq_vec(rho_local,u): + out = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + out[0] = rho_local; out[3] = u[0]; out[5] = u[1]; out[7] = u[2]; + out[1] = u.dot(u); out[9] = 2*u.x*u.x-u.y*u.y-u.z*u.z; out[11] = u.y*u.y-u.z*u.z + out[13] = u.x*u.y; out[14] = u.y*u.z; out[15] = u.x*u.z + return out + +``Compute_C()`` calculate the color gradient + +.. code-block:: python + + @ti.func + def Compute_C(i): + C = ti.Vector([0.0,0.0,0.0]) + ind_S = 0 + for s in ti.static(range(19)): + ip = periodic_index_for_psi(i+e[s]) + if (solid[ip] == 0): + #if it's fluid calculate the color gradient based on psi + C += 3.0*w[s]*e_f[s]*psi[ip] + else: + #if it is solid and abs(density r-density b) is less than 0.9 + ind_S = 1 + #calculate the color gradient based on psi_solid and set ind_s=1 + C += 3.0*w[s]*e_f[s]*psi_solid + + if (abs(rho_r[i]-rho_b[i]) > 0.9) and (ind_S == 1): + #if abs(density r-density b) is very large and it's solid set color gradient to be zero + C = ti.Vector([0.0,0.0,0.0]) + + return C + +``Compute_S_local`` calculate parameter of s diagonal + +.. code-block:: python + + @ti.func + def Compute_S_local(id): + sv=0.0; sother=0.0 + if (psi[id]>0): + if (psi[id]>0.1): + #if psi>0.1 + #sv=1.0/(niu_l/(1.0/3.0)+0.5) + sv=wl + else: + #if 0-0.1 + sv=lg0+g1*psi[id]+g2*psi[id]*psi[id] + #calculate s other + sother = 8.0*(2.0-sv)/(8.0-sv) + + #set s diagonal to be zero and set certain element to be relatie local parameter + S = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + S[1]=sv;S[2]=sv;S[4]=sother;S[6]=sother;S[8]=sother;S[9]=sv; + S[10]=sv;S[11]=sv;S[12]=sv;S[13]=sv;S[14]=sv;S[15]=sv;S[16]=sother; + S[17]=sother;S[18]=sother; + + + return S; + + +``collision()`` define the collision and recoloring process + +.. code-block:: python + + @ti.kernel + def colission(): + for i,j,k in rho: + #if it is inner fluid, calculate color gradient divided by norm of color gradient + if (i0 : + normal = C/cc + #calculate the M + m_temp = multiply_M(i,j,k) + meq = meq_vec(rho[i,j,k],v[i,j,k]) + #calculate surface tension term + meq[1] += CapA*cc + meq[9] += 0.5*CapA*cc*(2*normal.x*normal.x-normal.y*normal.y-normal.z*normal.z) + meq[11] += 0.5*CapA*cc*(normal.y*normal.y-normal.z*normal.z) + meq[13] += 0.5*CapA*cc*(normal.x*normal.y) + meq[14] += 0.5*CapA*cc*(normal.y*normal.z) + meq[15] += 0.5*CapA*cc*(normal.x*normal.z) + #calculate s local + S_local = Compute_S_local(ti.Vector([i,j,k])) + #calculate s*(m-meq) + for s in ti.static(range(19)): + m_temp[s] -= S_local[s]*(m_temp[s]-meq[s]) + m_temp[s] += (1-0.5*S_local[s])*GuoF(i,j,k,s,v[i,j,k]) + #calculte convection of density filed + g_r = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + g_b = ti.Vector([0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]) + + for s in ti.static(range(19)): + f[i,j,k,s] = 0 + for l in ti.static(range(19)): + # 1.single phase collision + f[i,j,k,s] += inv_M[s,l]*m_temp[l] + + g_r[s] = feq(s,rho_r[i,j,k],v[i,j,k]) + g_b[s] = feq(s,rho_b[i,j,k],v[i,j,k]) + + if (cc>0): + for kk in ti.static([1,3,5,7,9,11,13,15,17]): + # ef=ts.vector.dot(e[kk],C) + ef=e[kk].dot(C) + cospsi= g_r[kk] if (g_r[kk]nx-1: iout[0] = 0 + if i[1]<0: iout[1] = ny-1 + if i[1]>ny-1: iout[1] = 0 + if i[2]<0: iout[2] = nz-1 + if i[2]>nz-1: iout[2] = 0 + + return iout + +``periodic_index_for_psi(i)`` defines the index of boundary for psi if using periodic boundary condition + +.. code-block:: python + + @ti.func + def periodic_index_for_psi(i): + iout = i + if i[0]<0: + #if periodic boundary condition set index based on periodic boundary condition + if bc_psi_x_left == 0: + iout[0] = nx-1 + else: + #otherwise set neighbouring index, + #similar for other sides + iout[0] = 0 + + if i[0]>nx-1: + if bc_psi_x_right==0: + iout[0] = 0 + else: + iout[0] = nx-1 + + if i[1]<0: + if bc_psi_y_left == 0: + iout[1] = ny-1 + else: + iout[1] = 0 + + if i[1]>ny-1: + if bc_psi_y_right==0: + iout[1] = 0 + else: + iout[1] = ny-1 + + if i[2]<0: + if bc_psi_z_left==0: + iout[2] = nz-1 + else: + iout[2] = 0 + + if i[2]>nz-1: + if bc_psi_z_right==0: + iout[2] = 0 + else: + iout[2] = nz-1 + + return iout + + +``streaming1()`` defines steaming process of denisty distribution function + +.. code-block:: python + + @ti.kernel + def streaming1(): + for i,j,k in rho: + #if (solid[i,j,k] == 0): + if (i0): + F[0,j,k,s]=feq(s, rho_bcxl, v[1,j,k]) + else: + F[0,j,k,s]=feq(s, rho_bcxl, v[0,j,k]) + + if ti.static(bc_x_left==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[0,j,k]==0): + for s in ti.static(range(19)): + F[0,j,k,s]=feq(LR[s], 1.0, bc_vel_x_left[None])-F[0,j,k,LR[s]]+feq(s,1.0,bc_vel_x_left[None]) + + if ti.static(bc_x_right==1): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + if (solid[nx-2,j,k]>0): + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-2,j,k]) + else: + F[nx-1,j,k,s]=feq(s, rho_bcxr, v[nx-1,j,k]) + + if ti.static(bc_x_right==2): + for j,k in ti.ndrange((0,ny),(0,nz)): + if (solid[nx-1,j,k]==0): + for s in ti.static(range(19)): + F[nx-1,j,k,s]=feq(LR[s], 1.0, bc_vel_x_right[None])-F[nx-1,j,k,LR[s]]+feq(s,1.0,bc_vel_x_right[None]) + + + # Direction Y + if ti.static(bc_y_left==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + if (solid[i,1,k]>0): + F[i,0,k,s]=feq(s, rho_bcyl, v[i,1,k]) + else: + F[i,0,k,s]=feq(s, rho_bcyl, v[i,0,k]) + + if ti.static(bc_y_left==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,0,k]==0): + for s in ti.static(range(19)): + F[i,0,k,s]=feq(LR[s], 1.0, bc_vel_y_left[None])-F[i,0,k,LR[s]]+feq(s,1.0,bc_vel_y_left[None]) + + if ti.static(bc_y_right==1): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + if (solid[i,ny-2,k]>0): + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-2,k]) + else: + F[i,ny-1,k,s]=feq(s, rho_bcyr, v[i,ny-1,k]) + + if ti.static(bc_y_right==2): + for i,k in ti.ndrange((0,nx),(0,nz)): + if (solid[i,ny-1,k]==0): + for s in ti.static(range(19)): + F[i,ny-1,k,s]=feq(LR[s], 1.0, bc_vel_y_right[None])-F[i,ny-1,k,LR[s]]+feq(s,1.0,bc_vel_y_right[None]) + + # Z direction + if ti.static(bc_z_left==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + if (solid[i,j,1]>0): + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,1]) + else: + F[i,j,0,s]=feq(s, rho_bczl, v[i,j,0]) + + if ti.static(bc_z_left==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,0]==0): + for s in ti.static(range(19)): + F[i,j,0,s]=feq(LR[s], 1.0, bc_vel_z_left[None])-F[i,j,0,LR[s]]+feq(s,1.0,bc_vel_z_left[None]) + + if ti.static(bc_z_right==1): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + if (solid[i,j,nz-2]>0): + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-2]) + else: + F[i,j,nz-1,s]=feq(s, rho_bczr, v[i,j,nz-1]) + + if ti.static(bc_z_right==2): + for i,j in ti.ndrange((0,nx),(0,ny)): + if (solid[i,j,nz-1]==0): + for s in ti.static(range(19)): + F[i,j,nz-1,s]=feq(LR[s], 1.0, bc_vel_z_right[None])-F[i,j,nz-1,LR[s]]+feq(s,1.0,bc_vel_z_right[None]) + +``Boundary_condition_psi()`` calculate macroscopic variable + +.. code-block:: python + + @ti.kernel + def streaming3(): + for i,j,k, in rho: + #if (solid[i,j,k] == 0): + if (i + + + + + + lbm_solver_3d_2phase_sparse — taichi-LBM3D 0.0.1 documentation + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

lbm_solver_3d_2phase_sparse

+

This file is almost the same as the lbm_solver_3d_2phase.py file execpt sparse storage definition of some varibles

+
# Sparse Storage memory allocation
+f = ti.field(ti.f32)
+F = ti.field(ti.f32)
+rho = ti.field(ti.f32)
+v = ti.Vector.field(3, ti.f32)
+rhor = ti.field(ti.f32)
+rhob = ti.field(ti.f32)
+rho_r = ti.field(ti.f32)
+rho_b = ti.field(ti.f32)
+n_mem_partition = 3
+
+cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1))
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhor)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhob)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_r)
+cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_b)
+
+
+cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1))
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f)
+cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F)
+
+
+

Above code snippts define the sparse storage of some varibles

+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/twophase/lbm_solver_3d_2phase_sparse.rst b/docs/twophase/lbm_solver_3d_2phase_sparse.rst new file mode 100644 index 0000000..0e10b26 --- /dev/null +++ b/docs/twophase/lbm_solver_3d_2phase_sparse.rst @@ -0,0 +1,32 @@ +lbm_solver_3d_2phase_sparse +======================================== + +This file is almost the same as the ``lbm_solver_3d_2phase.py`` file execpt sparse storage definition of some varibles + +.. code-block:: python + + # Sparse Storage memory allocation + f = ti.field(ti.f32) + F = ti.field(ti.f32) + rho = ti.field(ti.f32) + v = ti.Vector.field(3, ti.f32) + rhor = ti.field(ti.f32) + rhob = ti.field(ti.f32) + rho_r = ti.field(ti.f32) + rho_b = ti.field(ti.f32) + n_mem_partition = 3 + + cell1 = ti.root.pointer(ti.ijk, (nx//n_mem_partition+1,ny//n_mem_partition+1,nz//n_mem_partition+1)) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(v) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhor) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rhob) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_r) + cell1.dense(ti.ijk, (n_mem_partition,n_mem_partition,n_mem_partition)).place(rho_b) + + + cell2 = ti.root.pointer(ti.ijkl,(nx//3+1,ny//3+1,nz//3+1,1)) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(f) + cell2.dense(ti.ijkl,(n_mem_partition,n_mem_partition,n_mem_partition,19)).place(F) + +Above code snippts define the sparse storage of some varibles \ No newline at end of file