Skip to content

Commit 902042f

Browse files
committed
updated readme
1 parent 720e112 commit 902042f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

open_fdd/air_handling_unit/faults/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -2072,7 +2072,6 @@ def apply(self, df: pd.DataFrame) -> pd.DataFrame:
20722072
raise e
20732073

20742074

2075-
20762075
class FaultConditionSixteen(FaultCondition):
20772076
"""Class provides the definitions for Fault Condition 16.
20782077
ERV Ineffective Process based on outdoor air temperature ranges.
@@ -2181,10 +2180,10 @@ def calculate_erv_efficiency(self, df: pd.DataFrame) -> pd.DataFrame:
21812180
# Calculate the temperature differences
21822181
delta_temp_oa = df[self.erv_oat_leaving_col] - df[self.erv_oat_enter_col]
21832182
delta_temp_ea = df[self.erv_eat_enter_col] - df[self.erv_oat_enter_col]
2184-
2183+
21852184
# Use the absolute value to handle both heating and cooling applications
21862185
df["erv_efficiency_oa"] = np.abs(delta_temp_oa) / np.abs(delta_temp_ea)
2187-
2186+
21882187
return df
21892188

21902189
def apply(self, df: pd.DataFrame) -> pd.DataFrame:

open_fdd/air_handling_unit/reports/__init__.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ def create_plot(self, df: pd.DataFrame):
919919
print("summary statistics ")
920920
print(df["erv_efficiency_oa"].describe())
921921
print("=" * 50)
922-
922+
923923
sys.stdout.flush()
924924

925925
# Create the plot with four subplots
@@ -934,16 +934,19 @@ def create_plot(self, df: pd.DataFrame):
934934

935935
# Plot ERV Exhaust Air Side Temps
936936
ax2.plot(df.index, df[self.erv_eat_enter_col], label="Enter", color="red")
937-
ax2.plot(df.index, df[self.erv_eat_leaving_col], label="Leaving", color="purple")
937+
ax2.plot(
938+
df.index, df[self.erv_eat_leaving_col], label="Leaving", color="purple"
939+
)
938940
ax2.legend(loc="best")
939941
ax2.set_ylabel("ERV Exhaust Air Side Temps °F")
940942

941-
942943
# Plot ERV Efficiency
943-
ax3.plot(df.index, df["erv_efficiency_oa"], label="ERV Efficiency OA", color="b")
944+
ax3.plot(
945+
df.index, df["erv_efficiency_oa"], label="ERV Efficiency OA", color="b"
946+
)
944947
ax3.legend(loc="best")
945948
ax3.set_ylabel("ERV Efficiency OA")
946-
949+
947950
# Plot Fault Flags
948951
ax4.plot(df.index, df[self.fault_col], label="Fault", color="k")
949952
ax4.set_xlabel("Date")
@@ -970,14 +973,12 @@ def summarize_fault_times(self, df: pd.DataFrame) -> dict:
970973
"flag_true_erv_oat_leave_temp": round(
971974
df[self.erv_oat_leaving_col].where(df[self.fault_col] == 1).mean(), 2
972975
),
973-
974976
"flag_true_erv_eat_enter_temp": round(
975977
df[self.erv_eat_enter_col].where(df[self.fault_col] == 1).mean(), 2
976978
),
977979
"flag_true_erv_eat_leave_temp": round(
978980
df[self.erv_eat_leaving_col].where(df[self.fault_col] == 1).mean(), 2
979981
),
980-
981982
"hours_motor_runtime": round(
982983
(delta * df[self.supply_vfd_speed_col].gt(0.01).astype(int)).sum()
983984
/ pd.Timedelta(hours=1),

0 commit comments

Comments
 (0)