Skip to content

Commit 4169e62

Browse files
committed
Fix test
1 parent 1631055 commit 4169e62

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

GHEtool/test/unit-tests/test_fluiddata.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,20 @@ def test_commercial_fluids_data():
242242
assert np.isclose(fluid.conductivity(5), 0.473)
243243
assert np.isclose(fluid.density(10), 1046)
244244
assert np.isclose(fluid.specific_heat(10), 3780)
245-
assert np.isclose(fluid.viscosity(10), 3.28 * fluid.density(10) * 10e-6)
245+
assert np.isclose(fluid.viscosity(10), 3.28 * fluid.density(10) * 1e-6)
246246

247247
assert np.allclose(fluid.conductivity([10, 12]), [0.475, 0.4758])
248248
assert np.allclose(fluid.density([10, 12]), [1046, 1045.6])
249249
assert np.allclose(fluid.specific_heat([10, 12]), [3780, 3780.])
250-
assert np.allclose(fluid.viscosity([10, 12]), [0.0343088, 0.03216388])
250+
assert np.allclose(fluid.viscosity([10, 12]), [0.00343088, 0.003216388])
251251

252252
fluid = TemperatureDependentFluidData('Thermox DTX', 28, mass_percentage=False)
253253
assert np.isclose(fluid.freezing_point, -15)
254254
assert np.isclose(fluid.k_f(10), 0.475)
255255
assert np.isclose(fluid.k_f(5), 0.473)
256256
assert np.isclose(fluid.rho(10), 1046)
257257
assert np.isclose(fluid.cp(10), 3780)
258-
assert np.isclose(fluid.mu(10), 3.28 * fluid.rho(10) * 10e-6)
258+
assert np.isclose(fluid.mu(10), 3.28 * fluid.rho(10) * 1e-6)
259259

260260
assert (np.isclose(fluid.rho(100), fluid.rho(80)))
261261

@@ -265,21 +265,21 @@ def test_commercial_fluids_data():
265265
assert np.isclose(fluid.conductivity(5), 0.443)
266266
assert np.isclose(fluid.density(10), 1037)
267267
assert np.isclose(fluid.specific_heat(10), 3820)
268-
assert np.isclose(fluid.viscosity(10), 5.46 * fluid.density(10) * 10e-6)
268+
assert np.isclose(fluid.viscosity(10), 5.46 * fluid.density(10) * 1e-6)
269269

270270
fluid = TemperatureDependentFluidData('Coolflow NTP', 33, mass_percentage=False)
271271
assert np.isclose(fluid.freezing_point, -15)
272272
assert np.isclose(fluid.k_f(10), 0.444)
273273
assert np.isclose(fluid.k_f(5), 0.443)
274274
assert np.isclose(fluid.rho(10), 1037)
275275
assert np.isclose(fluid.cp(10), 3820)
276-
assert np.isclose(fluid.mu(10), 5.46 * fluid.rho(10) * 10e-6)
276+
assert np.isclose(fluid.mu(10), 5.46 * fluid.rho(10) * 1e-6)
277277

278278
# test bounds error
279279
assert np.isclose(fluid.k_f(-100), 0.435)
280-
assert np.isclose(fluid.mu(-100), 0.435)
281-
assert np.isclose(fluid.rho(-100), 0.435)
282-
assert np.isclose(fluid.cp(-100), 0.435)
280+
assert np.isclose(fluid.mu(-100), 0.02204968)
281+
assert np.isclose(fluid.rho(-100), 1046.0)
282+
assert np.isclose(fluid.cp(-100), 3770.0)
283283

284284
with pytest.raises(ValueError):
285285
fluid = ThermoxDTX(100)

0 commit comments

Comments
 (0)