diff --git a/rust/fastsim-core/src/simdrive.rs b/rust/fastsim-core/src/simdrive.rs index 0a68b047..c6be3a5f 100644 --- a/rust/fastsim-core/src/simdrive.rs +++ b/rust/fastsim-core/src/simdrive.rs @@ -372,41 +372,90 @@ pub struct RustSimDrive { #[api(has_orphaned)] pub props: RustPhysicalProperties, pub i: usize, // 1 # initialize step counter for possible use outside sim_drive_walk() + /// Current maximum fuel storage output power, + /// considering `veh.fs_max_kw` and transient limit, + /// as determined by achieved fuel storage power output and `veh.fs_secs_to_peak_pwr` pub cur_max_fs_kw_out: Array1, + /// Transient fuel converter output power limit, + /// as determined by achieved fuel converter power output, `veh.fc_max_kw`, and `veh.fs_secs_to_peak_pwr` pub fc_trans_lim_kw: Array1, + /// REDUNDANT: always equal to `veh.fc_max_kw` pub fc_fs_lim_kw: Array1, + /// REDUNDANT: always equal to `cur_max_fs_kw_out` pub fc_max_kw_in: Array1, + /// Current maximum fuel converter output power, + /// considering `veh.fc_max_kw` and transient limit `fc_trans_lim_kw` pub cur_max_fc_kw_out: Array1, + /// ESS discharging power limit, + /// considering remaining ESS energy and ESS efficiency pub ess_cap_lim_dischg_kw: Array1, + /// Current maximum ESS output power, + /// considering `ess_cap_lim_dischg_kw` and `veh.ess_max_kw` pub cur_ess_max_kw_out: Array1, + /// Current maximum electrical power that can go toward propulsion, + /// `cur_max_elec_kw` limited by the maximum theoretical motor input power `veh.mc_max_elec_in_kw` pub cur_max_avail_elec_kw: Array1, + /// ESS charging power limit, + /// considering unused energy capacity and ESS efficiency pub ess_cap_lim_chg_kw: Array1, + /// ESS charging power limit, + /// considering `ess_cap_lim_chg_kw` and `veh.ess_max_kw` pub cur_max_ess_chg_kw: Array1, + /// Current maximum electrical power that can go toward propulsion: + /// if FCEV, equal to `cur_max_fc_kw_out` + `cur_max_roadway_chg_kw` + `cur_ess_max_kw_out` - `aux_in_kw`, + /// otherwise equal to `cur_max_roadway_chg_kw` + `cur_ess_max_kw_out` - `aux_in_kw` pub cur_max_elec_kw: Array1, pub mc_elec_in_lim_kw: Array1, + /// Transient electric motor output power limit, + /// as determined by achieved motor mechanical power output, `veh.mc_max_kw`, and `veh.ms_secs_to_peak_pwr` pub mc_transi_lim_kw: Array1, pub cur_max_mc_kw_out: Array1, pub ess_lim_mc_regen_perc_kw: Array1, + /// ESS limit on electricity regeneration, + /// considering `veh.mc_max_kw`, or `cur_max_ess_chg_kw` and motor efficiency pub ess_lim_mc_regen_kw: Array1, + /// REDUNDANT: always equal to `ess_lim_mc_regen_kw` pub cur_max_mech_mc_kw_in: Array1, pub cur_max_trans_kw_out: Array1, + /// Required tractive power to meet cycle, + /// equal to `drag_kw` + `accel_kw` + `ascent_kw` pub cyc_trac_kw_req: Array1, pub cur_max_trac_kw: Array1, pub spare_trac_kw: Array1, pub cyc_whl_rad_per_sec: Array1, + /// Power to change wheel rotational speed, + /// calculated with `veh.wheel_inertia_kg_m2` and `veh.num_wheels` pub cyc_tire_inertia_kw: Array1, + /// Required power to wheels to meet cycle, + /// equal to `cyc_trac_kw_req` + `rr_kw` + `cyc_tire_inertia_kw` pub cyc_whl_kw_req: Array1, pub regen_contrl_lim_kw_perc: Array1, pub cyc_regen_brake_kw: Array1, + /// Power lost to friction braking, + /// only nonzero when `cyc_whl_kw_req` is negative and regenerative braking cannot provide enough braking, pub cyc_fric_brake_kw: Array1, + /// Required transmission output power to meet cycle, + /// equal to `cyc_whl_kw_req` + `cyc_fric_brake_kw` pub cyc_trans_kw_out_req: Array1, + /// `true` if `cyc_trans_kw_out_req` <= `cur_max_trans_kw_out` pub cyc_met: Array1, + /// Achieved transmission output power, + /// either `cyc_trans_kw_out_req` if cycle is met, + /// or `cur_max_trans_kw_out` if it is not pub trans_kw_out_ach: Array1, + /// Achieved transmission input power, accounting for `veh.trans_eff` pub trans_kw_in_ach: Array1, pub cur_soc_target: Array1, pub min_mc_kw_2help_fc: Array1, + /// Achieved electric motor mechanical output power to transmission pub mc_mech_kw_out_ach: Array1, + /// Achieved electric motor electrical input power, + /// accounting for electric motor efficiency pub mc_elec_kw_in_ach: Array1, + /// Auxiliary power load, + /// optionally overridden with an input array, + /// or if aux loads are forced to go through alternator (when `veh.no_elec_aux` is `true`) equal to `veh.aux_kw` / `veh.alt_eff` + /// otherwise equal to `veh.aux_kw` pub aux_in_kw: Array1, pub impose_coast: Array1, pub roadway_chg_kw_out_ach: Array1, @@ -418,6 +467,8 @@ pub struct RustSimDrive { pub fs_kw_out_ach: Array1, pub fs_kwh_out_ach: Array1, pub ess_cur_kwh: Array1, + /// Current ESS state of charge, + /// multiply by `veh.ess_max_kwh` to calculate remaining ESS energy pub soc: Array1, pub regen_buff_soc: Array1, pub ess_regen_buff_dischg_kw: Array1, @@ -427,10 +478,15 @@ pub struct RustSimDrive { pub max_ess_accell_buff_dischg_kw: Array1, pub ess_accel_regen_dischg_kw: Array1, pub mc_elec_in_kw_for_max_fc_eff: Array1, + /// Electrical power requirement for all-electric operation, + /// only applicable if vehicle has electrified powertrain, + /// equal to `aux_in_kw` + `trans_kw_in_ach` / motor efficiency pub elec_kw_req_4ae: Array1, pub can_pwr_all_elec: Array1, pub desired_ess_kw_out_for_ae: Array1, pub ess_ae_kw_out: Array1, + /// Charging power received from electric roadway (er), if enabled, + /// for all electric (ae) operation. pub er_ae_kw_out: Array1, pub ess_desired_kw_4fc_eff: Array1, pub ess_kw_if_fc_req: Array1, @@ -441,6 +497,9 @@ pub struct RustSimDrive { pub mc_kw_if_fc_req: Array1, pub fc_forced_on: Array1, pub fc_forced_state: Array1, + /// Power the motor (mc) must provide if the engine (fc) is being + /// forced on. If the engine just turned on and triggers a regen + /// event, it'll be negative. pub mc_mech_kw_4forced_fc: Array1, pub fc_time_on: Array1, pub prev_fc_time_on: Array1, @@ -454,10 +513,15 @@ pub struct RustSimDrive { pub add_kwh: Array1, pub dod_cycs: Array1, pub ess_perc_dead: Array1, + /// Power lost to aerodynamic drag according to the drag equation, `1/2 * rho * Cd * A * v_avg³ / 1000` pub drag_kw: Array1, pub ess_loss_kw: Array1, + /// Power to accelerate, `veh.veh_kg * (v_current² - v_prev²)/2 / dt / 1000` pub accel_kw: Array1, + /// Power expended to ascend a grade, `sin(atan(grade)) * props.a_grav_mps2 * veh.veh_kg * v_avg / 1000` pub ascent_kw: Array1, + /// Power lost to rolling resistance, `normal force * veh.wheel_rr_coef * v_avg / 1000`, + /// with normal force calculated as `cos(atan(grade)) * veh.veh_kg * props.a_grav_mps2` pub rr_kw: Array1, pub cur_max_roadway_chg_kw: Array1, pub trace_miss_iters: Array1,