fastresearchgroup / fastresearchgroup/TACOCAT
Fluid properties dictionary functionality needs to be revised to reflect a faster/compact implementation
- Dominant language
- Python
- Stars
- 8
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
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'])
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading LoadedTACO/src/Coolant_Value.py and compare its current fluid-property handling with the proposed implementation in the issue. Verify the FLiBe, Na, and Water entries and their dictionary lookups; done means the revised compact functionality works for the shown calls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100