Skip to content

Commit e859a36

Browse files
ven-kChrisRackauckas
authored andcommitted
docs: bump MTK to 8 (from 8.33) and fix custom_component example
1 parent ea8bc5c commit e859a36

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ IfElse = "0.1"
1616
ModelingToolkit = "8"
1717
ModelingToolkitStandardLibrary = "1.8"
1818
OrdinaryDiffEq = "6.31"
19-
Plots = "1.36"
19+
Plots = "1.36"

docs/src/tutorials/custom_component.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ model NonlinearResistor "Chua's resistor"
2727
parameter SI.Conductance Ga "conductance in inner voltage range";
2828
parameter SI.Conductance Gb "conductance in outer voltage range";
2929
parameter SI.Voltage Ve "inner voltage range limit";
30-
equation
30+
equation
3131
i = if (v < -Ve) then Gb*(v + Ve) - Ga*Ve else if (v > Ve) then Gb*(v - Ve) + Ga*Ve else Ga*v;
3232
end NonlinearResistor;
3333
```
@@ -94,7 +94,7 @@ The final model can now be created with the components from the library and the
9494
@named L = Inductor(L = 18)
9595
@named Ro = Resistor(R = 12.5e-3)
9696
@named G = Conductor(G = 0.565)
97-
@named C1 = Capacitor(C = 10, v_start = 4)
97+
@named C1 = Capacitor(C = 10, v = 4)
9898
@named C2 = Capacitor(C = 100)
9999
@named Nr = NonlinearResistor(Ga = -0.757576,
100100
Gb = -0.409091,
@@ -119,7 +119,7 @@ nothing # hide
119119

120120
Now the model can be simulated.
121121
First, `structural_simplify` is called on the model and an `ODEProblem` is built from the result.
122-
Since the initial voltage of the first capacitor was already specified via `v_start`, no initial condition is given and an empty pair is supplied.
122+
Since the initial voltage of the first capacitor was already specified via `v`, no initial condition is given and an empty pair is supplied.
123123

124124
```@example components
125125
sys = structural_simplify(model)

0 commit comments

Comments
 (0)