Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
krad = 1
# Define set points
t_set = np.zeros(timesteps_day) + 273.15 + 22
for q in range(int(6 * timesteps_day / 24), int(18 * timesteps_day / 24)):
t_set[q] = 273.15 + 27
t_set = np.tile(t_set, 60)
t_set_heating = t_set
t_set_cooling = t_set
heater_limit = np.zeros((timesteps, 3)) + 1e10
cooler_limit = np.zeros((timesteps, 3)) - 1e10
# Calculate indoor air temperature
T_air, Q_hc, Q_iw, Q_ow = \
low_order_VDI.reducedOrderModelVDI(houseData,
weatherTemperature,
solarRad_in,
equalAirTemp,
alphaRad,
ventRate,
Q_ig,
source_igRad,
krad,
t_set_heating,
t_set_cooling,
heater_limit,
cooler_limit,
heater_order=np.array(
[1, 2,
3]),
cooler_order=np.array(
"alphaowi": 2.7,
"alphaWall": 25 * 10.5, # 25 * sum(Ao)
"withInnerwalls": True}
krad = 1
# Define set points (prevent heating or cooling!)
t_set_heating = np.zeros(timesteps) # in Kelvin
t_set_cooling = np.zeros(timesteps) + 600 # in Kelvin
heater_limit = np.zeros((timesteps, 3)) + 1e10
cooler_limit = np.zeros((timesteps, 3)) - 1e10
# Calculate indoor air temperature
T_air, Q_hc, Q_iw, Q_ow = \
low_order_VDI.reducedOrderModelVDI(houseData,
weatherTemperature,
solarRad_in,
equalAirTemp,
alphaRad,
ventRate,
Q_ig,
source_igRad,
krad,
t_set_heating,
t_set_cooling,
heater_limit,
cooler_limit,
heater_order=np.array(
[1, 2,
3]),
cooler_order=np.array(
# Define set points
t_set = np.zeros(timesteps_day) + 273.15 + 22
for q in range(int(6 * timesteps_day / 24), int(18 * timesteps_day / 24)):
t_set[q] = 273.15 + 27
t_set = np.tile(t_set, 60)
t_set_heating = t_set
t_set_cooling = t_set
heater_limit = np.zeros((timesteps, 3))
cooler_limit = np.zeros((timesteps, 3))
heater_limit[:, 0] = 500
cooler_limit[:, 1] = -500
# Calculate indoor air temperature
T_air, Q_hc, Q_iw, Q_ow = \
low_order_VDI.reducedOrderModelVDI(houseData,
weatherTemperature,
solarRad_in,
equalAirTemp,
alphaRad,
ventRate,
Q_ig,
source_igRad,
krad,
t_set_heating,
t_set_cooling,
heater_limit,
cooler_limit,
heater_order=np.array(
[1, 2,
3]),
cooler_order=np.array(
"alphaiwi": 2.24,
"alphaowi": 2.7,
"alphaWall": 25 * 10.5, # 25 * sum(Ao)
"withInnerwalls": True}
krad = 1
# Define set points (prevent heating or cooling!)
t_set_heating = np.zeros(timesteps) # in Kelvin
t_set_cooling = np.zeros(timesteps) + 600 # in Kelvin
heater_limit = np.zeros((timesteps,3)) + 1e10
cooler_limit = np.zeros((timesteps,3)) - 1e10
# Calculate indoor air temperature
T_air, Q_hc, Q_iw, Q_ow = low_order_VDI.reducedOrderModelVDI(houseData, weatherTemperature, solarRad_in,
equalAirTemp, alphaRad, ventRate, Q_ig, source_igRad, krad,
t_set_heating, t_set_cooling, heater_limit, cooler_limit,
heater_order=np.array([1,2,3]), cooler_order=np.array([1,2,3]),
dt=int(3600/times_per_hour))
# Compute averaged results
T_air_c = T_air - 273.15
T_air_mean = np.array([np.mean(T_air_c[i*times_per_hour:(i+1)*times_per_hour]) for i in range(24*60)])
T_air_1 = T_air_mean[0:24]
T_air_10 = T_air_mean[216:240]
T_air_60 = T_air_mean[1416:1440]
ref_file = 'case12_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
"alphaiwi": 2.24,
"alphaowi": 2.7,
"alphaWall": 25 * 10.5, # 25 * sum(Ao)
"withInnerwalls": True}
krad = 1
# Define set points (prevent heating or cooling!)
t_set_heating = np.zeros(timesteps) # in Kelvin
t_set_cooling = np.zeros(timesteps) + 600 # in Kelvin
heater_limit = np.zeros((timesteps, 3)) + 1e10
cooler_limit = np.zeros((timesteps, 3)) - 1e10
# Calculate indoor air temperature
T_air, Q_hc, Q_iw, Q_ow = low_order_VDI.reducedOrderModelVDI(houseData,
weatherTemperature,
solarRad_in,
equalAirTemp,
alphaRad,
ventRate,
Q_ig,
source_igRad,
krad,
t_set_heating,
t_set_cooling,
heater_limit,
cooler_limit,
heater_order=np.array(
[1, 2,
3]),
cooler_order=np.array(
# t_set_heating = np.zeros(timesteps) + 273.15 + 21 # in Kelvin
t_set_heat_day = \
np.array([18, 18, 18, 18, 18, 18, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 18]) + 273.15
t_set_heating = np.tile(t_set_heat_day, 365)
# Define set points for cooling (cooling is disabled for high values)
# #-------------------------------------------------------
t_set_cooling = np.zeros(timesteps) + 273.15 + 1000 # in Kelvin
heater_limit = np.zeros((timesteps, 3)) + 1e10
cooler_limit = np.zeros((timesteps, 3)) - 1e10
# Calculate indoor air temperature with VDI model
T_air, Q_hc, Q_iw, Q_ow = \
low_order_VDI.reducedOrderModelVDI(houseData=houseData,
weatherTemperature=weatherTemperature,
solarRad_in=solarRad_in,
equalAirTemp=equalAirTemp,
alphaRad=alphaRad,
ventRate=ventRate,
Q_ig=Q_ig,
source_igRad=source_igRad,
krad=krad,
heater_order=np.array([1, 2, 3]),
cooler_order=np.array([1, 2, 3]),
t_set_heating=t_set_heating,
t_set_cooling=t_set_cooling,
heater_limit=heater_limit,
cooler_limit=cooler_limit)
return (T_air, Q_hc, Q_iw, Q_ow)