Skip to content

Commit 64938ba

Browse files
fixed circular import
1 parent 6728972 commit 64938ba

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/sparging/correlations.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
from __future__ import annotations
2-
from sparging.config import *
2+
from sparging.config import ureg, const_R, const_g, VERBOSE
3+
from typing import TYPE_CHECKING
4+
5+
if TYPE_CHECKING:
6+
from sparging.model import SimulationInput
37
import numpy as np
48
import scipy.constants as const
59
import warnings
@@ -77,7 +81,7 @@ def get_d_b(flow_g_vol: float, nozzle_diameter: float, nb_nozzle: int) -> float:
7781
)
7882

7983

80-
def get_Re(input: SimulationInput) -> float:
84+
def get_Re(input: "SimulationInput") -> float:
8185
try:
8286
u = input.u_g0
8387
Re_old = input.Re
@@ -97,7 +101,7 @@ def get_Re(input: SimulationInput) -> float:
97101
return Re.to("dimensionless")
98102

99103

100-
def get_u_g0(input: SimulationInput) -> float: # TODO move inside class ?
104+
def get_u_g0(input: "SimulationInput") -> float: # TODO move inside class ?
101105
"""
102106
bubble initial velocity [m/s], correlation for terminal velocity from Clift 1978
103107
"""
@@ -121,7 +125,7 @@ def get_u_g0(input: SimulationInput) -> float: # TODO move inside class ?
121125
return u_g0
122126

123127

124-
def get_eps_g(input: SimulationInput) -> float:
128+
def get_eps_g(input: "SimulationInput") -> float:
125129
"""computes gas void fraction from ideal gas law and Young-Laplace pressure in the bubbles (neglecting hydrostatic pressure variation)"""
126130
eps_g = (
127131
const_R
@@ -142,7 +146,7 @@ def get_eps_g(input: SimulationInput) -> float:
142146
def get_h_higbie(D_l: float, u_g: float, d_b: float) -> float:
143147
"""mass transfer coefficient [m/s] for tritium in liquid FLiBe using Higbie penetration model"""
144148
h_l = (
145-
(D_l * u_g) / (ufl.pi * d_b)
149+
(D_l * u_g) / (const.pi * d_b)
146150
) ** 0.5 # mass transport coefficient Higbie penetration model
147151
return h_l
148152

0 commit comments

Comments
 (0)