Skip to content

Commit 3557f20

Browse files
committed
update out of date bit in previous conservation law tutorial
1 parent 32b0204 commit 3557f20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/model_creation/conservation_laws.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# [Working with Conservation Laws](@id conservation_laws)
2-
Catalyst can detect, and eliminate for differential-equation based models, *conserved quantities*, i.e. linear combinations of species which are conserved via the chemistry. This functionality is both automatically utilised by Catalyst (e.g. to [remove singular Jacobians during steady state computations](@ref homotopy_continuation_conservation_laws)), but is also available for users to utilise directly (e.g. to potentially [improve simulation performance](@ref ode_simulation_performance_conservation_laws)).
2+
Catalyst can detect, and eliminate for differential-equation based models, *conserved quantities*, i.e. linear combinations of species which are conserved via their chemistry. This functionality is both automatically utilised by Catalyst (e.g. to [remove singular Jacobians during steady state computations](@ref homotopy_continuation_conservation_laws)), but is also available for users to utilise directly (e.g. to potentially [improve simulation performance](@ref ode_simulation_performance_conservation_laws)).
33

44
To illustrate conserved quantities, let us consider the following [two-state](@ref basic_CRN_library_two_states) model:
55
```@example conservation_laws
@@ -39,7 +39,7 @@ Using the `unknowns` function we can confirm that the ODE only has a single unkn
3939
```@example conservation_laws
4040
unknowns(osys)
4141
```
42-
Next, using `parameters` we note that an additional parameter, `Γ[1]` has been added to the system:
42+
Next, using `parameters` we note that an additional parameter, `Γ` has been added to the system:
4343
```@example conservation_laws
4444
parameters(osys)
4545
```
@@ -53,7 +53,7 @@ ps = [:k₁ => 10.0, :k₂ => 2.0]
5353
oprob = ODEProblem(rs, u0, (0.0, 1.0), ps; remove_conserved = true)
5454
nothing # hide
5555
```
56-
Here, while `Γ[1]` becomes a parameter of the new system, it has a [default value](@ref dsl_advanced_options_default_vals) equal to the corresponding conservation law. Hence, its value is computed from the initial condition `[:X₁ => 80.0, :X₂ => 20.0]`, and does not need to be provided in the parameter vector. Next, we can simulate and plot our model using normal syntax:
56+
Here, while `Γ` becomes a parameter of the new system, it has a [default value](@ref dsl_advanced_options_default_vals) equal to the corresponding conservation law. Hence, its value is computed from the initial condition `[:X₁ => 80.0, :X₂ => 20.0]`, and does not need to be provided in the parameter vector. Next, we can simulate and plot our model using normal syntax:
5757
```@example conservation_laws
5858
sol = solve(oprob)
5959
plot(sol)
@@ -66,7 +66,7 @@ While `X₂` is an observable (and not unknown) of the ODE, we can [access it](@
6666
sol[:X₂]
6767
```
6868
!!! note
69-
Generally, `remove_conserved = true` should not change any model workflows. I.e. anything that works without this option should also work when an `ODEProblem` is created using `remove_conserved = true`.
69+
Generally, `remove_conserved = true` should not change any modelling workflows. I.e. anything that works without this option should also work when an `ODEProblem` is created using `remove_conserved = true`.
7070

7171
!!! note
7272
The `remove_conserved = true` option is available when creating `SDEProblem`s, `NonlinearProblem`s, and `SteadyStateProblem`s (and their corresponding systems). However, it cannot be used when creating `JumpProblem`s.

0 commit comments

Comments
 (0)