We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 588966b + a9d2215 commit 95252f2Copy full SHA for 95252f2
test/Mechanical/rotational.jl
@@ -20,7 +20,7 @@ D = Differential(t)
20
21
@named model = ODESystem(connections, t, systems=[fixed, inertia1, inertia2, spring, damper])
22
sys = structural_simplify(model)
23
- prob = DAEProblem(sys, D.(states(sys)) .=> 0.0, [], (0, 10.0))
+ prob = DAEProblem(sys, D.(states(sys)) .=> 0, D.(states(model)) .=> 0.0, (0, 10.0))
24
sol = solve(prob, DFBDF())
25
26
# Plots.plot(sol; vars=[inertia1.w, inertia2.w])
@@ -53,8 +53,7 @@ end
53
54
@named model = ODESystem(connections, t, systems=[fixed, torque, inertia1, inertia2, spring, damper, sine])
55
56
- #prob = ODAEProblem(sys, Pair[], (0, 1.0))
57
- prob = DAEProblem(sys, D.(states(sys)) .=> 0.0, [D(D(inertia2.phi)) => 1.0], (0, 10.0))
+ prob = DAEProblem(sys, D.(states(sys)) .=> 0.0, [D(D(inertia2.phi)) => 1.0; D.(states(model)) .=> 0.0], (0, 10.0))
58
59
60
# Plots.plot(sol; vars=[inertia1.w, -inertia2.w*2])
0 commit comments