NatLabRockies / NatLabRockies/fastsim

Add field `output_power_domain`: `PowerDomain` to FuelConverter

Open
#306 0 comments 0 reactions 1 assignee View on GitHub

@kylecarow is already working on this.

Since Jul 21, 2026.

enhancement
Dominant language
Rust
Stars
60
Forks
19
Avg merge
10d 2h
Merged PRs (30d)
2

Description

We should introduce a field that designates the domain of the fuel converters output (electrical power or mechanical power)

pub enum PowerDomain {
    Mechanical,
    Electrical,
}

pub struct FuelConverter {
    ...
    #[serde(default = fc_output_power_domain_default)]
    pub output_power_domain: PowerDomain,
}

fn fc_output_power_domain_default() -> PowerDomain {
    PowerDomain::Mechanical
}

We can use output_power_domain during initialization to ensure the fuel converter is compatible with the vehicle architecture.

Examples:

  • Conventional vehicle:
    • requires Mechanical
      • fuel converter output feeds drivetrain directly
  • Parallel HEV:
    • requires Mechanical
      • fuel converter provides mechanical power alongside electric machine
  • Series HEV:
    • requires Mechanical
      • fuel converter output feeds generator
  • FCEV:
    • requires Electrical
      • fuel converter output feeds electrical bus directly

This prevents invalid combinations from silently producing incorrect simulations.

We can also use it for matches in the future, or for more intricate power flow modeling

Should be included in the rollout of FCEV #270

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.