@@ -37,22 +37,20 @@ D = Differential(t)
37
37
@test all (sol[inertia1. w] .== 0 )
38
38
@test sol[inertia2. w][end ]≈ 0 atol= 1e-3 # all energy has dissipated
39
39
40
-
41
40
@named springdamper = SpringDamper (; c = 1e4 , d = 10 )
42
41
connections = [connect (fixed. flange, inertia1. flange_b)
43
- connect (inertia1. flange_b, springdamper. flange_a)
44
- connect (springdamper. flange_b, inertia2. flange_a)]
42
+ connect (inertia1. flange_b, springdamper. flange_a)
43
+ connect (springdamper. flange_b, inertia2. flange_a)]
45
44
46
45
@named model = ODESystem (connections, t,
47
- systems = [fixed, inertia1, inertia2, springdamper])
46
+ systems = [fixed, inertia1, inertia2, springdamper])
48
47
sys = structural_simplify (model)
49
48
50
49
prob = ODEProblem (sys, Pair[], (0 , 10.0 ))
51
50
sol2 = solve (prob, Rodas4 ())
52
51
@test SciMLBase. successful_retcode (sol)
53
52
54
- @test sol2 (0 : 1 : 10 , idxs= inertia2. w). u ≈ sol1 (0 : 1 : 10 , idxs= inertia2. w). u atol= 1e-3
55
-
53
+ @test sol2 (0 : 1 : 10 , idxs = inertia2. w). u≈ sol1 (0 : 1 : 10 , idxs = inertia2. w). u atol= 1e-3
56
54
57
55
# Plots.plot(sol; vars=[inertia1.w, inertia2.w])
58
56
end
0 commit comments