bte.dvm.collision#

Module Contents#

Classes#

collisioner

Class with kernel initialized for doing binary collision

collisioner_bgk

Class with kernel initialized for doing binary collision

Functions#

get_potential(omega)

calculate the alpha for inverse law potential.

lgwt(N, a, b)

Gauss-Legendre quadrature

init_kernel_mode_vector(umax, umin, unum, vmax, vmin, ...)

Get the collision kernel.

collision_fft(f_spec, kn_bzm, phi, psi, phipsi)

collision_fft_fg(f_spec, g_spec, kn_bzm, phi, psi, phipsi)

get_collision(v_meta[, quad_num, omega, M])

get_vshape(v_meta)

bte.dvm.collision.get_potential(omega)[source]#

calculate the alpha for inverse law potential.

Parameters:

omega (float) – \(\omega\) in \(\mu \propto T^{\omega}\).

Returns:

alpha

bte.dvm.collision.lgwt(N, a, b)[source]#

Gauss-Legendre quadrature

Parameters:
  • N (int) – points

  • a (float) – left

  • b (float) – right

Returns:

quadrature points, weight

Return type:

Tuple[torch.Tensor,torch.Tensor]

bte.dvm.collision.init_kernel_mode_vector(umax, umin, unum, vmax, vmin, vnum, wmax, wmin, wnum, quad_num, omega=0.81, M=5, dtype=torch.float64)[source]#

Get the collision kernel.

reference: http://dx.doi.org/10.1016/j.jcp.2013.05.003

Parameters:
  • umax (float) – _description_

  • umin (float) – _description_

  • unum (int) – _description_

  • vmax (float) – _description_

  • vmin (float) – _description_

  • vnum (int) – _description_

  • wmax (float) – _description_

  • wmin (float) – _description_

  • wnum (int) – _description_

  • quad_num (int) – _description_

  • omega (float, optional) – _description_. Defaults to 0.81.

  • M (int, optional) – _description_. Defaults to 5.

  • dtype (_type_, optional) – _description_. Defaults to torch.float64.

Returns:

_description_

Return type:

_type_

bte.dvm.collision.collision_fft(f_spec, kn_bzm, phi, psi, phipsi)[source]#
Return type:

torch.Tensor

bte.dvm.collision.collision_fft_fg(f_spec, g_spec, kn_bzm, phi, psi, phipsi)[source]#
Return type:

torch.Tensor

bte.dvm.collision.get_collision(v_meta, quad_num=8, omega=0.81, M=5)[source]#
Parameters:
bte.dvm.collision.get_vshape(v_meta)[source]#
Parameters:

v_meta (bte.dvm.distribution.DVDisMeta_Grid) –

Return type:

Tuple[int, int, int]

class bte.dvm.collision.collisioner(v_meta, quad_num, omega=0.81, M=5, device='cpu', dtype=torch.float32)[source]#

Bases: torch.nn.Module

Class with kernel initialized for doing binary collision

do_collision(f, kn_bzm=1.0)[source]#
Parameters:

f (torch.Tensor) –

class bte.dvm.collision.collisioner_bgk(v_meta)[source]#

Bases: torch.nn.Module

Class with kernel initialized for doing binary collision

do_collision(f, kn_bzm=1.0)[source]#
Parameters:

f (torch.Tensor) –