pyrk.th_component module

class pyrk.th_component.THComponent(name=None, mat=<materials.material.Material object>, vol=<Quantity(0.0, 'meter ** 3')>, T0=<Quantity(0.0, 'kelvin')>, alpha_temp=<Quantity(0.0, 'delta_k / kelvin')>, timer=<timer.Timer object>, heatgen=False, power_tot=<Quantity(0, 'watt')>, sph=False, ri=<Quantity(0, 'meter')>, ro=<Quantity(0, 'meter')>)[source]

Bases: object

This class represents a component of the system it has material and geometric properties essential to thermal modeling and heat transfer in support of calculations related to the thermal hydraulics sub block

addConvBC(env, prev_comp, h, R)[source]

add convective boundary condition

Parameters:
  • env (str) – name of the environment for convective heat transfer (the fluid)
  • prev_comp (str) – name of the component that is immediately inside the boundary component
  • h (float or obj of Convective Model) – convective heat transfer coefficient
  • R (float) – radius of the sphere
add_advection(name, m_flow, t_in, cp)[source]

Add advection dictionary to the fluid component(coolant) that has advective heat tranfer

Parameters:
  • m_flow (float) – mass flow rate
  • t_in (float) – temperature at the inlet of the control volume
  • cp (float) – specific heat capacity
add_conduction(env, area=<Quantity(0.0, 'meter ** 2')>, L=<Quantity(0.0, 'meter')>, r_b=<Quantity(0.0, 'meter')>, r_env=<Quantity(0.0, 'meter')>)[source]

Add parameters for conduction heat transfer calculation area and L are used for slab geometry r_b and r_env are used for spherical heat diffusion

Parameters:
  • env (str) – name of the component that this component conduct heat to
  • area (float) – conduction surface for the slab
  • L (float) – thickness of the slab
  • r_b (float) – outer radius of the component
  • r_env (float) – outer radius of the environment
add_convection(env, h, area)[source]

add convection in the self.conv dictionary

Parameters:
  • env (str) – name of the component that heat is transfered to/from
  • h (float) – heat transfer coefficient
  • area (float) – heat transfer area
add_custom(env, res)[source]
add_mass_trans(env, H, u)[source]
dtemp(timestep)[source]

calculate temperature difference between the given timestep and the timestep where feedback is turned on

Parameters:timestep (int) – the timestep at which to query the tempareture
mesh(size)[source]

cut a THComponent into a list of smaller components uniform meshing method, only implemented for spherical components

Parameters:size (float with length unit) – size of uniform mesh element
Returns:list of smaller components
metadata()[source]

A recorder function to fill the th/th_params table

record()[source]

A recorder function to fill the th/th_timeseries table

rho(timestep)[source]

The density of this component’s materials

Parameters:timestep (int) – the timestep at which to query the temperature
Returns:the density of this component
Return type:float, in units of $kg/m^3$
temp(timestep)[source]

The temperature of this component at the chosen timestep

Parameters:timestep (int) – the timestep at which to query the temperature
Returns:the temperature of the component at the chosen timestep
Return type:float, in units of kelvin
temp_reactivity(timestep)[source]

calculate reactivity of a component from temperature feedback

Parameters:
  • timestep (int) – the timestep at which to calculate reactivity feedback
  • T0_timestep (int) – the timestep at which the temperature is used as reference temperature
update_temp(timestep, temp)[source]

Updates the temperature

Parameters:
  • timestep (int) – the timestep at which to query the temperature
  • temp – the new temperature
class pyrk.th_component.THSuperComponent(name, T0, sub_comp=[], timer=<timer.Timer object>)[source]

Bases: pyrk.th_component.THComponent

A ‘component’ containing a list of component Creating a superComponent would automatically define conduction between the mesh elements

add_component(a_component)[source]
add_conduction_in_mesh()[source]

add conduction between the mesh elements

add_conv_bc(envname, h)[source]

add convective boundary condition to the supercomponent

Parameters:
  • envname (str) – the name of the component that self tranfer heat with
  • h (float) – convective heat transfer coefficient
compute_tr(t_env, t_innercomp, h)[source]

compute temperature at r=R for the sphere from the temperature at r=R-dr and the temperature of the env/fluid/coolant

Parameters:
  • t_env (float) – temperature of the component(env) that self tranfers heat with
  • t_innercomp (float) – temperature of the component that is inside self