| 1 | 
greg | 
2.1 | 
{ RCSid $Id$ } | 
| 2 | 
  | 
  | 
{ | 
| 3 | 
  | 
  | 
        The following calculation uses the BRTDfunc type to reproduce the | 
| 4 | 
  | 
  | 
        calculation used by LBL's Optics 5 program for the transmittance | 
| 5 | 
  | 
  | 
        and reflectance of coated glazings.  This calculation is based | 
| 6 | 
  | 
  | 
        on fits for the angular dependence for clear and bronze-coated | 
| 7 | 
  | 
  | 
        glazing, and is not terribly accurate.  The variables ??_clear | 
| 8 | 
  | 
  | 
        below should be replaced by ??_bronze in the case of the bronze | 
| 9 | 
  | 
  | 
        glazing model.  Used with optics2rad script. | 
| 10 | 
  | 
  | 
 | 
| 11 | 
  | 
  | 
        5/18/2006       Greg Ward | 
| 12 | 
  | 
  | 
 | 
| 13 | 
  | 
  | 
        Arguments used for this material should look like: | 
| 14 | 
  | 
  | 
 | 
| 15 | 
  | 
  | 
        mod BRTDfunc my_glazing | 
| 16 | 
  | 
  | 
        10      rR_clear        rG_clear        rB_clear | 
| 17 | 
  | 
  | 
                RTAU*tR_clear   GTAU*tG_clear   BTAU*tB_clear | 
| 18 | 
  | 
  | 
                0       0       0 | 
| 19 | 
  | 
  | 
                window.cal | 
| 20 | 
  | 
  | 
        0 | 
| 21 | 
  | 
  | 
        15      0       0       0 | 
| 22 | 
  | 
  | 
                0       0       0 | 
| 23 | 
  | 
  | 
                0       0       0 | 
| 24 | 
  | 
  | 
                FRRHO   FGRHO   FBRHO | 
| 25 | 
  | 
  | 
                BRRHO   BGRHO   BBRHO | 
| 26 | 
  | 
  | 
 | 
| 27 | 
  | 
  | 
        where: | 
| 28 | 
  | 
  | 
                FRRHO   FGRHO   FBRHO   is front normal spectral reflectance | 
| 29 | 
  | 
  | 
                BRRHO   BGRHO   BBRHO   is back normal spectral reflectance | 
| 30 | 
  | 
  | 
                RTAU    GTAU    BTAU    is normal spectral transmittance | 
| 31 | 
  | 
  | 
} | 
| 32 | 
  | 
  | 
                                { get normal reflectance } | 
| 33 | 
  | 
  | 
rbase = if(Rdot,10,13);                 { different front and back } | 
| 34 | 
  | 
  | 
Rred = arg(rbase)*CrP; | 
| 35 | 
  | 
  | 
Rgrn = arg(rbase+1)*CgP; | 
| 36 | 
  | 
  | 
Rblu = arg(rbase+2)*CbP; | 
| 37 | 
  | 
  | 
                                { transmittance coefficients } | 
| 38 | 
  | 
  | 
Tclear = clip(-.0015 + RdotP*(3.355 + RdotP*(-3.840 + | 
| 39 | 
  | 
  | 
                        RdotP*(1.460 + RdotP*.0288)))); | 
| 40 | 
  | 
  | 
 | 
| 41 | 
  | 
  | 
Tbronze = clip(-.002 + RdotP*(2.813 + RdotP*(-2.341 + | 
| 42 | 
  | 
  | 
                        RdotP*(-.05725 + RdotP*.599)))); | 
| 43 | 
  | 
  | 
 | 
| 44 | 
  | 
  | 
                                { reflectance coefficients } | 
| 45 | 
  | 
  | 
Rclear = clip(.999 + RdotP*(-.563 + RdotP*(2.043 + | 
| 46 | 
  | 
  | 
                        RdotP*(-2.532 + RdotP*1.054))) - Tclear); | 
| 47 | 
  | 
  | 
 | 
| 48 | 
  | 
  | 
Rbronze = clip(.997 + RdotP*(-1.868 + RdotP*(6.513 + | 
| 49 | 
  | 
  | 
                        RdotP*(-7.862 + RdotP*3.225))) - Tbronze); | 
| 50 | 
  | 
  | 
 | 
| 51 | 
  | 
  | 
                                { returned spectral transmittance } | 
| 52 | 
  | 
  | 
tR_clear = CrP*Tclear; | 
| 53 | 
  | 
  | 
tG_clear = CgP*Tclear; | 
| 54 | 
  | 
  | 
tB_clear = CbP*Tclear; | 
| 55 | 
  | 
  | 
 | 
| 56 | 
  | 
  | 
tR_bronze = CrP*Tbronze; | 
| 57 | 
  | 
  | 
tG_bronze = CgP*Tbronze; | 
| 58 | 
  | 
  | 
tB_bronze = CbP*Tbronze; | 
| 59 | 
  | 
  | 
                                { returned spectral reflectance } | 
| 60 | 
  | 
  | 
rR_clear = Rred*(1 - Rclear) + Rclear; | 
| 61 | 
  | 
  | 
rG_clear = Rgrn*(1 - Rclear) + Rclear; | 
| 62 | 
  | 
  | 
rB_clear = Rblu*(1 - Rclear) + Rclear; | 
| 63 | 
  | 
  | 
 | 
| 64 | 
  | 
  | 
rR_bronze = Rred*(1 - Rbronze) + Rbronze; | 
| 65 | 
  | 
  | 
rG_bronze = Rgrn*(1 - Rbronze) + Rbronze; | 
| 66 | 
  | 
  | 
rB_bronze = Rblu*(1 - Rbronze) + Rbronze; |