Correcting a bug on angle computation (degrees required), for hinged windows
This commit is contained in:
parent
04980cc41b
commit
8f43b137d9
2 changed files with 6 additions and 6 deletions
|
|
@ -253,7 +253,7 @@ class HingedWindow(WindowOpening):
|
|||
0.04 if window_ratio < 2 else 0.038)
|
||||
cd_max = (0.612 if window_ratio < 0.5 else 0.589 if window_ratio < 1
|
||||
else 0.563 if window_ratio < 2 else 0.548)
|
||||
window_angle = np.arccos(1-self.opening_length**2/(2.*self.window_height**2))
|
||||
window_angle = np.arccos(1-self.opening_length**2/(2.*self.window_height**2))*180/np.pi
|
||||
return cd_max*(1-np.exp(-M*window_angle))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,10 +39,10 @@ def test_number_of_windows(baseline_slidingwindow):
|
|||
@pytest.mark.parametrize(
|
||||
"window_width, expected_discharge_coefficient",
|
||||
[
|
||||
[0.5, 0.01369640075],
|
||||
[1., 0.01056914747],
|
||||
[2., 0.00843150922],
|
||||
[4., 0.00779945967],
|
||||
[0.5, 0.447],
|
||||
[1., 0.379],
|
||||
[2., 0.328],
|
||||
[4., 0.308],
|
||||
],
|
||||
)
|
||||
def test_hinged_window(baseline_hingedwindow,window_width,
|
||||
|
|
@ -52,7 +52,7 @@ def test_hinged_window(baseline_hingedwindow,window_width,
|
|||
window_width=window_width)
|
||||
|
||||
npt.assert_allclose(hinged_window.discharge_coefficient,
|
||||
expected_discharge_coefficient, rtol=1e-8)
|
||||
expected_discharge_coefficient, rtol=1e-2)
|
||||
|
||||
|
||||
def test_sliding_window(baseline_slidingwindow):
|
||||
|
|
|
|||
Loading…
Reference in a new issue