SemiInfinite¶
- class pychemengg.heattransfer.transient.SemiInfinite(boundarycondition=None, xposition_tofindtemp=None, time=None, density=None, specificheat=None, thermalconductivity=None, thermaldiffusivity=None, constantsurfacetemperature=None, heattransfercoefficient=None, heatflux=None, energypulse=None, T_infinity=None, T_initial=None)[source]¶
Bases:
object
Model to analyze transient heat flow in semi-infinite objects.
- Parameters
- boundaryconditionstr
String defining the boundary condition applied to surface of semi-infinite object. It can take any of the four following values:
“surfacetemperature_specified”
“heatflux_specified”
“surfaceconvection_specified”
“energypulse_specified”
- xposition_tofindtempint or float
Location inside the semi infinite object where temperature is to be found. Surface of the semi infinite object is considered to be the origin (x=0)
- timeint or float
Time at which temperature in the semi infinite solid is to be found.
- densityint or float
Density of solid object.
- specificheatint or float
Specific heat of solid object.
- thermalconductivityint or float
Thermal conductivity of solid object.
- thermaldiffusivityint or float
Thermal diffusivity of solid object.
- constantsurfacetemperatureint or float
New temperature of surface at which it is held contant (following a step change from T_initial)
- heattransfercoefficientint or float
Heat transfer coefficient between solid object and surrounding.
- heatfluxint of float
Heat flux applied on surface of solid object.
- energypulseint or float
Energy pulse applied to surface of solid object.
- T_infinityint or float
Temperature of surroundings.
- T_initialint or float
Temperature of solid object at time = 0.
Examples
First import the module transient
Units used in this example: SI system
However, any consistent units can be used
>>> from pychemengg.heattransfer import transient >>> wood = transient.SemiInfinite(boundarycondition="heatflux_specified", time = 20*60, T_initial=20, heatflux=1250, thermalconductivity=0.159, thermaldiffusivity=1.75e-7, xposition_tofindtemp=0) # This will create an instance of 'Semi Infinite object' with a name 'wood'
- Attributes
- See “Parameters”. All parameters are attributes. Additional attributes are listed below.
- __init__(boundarycondition=None, xposition_tofindtemp=None, time=None, density=None, specificheat=None, thermalconductivity=None, thermaldiffusivity=None, constantsurfacetemperature=None, heattransfercoefficient=None, heatflux=None, energypulse=None, T_infinity=None, T_initial=None)[source]¶
Methods
__init__
([boundarycondition, …])calc_contacttemperature
(other_semiinfinitesolid)Calculate contact temperature of two semi infinite solids”.
Calculate heat flux at time = t for boundary condition = “surfacetemperature_specified”.
Calculate temperature of Semi Infinite object at time = t and position = x.
- calc_contacttemperature(other_semiinfinitesolid)[source]¶
Calculate contact temperature of two semi infinite solids”.
- Parameters
- other_semiinfinitesolid~heattransfer.transient.SemiInfinite
A SemiInfinite instance that serves as the second semiinfinite solid that is in contact with the first semiinfinite solid - the ‘self’
- Returns
- temperatureint or float
Temperature at contact of two semi infinite solids.
Notes
Contact temperature is computed using the following formula:
\[T_s = \left( \frac{\sqrt{(k \rho c_p)_A} T_{A,i} + \sqrt{(k \rho c_p)_B} T_{B,i}} {\sqrt{(k \rho c_p)}_A + \sqrt{(k \rho c_p)_B}} \right)\]where:
k = thermal conductivity of semi infinite solid ‘A’ or ‘B’
\(\rho\) = density of semi infinite solid ‘A’ or ‘B’
\(c_p\) = specific heat of semi infinite solid ‘A’ or ‘B’
\(T_{s}\) = contact temperature of semi infinite objects A and B
\(T_{A,i}\) = temperature of semi infinite object A at time = 0 (before contact with ‘B’)
\(T_{B,i}\) = temperature of semi infinite object B at time = 0 (before contact with ‘A’)
References
[1] Y. A. Cengel and A. J. Ghajar, “Heat And Mass Transfer Fundamentals and Applications”, 6th Edition. New York, McGraw Hill Education, 2020.
Examples
>>> from pychemengg.heattransfer import transient # If a human touches a metal block, then the temperature at interface # of human and aluminum is as follows: # First model the human and aluminum as semi infinite solids >>> human = transient.SemiInfinite(boundarycondition="surfacetemperature_specified", thermalconductivity=1, density=1, specificheat=1.1e3**2, T_initial=32) >>> aluminum = transient.SemiInfinite(boundarycondition="surfacetemperature_specified", thermalconductivity=1, density=1, specificheat=24e3**2, T_initial=20) # Next apply the method on one and pass the other as argument >>> human.calc_contacttemperature(aluminum) 20.52589641434263
- calc_heatflux_forconstantsurfacetemperature()[source]¶
Calculate heat flux at time = t for boundary condition = “surfacetemperature_specified”.
- Parameters
- None_requiredNone
Attributes that are already defined are used in calculation.
- Returns
- heat fluxint or float; Positive: Heat is gained by object, Negative: Heat is lost by object
Heat flux at a given instance of time ‘t’.
Notes
Heat flux of the sold semi infinite object at given time ‘t’ is computed using the following formula:
Boundary condition: Surface temperature is specified as \(T_s\) = constant
q_s(t) = frac{k(T_s - T_i)}{sqrt{pi alpha t}}
where:
t = time at which temperature or flux is to be computed
\(\alpha\) = thermal diffusivity of solid object
\(T_{s}\) = new surface temperature of solid object
\(T_{i}\) = temperature of solid object at time = 0
\(q_s(t)\) = heat flux at any time ‘t’
References
[1] Y. A. Cengel and A. J. Ghajar, “Heat And Mass Transfer Fundamentals and Applications”, 6th Edition. New York, McGraw Hill Education, 2020.
Examples
>>> from pychemengg.heattransfer import transient >>> pipe = transient.SemiInfinite(boundarycondition="surfacetemperature_specified", constantsurfacetemperature=-10, T_initial=15, thermalconductivity=0.4, thermaldiffusivity=0.15e-6, time = 90*24*3600) # This will create an instance of 'Semi Infinite object' with a name 'pipe' >>> pipe.calc_heatflux_forconstantsurfacetemperature () pipe.calc_heatflux_forconstantsurfacetemperature () -5.223977625442188 # negative value indicates heat is being lost by the solid object
- calc_temperature()[source]¶
Calculate temperature of Semi Infinite object at time = t and position = x.
- Parameters
- None_requiredNone
Attributes that are already defined are used in calculation.
- Returns
- temperatureint or float
Temperature of object at given location and time.
Notes
Temperature of the sold semi infinite object at given location and time is computed based on the ‘boundary condition’.
Boundary condition: Surface temperature is specified as \(T_s\) = constant
\[\frac{T(x,t) - T_i}{T_s - T_i} = erfc \left( \frac{x}{2\sqrt{\alpha t}} \right) \]Boundary condition: Surface heat flux is specified as \(q_s\) = constant
\[T(x,t) - T_i = \frac{q_s}{k} \left( \sqrt{\frac{4 \alpha t}{\pi}} exp\left(-\frac {x^2}{4 \alpha t}\right) -x erfc\left( \frac{x}{2\sqrt{\alpha t}} \right) \right) \]Boundary condition: Convection on surface, \(q_s(t) = h[T_{\infty} - T(0,t)]\)
\[\frac{T(x,t) - T_i}{T_s - T_i} = erfc \left( \frac{x}{2\sqrt{\alpha t}} \right) - exp \left( \frac{hx}{k} + \frac{h^2 \alpha t}{k^2}\right) erfc\left( \frac{x}{2\sqrt{\alpha t}} + \frac{h \sqrt{\alpha t}}{k}\right) \]Boundary condition: Surface is exposed to energy pulse, \(e_s\) = constant
\[T(x,t) - T_i = \frac{e_s}{k \sqrt{ \frac{\pi t}{\alpha} }} exp \left( -\frac {x^2}{4 \alpha t} \right) \]where:
t = time at which temperature or flux is to be computed
x = location from surface of the semi infinite object where temperature is to be computed
k = thermal conductivity of solid
h = heat transfer coefficient between solid and fluid
\(\alpha\) = thermal diffusivity of solid object
\(T(x,t)\) = temperature of solid object at losition ‘x’ and time ‘t’
\(T_{s}\) = new surface temperature of solid object
\(T_{i}\) = temperature of solid object at time = 0
\(q_s\) = constant heat flux applied to solid surface
\(e_s\) = constant energy pulse applied to soild surface
\(T_{\infty}\) = temperature of fluid in contact with solid
References
[1] Y. A. Cengel and A. J. Ghajar, “Heat And Mass Transfer Fundamentals and Applications”, 6th Edition. New York, McGraw Hill Education, 2020.
Examples
>>> from pychemengg.heattransfer import transient >>> wood = transient.SemiInfinite(boundarycondition="heatflux_specified", time = 20*60, T_initial=20, heatflux=1250, thermalconductivity=0.159, thermaldiffusivity=1.75e-7, xposition_tofindtemp=0) # This will create an instance of 'Semi Infinite object' with a name 'wood' >>> wood.calc_temperature() 148.5516322557588