Merge branch 'develop/outside_temp_always_lower' into 'master'
Inside temperature is always at least 0.1 K higher than outside temperature See merge request cara/cara!83
This commit is contained in:
commit
2f1b77e8f5
2 changed files with 13 additions and 5 deletions
|
|
@ -203,6 +203,9 @@ class WindowOpening(Ventilation):
|
|||
#: used to exchange air (0 <= cd_b <= 1)
|
||||
cd_b: float = 0.6
|
||||
|
||||
#: Minimum difference between inside and outside temperature
|
||||
min_deltaT: float = 0.1
|
||||
|
||||
def transition_times(self) -> typing.Set[float]:
|
||||
transitions = super().transition_times()
|
||||
transitions.update(self.inside_temp.transition_times)
|
||||
|
|
@ -214,12 +217,17 @@ class WindowOpening(Ventilation):
|
|||
if not self.active.triggered(time):
|
||||
return 0.
|
||||
|
||||
# Reminder, no dependence on time in the resulting calculation.
|
||||
inside_temp = self.inside_temp.value(time)
|
||||
outside_temp = self.outside_temp.value(time)
|
||||
|
||||
# Reminder, no dependence on time in the resulting calculation.
|
||||
temp_delta = abs(inside_temp - outside_temp) / outside_temp
|
||||
root = np.sqrt(9.81 * self.window_height * temp_delta)
|
||||
# The inside_temperature is forced to be always at least min_deltaT degree
|
||||
# warmer than the outside_temperature. Further research needed to
|
||||
# handle the buoyancy driven ventilation when the temperature gradient
|
||||
# is inverted.
|
||||
inside_temp = max(inside_temp, outside_temp + self.min_deltaT)
|
||||
temp_gradient = (inside_temp - outside_temp) / outside_temp
|
||||
root = np.sqrt(9.81 * self.window_height * temp_gradient)
|
||||
window_area = self.window_height * self.opening_length * self.number_of_windows
|
||||
return (3600 / (3 * room.volume)) * self.cd_b * window_area * root
|
||||
|
||||
|
|
|
|||
|
|
@ -471,7 +471,7 @@ def build_exposure_model(concentration_model):
|
|||
"month, expected_r0",
|
||||
[
|
||||
['Jan', 91.06953],
|
||||
['Jun', 99.46692],
|
||||
['Jun', 99.995335],
|
||||
],
|
||||
)
|
||||
def test_r0_hourly_dep(month,expected_r0):
|
||||
|
|
@ -489,7 +489,7 @@ def test_r0_hourly_dep(month,expected_r0):
|
|||
"month, expected_r0",
|
||||
[
|
||||
['Jan', 91.19912],
|
||||
['Jun', 99.59226],
|
||||
['Jun', 99.997324],
|
||||
],
|
||||
)
|
||||
def test_r0_hourly_dep_refined(month,expected_r0):
|
||||
|
|
|
|||
Loading…
Reference in a new issue