def weather_data_calculator(weatherDataFrame): deltaTheating = weatherDataFrame["Values"]["Design Heating T"]-weatherDataFrame["Values"]["Winter T"] deltaTcooling = weatherDataFrame["Values"]["Summer T"]-weatherDataFrame["Values"]["Design Cooling T"] DRcooling = weatherDataFrame["Values"]["DR"] latitude = weatherDataFrame["Values"]["Latitude"] DBT_Kelvin_outdoor = weatherDataFrame["Values"]["Summer T"]+273.15 #T in kelvin WBT_Kelvin_outdoor = weatherDataFrame["Values"]["Summer WBT"]+273.15 DBT_Kelvin_indoor = weatherDataFrame["Values"]["Design Cooling T"]+273.15 RH_indoor = weatherDataFrame["Values"]["Design Cooling RH"] S_outdoor = SI.state("DBT",DBT_Kelvin_outdoor,"WBT",WBT_Kelvin_outdoor,101325) # use stete func in spysi to calculate w W_out = S_outdoor[4] S_indoor = SI.state("DBT",DBT_Kelvin_indoor,"RH",RH_indoor,101325) W_in = S_indoor[4] inputsList = pd.Series([deltaTheating,deltaTcooling,DRcooling,latitude,W_out,W_in],index=["deltaTheating","deltaTcooling","DRcooling","latitude","W out","W in"]) return inputsList
# W - kilogram per kilogram (pounds mass per pound mass) # WBT - Kelvins (degrees Rankine) # p2 - A string that is a valid state property but must not be the same as p1 # p2val - A numeric that is in base units of which ever property that is given. # P - A numeric that is the atmospheric pressure in Pascals of SI units or # pounds per square inch for IP units. # The state function returns a list of all state property values in the # following order: # Dry bulb temperature (DBT) # Specific enthalpy (H) # Relative humidity (RH) # Specific volume (V) # Humidity ratio (W) # Wet bulb temperature (WBT) # Example - For a dry bulb temperature of 300 Kelvin and a relative humidity # of 0.32 (i.e. 32%) at standard atompspheric pressure, the other # state properties can be calculated by the following. S = SI.state("DBT", 300, "RH", 0.32, 101325) print("The dry bulb temperature is ", S[0]) print("The specific enthalpy is ", S[1]) print("The relative humidity is ", S[2]) print("The specific volume is ", S[3]) print("The humidity ratio is ", S[4]) print("The wet bulb temperature is ", S[5]) # All calculated values are in base SI units as listed above.
# W - kilogram per kilogram (pounds mass per pound mass) # WBT - Kelvins (degrees Rankine) # p2 - A string that is a valid state property but must not be the same as p1 # p2val - A numeric that is in base units of which ever property that is given. # P - A numeric that is the atmospheric pressure in Pascals of SI units or # pounds per square inch for IP units. # The state function returns a list of all state property values in the # following order: # Dry bulb temperature (DBT) # Specific enthalpy (H) # Relative humidity (RH) # Specific volume (V) # Humidity ratio (W) # Wet bulb temperature (WBT) # Example - For a dry bulb temperature of 300 Kelvin and a relative humidity # of 0.32 (i.e. 32%) at standard atompspheric pressure, the other # state properties can be calculated by the following. S=SI.state("DBT",300,"RH",0.32,101325) print("The dry bulb temperature is ", S[0]) print("The specific enthalpy is ", S[1]) print("The relative humidity is ", S[2]) print("The specific volume is ", S[3]) print("The humidity ratio is ", S[4]) print("The wet bulb temperature is ", S[5]) # All calculated values are in base SI units as listed above.
d = d + 1 e = 1 while rh2 > int(hum2[e]): e = e + 1 if comb[d][e] == 0: vco = vco + 1 if comb[d][e] == 1: co = co + 1 if comb[d][e] == 2: aw = aw + 1 if comb[d][e] == 3: unc = unc + 1 warcom = max(float(comf[b][c]), float(awarm[d][e])) if (comf[b][c] <= 0) & (awarm[d][e] >= 0): warcom = 3 s = SI.state("DBT", (273 + temp), "RH", (rh / 100), 101325) try: tw = s[5] - 273 except TypeError: tw = s[5] try: TSI = (0.308 * tw) + (0.745 * temp) - (2.06 * (math.sqrt( (0.9 * warcom) + 0.841))) except: TSI = None tiime = t[1].split(':') if t[-1] == 'PM': tiime[0] = str(int(tiime[0]) + 12) # if (int(tiime[0])>7 & int(tiime[0])<23): # Met = 1.7 #else: