Absorber
- class grheat.absorber.Absorber(mu_a, tp=0, diffusivity=1.4557999999999998e-07, capacity=4184000.0, boundary='infinite')[source]
Bases:
objectHeat transfer solutions for exponential heating of semi-infinite absorbing-only media.
This class provides solutions for the temperature rise in a semi-infinite medium due to uniform illumination over its surface. The illumination is exponentially absorbed within the medium, with the volumetric heating being proportional to mu_a * exp(-mu_a * z).
This is a one-dimensional solution in the depth z.
- The solutions are applicable under three different boundary conditions at z=0:
‘infinite’: No boundary (infinite medium).
‘adiabatic’: No heat flow across the boundary.
‘zero’: Boundary is fixed at T=0.
- mu_a(scalar)
- Type:
Exponential attenuation coefficient [1/meters].
- tp(scalar)
- Type:
Time of source impulse [seconds].
- diffusivity(scalar)
- Type:
Thermal diffusivity [m**2/s].
- capacity(scalar)
- Type:
Volumetric heat capacity [J/degree/m**3].
- boundary(str)
- Type:
Boundary condition at z=0 (‘infinite’, ‘adiabatic’, or ‘zero’).
Methods Summary
continuous(z, t)Calculate temperature rise due to continuous surface irradiance on an absorber.
instantaneous(z, t)Calculate temperature rise due to an instant surface exposure.
pulsed(z, t, t_pulse)Calculate temperature rise due to pulsed radiant exposure on absorber surface.
Methods Documentation
- continuous(z, t)[source]
Calculate temperature rise due to continuous surface irradiance on an absorber.
The method computes the temperature increase at a specified depth z and time t due to a continuous irradiance of 1 W/m² on the absorber’s surface. The volumetric heating within the medium decreases exponentially with depth, following the expression: mu_a * exp(-mu * z) [W/m³]. The heating starts at t=0 and continues up to the specified time t.
The temperatures are calculated as in Prahl’s 1995 SPIE paper, “Charts to rapidly estimate temperature following laser irradiation”.
The method handles scalar or array-like inputs for z and t, allowing for the calculation of temperature increases at multiple depths and/or times.
- Parameters:
z (scalar or array) – Depth(s) at which the temperature is desired [meters].
t (scalar or array) – Time(s) at which the temperature is desired [seconds].
- Returns:
scalar or array – Temperature increase at the specified depth(s) and time(s) [°C].
Example
import grheat import numpy as np import matplotlib.pyplot as plt z = 0 # meters mu_a = 0.25 * 1000 # 1/m t = np.linspace(0, 500, 100) / 1000 # seconds medium = grheat.Absorber(mua) T = medium.continuous(z, t) plt.plot(t * 1000, T, color='blue') plt.xlabel("Time (ms)") plt.ylabel("Surface Temperature Increase (°C)") plt.title("1 W/m² Surface Irradiance") plt.show()
- instantaneous(z, t)[source]
Calculate temperature rise due to an instant surface exposure.
This method computes the temperature increase at a specified depth z and time t following an instantaneous radiant exposure of 1 J/m² on the medium’s surface. The computation is based on the formulations provided in Prahl’s 1995 SPIE paper, “Charts to rapidly estimate temperature following laser irradiation”.
The method handles scalar or array-like inputs for z and t, allowing for the calculation of temperature increases at multiple depths and/or times.
The self.tp attribute of the Absorber object specifies the time of the source impulse, which is used in the underlying _instantaneous method call.
- Parameters:
z (scalar or array) – Depth(s) at which the temperature is desired [meters].
t (scalar or array) – Time(s) at which the temperature is desired [seconds].
- Returns:
scalar or array – Temperature increase at the specified depth(s) and time(s) [°C].
Example
import grheat import numpy as np import matplotlib.pyplot as plt z = 0 # meters mu_a = 0.25 * 1000 # 1/m tp = 0.1 # seconds t = np.linspace(0, 500, 100) / 1000 # seconds medium = grheat.Absorber(mua, tp) T = medium.continuous(z, t) plt.plot(t * 1000, T, color='blue') plt.xlabel("Time (ms)") plt.ylabel("Surface Temperature Increase (°C)") plt.title("1 J/m² Instant Radiant Exposure at %.1f seconds" % tp) plt.show()
- pulsed(z, t, t_pulse)[source]
Calculate temperature rise due to pulsed radiant exposure on absorber surface.
The method computes the temperature increase at a specified depth z and time t due to a pulsed irradiance of 1 J/m² on the absorber’s surface. The irradiance starts at t=0 and continues up to time t_pulse. The volumetric heating within the medium decreases exponentially with depth, following the expression: mu_a * exp(-mu * z) [W/m³].
The temperatures are calculated as in Prahl’s 1995 SPIE paper, “Charts to rapidly estimate temperature following laser irradiation”. The calculations of temperature should work for times before, during, and after the pulse.
- Parameters:
z (scalar or array) – Depth(s) at which the temperature is desired [meters].
t (scalar or array) – Time(s) at which the temperature is desired [seconds].
t_pulse (scalar) – Duration of the irradiance pulse [seconds].
- Returns:
scalar or array – Temperature increase at the specified depth(s) and time(s) [°C].
Example
import grheat import numpy as np import matplotlib.pyplot as plt z = 0 # meters mu_a = 0.25 * 1000 # 1/m t = np.linspace(0, 500, 100) / 1000 # seconds t_pulse = 0.100 # seconds medium = grheat.Absorber(mua) T = medium.pulsed(z, t, t_pulse) plt.plot(t * 1000, T, color='blue') plt.xlabel("Time (ms)") plt.ylabel("Surface Temperature Increase (°C)") plt.title("1 J/m² pulse lasting %.0f ms" % t_pulse) plt.show()