Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:,0]
T_air_ref_10 = T_air_ref_10[:,0]
T_air_ref_60 = T_air_ref_60[:,0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)
T_air_10 = T_air_mean[216:240]
T_air_60 = T_air_mean[1416:1440]
ref_file = 'case08_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)
T_air_60 = T_air_mean[1416:1440]
this_path = os.path.dirname(os.path.abspath(__file__))
ref_file = 'case01_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)
Q_hc_10 = Q_hc_mean[216:240]
Q_hc_60 = Q_hc_mean[1416:1440]
this_path = os.path.dirname(os.path.abspath(__file__))
ref_file = 'case07_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(Q_hc_ref_1, Q_hc_ref_10, Q_hc_ref_60) = vdic.load_res(ref_path)
Q_hc_ref_1 = Q_hc_ref_1[:, 0]
Q_hc_ref_10 = Q_hc_ref_10[:, 0]
Q_hc_ref_60 = Q_hc_ref_60[:, 0]
if plot_res:
plot_result(Q_hc_1, Q_hc_ref_1, "Results day 1", "heat")
plot_result(Q_hc_10, Q_hc_ref_10, "Results day 10", "heat")
plot_result(Q_hc_60, Q_hc_ref_60, "Results day 60", "heat")
max_dev_1 = np.max(np.abs(Q_hc_1 - Q_hc_ref_1))
max_dev_10 = np.max(np.abs(Q_hc_10 - Q_hc_ref_10))
max_dev_60 = np.max(np.abs(Q_hc_60 - Q_hc_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)
T_air_10 = T_air_mean[216:240]
T_air_60 = T_air_mean[1416:1440]
this_path = os.path.dirname(os.path.abspath(__file__))
ref_file = 'case02_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_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 = 'case09_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)
Q_hc_60 = Q_hc_mean[1416:1440]
this_path = os.path.dirname(os.path.abspath(__file__))
ref_file = 'case07_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(Q_hc_ref_1, Q_hc_ref_10, Q_hc_ref_60) = vdic.load_res(ref_path)
Q_hc_ref_1 = Q_hc_ref_1[:, 0]
Q_hc_ref_10 = Q_hc_ref_10[:, 0]
Q_hc_ref_60 = Q_hc_ref_60[:, 0]
if plot_res:
plot_result(Q_hc_1, Q_hc_ref_1, "Results day 1", "heat")
plot_result(Q_hc_10, Q_hc_ref_10, "Results day 10", "heat")
plot_result(Q_hc_60, Q_hc_ref_60, "Results day 60", "heat")
max_dev_1 = np.max(np.abs(Q_hc_1 - Q_hc_ref_1))
max_dev_10 = np.max(np.abs(Q_hc_10 - Q_hc_ref_10))
max_dev_60 = np.max(np.abs(Q_hc_60 - Q_hc_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_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]
this_path = os.path.dirname(os.path.abspath(__file__))
ref_file = 'case03_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_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 = 'case10_res.csv'
ref_path = os.path.join(this_path, 'inputs', ref_file)
# Load reference results
(T_air_ref_1, T_air_ref_10, T_air_ref_60) = vdic.load_res(ref_path)
T_air_ref_1 = T_air_ref_1[:, 0]
T_air_ref_10 = T_air_ref_10[:, 0]
T_air_ref_60 = T_air_ref_60[:, 0]
if plot_res:
plot_result(T_air_1, T_air_ref_1, "Results day 1", "temperature")
plot_result(T_air_10, T_air_ref_10, "Results day 10", "temperature")
plot_result(T_air_60, T_air_ref_60, "Results day 60", "temperature")
max_dev_1 = np.max(np.abs(T_air_1 - T_air_ref_1))
max_dev_10 = np.max(np.abs(T_air_10 - T_air_ref_10))
max_dev_60 = np.max(np.abs(T_air_60 - T_air_ref_60))
print("Max. deviation day 1: " + str(max_dev_1))
print("Max. deviation day 10: " + str(max_dev_10))
print("Max. deviation day 60: " + str(max_dev_60))
return (max_dev_1, max_dev_10, max_dev_60)