10 Replies Latest reply on Aug 2, 2018 4:49 PM by Rick Davin

    Heat Index Calculation

    james.arackal

      Hi Any one have done  heat Index calculation in PI Explorer formula attribute using ambient temperature and humidity? please share the formula.

       

      Many Thanks,

        • Re: Heat Index Calculation
          james.arackal

          Hello all,

           

          I got the below formula for excel, can anyone convert for PI attribute formula.

           

          =IF((C5*9/5+32)<=80,C5,IF(AND(E5<13,((C5*9/5+32)>80),((C5*9/5+32)<112)),(((-42.379+2.04901523*(C5*9/5+32)+10.14333127*E5-0.22475541*(C5*9/5+32)*E5-0.00683783*(C5*9/5+32)*(C5*9/5+32)-0.05481717*E5*E5+0.00122874*(C5*9/5+32)*(C5*9/5+32)*E5+0.00085282*(C5*9/5+32)*E5*E5-0.00000199*(C5*9/5+32)*(C5*9/5+32)*E5*E5)-32)*5/9)-(((13-E5)/4)*SQRT((17-ABS((C5*9/5+32)-95))/17)),IF(AND(E5>85,((C5*9/5+32)>80),((C5*9/5+32)<87)),(((-42.379+2.04901523*(C5*9/5+32)+10.14333127*E5-0.22475541*(C5*9/5+32)*E5-0.00683783*(C5*9/5+32)*(C5*9/5+32)-0.05481717*E5*E5+0.00122874*(C5*9/5+32)*(C5*9/5+32)*E5+0.00085282*(C5*9/5+32)*E5*E5-0.00000199*(C5*9/5+32)*(C5*9/5+32)*E5*E5)-32)*5/9)+((E5-85)/10)*((87-(C5*9/5+32))/5),(((-42.379+2.04901523*(C5*9/5+32)+10.14333127*E5-0.22475541*(C5*9/5+32)*E5-0.00683783*(C5*9/5+32)*(C5*9/5+32)-0.05481717*E5*E5+0.00122874*(C5*9/5+32)*(C5*9/5+32)*E5+0.00085282*(C5*9/5+32)*E5*E5-0.00000199*(C5*9/5+32)*(C5*9/5+32)*E5*E5)-32)*5/9))))

           

          where C5=A= Temperature

          where E5=B= Humidity

           

          Many Thanks

          • Re: Heat Index Calculation
            rschmitz

            Hi James,

             

            Not that this is really a question about PI, but I did a quick search on Google and found the following on Wikipedia for the Heat Index Formula. All of these formulas are approximations, so take that with a grain of salt.

             

            Cheers,

            Rob

            • Re: Heat Index Calculation
              james.arackal

              Hi Thanks for the reply,

               

              my problem is , I already have the formula in excel and how to convert this to pi attribute Calculation . Pi attribute doesn’t recognize coma as used in excel ?

              • Re: Heat Index Calculation
                Rick Davin

                Hi James,

                 

                The adage "Give a man a fish and he eats for a day.  Teach a man to fish and he eats for a lifetime." is most applicable here.  You are using a very specific, highly customized variation of the standard heat index calculation in the Wikipedia link provided by Robert Schmitz.  As your needs are very specific, it is of utmost importance that YOU be the one to finalize and approve of the calculation that you insist on using.  Otherwise we are left in a position where you can point the finger at others if something is wrong.  Our job here is to educate you and empower you to support your system as you deem fit.

                 

                I provide the following as an educational sample.  It is provided on an AS-IS basis.  The core of the formula is based on Wikipedia.  As an example of how to check AND conditions, I have included an extra expression at the bottom.  There is also the part of the expression ExtraPartForYou that is left to you because it is non-standard.

                 

                CLICK ON IMAGE TO ENLARGE

                2018-08-02 11_33_30-Window.png

                 

                The above will work as long your input temperature is in Temperature UOM class.  If you input a unitless value, understand that it will be considered as degree Fahrenheit, and not converted.  If you have unitless temps (i.e. a null UOM), you either need to convert yourself ahead of time, or really the best advice is that you should assign a proper UOM.

                 

                The output result would be the AdjustedHI also in degrees Fahrenheit.  If you say the output attribute should be in degree Celsius, this is not a problem as AF will automatically perform the conversion for you.  Which is to say you don't have to do anything special to the Analysis shown.

                 

                The Excel formulas which you insist are gospel are far from perfect.  For instance the beginning of your Excel formula:

                 

                =IF((C5*9/5+32)<=80,C5,IF(AND(E5<13,((C5*9/5+32)>80),((C5*9/5+32)<112)), etc

                 

                Can be reduced to

                 

                =IF( T<=80, T, IF( AND( R<13, T>80, T<112)), etc.

                 

                Once you look at the simplified statement, you can easily see that the AND does not need the T>80 check given that T<=80 obviously failed earlier.

                3 of 3 people found this helpful