Skip to content

Commit 0f6931a

Browse files
docs: remove usages of ModelingToolkitDesigner
1 parent eb976a8 commit 0f6931a

File tree

2 files changed

+1
-41
lines changed

2 files changed

+1
-41
lines changed

docs/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
66
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
88
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
9-
ModelingToolkitDesigner = "23d639d0-9462-4d1e-84fe-d700424865b8"
109
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
1110
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
1211
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
@@ -26,7 +25,6 @@ DifferentialEquations = "7.6"
2625
Distributions = "0.25"
2726
Documenter = "1"
2827
ModelingToolkit = "8.33, 9"
29-
ModelingToolkitDesigner = "1"
3028
NonlinearSolve = "0.3, 1, 2, 3"
3129
Optim = "1.7"
3230
Optimization = "3.9"

docs/src/tutorials/domain_connections.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ end
9494
nothing #hide
9595
```
9696

97-
When the system is defined we can generate a fluid component and connect it to the system. Here `fluid` is connected to the `src.port`, but it could also be connected to `vol.port`, any connection in the network is fine. Note: we can visualize the system using `ModelingToolkitDesigner.jl`, where a dashed line is used to show the `fluid` connection to represent a domain connection that is only transporting parameters and not unknown variables.
97+
When the system is defined we can generate a fluid component and connect it to the system. Here `fluid` is connected to the `src.port`, but it could also be connected to `vol.port`, any connection in the network is fine.
9898

9999
```@example domain
100100
@component function System(; name)
@@ -115,20 +115,6 @@ end
115115
nothing #hide
116116
```
117117

118-
```@setup domain
119-
# code to generate diagrams...
120-
# using ModelingToolkitDesigner
121-
# path = raw"C:\Work\Assets\ModelingToolkit.jl\domain_connections"
122-
# design = ODESystemDesign(odesys, path);
123-
124-
# using CairoMakie
125-
# CairoMakie.set_theme!(Theme(;fontsize=12))
126-
# fig = ModelingToolkitDesigner.view(design, false)
127-
# save(joinpath(path, "odesys.svg"), fig; resolution=(300,300))
128-
```
129-
130-
![odesys](https://github.com/SciML/ModelingToolkit.jl/assets/40798837/d19fbcf4-781c-4743-87b7-30bed348ff98)
131-
132118
To see how the domain works, we can examine the set parameter values for each of the ports `src.port` and `vol.port`. First we assemble the system using `structural_simplify()` and then check the default value of `vol.port.ρ`, whichs points to the setter value `fluid₊ρ`. Likewise, `src.port.ρ`, will also point to the setter value `fluid₊ρ`. Therefore, there is now only 1 defined density value `fluid₊ρ` which sets the density for the connected network.
133119

134120
```@repl domain
@@ -195,14 +181,6 @@ end
195181
nothing #hide
196182
```
197183

198-
```@setup domain
199-
# design = ODESystemDesign(actsys2, path);
200-
# fig = ModelingToolkitDesigner.view(design, false)
201-
# save(joinpath(path, "actsys2.svg"), fig; resolution=(500,300))
202-
```
203-
204-
![actsys2](https://github.com/SciML/ModelingToolkit.jl/assets/40798837/8ed50035-f6ac-48cb-a585-1ef415154a02)
205-
206184
After running `structural_simplify()` on `actsys2`, the defaults will show that `act.port_a.ρ` points to `fluid_a₊ρ` and `act.port_b.ρ` points to `fluid_b₊ρ`. This is a special case, in most cases a hydraulic system will have only 1 fluid, however this simple system has 2 separate domain networks. Therefore, we can connect a single fluid to both networks. This does not interfere with the mathematical equations of the system, since no unknown variables are connected.
207185

208186
```@example domain
@@ -227,14 +205,6 @@ end
227205
nothing #hide
228206
```
229207

230-
```@setup domain
231-
# design = ODESystemDesign(actsys1, path);
232-
# fig = ModelingToolkitDesigner.view(design, false)
233-
# save(joinpath(path, "actsys1.svg"), fig; resolution=(500,300))
234-
```
235-
236-
![actsys1](https://github.com/SciML/ModelingToolkit.jl/assets/40798837/054404eb-dbb7-4b85-95c0-c9503d0c4d00)
237-
238208
## Special Connection Cases (`domain_connect()`)
239209

240210
In some cases a component will be defined with 2 connectors of the same domain, but they are not connected. For example the `Restrictor` defined here gives equations to define the behavior of how the 2 connectors `port_a` and `port_b` are physically connected.
@@ -282,14 +252,6 @@ end
282252
nothing #hide
283253
```
284254

285-
```@setup domain
286-
# design = ODESystemDesign(ressys, path);
287-
# fig = ModelingToolkitDesigner.view(design, false)
288-
# save(joinpath(path, "ressys.svg"), fig; resolution=(500,300))
289-
```
290-
291-
![ressys](https://github.com/SciML/ModelingToolkit.jl/assets/40798837/3740f0e2-7324-4c1f-af8b-eba02cfece81)
292-
293255
When `structural_simplify()` is applied to this system it can be seen that the defaults are missing for `res.port_b` and `vol.port`.
294256

295257
```@repl domain

0 commit comments

Comments
 (0)