Adding two ventilation tests (sliding/hinged windows)
This commit is contained in:
parent
e8c80ec04f
commit
595289c957
1 changed files with 26 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import dataclasses
|
||||
|
||||
import pytest
|
||||
import numpy.testing as npt
|
||||
|
||||
from cara import models
|
||||
|
||||
|
|
@ -23,3 +24,28 @@ def test_number_of_windows(baseline_window):
|
|||
two_window_exchange = two_windows.air_exchange(room, 1)
|
||||
assert one_window_exchange != 0
|
||||
assert one_window_exchange * 2 == two_window_exchange
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"window_width, expected_cd_b",
|
||||
[
|
||||
[0.5, 0.01369640075],
|
||||
[1., 0.01056914747],
|
||||
[2., 0.00843150922],
|
||||
[4., 0.00779945967],
|
||||
],
|
||||
)
|
||||
def test_hinged_window(baseline_window,window_width,expected_cd_b):
|
||||
room = models.Room(75)
|
||||
hinged_window = dataclasses.replace(baseline_window, cd_b=None,
|
||||
window_type='hinged',window_width=window_width)
|
||||
|
||||
npt.assert_allclose(hinged_window._cd_b, expected_cd_b, rtol=1e-8)
|
||||
|
||||
|
||||
def test_sliding_window(baseline_window):
|
||||
room = models.Room(75)
|
||||
sliding_window = dataclasses.replace(baseline_window, cd_b=None,
|
||||
window_type='sliding')
|
||||
|
||||
assert sliding_window._cd_b == 0.6
|
||||
|
|
|
|||
Loading…
Reference in a new issue