Alternator efficiency for HEVs (applies fc aux load only)#272
Closed
kylecarow wants to merge 3 commits into
Closed
Alternator efficiency for HEVs (applies fc aux load only)#272kylecarow wants to merge 3 commits into
kylecarow wants to merge 3 commits into
Conversation
kylecarow
marked this pull request as draft
July 15, 2026 16:11
Collaborator
Author
|
Should probably rebase these changes on #279 and implement this as a vehicle-wide aux load efficiency penalty |
This was referenced Jul 15, 2026
Collaborator
Author
|
#286 is a better approach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a small bug I found where HEVs/PHEVs did not account for alternator efficiency in aux power loads coming supplied by the fuel converter. Aux loads supplied by the RES are assumed to be all electric as is our assumption for BEVs so there is no alternator to account for there.
In fact, we did not even have an alternator efficiency in the HybridElectricVehicle at all, so this PR adds that and makes a default of 100% to maintain compatibility with existing vehicle files (that would otherwise have a missing field and fail to deserialize). There is also a test to make sure this works as expected. Maybe we can add a logging event letting the user know the default value of 100% was used? I anticipate getting rid of this serde default as soon as we switch to a break in the vehicle file format (next major version?)
A hiccup I predict with this change: if we want to model fuel cells in FASTSim 3 as HEVs (but have a different powertrain type, just like we do for PHEVs), then having an alternator efficiency in the HybridElectricVehicle doesn't exactly make sense, as they have no alternator. We can enforce this field to be 100% but I really don't like the idea of having fields that don't apply - that feels like a FASTSim-2-ism.
Option<si::Ratio>instead, and make None unwrap to 100%I also dont like how we model alternator as a ratio rather than an interpolator. Could we support alternators that have varying efficiency based on power load? FC temperature as a surrogate?