diff --git a/cara/apps/calculator/README.md b/cara/apps/calculator/README.md
index 08fef2c9..8d9685af 100644
--- a/cara/apps/calculator/README.md
+++ b/cara/apps/calculator/README.md
@@ -52,21 +52,24 @@ Please bear in mind that any of the two inputs only consider the supply of fresh
Natural ventilation refers to rooms which have openable windows.
There are many possibilities to calculate natural ventilation air flows, for simplification this tool assumes a single-sided natural ventilation scheme which is a conservative approach for the purpose of this tool.
+Please choose the type of window (see illustration below):
+ * Sliding or side-hung
+ * Top- or bottom-hung
+ 
+
Please enter the number, height and width and opening distance of the windows (in m).
If there are multiple windows of different sizes, you should take an average.
The window opening distance (in m) is:
-
- * In the case of windows that slide, the length the window is moved open.
-
- * For articulated windows, it is the distance between the fixed frame and the movable glazed part when open. Window opening distance example (image of open window and measuring tape):
+* In the case of Sliding or Side-Hung option, the length the window is moved open
+* In case of Top- or Bottom-Hung, the distance between the fixed frame and the movable glazed part when open
+ Window opening distance example (image of open window and measuring tape):

**Notes**: If you are unsure about the opening distance for the window, it is recommended to choose a conservative value (5 cms, 0.05m or 10cms, 0.10m).
If you open the window at different distances throughout the day, choose an average value.
-The width of the window is not currently used as an input to the model (height and opening distance is sufficient to calculate the free area).
When using natural ventilation, the circulation of air is simulated as a function of the difference between the temperature inside the room and the outside air temperature. The average outdoor temperature for each hour of the day has been computed for every month of the year based on historical data for Geneva, Switzerland.
It is therefore very important to enter the correct time and date in the event data section.
Finally, you must specify when the windows are open - all the time (always), or for 10 minutes every 2 hours.
diff --git a/cara/apps/calculator/static/images/window_type.PNG b/cara/apps/calculator/static/images/window_type.PNG
new file mode 100644
index 00000000..8d7d7405
Binary files /dev/null and b/cara/apps/calculator/static/images/window_type.PNG differ
diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js
index 9764d71b..c674e2fa 100644
--- a/cara/apps/calculator/static/js/form.js
+++ b/cara/apps/calculator/static/js/form.js
@@ -90,14 +90,14 @@ function unrequire_fields(obj) {
function require_room_volume(option) {
require_input_field("#room_volume", option);
- disable_input_field("#room_volume", option);
+ disable_input_field("#room_volume", !option);
}
function require_room_dimensions(option) {
require_input_field("#floor_area", option);
require_input_field("#ceiling_height", option);
- disable_input_field("#floor_area", option);
- disable_input_field("#ceiling_height", option);
+ disable_input_field("#floor_area", !option);
+ disable_input_field("#ceiling_height", !option);
}
function require_mechanical_ventilation(option) {
@@ -117,31 +117,34 @@ function require_natural_ventilation(option) {
$("#window_hinged").prop('required', option);
$("#always").prop('required', option);
$("#interval").prop('required', option);
+
+ $("#window_sliding").prop('checked', option);
+ require_window_width(false);
}
function require_window_width(option) {
require_input_field("#window_width", option);
- disable_input_field("#window_width", option);
+ disable_input_field("#window_width", !option);
}
function require_air_changes(option) {
require_input_field("#air_changes", option);
- disable_input_field("#air_changes", option);
+ disable_input_field("#air_changes", !option);
}
function require_air_supply(option) {
require_input_field("#air_supply", option);
- disable_input_field("#air_supply", option);
+ disable_input_field("#air_supply", !option);
}
function require_single_event(option) {
require_input_field("#single_event_date", option);
- disable_input_field("#single_event_date", option);
+ disable_input_field("#single_event_date", !option);
}
function require_recurrent_event(option) {
$("#recurrent_event_month").prop('required', option);
- disable_input_field("#recurrent_event_month", option);
+ disable_input_field("#recurrent_event_month", !option);
}
function require_lunch(option) {
@@ -170,7 +173,7 @@ function require_mask(option) {
function require_hepa(option) {
require_input_field("#hepa_amount", option);
- disable_input_field("#hepa_amount", option);
+ disable_input_field("#hepa_amount", !option);
}
function require_input_field(id, option) {
@@ -182,9 +185,9 @@ function require_input_field(id, option) {
function disable_input_field(id, option) {
if (option)
- $(id).removeClass("disabled");
- else
$(id).addClass("disabled");
+ else
+ $(id).removeClass("disabled");
}
function setMaxInfectedPeople() {
@@ -270,6 +273,9 @@ function click_radio(id) {
case "air_changes":
$("#air_type_changes").click();
break;
+ case "window_width":
+ $("#window_hinged").click();
+ break;
case "hepa_amount":
$("#hepa_yes").click();
break;
diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2
index f5fc4555..c311e894 100644
--- a/cara/apps/calculator/templates/calculator.form.html.j2
+++ b/cara/apps/calculator/templates/calculator.form.html.j2
@@ -80,11 +80,11 @@
Number of windows:
Height of window:
Window type:
-
-
+
+
-
- Width of window:
+
+ Width of window:
Opening distance:
Windows open:
@@ -215,8 +215,8 @@
This tool simulates the long range airborne spread SARS-CoV-2 virus in a finite volume and estimates the risk of COVID-19 infection. It is based on current scientific data and can be used to compare the effectiveness of different mitigation measures.
Ventilation data:
{% if form.mechanical_ventilation_type == "air_supply"%} - Air supply flow rate: {{ form.air_supply }} + Air supply flow rate: {{ form.air_supply }} m³ / hour {% elif form.mechanical_ventilation_type == "air_changes"%} - Air changes per hour: {{ form.air_changes }} + Air changes per hour: {{ form.air_changes }} h⁻¹ {% endif %}
Number of windows: {{ form.windows_number }}
Height of window: {{ form.window_height }}
Window type: {{ form.window_type }}
Height of window: {{ form.window_height }} m
Window type: {% if form.window_type == "hinged" %} -
Width of window: {{ form.window_width }}
Width of window: {{ form.window_width }} m
Opening distance: {{ form.opening_distance }}
Opening distance: {{ form.opening_distance }} m
Windows open: {{ form.windows_open }}
When using the natural ventilation option, air flows are calculated using averaged hourly temperatures for the Geneva region, based on historical data for the month selected.
@@ -67,7 +70,7 @@HEPA Filtration: {{ 'Yes' if form.hepa_option else 'No' }}
HEPA amount: {{ form.hepa_amount }}
HEPA amount: {{ form.hepa_amount }} m³ / hour