Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluid properties dictionary functionality needs to be revised to reflect a faster/compact implementation #70

Open
lcarasik opened this issue Dec 15, 2023 · 0 comments

Comments

@lcarasik
Copy link
Contributor

The current https://github.com/fastresearchgroup/TACOCAT/blob/main/LoadedTACO/src/Coolant_Value.py file needs to be revised as follows:

(Note: Only the proper dictionary call is meant to be included, I just don't have time to format this yet)

'''
Dictionary of Fluids and properties (density, Specific Heat, Viscosity, and Thermal Conductivity)
type dictionary name in iPython counsel to get properties 
to get specific property -> type DictionaryName['Property'] in the iPython Counsel
Example : Ethanol['density']
Output: '0.7892 g/cm3'
'''

import numpy as np

def thermophys_FLiBe(T):
    # Where T is in Kelvin
    # Reference: 
    # 1) Fluoride salt coolant properties for nuclear reactor applications: A review
    # https://doi.org/10.1016/j.anucene.2017.05.036
    rho = 2413.0-0.488*T              # kg/m3 for 800K to 1080K. - ref 1
    Cp = 2386.0                       # J/kg/K for 750K to 1200 K. - ref 1
    k = 1.1                           # W/m-K for 750K to 1200 K. - ref 1
    mu = (0.116*np.exp(3755/T))*0.001 # Pa-s for 873K to 1073 K.- ref 1
    # Tmelt = ~459 C or 732.15 K and Tboil = 1430 C to 1703.15 K - ref 1
    return rho,Cp,mu,k

def thermophys_Na(T):
	# Where T is in Kelvin
    # Reference: 
    # 1) Database of thermophysical properties of liquid metal coolants for GEN-IV
    # https://inis.iaea.org/collection/NCLCollectionStore/_Public/43/095/43095088.pdf?r=1
    rho = 1014.0-0.235*T                                              # kg/m3 for 371K to 1155K. - ref 1 
    Cp = -3.001*(10**6)*T**-2 + 1658 - 0.8479*T + 4.454*(10**-4)*T**2 # J/kg/K for 371K to 1155K. - ref 1 
    k = 104-0.047*T         # W/m-K for 371K to 1155K. - ref 1 
    ln_mu = - 6.4406 - 0.3958*np.log(T)  + 556.835/T 
    mu = np.exp(ln_mu)                                                # Pa-s for 371K to 1155K. - ref 1 
    # Tmelt = ~# C or 371.0 K and Tboil = # C to 1155 K - ref 1
    return rho,Cp,mu,k

#FLiBe = {'FLiBe': thermophys_FLiBe}#.rho(T+273.15)}

# How to define a dictonary for water providing units and everything.
Water = {'density': '1g/cm3' ,
         'Specific Heat': '4.179J/g-°C' ,
         'Viscosity': '8.90 × 10−4 Pa',
         'Thermal Conductivity': '0.6 W/mK'} 

# How to define a main dictonary that nests the others
fluids_prop = {"FLiBe" : thermophys_FLiBe,
               "Na"    : thermophys_Na,
               "Water" : Water}

# How to call the entire nested dictonary
T_FLiBe = 550 # FLiBe Temperature in C 
T_Na = 350 # Na Temperature in C 

# This prints out every output of the function calls.
print(fluids_prop["FLiBe"](T_FLiBe))
print(fluids_prop["Na"](T_Na))

# This calls the function through the dictionary

[rho_t,Cp_t,mu_t,k_t] = fluids_prop["FLiBe"](T_FLiBe)
print("The FLiBe density is,",rho_t,"kg/m3")
print("The FLiBe viscosity is,",mu_t,"Pa-s")
print("The FLiBe specific heat is,",Cp_t,"J/kg/K")
print("The FLiBe thermal conductivity is,",k_t,"W/m-K")

# How to call the nested dictonary first value
print("The density of water is,", fluids_prop["Water"]['density'])
print("The specific heat of water is,",fluids_prop["Water"]['Specific Heat'])
print("The viscosity of water is,", fluids_prop["Water"]['Viscosity'])
print("The thermal conductivity of water is,",fluids_prop["Water"]['Thermal Conductivity'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant