Skip to content

Commit

Permalink
Update concentrations over time.
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion committed Oct 9, 2024
1 parent 4f12486 commit 93fd1fa
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions python/ribasim_testmodels/ribasim_testmodels/discrete_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,13 @@ def continuous_concentration_condition_model() -> Model:
substance=["Cl"],
concentration=[1.0], # start of slightly salty
),
basin.Concentration(
time=pd.date_range(
start="2020-01-01", end="2021-01-01", periods=10, unit="ms"
),
substance="Bar",
precipitation=0.1,
),
],
)

Expand All @@ -634,7 +641,7 @@ def continuous_concentration_condition_model() -> Model:
level_boundary.Static(level=[25.0]),
level_boundary.Concentration(
time=pd.date_range(
start="2020-01-01", end="2021-01-01", periods=2, unit="ms"
start="2020-01-01", end="2021-01-01", periods=10, unit="ms"
),
substance="Cl",
concentration=35.0,
Expand All @@ -644,7 +651,16 @@ def continuous_concentration_condition_model() -> Model:

flowb = model.flow_boundary.add(
Node(4, Point(1, 0)),
[flow_boundary.Static(flow_rate=[10])],
[
flow_boundary.Static(flow_rate=[10]),
flow_boundary.Concentration(
time=pd.date_range(
start="2020-01-01", end="2021-01-01", periods=11, unit="ms"
),
substance="Foo",
concentration=1.0,
),
],
)

discretec = model.discrete_control.add(
Expand Down

0 comments on commit 93fd1fa

Please sign in to comment.