Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

propagated variables from hev to bev #187

Merged
merged 12 commits into from
Feb 3, 2025
10 changes: 9 additions & 1 deletion cal_and_val/thermal/cal_bev.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import fastsim as fsim
from fastsim import pymoo_api

# Unit conversion constants
mps_per_mph = 0.447
celsius_to_kelvin_offset = 273.15

Expand All @@ -34,6 +35,13 @@
cyc_folder_path = Path(__file__).parent / "dyno_test_data/2020 Chevrolet Bolt EV/Extended Datasets"
assert cyc_folder_path.exists(), cyc_folder_path

# Test data columns
time_column = "Time[s]_RawFacilities"
speed_column = "Dyno_Spd[mph]"
cabin_temp_column = "Cabin_Temp[C]"
eng_clnt_temp_column = "engine_coolant_temp_PCAN__C"
cell_temp_column = "Cell_Temp[C]"

# See 2020_Chevrolet_Bolt_TestSummary_201005.xlsm for cycle-level data
cyc_files: List[str] = [
# TODO: check for seat heater usage in cold cycles and account for that in model!
Expand Down Expand Up @@ -77,7 +85,7 @@ def df_to_cyc(df: pd.DataFrame) -> fsim.Cycle:
cyc_dict = {
"time_seconds": df["Time[s]_RawFacilities"].to_list(),
"speed_meters_per_second": (df["Dyno_Spd[mph]"] * mps_per_mph).to_list(),
"temp_amb_air_kelvin": (df["Cell_Temp[C]"] + celsius_to_kelvin_offset).to_list(),
"temp_amb_air_kelvin": (df[cell_temp_column] + celsius_to_kelvin_offset).to_list(),
# TODO: pipe solar load from `Cycle` into cabin thermal model
# TODO: use something (e.g. regex) to determine solar load
# see column J comments in 2021_Hyundai_Sonata_Hybrid_TestSummary_2022-03-01_D3.xlsx
Expand Down
Loading
Loading