Skip to content

[FEATURE] PiecewiseEffects for Flows #300

@JonaGL

Description

@JonaGL

Prerequisite Checks

  • I have searched the existing issues and confirmed this feature doesn't already exist.

  • I have checked the documentation to ensure this feature isn't already available.

Is your feature request related to a problem?

At the moment I'm not able to model the piecewise (in reality non-linear) relationships between flows and effects.

Describe the solution you'd like

I would like to use PiecewiseEffects in Flow:
flixopt.Flow( ... , effects_per_flow_hour=flixopt.PiecewiseEffects( ... ))

Energy System Use Case

I try to implement pressure losses for transmission objects on a very simplified basis. The pressure loss of a pipe is non-linear in respect to the flow in the pipe. To represent the pressure loss more precisely, I would like to use PiecewiseEffects.

Desired Code Example (optional)

# example with pressure losses, which my_effect takes into account
my_piecewise_effect = fx.PiecewiseEffects(
        piecewise_origin=fx.Piecewise(flow_list),
        piecewise_shares={my_effect.label: fx.Piecewise(pressure_loss_list)},
    )

flixopt.Flow( ... , effects_per_flow_hour=my_piecewise_effect)

Component Category (if applicable)

Network/Grid (transmission, distribution)

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions