Skip to content

Commit

Permalink
Mu and k model temp for both fluid and Nusselt/h computations
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadac1 committed Jan 23, 2023
1 parent 4523977 commit 2955140
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion class_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ def __init__(self, P_max, P_grad, T_out, T_in):
self.T_in = T_in

class Fluid:
def __init__(self, rho, cp, k):
def __init__(self, rho, cp, k, mu):
self.rho = rho
self.cp = cp
self.k = k
self.mu = mu

class Tank:
def __init__(self, V_max, fluid, T_tank):
Expand Down
15 changes: 13 additions & 2 deletions solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
########## Initializing working fluids ##############
######################################################

sodium = Fluid(rho = lambda T : 1014 - 0.235*(273+T), cp = lambda T : -3.001e6*(273+T)**(-2) + 1658 - 0.8479*(273+T) +4.454e-4*(273+T)**2, k = 84) # Secondary fluid initialization
nitrate_salt = Fluid(rho = lambda T : 2090 - 0.636*T, cp = lambda T : 1443 + 0.172*T, k = 0.443) # Storage fluid initialization
sodium = Fluid(rho = lambda T : 1014 - 0.235*(273+T), cp = lambda T : -3.001e6*(273+T)**(-2) + 1658 - 0.8479*(273+T) +4.454e-4*(273+T)**2, k = lambda T : 104-0.047*(T+273), mu = lambda T : m.exp(556.835/(273+T) - 0.3958*m.log(273+T) - 6.4406)) # Secondary fluid initialization
nitrate_salt = Fluid(rho = lambda T : 2090 - 0.636*T, cp = lambda T : 1443 + 0.172*T, k = lambda T : 0.443 - 1.9e-4 * T, mu = lambda T : (22.714 - 0.120 * T + 2.281e-4 * T**2 - 1.474e-7 * T**3)*1e-3) # Storage fluid initialization

def system_initialize(reactor_max_power, t_unload_max):

Expand Down Expand Up @@ -144,6 +144,17 @@ def compute_flows(P_core, P_load, P_unload, stored_energy):

return(primary_flow, load_flow, unload_flow)

def Nu_h(fluid, flow, Di, f, T):

velocity = flow/ (fluid.rho(T) * (np.pi/4)*Di**2)
Re = velocity*Di*fluid.rho(T)/fluid.mu(T)
Pr = fluid.cp(T)*fluid.mu(T)/fluid.k(T)

Nu = (f/8)*(Re - 1000)*Pr/(1 + 12.7*m.sqrt(f/8)*(Pr**(2/3) - 1))
h = Nu*fluid.k(T) / Di

return (Nu,h)


def print_load_graph(P_grid, reac, max_stored_energy, Time, P_core, P_load, P_unload, stored_energy, x1, x2):

Expand Down

0 comments on commit 2955140

Please sign in to comment.