Skip to content

Commit 4135c22

Browse files
author
claresinger
committed
better variable names
1 parent 5c3df34 commit 4135c22

File tree

1 file changed

+9
-9
lines changed
  • PySDM/physics/homogeneous_liquid_nucleation_rate

1 file changed

+9
-9
lines changed

PySDM/physics/homogeneous_liquid_nucleation_rate/cnt.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ def __init__(self, _):
1313

1414
@staticmethod
1515
def j_liq_homo(const, T, S, e_s):
16-
m1 = const.Mv / const.N_A # kg per molecule
17-
v1 = m1 / const.rho_w # m3 per molecule
18-
N1 = (S * e_s) / (m1 * const.Rv * T) # molecules per m3
16+
mass_per_moleculue = const.Mv / const.N_A
17+
volume_per_molecule = mass_per_moleculue / const.rho_w
18+
N1 = (S * e_s) / (mass_per_moleculue * const.Rv * T) # molecules per m3
1919
return (
20-
((2 * const.sgm_w) / (np.pi * m1)) ** (1 / 2)
21-
* (v1 * N1**2 / S)
20+
((2 * const.sgm_w) / (np.pi * mass_per_moleculue)) ** (1 / 2)
21+
* (volume_per_molecule * N1**2 / S)
2222
* np.exp(
23-
(-16 * np.pi * v1**2 * const.sgm_w**3)
23+
(-16 * np.pi * volume_per_molecule**2 * const.sgm_w**3)
2424
/ (3 * const.k_B**3 * T**3 * np.log(S) ** 2)
2525
)
2626
)
2727

2828
@staticmethod
2929
def r_liq_homo(const, T, S):
30-
m1 = const.Mv / const.N_A # kg per molecule
31-
v1 = m1 / const.rho_w # m3 per molecule
32-
return (2 * const.sgm_w * v1) / (const.k_B * T * np.log(S))
30+
mass_per_moleculue = const.Mv / const.N_A
31+
volume_per_molecule = mass_per_moleculue / const.rho_w
32+
return (2 * const.sgm_w * volume_per_molecule) / (const.k_B * T * np.log(S))

0 commit comments

Comments
 (0)