9 Function to compute constant kernel
13 K0 : scalar, type -> float
14 constant value of the kernel function (used to adapt to code unit)
15 u : scalar, type -> float
16 mass variable (colliding grain of mass u)
17 v : scalar, type -> float
18 mass variable (colliding grain of mass v)
23 res : scalar, type -> float
24 evaluate constant kernel
36 Function to compute additive kernel
40 K0 : scalar, type -> float
41 constant value of the kernel function (used to adapt to code unit)
42 u : scalar, type -> float
43 mass variable (colliding grain of mass u)
44 v : scalar, type -> float
45 mass variable (colliding grain of mass v)
50 res : scalar, type -> float
51 evaluate additive kernel at u and v
62 Function to compute the cross-section term in the ballistic kernel K = sigma * dv
66 K0 : scalar, type -> float
67 constant value of the kernel function (used to adapt to code unit)
68 u : scalar, type -> float
69 mass variable (colliding grain of mass u)
70 v : scalar, type -> float
71 mass variable (colliding grain of mass v)
76 res : scalar, type -> float
77 evaluate cross-section term of the balistic kernel at u and v
82 res = K0 * (u ** (2.0 / 3.0) + 2.0 * u ** (1.0 / 3.0) * v ** (1.0 / 3.0) + v ** (2.0 / 3.0))
90 Function to compute collision kernel from Brownian motion, K = sigma * dv
94 K0 : scalar, type -> float
95 constant value of the kernel function (used to adapt to code unit)
96 u : scalar, type -> float
97 mass variable (colliding grain of mass u)
98 v : scalar, type -> float
99 mass variable (colliding grain of mass v)
104 res : scalar, type -> float
105 Brownian motion collision kernel
111 * (u ** (2.0 / 3.0) + 2.0 * u ** (1.0 / 3.0) * v ** (1.0 / 3.0) + v ** (2.0 / 3.0))
112 * np.sqrt(1.0 / u + 1.0 / v)
118def func_kernel(kernel, K0, u, v):
120 Function to compute kernels at u and v
124 kernel : scalar, type -> integer
125 select the collisional kernel function
126 K0 : scalar, type -> float
127 constant value of the kernel function (used to adapt to code unit)
128 u : scalar, type -> float
129 mass variable (colliding grain of mass u)
130 v : scalar, type -> float
131 mass variable (colliding grain of mass v)
136 res : scalar, type -> float
137 evaluate kernel at u and v
143 res = kconst(K0, u, v)
151 return "Need to choose a kernel in the list."
157def func_kernel_numba(kernel, K0, u, v):
159 Function to compute kernels at u and v
163 kernel : scalar, type -> integer
164 select the collisional kernel function
165 K0 : scalar, type -> float
166 constant value of the kernel function (used to adapt to code unit)
167 u : scalar, type -> float
168 mass variable (colliding grain of mass u)
169 v : scalar, type -> float
170 mass variable (colliding grain of mass v)
175 res : scalar, type -> float
176 evaluate kernel at u and v
181 res = kconst(K0, u, v)