def density(self): """ SFRMetal density as a funciton of T. [kg/m^3] """ return DensityModel(a=14.1 * units.gram / units.cm**3, model='constant')
def __init__(self, name=None, k=0*units.watt/units.meter/units.kelvin, cp=0*units.joule/units.kg/units.kelvin, mu=0*units.pascal*units.seconds, dm=DensityModel()): """Initalizes a material :param name: The name of the component (i.e., "fuel" or "cool") :type name: str. :param k: The thermal conductivity of the component :type k: float, pint.unit.Quantity :math:'watt/meter/K' :param cp: specific heat capacity, :math:`c_p`, in :math:`J/kg-K` :type cp: float, pint.unit.Quantity :math:`J/kg-K` :param mu: dynamic viscosity(for fluid), :math:`mu`, in :math:`Pa.s` :type mu: float, pint.unit.Quantity :math:`Pa.s` :param dm: The density of the material :type dm: DensityModel object """ self.name = name self.k = k.to('watt/meter/kelvin') validation.validate_ge("k", k, 0*units.watt/units.meter/units.kelvin) self.cp = cp.to('joule/kg/kelvin') validation.validate_ge("cp", cp, 0*units.joule/units.kg/units.kelvin) self.mu = mu.to('pascal*seconds') self.dm = dm
def density(self): """ SS316 density in [kg/m^3] from asm.matweb.com """ return DensityModel(a=8000.0 * units.kg / (units.meter**3), model="constant")
def density(self): """ FLiBe density as a funciton of T. [kg/m^3] """ return DensityModel(a=2413.2172*units.kg/(units.meter**3), b=-0.488*units.kg/(units.meter**3)/units.kelvin, model="linear")
def density(self): """ Kernel density for TRISO kernel is 10500.0kg/m^3 A constant density model appears sufficiently accurate according to most sources - Andreades et al in particular: Andreades, C., A.T. Cisneros, J.K. Choi, A.Y.K Chong, David L. Krumwiede, Lakshana Huddar, Kathryn D. Huff, et al. 2014. Technical Description of the 'Mark 1' Pebble-Bed, Fluoride-Salt-Cooled, High-Temperature Reactor Power Plant. Thermal Hydraulics Group UCBTH-14-002. FHR Project. Berkeley, CA: University of California, Berkeley, Department of Nuclear Engineering. """ return DensityModel(a=10500.0*units.kg/(units.meter**3), model="constant")
def density(self): """ Graphite density for H451 nuclear grade graphite is 1740kg/m^3. A constant density model appears sufficiently accurate according to most sources - Andreades et al in particular: Andreades, C., A.T. Cisneros, J.K. Choi, A.Y.K Chong, David L. Krumwiede, Lakshana Huddar, Kathryn D. Huff, et al. 2014. Technical Description of the Mark 1 Pebble-Bed, Fluoride-Salt-Cooled, High-Temperature Reactor Power Plant. Thermal Hydraulics Group UCBTH-14-002. FHR Project. Berkeley, CA: University of California, Berkeley, Department of Nuclear Engineering. Note that in the dissertation by M. Fratoni, this number is reported as "1.74 kg/m^3". However, this is a units error. The number intended by that document was 1.74 g/cm^3, which corresponds to this model. """ return DensityModel(a=1740. * units.kg / (units.meter**3), model="constant")
def density(self): """ FLiBe density as a funciton of T. [kg/m^3] The relation is .. math:: 2415 + 0.49072T\] This is based on http://aries.ucsd.edu/raffray/publications/FST/TOFE_15_Zaghloul.pdf it is valid between the melting point and the critical point .. math:: t_m = 732.2 .. math:: t_c = 4498.8 """ return DensityModel(a=2415.6 * units.kg / (units.meter**3), b=0.49072 * units.kg / (units.meter**3) / units.kelvin, model="linear")
# External Reactivity from reactivity_insertion import RampReactivityInsertion rho_ext = RampReactivityInsertion(timer=ti, t_start=60.0 * units.seconds, t_end=70.0 * units.seconds, rho_init=0.0 * units.delta_k, rho_rise=600.0 * units.pcm, rho_final=600.0 * units.pcm) # maximum number of internal steps that the ode solver will take nsteps = 5000 k_mod = random.gauss(17, 17 * 0.05) * units.watt / (units.meter * units.kelvin) cp_mod = random.gauss(1650.0, 1650.0 * 0.05) * \ units.joule / (units.kg * units.kelvin) rho_mod = DensityModel(a=1740. * units.kg / (units.meter**3), model="constant") Moderator = Material('mod', k_mod, cp_mod, dm=rho_mod) k_fuel = random.uniform(15.0, 19.0) * units.watt / (units.meter * units.kelvin) cp_fuel = random.gauss( 1818.0, 1818 * 0.05) * units.joule / units.kg / units.kelvin # [J/kg/K] rho_fuel = DensityModel(a=2220.0 * units.kg / (units.meter**3), model="constant") Fuel = Material('fuel', k_fuel, cp_fuel, dm=rho_fuel) k_shell = random.gauss(17, 17 * 0.05) * units.watt / \ (units.meter * units.kelvin) cp_shell = random.gauss( 1650.0, 1650.0 * 0.05) * units.joule / (units.kg * units.kelvin) rho_shell = DensityModel(a=1740. * units.kg / (units.meter**3), model="constant")
def density(self): return DensityModel(a=10500.*units.kg/(units.meter**3), model="constant")
from density_model import DensityModel T0 = 0.0 * units.kelvin k_default = 0 * units.watt / (units.meter * units.kelvin) cp_default = 0.0 * units.joule / (units.kg * units.kelvin) mu_default = 0.0 * units.pascal * units.second rho_at_time_zero = 0.0 * units.kg / units.meter**3 rho_at_temp_zero = 0.0 * units.kg / units.meter**3 name = "defaulttestname" defaultLiq = liquid_material.LiquidMaterial(name=name) T0_test = 0.0 * units.kelvin k_test = 0 * units.watt / (units.meter * units.kelvin) cp_test = 0.0 * units.joule / (units.kg * units.kelvin) rho_test = DensityModel(a=1740.0 * units.kg / (units.meter**3), model="constant") name_test = "testname" def test_constructor_liq(): assert_equal(defaultLiq.name, name) assert_equal(defaultLiq.k, k_default) assert_equal(defaultLiq.cp, cp_default) assert_equal(defaultLiq.mu, mu_default) assert_equal(defaultLiq.rho(T0), rho_at_time_zero) assert_equal(defaultLiq.rho(0 * units.kelvin), rho_at_temp_zero) def test_all_vars_avail_liquid(): tester = liquid_material.LiquidMaterial(name_test, k_test, cp_test, rho_test, mu_default)