Adding tests for mechanical ventilation in test_model_generator
This commit is contained in:
parent
5a64291f2b
commit
860d68583d
1 changed files with 31 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ def test_model_from_dict(baseline_form_data):
|
|||
# assert model.ventilation == cara.models.Ventilation()
|
||||
|
||||
|
||||
def test_ventilation(baseline_form):
|
||||
def test_ventilation_window(baseline_form):
|
||||
room = models.Room(75)
|
||||
window = models.WindowOpening(
|
||||
active=models.PeriodicInterval(period=120, duration=10),
|
||||
|
|
@ -40,6 +40,36 @@ def test_ventilation(baseline_form):
|
|||
[baseline_form.ventilation().air_exchange(room, t) for t in ts])
|
||||
|
||||
|
||||
def test_ventilation_mechanical(baseline_form):
|
||||
room = models.Room(75)
|
||||
mech = models.HVACMechanical(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
q_air_mech=500.,
|
||||
)
|
||||
baseline_form.ventilation_type = 'mechanical'
|
||||
baseline_form.mechanical_ventilation_type = 'mechanical'
|
||||
baseline_form.air_supply = 500.
|
||||
|
||||
ts = np.linspace(8, 16, 100)
|
||||
np.testing.assert_allclose([mech.air_exchange(room, t) for t in ts],
|
||||
[baseline_form.ventilation().air_exchange(room, t) for t in ts])
|
||||
|
||||
|
||||
def test_ventilation_airchanges(baseline_form):
|
||||
room = models.Room(75)
|
||||
airchange = models.AirChange(
|
||||
active=models.PeriodicInterval(period=120, duration=120),
|
||||
air_exch=3.,
|
||||
)
|
||||
baseline_form.ventilation_type = 'mechanical'
|
||||
baseline_form.mechanical_ventilation_type = 'air_changes'
|
||||
baseline_form.air_changes = 3.
|
||||
|
||||
ts = np.linspace(8, 16, 100)
|
||||
np.testing.assert_allclose([airchange.air_exchange(room, t) for t in ts],
|
||||
[baseline_form.ventilation().air_exchange(room, t) for t in ts])
|
||||
|
||||
|
||||
def test_present_intervals(baseline_form):
|
||||
baseline_form.coffee_duration = 15
|
||||
baseline_form.coffee_option = True
|
||||
|
|
|
|||
Loading…
Reference in a new issue