-
Notifications
You must be signed in to change notification settings - Fork 2
/
quantities.py
executable file
·51 lines (43 loc) · 1.04 KB
/
quantities.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
Module quantities provides functions to calculate relevant physical quantities.
"""
def nD0_active(N, vzero, dr, L):
"""
Returns product of particle density n = N/L^2 and active diffusion constant
D_0 = vzero^2/2*dr.
Parameters
----------
N : int or float
Number of particles.
vzero : float
Self-propelling velocity.
dr : float
Rotation diffusion constant.
L : float
Characteristic system length.
Returns
-------
product : float
n D_0
"""
return (N*(vzero**2))/(2*dr*(L**2))
def nD0_thermal(N, kT, gamma, L):
"""
Returns product of particle density n = N/L^2 and diffusion constant
D_0 = 2*kT*N/gamma*L^2.
Parameters
----------
N : int or float
Number of particles.
kT : float
Dimensionless temperature.
gamma : float
Brownian dumping coefficient.
L : float
Characteristic system length.
Returns
-------
product : float
n D_0
"""
return (2*kT*N)/(gamma*(L**2))