Ejemplo n.º 1
0
 def __init__(self,
              t0=0.0*units.seconds,
              tf=1.0*units.seconds,
              dt=1.0*units.seconds):
     self.t0 = validation.validate_ge("t0", t0, 0.0*units.seconds)
     self.tf = validation.validate_ge("tf", tf, t0)
     self.dt = validation.validate_ge("dt", dt, 0.0*units.seconds)
     self.series = units.Quantity(np.linspace(start=t0.magnitude,
                                              stop=tf.magnitude,
                                              num=self.timesteps()),
                                  'seconds')
     self.ts = 0
Ejemplo n.º 2
0
    def __init__(self,
                 name=None,
                 mat=Material(),
                 vol=0 * units.meter**3,
                 T0=0 * units.kelvin,
                 alpha_temp=0 * units.delta_k / units.kelvin,
                 timer=Timer(),
                 heatgen=False,
                 power_tot=0 * units.watt):
        """Initalizes a thermal hydraulic component.
        A thermal-hydraulic component will be treated as one "lump" in the
        lumped capacitance model.

        :param name: The name of the component (i.e., "fuel" or "cool")
        :type name: str.
        :param vol: The volume of the component
        :type vol: float meter**3
        :param T0: The initial temperature of the component
        :type T0: float.
        :param alpha_temp: temperature coefficient of reactivity
        :type alpha_temp: float
        :param timer: The timer instance for the sim
        :type timer: Timer object
        :param heatgen: is this component a heat generator (fuel)
        :type heatgen: bool
        """
        self.name = name
        self.vol = vol.to('meter**3')
        validation.validate_ge("vol", vol, 0 * units.meter**3)
        self.k = mat.k
        self.cp = mat.cp
        self.dm = mat.dm
        self.T0 = T0.to('kelvin')
        validation.validate_num("T", T0)
        self.T = units.Quantity(
            np.zeros(shape=(timer.timesteps(), ), dtype=float), 'kelvin')
        self.T[0] = T0
        self.alpha_temp = alpha_temp.to('delta_k/kelvin')
        self.timer = timer
        self.heatgen = heatgen
        self.power_tot = power_tot
        self.cond = {}
        self.conv = {}
        self.mass = {}
        self.cust = {}
        self.prev_t_idx = 0
Ejemplo n.º 3
0
def f_th(t, y_th, si):
    """Returns the thermal hydraulics solution at time t

    :param t: the time [s] at which the update is occuring.
    :type t: float.
    :param y: TODO
    :type y: np.ndarray
    """
    t_idx = si.timer.t_idx(t * units.seconds)
    f = units.Quantity(np.zeros(shape=(si.n_components(), ), dtype=float),
                       'kelvin / second')
    power = si.y[t_idx][0]
    o_i = 1 + si.n_pg
    o_f = 1 + si.n_pg + si.n_dg
    omegas = si.y[t_idx][o_i:o_f]
    for idx, comp in enumerate(si.components):
        f[idx] = si.th.dtempdt(component=comp,
                               power=power,
                               omegas=omegas,
                               t_idx=t_idx)
    return f
Ejemplo n.º 4
0
#############################################
#
# User Workspace
#
#############################################

# Thermal hydraulic params
# Temperature feedbacks of reactivity (ragusa_consistent_2009)
# Doppler
# actually this coeff is to per C^d... crap.
alpha_f = (-0.8841 * units.pcm / units.kelvin)
# Coolant
alpha_c = (0.1263 * units.pcm / units.kelvin)
# below from ragusa_consistent_2009
t_fuel = units.Quantity(525.0, units.degC).to(units.kelvin)
t_clad = units.Quantity(525.0, units.degC).to(units.kelvin)
t_cool = units.Quantity(440.0, units.degC).to(units.kelvin)
t_inlet = units.Quantity(355.0, units.degC).to(units.kelvin)

# [m] ... matrix(4mm) + coating(1mm)
kappa = 0.00  # TODO if you fix omegas, kappa ~ 0.06

# Initial time
t0 = 0.00 * units.seconds

# Timestep
dt = 0.005 * units.seconds

# Final Time
tf = 10.0 * units.seconds
Ejemplo n.º 5
0
alpha_c = -1.8 * units.pcm / units.kelvin
alpha_m = -0.7 * units.pcm / units.kelvin
alpha_r = 1.8 * units.pcm / units.kelvin
# below from steady state analysis
t_fuel = 955.58086 * units.kelvin
t_cool = 936.57636 * units.kelvin
t_refl = 923.18521 * units.kelvin
t_mod = 937.39862 * units.kelvin
t_graph_peb = 936.40806 * units.kelvin
t_core = 970.54064 * units.kelvin

# the data below comes from design doc rev c

# self._vol_flow_rate = 976.0*0.3 # kg/s TODO 0.3 is nat circ guess
vel_cool = 2. * units.meter / units.second  # m/s
t_inlet = units.Quantity(600.0, units.degC)  # degrees C
# [m] ... matrix(4mm) + coating(1mm)
thickness_fuel_matrix = 0.005 * units.meter
kappa = 0.00  # TODO if you fix omegas, kappa ~ 0.06
core_height = 3.5 * units.meter  # [m] (TODO currently approximate)
core_inner_radius = 0.35 * units.meter  # m
core_outer_radius = 1.25 * units.meter  #

# Initial time
t0 = 0.00 * units.seconds

# Timestep
dt = 0.005 * units.seconds

# Final Time
tf = 5.0 * units.seconds
Ejemplo n.º 6
0
# Timing: t0=initial, dt=step, tf=final
t0 = 0.00*units.seconds
dt = 0.005*units.seconds
tf = 5.0*units.seconds

# Temperature feedbacks of reactivity (Ragusa2009)
# Fuel: Note Doppler model not implemented
alpha_f = (-0.8841*units.pcm/units.kelvin)
# Coolant
alpha_c = (0.1263*units.pcm/units.kelvin)

# Initial Temperatures
t_fuel = 737.033*units.kelvin
t_cool = 721.105*units.kelvin
t_inlet = units.Quantity(400.0, units.degC)
t_inlet.ito(units.kelvin)

# Neglect decay heating
kappa = 0.00

# Geometry
# fuel pin radius
r_fuel = 0.00348*units.meter
# active core height
h_core = 0.8*units.meter
# surface area of fuel pin
a_fuel = 2*math.pi*r_fuel*h_core
# volume of a fuel pin
vol_fuel = math.pi*pow(r_fuel, 2)*h_core
# hydraulic area per fuel pin