;ò
±Fc           @   sn   d  Z  d k l Z l Z l Z d k l Z d k Z d e f d „  ƒ  YZ [ [ [ d k	 l
 Z
 d „  Z d S(   sX   Description of thermal radiation.

$Id: thermal.py,v 1.3 2007/03/24 16:11:59 eddy Exp $
(   s   Thermals   Quantums   Vacuum(   s   ObjectNs   Radiatorc           B   sf   t  Z d  Z d „  Z e i d „ Z e i e i	 d „ Z
 e e e e i e i e i e i d „ Z RS(   s&   Descriptor for a black-body radiator. c         O   s'   t  t i |  f | | ƒ | |  _ d  S(   N(   s   applys   Objects   __init__s   selfs   argss   whats   temperatures   _Radiator__temperature(   s   selfs   temperatures   argss   what(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   __init__   s    c         C   s   |  i d | Sd S(   s§  Computes the power output per unit area of exposed surface.

        To compute total power output, allowing (if the body isn't convex) for
        re-absorption of some of what it emits, I suspect you should multiply
        radiance by the surface area of the body's convex hull, rather than its
        actual surface area.  The product is then the rate of loss of energy,
        due to thermal radiation, of the body. i   N(   s   selfs   _Radiator__temperatures   S(   s   selfs   ignoreds   S(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   _lazy_get_total_   s     c         C   s   | |  i Sd S(   s'   Constant needed by spectral: h / (k.T).N(   s   hoverks   selfs   _Radiator__temperature(   s   selfs   ignoreds   hoverk(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   _lazy_get__hoverkT_   s     c   
      C   s°   | o$ |  i d | d | ƒ d | Sn0 | o
 | } n | o | | } n
 t d ‚ d | | |  i | ƒ d }	 | o |	 | d | d Sn |	 | d | d Sd S(   só  Returns spectral radiance.

        Takes any one of three arguments, in the order nu, frequency,
        wavelength, the former being the `angular' frequency of the radiation,
        frequency/(2*pi).  If more than one is given, the first in the above
        ordering (which is their positional order) is used, any others are
        ignored.  Returns the radiance (power output per unit area) of the body,
        per unit variation in the given argument, produced in a narrow portion
        of the spectrum about the given position in the spectrum.

        Since this is `per unit', the answer depends on which argument you
        supplied not only for how the argument is read but also in how the power
        density varies with that argument. s	   frequencyi   s,   Either zero input or none given: unphysical.i   i   i   N(   s   nus   selfs   spectrals   pis	   frequencys   fs
   wavelengths   cs
   ValueErrors   hs   exps   _hoverkTs   base(
   s   selfs   nus	   frequencys
   wavelengths   exps   hs   cs   pis   fs   base(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   spectral"   s      $ 
 	 (   s   __name__s
   __module__s   __doc__s   __init__s   Thermals   Stefans   _lazy_get_total_s   Quantums   hs   ks   _lazy_get__hoverkT_s   Nones   maths   exps   Vacuums   cs   pis   spectral(    (    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   Radiator   s
    	(   s   Kelvinc         O   sÅ   y |  d } WnZ t j
 oN |  t d j o
 |  } qª |  d t } | t d j  o t d ‚ qª nA X|  d j o |  t } n% | d j  o t d ‚ n | t } t t | f | | ƒ Sd S(   s×   Wrap Radiator with provision for -ve temperatures (in Centigrade).

    This isn't the right way to wrap it, but if any wrapping's to be done, it
    should be done here, not by bodging Radiator's __init__ method ! f273.14999999999998i    s5   Negative temperature, even after coercion by 273.15 KN(	   s   temperatures   Ts	   TypeErrors   Kelvins
   ValueErrors   applys   Radiators   argss   what(   s   temperatures   argss   whats   T(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   radiator>   s       
 
(   s   __doc__s   physicss   Thermals   Quantums   Vacuums   study.value.objects   Objects   maths   Radiators   study.value.unitss   Kelvins   radiator(   s   radiators   Radiators   Kelvins   Objects   Thermals   Vacuums   Quantums   math(    (    s)   /home/eddy/.sys/py/study/chemy/thermal.pys   ?   s   	0	