Skip to content

Commit

Permalink
Chaning the structure of the nusselt function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
FranklinTrevor authored and FranklinTrevor committed Apr 30, 2024
1 parent 941b88c commit 5391037
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 50 deletions.
43 changes: 3 additions & 40 deletions LoadedTACO/src/NusseltNumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,18 @@
@author: skyet
"""
import LoadedTACO.src.HT9Props as clad
import LoadedTACO.src.HexDhCal as Geom
import LoadedTACO.src.HegNu as Nu
import LoadedTACO.src.TempBulkCal as TempBulk
import TACOCAT_Read_In_File as TCinput
import LoadedTACO.src.Geometry_Value as Geometry
from scipy.integrate import trapz
from scipy.integrate import quad
from LoadedTACO.src.Fuel_Props import Fuel_props
from LoadedTACO.src.Geometry_Value import Core_Geometry
from LoadedTACO.src.Coolant_Value import Coolant

#References:
# 1.)https://www.sciencedirect.com/science/article/pii/S073519332030347X
#2.)https://www.thermal-engineering.org/what-is-dittus-boelter-equation-definition/
Uinlet = TCinput.Uinlet #average inlet velocity in a subchannel - m/s
Coolant_Type = TCinput.Coolant
Geometry_Type = TCinput.Geometry
Pr = Coolant[Coolant_Type]["Cp"]*Coolant[Coolant_Type]["nu"]*Coolant[Coolant_Type]["rho"]/Coolant[Coolant_Type]["k"] #Prandtl Number Calculation
Re = (Uinlet*Core_Geometry[Geometry_Type]["InnerHydraulicDiameter"]/Coolant[Coolant_Type]["nu"])
b=0.4 #This is for heating. May need to revise in the future
f = 0.316*Re**(-0.25) #Re should be Re1. This is to test Nusselt Number Capabilities. Needs to be revised in the future
Dh=Core_Geometry[Geometry_Type]["InnerHydraulicDiameter"]
L=Geometry.z
Prw=Pr #We assume that Prandlt Number at the wall is the same as the Prandlt number at the middle of the channel
# Defining Nusselt Number functions


def Nu_DB(Re,Pr,b):
Nu=0.023*(Re**0.8)*(Pr**b)
return Nu
#Nu_DB (1,5,7)
#print (Nu)


def Nu_Gn(f,Re,Pr,Dh,L,Prw):
Nu=(((f/8)*(Re-1000)*Pr)/(1+12.7*((f/8)**(1/2))*((Pr**(2/3))-1)))*((1+((Dh/L)**(2/3)))*((Pr/Prw)**0.11))
return Nu
# Nu_Gn (9,11,13,15,17,19)
#print (Nu)
# Preparing Functions for dictionary
Nu_dittus = Nu_DB(Re,Pr,b)
Nu_Gniel=Nu_Gn(f,Re,Pr,Dh,L,Prw)

Nus_DB={"NuCorrelation":Nu_dittus,}
Nus_Gn={"NuCorrelation":Nu_Gniel,}
#Dictionary
Nusselt={
"DittusBoelter":Nus_DB,
"Gnilenski":Nus_Gn,
"DittusBoelter":Nu_DB,
"Gnilenski":Nu_Gn,
}


30 changes: 21 additions & 9 deletions TACOCAT.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from LoadedTACO.src.Geometry_Value import Core_Geometry
from LoadedTACO.src.Coolant_Value import Coolant
from LoadedTACO.src.Flux_Profiles import Fluxes
from LoadedTACO.src.NusseltNumber import Nusselt
#Assumptions
#1. The core thermal production is assumed to set after heat deposition
#(i.e. gamma isn't relevant)
Expand Down Expand Up @@ -43,7 +44,6 @@
#Coolant Parameters
Cp = Coolant[Coolant_Type]["Cp"]
rho = Coolant[Coolant_Type]["rho"]
Nu=Nusselt[Nusselt_Type]["NuCorrelation"]

#Geometry Parameters
z = Geometry.z
Expand All @@ -60,7 +60,9 @@
## Core Geometry Calculations
# Geometric Calculations
CVol = Core_Geometry[Geometry_Type]["FaceArea"]*Hc #Volume of the core - m^3

Dh=Core_Geometry[Geometry_Type]["InnerHydraulicDiameter"]
L = Geometry.z
PtoD = Geometry.PtoD
#----------------------------------------------------------------------------------#
## Core Parameter Calculations

Expand All @@ -83,7 +85,14 @@
Peavg = (Pe + Pemax)/2 # Average Peclect number in a inner channel
Re1 = Peavg/Pravg # Average Reynolds number in a inner channel
fsm = 0.316*Re1**(-0.25)
Nu=Nusselt.Nu_DB(Re,Pr,0.4)

# Nusselt number calculation
Nu_func=Nusselt[Nusselt_Type]
args = {
"DittusBoelter":(Re,Pr,0.4),
"Gnilenski":(fsm,Re,Pr,Dh,L,Pr),
}
Nu = Nu_func(*args[Nusselt_Type])

h = Nu*Coolant[Coolant_Type]["k"]/Core_Geometry[Geometry_Type]["InnerHydraulicDiameter"] #Heat Transfer Coefficient for Rod Bundles - W/m^2 - C

Expand Down Expand Up @@ -181,26 +190,29 @@ def HotFBulkTemp(Tbulkin,FluxPro,z,NFuel,qlinHotF,Cp,Uinlet,rho,A_xs):
h = 10
w = 8

lw = 2.5
fs = 14
lw = 2
fs = 24

k = 1
plt.figure(k, figsize=(h,w))
plt.rcParams['font.family'] = 'Times New Roman' # sets the font family
plt.plot(Geometry.z,Tbulk,'r--',linewidth = lw,label=r'$T_{bulk}$')
plt.plot(Geometry.z,TbulkHotF,'k--',linewidth = lw, label=r'$T_{bulk-HF}$')
plt.plot(Geometry.z,Tcl, 'g-',linewidth = lw, label=r'$T_{cl}$')
plt.plot(Geometry.z,TclHotF, 'c-',linewidth = lw, label=r'$T_{cl-HF}$')
plt.axhline(y=Coolant[Coolant_Type]["Tboil"], xmin = 0, xmax = 1, color = 'r',linewidth = lw, label='Coolant Boiling Temp')
plt.axhline(y=Coolant[Coolant_Type]["TmeltCoolant"], xmin = 0, xmax = 1, color = 'b',linewidth = lw, label='Coolant Melting Temp')
plt.legend(loc='center left')
plt.legend(loc='best', fontsize = fs)
plt.xlabel('Axial Height - m',fontsize = fs)
plt.ylabel('Temperature - C',fontsize = fs)
plt.xticks(fontsize = fs)
plt.yticks(fontsize = fs)
plt.grid()
fig = TCinput.Reactor_Title + '_Axial_Temperatures'
if print_logic == 0:
plt.savefig(fig + '.png', dpi = 300, format = "png",bbox_inches="tight")
plt.savefig(fig + '.eps', dpi = 300, format = "eps",bbox_inches="tight")
plt.savefig(fig + '.svg', dpi = 300, format = "svg",bbox_inches="tight")
plt.savefig(fig + '.tiff', dpi = 300, format = "tiff",bbox_inches="tight")
plt.savefig(fig + '.tiff', dpi = 300, format = "tiff",bbox_inches="tight")

This comment has been minimized.

Copy link
@lcarasik

lcarasik May 4, 2024

Contributor

Change this back to .eps

plt.savefig(fig + '.tiff', dpi = 300, format = "tiff",bbox_inches="tight")

This comment has been minimized.

Copy link
@lcarasik

lcarasik May 4, 2024

Contributor

Change this back to .svg

k = k + 1

plt.figure(k, figsize=(h,w))
Expand Down
2 changes: 1 addition & 1 deletion TACOCAT_Read_In_File.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#Provide Clad Properties. Cladding includes:
Clad_Props = "Graphite_384_2" #Cladding Properties for Graphite

#Provide desired Nusselt Number Corrilation. Corrilations include:Nus_DB and Nus_Gn
#Provide desired Nusselt Number Corrilation. Corrilations include: DittusBoelter, Gnilenski, Nak_Wire_Wrapped
Nusselt="DittusBoelter"

Hc = 0.35 #Active Height of Core is 2m
Expand Down

0 comments on commit 5391037

Please sign in to comment.