Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ FiniteDiff = "2"
ForwardDiff = "0.10, 1"
IncompleteLU = "0.2"
JLD2 = "0.4, 0.5.1"
ModelingToolkit = "9"
ModelingToolkit = "10"
NonlinearSolve = "3.15, 4"
ODEProblemLibrary = "0.1"
Optimization = "3, 4"
Expand Down
3 changes: 1 addition & 2 deletions docs/src/basics/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ DAE solvers will not be able to accurately solve the equation without rewriting
ModelingToolkit is able to automatically detect this kind of condition and perform the equation
transformation automatically. As such, if you are having difficulties with a DAE system, it is
highly recommended to try `modelingtookitize` to transform the system to MTK's formulation and
running `structural_simplify` to see how it would change the equations, simply convert the model
to MTK.
running `mtkcompile` to see how it would change the equations, simply convert the model to MTK.

## [Performance](@id faq_performance)

Expand Down
7 changes: 3 additions & 4 deletions docs/src/examples/outer_solar_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The data is taken from the book “Geometric Numerical Integration” by E. Hair

```@example outersolarsystem
using Plots, OrdinaryDiffEq, ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
gr()

G = 2.95912208286e-4
Expand Down Expand Up @@ -47,9 +48,8 @@ Here, we want to solve for the motion of the five outer planets relative to the
```@example outersolarsystem
const ∑ = sum
const N = 6
@variables t u(t)[1:3, 1:N]
@variables u(t)[1:3, 1:N]
u = collect(u)
D = Differential(t)
potential = -G *
∑(
i -> ∑(j -> (M[i] * M[j]) / √(∑(k -> (u[k, i] - u[k, j])^2, 1:3)), 1:(i - 1)),
Expand All @@ -71,8 +71,7 @@ Thus, $\dot{q}$ is defined by the masses. We only need to define $\dot{p}$, and
```@example outersolarsystem
eqs = vec(@. D(D(u))) .~ .-ModelingToolkit.gradient(potential, vec(u)) ./
repeat(M, inner = 3)
@named sys = ODESystem(eqs, t)
ss = structural_simplify(sys)
@mtkcompile sys = System(eqs, t)
prob = ODEProblem(ss, [vec(u .=> pos); vec(D.(u) .=> vel)], tspan)
sol = solve(prob, Tsit5());
```
Expand Down
Loading