Skip to content

consumedSystemFlux gets set to zero incorrectly if the heat consumed by a ModuleSystemHeat exactly matches the remaining total flux #138

@Phantomical

Description

@Phantomical

I'm not sure anyone has noticed this in practice, since it requires some specific conditions to actually hit. I've been trying to build some new modules on top of SystemHeat and happened to run into it.

Here's the setup you need to verify this:

  • Create a producer A that produces X flux (e.g. 20 MW)
  • Create a consumer B that consumes exactly X flux
  • Put these both on the same loop
  • The ModuleSystemHeat for B will have consumedSystemFlux set to 0 when it should instead be set to -X

The problem seems to be that in this branch in HeatLoop.AllocateFlux which seems like it should really be setting consumedSystemFlux to -totalFlux instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions