Skip to content

Modeling error in StorageModel Class #265

@lucysbrokenwings

Description

@lucysbrokenwings

== charge_state.isel(time=slice(None, -1)) * (1 - rel_loss * hours_per_step)

In the storage model the influence of the length of timesteps is incorrectly modeled.
The way it is currently implemented is a linear scaling of the loss per timestep with the hours per timestep. However it should scale exponentially.
Currently long timesteps and high losses per hour could even lead to negative charge states. However because they are forbidden by the boundaries of the corresponding variables, the solver would refrain from using the storage at all. This leads to unintended and unexpected behaviour for timesteps of a length other than one hour.

I therefore propose the following change:
== charge_state.isel(time=slice(None, -1)) * ((1 - rel_loss) ** hours_per_step)

That way the loss per hour would scale exponentially with the hours per timestep which is the mathematically correct implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions