@@ -32,7 +32,7 @@ D = Differential(t)
32
32
# Check if Relative temperature sensor reads the temperature of heat capacitor
33
33
# when connected to a thermal conductor and a fixed temperature source
34
34
@test sol. retcode == Success
35
- @test sol[reltem_sensor. T] + sol[tem_src. port. T] == sol[mass1. T] + sol[th_conductor. dT]
35
+ @test sol[reltem_sensor. T] + sol[tem_src. port. T] ≈ sol[mass1. T] + sol[th_conductor. dT]
36
36
37
37
@info " Building a two-body system..."
38
38
eqs = [connect (T_sensor1. port, mass1. port, th_conductor. port_a)
88
88
sol = solve (prob, Tsit5 ())
89
89
90
90
@test sol. retcode == Success
91
- @test sol[th_conductor. dT] .* G == sol[th_conductor. Q_flow]
91
+ @test sol[th_conductor. dT] .* G ≈ sol[th_conductor. Q_flow]
92
92
@test sol[th_conductor. Q_flow] ≈ sol[hf_sensor1. Q_flow] + sol[flow_src. port. Q_flow]
93
93
94
- @test sol[mass1. T] == sol[th_resistor. port_a. T]
94
+ @test sol[mass1. T] ≈ sol[th_resistor. port_a. T]
95
95
@test sol[th_resistor. dT] ./ R ≈ sol[th_resistor. Q_flow]
96
96
end
97
97
242
242
@test sol. retcode == Success
243
243
@test sol[T_winding. T] == sol[winding. T]
244
244
@test sol[T_core. T] == sol[core. T]
245
- @test sol[- core. port. Q_flow] ==
245
+ @test sol[- core. port. Q_flow] ≈
246
246
sol[coreLosses. port. Q_flow + convection. solid. Q_flow + winding2core. port_b. Q_flow]
247
247
@test sol[T_winding. T][end ] >= 500 # not good but better than nothing
248
248
@test sol[T_core. T] <= sol[T_winding. T]
0 commit comments