From ae4c09fda5c34a4bb1f6ae6b09118e484df87210 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 22 Nov 2021 09:10:31 +0100 Subject: [PATCH 01/41] Report title changed --- cara/apps/calculator/templates/base/calculator.report.html.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/calculator/templates/base/calculator.report.html.j2 index d6d1e893..fdccca1f 100644 --- a/cara/apps/calculator/templates/base/calculator.report.html.j2 +++ b/cara/apps/calculator/templates/base/calculator.report.html.j2 @@ -21,7 +21,7 @@
-

CARA - CALCULATOR REPORT

+

REPORT

Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}

From 38c4476bbff9b8af14092593005481598a008678 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 29 Nov 2021 11:41:29 +0100 Subject: [PATCH 02/41] Fix input placeholders --- .../calculator/templates/calculator.form.html.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index 75cbbe5b..a1ecd874 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -188,7 +188,7 @@
-
+
@@ -197,7 +197,7 @@
-
+
@@ -205,11 +205,11 @@
@@ -282,7 +282,7 @@
-
+
From 75ce9f29c53d87dfde5c953a6b47aa2958c31448 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 25 Nov 2021 17:27:16 +0100 Subject: [PATCH 03/41] Hide mask types when the option is "no mask" --- cara/apps/calculator/static/js/form.js | 14 ++++++++++++++ .../calculator/templates/calculator.form.html.j2 | 15 +++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index 71510e8c..12086af1 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -236,6 +236,14 @@ function on_ventilation_type_change() { }); } +function on_wearing_mask_change() { + wearing_mask = $('input[type=radio][name=mask_wearing_option]') + wearing_mask.each(function (index) { + if (this.checked) getChildElement($(this)).show(); + else getChildElement($(this)).hide(); + }) +} + /* -------UI------- */ function show_disclaimer() { @@ -558,6 +566,12 @@ $(document).ready(function () { // Call the function now to handle forward/back button presses in the browser. on_ventilation_type_change(); + // When the mask_wearing_option changes we want to make its respective + // children show/hide. + $("input[type=radio][name=mask_wearing_option]").change(on_wearing_mask_change); + // Call the function now to handle forward/back button presses in the browser. + on_wearing_mask_change(); + // Setup the maximum number of people at page load (to handle back/forward), // and update it when total people is changed. setMaxInfectedPeople(); diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index 75cbbe5b..92cd6b5e 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -260,15 +260,18 @@
Are masks worn when occupants are at workstations?
- +
- Type of masks used: - - - -
+ +
From b32e81b052bd42ca5093fb00c945e2ff2b19f59b Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 29 Nov 2021 14:06:03 +0100 Subject: [PATCH 04/41] Moved required fields logic to js --- cara/apps/calculator/static/js/form.js | 10 ++++++++-- cara/apps/calculator/templates/calculator.form.html.j2 | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index 12086af1..5a20f025 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -239,8 +239,14 @@ function on_ventilation_type_change() { function on_wearing_mask_change() { wearing_mask = $('input[type=radio][name=mask_wearing_option]') wearing_mask.each(function (index) { - if (this.checked) getChildElement($(this)).show(); - else getChildElement($(this)).hide(); + if (this.checked) { + getChildElement($(this)).show(); + require_fields(this); + } + else { + getChildElement($(this)).hide(); + require_fields(this); + } }) } diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index 92cd6b5e..9b73d9fd 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -260,9 +260,9 @@
Are masks worn when occupants are at workstations?
- + - +
- +
@@ -308,7 +308,7 @@ - +
@@ -531,8 +531,8 @@
  • Library = all seated, no talking, just breathing,
  • Laboratory = light physical activity, talking 50% of the time,
  • Workshop = moderate physical activity, talking 50% of the time,
  • -
  • Training = trainer standing and talking, rest seated and talking quietly. - Trainer assumed infected (worst case scenario),
  • +
  • Conference/Training = speaker/trainer standing and talking, rest seated and talking quietly. + Speaker/Trainer assumed infected (worst case scenario),
  • Gym = heavy exercise, no talking, just breathing.
  • Activity breaks:
    diff --git a/cara/apps/calculator/templates/userguide.html.j2 b/cara/apps/calculator/templates/userguide.html.j2 index a7f99c9e..5a4cb102 100644 --- a/cara/apps/calculator/templates/userguide.html.j2 +++ b/cara/apps/calculator/templates/userguide.html.j2 @@ -157,9 +157,9 @@ Within the number of people occupying the space, you should specify how many are
  • Control Room (night shift) = All persons seated, all talking 10% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
  • Lab = Based on a typical lab or technical working area, all persons are doing light activity and talking 50% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
  • Workshop = Based on a mechanical assembly workshop or equipment installation scenario, all persons are doing moderate activity and talking 50% of the time. This activity is equally applicable to bicycling, or walking on a gradient, in the LHC tunnels. Everyone (exposed and infected occupants) is treated the same in this model.
  • -
  • Training = Based on a typical training course scenario. -One individual (the trainer) is standing and talking, with all other individuals seated and talking quietly (whispering). -In this case it is assumed that the infected person is the trainer, because this is the worst case in terms of viral shedding.
  • +
  • Conference/Training = Based on a typical conference/training course scenario. +One individual (the speaker/trainer) is standing and talking, with all other individuals seated and talking quietly (whispering). +In this case it is assumed that the infected person is the speaker/trainer, because this is the worst case in terms of viral shedding.
  • Gym = All persons are doing heavy exercise and breathing (not talking). Everyone (exposed and infected occupants) is treated the same in this model.

  • Timings

    @@ -210,7 +210,7 @@ If not, then you can input separate breaks. This is particularly different when

    The model allows for a simulation with either a continuous wearing of face masks throughout the duration of the event, or have the removed at all times - i.e. all occupants (infected and exposed alike) wear or not masks for the duration of the simulation. Please bear in mind the user inputs shall be aligned with the current applicable public health & safety instructions. Please check what are the applicable rules, before deciding which assumptions are used for the simulation.

    -

    If you have selected the Training activity type, this equates to the trainer and all participants either wearing masks throughout the training (Yes), or removing them when seated/standing at their socially distanced positions within the training room (No). +

    If you have selected the Conference/Training activity type, this equates to the speakr/trainer and all participants either wearing masks throughout the conference/training (Yes), or removing them when seated/standing at their socially distanced positions within the conference/training room (No). Please confirm what are the applicable rules, before deciding which assumptions are used for the simulation

    For the time being only the Type 1 surgical and FFP2 masks can be selected.


    From 5c7fd32b1426bb5fa845d6fd0c07725cc4c27834 Mon Sep 17 00:00:00 2001 From: Nicola Tarocco Date: Thu, 2 Dec 2021 16:38:31 +0100 Subject: [PATCH 06/41] Change URL for OpenShift test-cara after migration to OKD4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e3ddd0b..332f6fe2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,7 +127,7 @@ deploy_to_test: rules: - if: '$CI_COMMIT_BRANCH == "live/test-cara" && $OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET' script: - - curl -X POST -k https://openshift-dev.cern.ch:443/apis/build.openshift.io/v1/namespaces/test-cara/buildconfigs/cara-router/webhooks/${OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET}/generic + - curl -X POST -k https://api.paas.okd.cern.ch/apis/build.openshift.io/v1/namespaces/test-cara/buildconfigs/cara-router/webhooks/${OPENSHIFT_TEST_BUILD_WEBHOOK_SECRET}/generic oci_calculator: From 3470cf1130c098e1b28a38ae4aa3860d4d06a8eb Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Fri, 12 Nov 2021 15:46:21 +0100 Subject: [PATCH 07/41] COVID Information link and CARA@CERN section only for CERN theme --- cara/apps/templates/base/index.html.j2 | 65 ++++++++++ cara/apps/templates/base/layout.html.j2 | 100 +++++++++++++++ cara/apps/templates/index.html.j2 | 71 +---------- cara/apps/templates/layout.html.j2 | 115 +----------------- cara/apps/themes/cern/templates/index.html.j2 | 11 ++ .../apps/themes/cern/templates/layout.html.j2 | 5 + 6 files changed, 185 insertions(+), 182 deletions(-) create mode 100644 cara/apps/templates/base/index.html.j2 create mode 100644 cara/apps/templates/base/layout.html.j2 create mode 100644 cara/apps/themes/cern/templates/index.html.j2 create mode 100644 cara/apps/themes/cern/templates/layout.html.j2 diff --git a/cara/apps/templates/base/index.html.j2 b/cara/apps/templates/base/index.html.j2 new file mode 100644 index 00000000..4497fd60 --- /dev/null +++ b/cara/apps/templates/base/index.html.j2 @@ -0,0 +1,65 @@ +{% extends "layout.html.j2" %} +{% set active_page="home/" %} + +{% block main %} + {#
    #} +
    +
    + + +
    +
    + +
    + +
    +
    +

    Introduction


    +
    +

    + CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. + It does this by simulating the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming homogenous mixing, and it estimates the risk of COVID-19 airborne transmission therein. + Please see the About page for more details on the methodology, assumptions and limitations of CARA. +

    +

    + The full CARA source code can be accessed freely under an Apache 2.0 open source license from our code repository. + It includes detailed instructions on how to run your own version of this tool. +

    +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +

    Apps:

    +
    + +
    + +
    +
    +
    + + {% block cara_at_cern %} + {% endblock cara_at_cern %} + +
    +

    Acknowledgements


    +

    + We wish to thank CERN’s HSE Unit, Beams Department, Experimental Physics Department, Information Technology Department, Industry, Procurement and Knowledge Transfer Department and International Relations Sector for their support to the study. + Thanks to Doris Forkel-Wirth, Benoit Delille, Walid Fadel, Olga Beltramello, Letizia Di Giulio, Evelyne Dho, Wayne Salter, Benoit Salvant and colleagues from the COVID working group for providing expert advice and extensively testing the model. + Finally, we wish to thank Fabienne Landua and the design service for preparing the illustrations and Alessandro Raimondo, Ana Padua and Manuela Cirilli from the Knowledge Transfer Group for their continuous support. + Our compliments towards the work and research performed by world leading scientists in this domain: Dr. Julian Tang, Prof. Manuel Gameiro, Dr. Linsey Marr, Prof. Jose Jimenez, Prof. Lidia Morawska, Prof. Yuguo Li et al. - their scientific contribution was indispensable for this project. + +

    +
    + +{% endblock main %} diff --git a/cara/apps/templates/base/layout.html.j2 b/cara/apps/templates/base/layout.html.j2 new file mode 100644 index 00000000..1fddbec9 --- /dev/null +++ b/cara/apps/templates/base/layout.html.j2 @@ -0,0 +1,100 @@ + + + + + + + + + + {% block title %} + CARA | COVID Airborne Risk Assessment + {% endblock title %} + + + + + + + + {% block extra_headers %} + {% endblock extra_headers %} + + + + + + +
    + {% block main %} + {% endblock main %} +
    + +
    +
    +
    + +
    + Logo +

    CERN strives to deploy its know-how and technologies to help solve + the challenges arising in the local and global fight against COVID-19. As a particle physics + research organisation, CERN is not in a position to advise on medical research, health or health + policy issues. Any initiative is conducted on a best effort and as-is basis, without liability or + warranty.

    +

    + CARA is Apache 2.0 licensed open-source + software developed at CERN. + You can find the source code at https://gitlab.cern.ch/cara/cara, + where we welcome contributions, feature requests and issue reports. +

    +
    + +
    +
    +
    + + + + + + + + + + + + + + {% block body_scripts %} + {% endblock body_scripts %} + + + diff --git a/cara/apps/templates/index.html.j2 b/cara/apps/templates/index.html.j2 index 30ed7f07..87cbd196 100644 --- a/cara/apps/templates/index.html.j2 +++ b/cara/apps/templates/index.html.j2 @@ -1,69 +1,2 @@ -{% extends "layout.html.j2" %} -{% set active_page="home/" %} - -{% block main %} - {#
    #} -
    -
    - - -
    -
    - -
    - -
    -
    -

    Introduction


    -
    -

    - CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. - It does this by simulating the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming homogenous mixing, and it estimates the risk of COVID-19 airborne transmission therein. - Please see the About page for more details on the methodology, assumptions and limitations of CARA. -

    -

    - The full CARA source code can be accessed freely under an Apache 2.0 open source license from our code repository. - It includes detailed instructions on how to run your own version of this tool. -

    -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Apps:

    -
    - -
    - -
    -
    -
    - -

    CARA @ CERN


    -
    -

    - CARA has been developed by CERN with the intention of allowing members of personnel with roles related to supervision, health & safety or space management to simulate the concerned workplaces on CERN sites. - A hosted CERN version of the CARA Covid Calculator is available on this site to members of the CERN personnel. -

    -
    -
    -

    Acknowledgements


    -

    - We wish to thank CERN’s HSE Unit, Beams Department, Experimental Physics Department, Information Technology Department, Industry, Procurement and Knowledge Transfer Department and International Relations Sector for their support to the study. - Thanks to Doris Forkel-Wirth, Benoit Delille, Walid Fadel, Olga Beltramello, Letizia Di Giulio, Evelyne Dho, Wayne Salter, Benoit Salvant and colleagues from the COVID working group for providing expert advice and extensively testing the model. - Finally, we wish to thank Fabienne Landua and the design service for preparing the illustrations and Alessandro Raimondo, Ana Padua and Manuela Cirilli from the Knowledge Transfer Group for their continuous support. - Our compliments towards the work and research performed by world leading scientists in this domain: Dr. Julian Tang, Prof. Manuel Gameiro, Dr. Linsey Marr, Prof. Jose Jimenez, Prof. Lidia Morawska, Prof. Yuguo Li et al. - their scientific contribution was indispensable for this project. - -

    -
    - -{% endblock main %} +{# The main index, this template is intended to be implemented by themes #} +{% extends "base/index.html.j2" %} \ No newline at end of file diff --git a/cara/apps/templates/layout.html.j2 b/cara/apps/templates/layout.html.j2 index 15020daa..1298f8eb 100644 --- a/cara/apps/templates/layout.html.j2 +++ b/cara/apps/templates/layout.html.j2 @@ -1,113 +1,2 @@ - - - - - - - - - - {% block title %} - CARA | COVID Airborne Risk Assessment - {% endblock title %} - - - - - - - - {% block extra_headers %} - {% endblock extra_headers %} - - - - - - -
    - {% block main %} - {% endblock main %} -
    - -
    -
    -
    - -
    - Logo -

    CERN strives to deploy its know-how and technologies to help solve - the challenges arising in the local and global fight against COVID-19. As a particle physics - research organisation, CERN is not in a position to advise on medical research, health or health - policy issues. Any initiative is conducted on a best effort and as-is basis, without liability or - warranty.

    -

    - CARA is Apache 2.0 licensed open-source - software developed at CERN. - You can find the source code at https://gitlab.cern.ch/cara/cara, - where we welcome contributions, feature requests and issue reports. -

    -
    - -
    -
    -
    - - - - - - - - - - - - - - {% block body_scripts %} - {% endblock body_scripts %} - - - +{# The main layout, this template is intended to be implemented by themes #} +{% extends "base/layout.html.j2" %} diff --git a/cara/apps/themes/cern/templates/index.html.j2 b/cara/apps/themes/cern/templates/index.html.j2 new file mode 100644 index 00000000..4ad3ef16 --- /dev/null +++ b/cara/apps/themes/cern/templates/index.html.j2 @@ -0,0 +1,11 @@ +{% extends "base/index.html.j2" %} + +{% block cara_at_cern %} +

    CARA @ CERN


    +
    +

    + CARA has been developed by CERN with the intention of allowing members of personnel with roles related to supervision, health & safety or space management to simulate the concerned workplaces on CERN sites. + A hosted CERN version of the CARA Covid Calculator is available on this site to members of the CERN personnel. +

    +
    +{% endblock cara_at_cern %} \ No newline at end of file diff --git a/cara/apps/themes/cern/templates/layout.html.j2 b/cara/apps/themes/cern/templates/layout.html.j2 new file mode 100644 index 00000000..3959e097 --- /dev/null +++ b/cara/apps/themes/cern/templates/layout.html.j2 @@ -0,0 +1,5 @@ +{% extends "base/layout.html.j2" %} + +{% block covid_information %} + +{% endblock covid_information %} \ No newline at end of file From 8caf7d69d24547e4f0309887d7f87e60f8f0c162 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 15 Nov 2021 14:24:51 +0100 Subject: [PATCH 08/41] calculator themes down into the apps directory --- .../themes/cern/templates/calculator.report.html.j2 | 0 cara/tests/apps/calculator/test_webapp.py | 1 - 2 files changed, 1 deletion(-) rename cara/apps/{calculator => }/themes/cern/templates/calculator.report.html.j2 (100%) diff --git a/cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 b/cara/apps/themes/cern/templates/calculator.report.html.j2 similarity index 100% rename from cara/apps/calculator/themes/cern/templates/calculator.report.html.j2 rename to cara/apps/themes/cern/templates/calculator.report.html.j2 diff --git a/cara/tests/apps/calculator/test_webapp.py b/cara/tests/apps/calculator/test_webapp.py index 09bc104c..fc41e8a5 100644 --- a/cara/tests/apps/calculator/test_webapp.py +++ b/cara/tests/apps/calculator/test_webapp.py @@ -79,7 +79,6 @@ class TestCernApp(tornado.testing.AsyncHTTPTestCase): def test_report(self): response = yield self.http_client.fetch(self.get_url('/calculator/baseline-model/result')) self.assertEqual(response.code, 200) - assert 'CERN HSE' in response.body.decode() assert 'expected number of new cases is' in response.body.decode() From 4ba16b91a65a8f258c13348c31a6d1ef44ee69ee Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Wed, 24 Nov 2021 14:37:50 +0100 Subject: [PATCH 09/41] GIA Info only for CERN Theme --- .../templates/base/calculator.form.html.j2 | 594 ++++++++++++++++++ .../templates/base/userguide.html.j2 | 261 ++++++++ .../calculator/templates/userguide.html.j2 | 261 +------- .../cern/templates/calculator.form.html.j2 | 7 + .../themes/cern/templates/userguide.html.j2 | 5 + 5 files changed, 869 insertions(+), 259 deletions(-) create mode 100644 cara/apps/calculator/templates/base/calculator.form.html.j2 create mode 100644 cara/apps/calculator/templates/base/userguide.html.j2 create mode 100644 cara/apps/themes/cern/templates/calculator.form.html.j2 create mode 100644 cara/apps/themes/cern/templates/userguide.html.j2 diff --git a/cara/apps/calculator/templates/base/calculator.form.html.j2 b/cara/apps/calculator/templates/base/calculator.form.html.j2 new file mode 100644 index 00000000..75f06c16 --- /dev/null +++ b/cara/apps/calculator/templates/base/calculator.form.html.j2 @@ -0,0 +1,594 @@ +{% extends "layout.html.j2" %} + +{% set DEBUG=False %} +{% set active_page="calculator/" %} + +{% block extra_headers %} + + + +{% endblock extra_headers %} + +{% block body_scripts %} + + + +{% endblock body_scripts %} + + +{% block main %} + +v{{ calculator_version }} + +
    +
    +
    +

    Calculator

    + +
    +
    +
    + +{% if DEBUG %} +
    +{% else %} + +{% endif %} +{{ xsrf_form_html }} + + + +
    +
    +
    +
    + + +
    + + +
    + +
    + + +
    + +
    + + Virus data: + +
    + ? +

    + +
    +
    +
    + +
    +
    + +
    + + Room data: + {% block room_data %} +
    + ? +
    + {% endblock room_data %} + +
    + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    Central heating system in use:
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    + + + + +
    + +
    + + + Ventilation data: +
    + ? +
    + +
    + +
    Ventilation type:
    + +
    +
    + + + + +
    +
    + +
    +
    +
    + + + + + + + + +
    HEPA filtration:
    +
    +
    + + + + +
    +
    + +
    +
    +
    + + Face masks: +
    + ? +
    + +
    + +
    Are masks worn when occupants are at workstations?
    + + + +
    + Type of masks used: + + + +
    +
    + +
    +
    + + + Event data: +
    + ? +

    + +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    + +
    +
    +
    + +
    +
    + + +
    +
    +
    Exposed person(s) presence:
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    + +
    +
    Infected person(s) presence:
    +
    +
    + + +
    +
    + + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    + + + Activity breaks: +
    + ? +
    +

    + + +
    + + + +

    +
    + +
    + Lunch break: + + + +
    +
    +
    + Start: +
    +
    + Finish:
    +
    +
    + + +
    +
    + Coffee Breaks: +
    +
    + + + + + +
    +
    +
    + +
    + + Duration (minutes): +
    +
    +
    +
    + +
    + Infected person(s) breaks: +
    + Lunch break: + + + +
    + +
    +
    + Start: +
    +
    + Finish:
    +
    +
    + + +
    +
    + Coffee Breaks: +
    +
    + + + + + +
    +
    +
    + +
    + + Duration (minutes): +
    +
    +
    +
    + +
    + Coffee breaks are spread evenly throughout the day.
    + + +

    +
    +
    + +
    + +
    + +
    + +

    + +
    + Quick Guide:
    + 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.
    + Virus data:
    + SARS-CoV-2 covers the original "wild type" strain of the virus and three variants of concern (VOC):
    +
      +
    • Alpha (also known as B.1.1.7, first identified in UK, Dec 2020),
    • +
    • Gamma (also known as P.1, first identified in Brazil/Japan, Jan 2021).
    • +
    • Delta (also known as B.1.617.2, first identified in India, Oct 2020).
    • +
    + Modify the default as necessary, according to local area prevalence e.g. for Geneva + or Ain (France).
    + Ventilation data:
    +
      +
    • Mechanical ventilation = the HVAC supply of fresh air. Check the flow rates with the concerned technical department.
    • +
    • Natural ventilation = the type of window opening. The opening distance is between the fixed frame and movable part when open (commonly used values are window height of 1.6m and window opening between 0.15m and 0.6m). In case of periodic opening, specify the duration (e.g. for 10 min) and frequency (e.g. every 60 min).
    • +
    • HEPA filtration = the air flow of the device. The following values are based on the different fan velocities of a specific commercial device proposed by the HSE Unit:
    • +
        +
      • Level 6 (max) = 430 m3/h (noisy),
      • +
      • Level 5 = 250 m3/h (ok w.r.t. noise, recommended),
      • +
      • Level 4 = 130 m3/h (silent),
      • +
      • Level 3 = 95 m3/h (silent).
      • +
      +
    + Activity types:
    + The type of activity applies to both the infected and exposed persons: +
      +
    • Office = all seated, talking 33% of the time,
    • +
    • Meeting = all seated, talking time shared between all persons,
    • +
    • Call Centre = all seated, continuous talking,
    • +
    • Control Room (day shift) = all seated, talking 50% of the time,
    • +
    • Control Room (night shift) = all seated, talking 10% of the time,
    • +
    • Library = all seated, no talking, just breathing,
    • +
    • Laboratory = light physical activity, talking 50% of the time,
    • +
    • Workshop = moderate physical activity, talking 50% of the time,
    • +
    • Training = trainer standing and talking, rest seated and talking quietly. + Trainer assumed infected (worst case scenario),
    • +
    • Gym = heavy exercise, no talking, just breathing.
    • +
    + Activity breaks:
    +
      +
    • If coffee breaks are included, they are spread out evenly throughout the day, + in addition to any lunch break (if applicable).
    • +
    + Refer to COVID Calculator App user guide + for more detailed explanations on how to use this tool.
    +
    + +
    + + +
    + +
    +
    +

    + CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. +

    +

    + CARA models the concentration profile of virions in enclosed spaces with clear and intuitive graphs. + The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. + The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. +

    +

    + The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 airborne transmission therein. + The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. + Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. +

    +

    + The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. + It can be used to compare the effectiveness of different airborne-related risk mitigation measures. +

    +

    + Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. + Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. + The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and + the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. +

    +

    + This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. + The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. + While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. + Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. +

    +

    + CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered + as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. +

    +
    + +
    + +{% endblock main %} diff --git a/cara/apps/calculator/templates/base/userguide.html.j2 b/cara/apps/calculator/templates/base/userguide.html.j2 new file mode 100644 index 00000000..4d32707a --- /dev/null +++ b/cara/apps/calculator/templates/base/userguide.html.j2 @@ -0,0 +1,261 @@ +{% extends "layout.html.j2" %} + +{% block main %} + +
    +

    Instructions for use


    +

    This is a guide to help you use the calculator app. + If you are using the expert version of the tool, you should look at the expert notes.

    +

    For more information on the Airborne Transmission of SARS-CoV-2, feel free to check out the HSE Seminar: https://cds.cern.ch/record/2743403

    +

    The methodology, mathematical equations and parameters of the model are described here in the CERN Report: CERN-OPEN-2021-004

    +
    + +
    + +
    + +
    +
    +

    + CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. +

    +

    + CARA models the concentration profile of potential virions in enclosed spaces with clear and intuitive graphs. + The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. + The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. +

    +

    + The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 airborne transmission therein. + The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. + Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. +

    +

    + The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. + It can be used to compare the effectiveness of different airborne-related risk mitigation measures. +

    +

    + Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. + Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. + The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and + the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. +

    +

    + This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. + The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. + While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. + Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. +

    +

    + CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered + as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. +

    +
    +
    + + +
    +

    How to use this tool


    +

    Simulation Name & Room number

    +
    +

    In order to be able to trace back the simulations in your workplace risk assessments, performed with the tool, you can give each one a unique name - for example "Office use on Tuesday mornings". +The simulation name has no bearing on the calculation.

    +

    A room number is included, if you do not wish to use a formal room number any reference will do - for example "57/2-004"

    +

    Virus Data


    +

    Please choose the correct virus strain or any reported Variant of Concern (VOC) from the list. +Changing this setting alters the properties of the virus which are used for the simulation. +This has a significant effect on the probability of infection. +The choices are:

    +
      +
    • SARS-CoV-2 (nominal strain), covering typical strains and variants which are not of concern from an epidemiologic point of view of the virus;
    • +
    • SARS-CoV-2 (Alpha VOC), first identified in the UK at the end of 2020 which is found to be approximately 1.5x more transmissible compared to the non-VOCs;
    • +
    • SARS-CoV-2 (Gamma VOC), first identified in Brazil in January 2021 which is found to be approximately 2.2x more transmissible compared to the non-VOCs.
    • +
    • SARS-CoV-2 (Delta VOC), first identified in India towards the end of 2020 which is found to be approximately 60% more transmissible compared to the ALPHA VOC.
    • +
    +

    The user can modify the selected variant from the default, according to the prevalence of the different variants in the local area. Access to this information can be found here:

    + +

    N.B. The transmission data for the Gamma variant has been taken from a study data gathered in Manaus, Brazil where the variant was first observed. +The local population in Manaus had very high levels of Covid-19 antibodies (>67%) in recent months. +This factor has been taken into account by the authors of the study, via statistical adjustments to the transmission value (i.e. it has been increased, to account for spread in a population with significant acquired Covid-19 immunity). +However, this value may be revised in the future as more studies of the Gamma VOC transmission in different geographical locations become available.

    +
    +

    Room Data

    +
    +

    Please enter either the room volume (in m³) or both the floor area (m²) and the room height (m). +{% block room_volume_guide %} +

    +{% endblock room_volume_guide %} +
    +

    Room heating system

    +
    +

    The use of central heating (e.g. radiators) reduces relative humidity of the indoor air, which can decrease the decay rate of viral infectivity. If your space is heated with such water radiators, select 'Yes'. If your space does not have such heating, or they are not in use in the period of the simulation (e.g. summer), select 'No'.

    +
    +

    Ventilation type

    +
    +

    There are three main options:

    +
    +

    Mechanical ventilation

    +
    +

    If the room has mechanical ventilation, suppling fresh air from outside (either a local or centralised system), you should select this option. +In order to make an accurate calculation you will need to know either the flow rate of fresh air supplied in the room or th total number of air changes per hour with fresh air.

    +

    Please bear in mind that any of the two inputs only consider the supply of fresh air. If a portion of air is recirculated, it shall not be accounted for in the inputs.

    +
    +

    Natural ventilation

    +
    +

    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 +Window type
    • +
    +

    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 Sliding or Side-Hung option, the length the window is moved open. +Window opening distance example (image of open window and measuring tape): +Window Opening Distance
    • +
    • In case of Top- or Bottom-Hung, the distance between the fixed frame and the movable glazed part when open.
    • +
    +

    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.

    +

    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 if the windows are open permanently (at all the times), or periodically (in intervals for a certain duration and frequency - both in minutes) - e.g. open the window for 10 minutes (duration) every 60 minutes (frequency).

    +
    +

    No ventilation

    +
    +

    This option assumes there is neither Mechanical nor Natural ventilation in the simulation.

    +
    +

    HEPA filtration

    +
    +

    A HEPA filter is a high efficiency particulate matter filter, which removes small airborne particles from the air. +They can be very useful for removing particles with viruses from the air in an enclosed space. +The calculator allows you to simulate the installation of a HEPA air filter within the room. +The recommended airflow rate for the HEPA filter should correspond to a total air exchange rate of 3 - 6 ACH (the higher the better, even beyond 6).

    +
    +

    Event Data

    +
    +

    Here we capture the information about the event being simulated. +First enter the number of occupants in the space, if you have a (small) variation in the number of people, please input the average or consider using the expert tool. +Within the number of people occupying the space, you should specify how many are infected.

    +

    As an example, for a shared office with 4 people, where one person is infected, we enter 4 occupants and 1 infected person.

    +
    +

    Activity type

    +
    +

    There are a few predefined activities in the tool at present.

    +
      +
    • Office = All persons seated, talking occasionally (1/3rd of the time, with normal breathing the other 2/3rds of the time). Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Meeting = All persons seated, having a conversation (approximately each occupant is 1/N % of the time talking, where N is the number of occupants). Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Library = All persons seated, breathing only (not talking), all the time.
    • +
    • Call Centre = All persons seated, all talking simultaneously, all the time. This is a conservative profile, i.e. will show an increased P(i) compared to office/meeting activity. Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Control Room (day shift) = All persons seated, all talking 50% of the time. This is a conservative profile, i.e. will show an increased P(i) compared to office/meeting activity. Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Control Room (night shift) = All persons seated, all talking 10% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Lab = Based on a typical lab or technical working area, all persons are doing light activity and talking 50% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Workshop = Based on a mechanical assembly workshop or equipment installation scenario, all persons are doing moderate activity and talking 50% of the time. This activity is equally applicable to bicycling, or walking on a gradient, in the LHC tunnels. Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    • Training = Based on a typical training course scenario. +One individual (the trainer) is standing and talking, with all other individuals seated and talking quietly (whispering). +In this case it is assumed that the infected person is the trainer, because this is the worst case in terms of viral shedding.
    • +
    • Gym = All persons are doing heavy exercise and breathing (not talking). Everyone (exposed and infected occupants) is treated the same in this model.
    • +
    +

    Timings

    +

    You should enter the time (hours:minutes) for the start and end of the simulation period (i.e. 8:30 to 17:30 for a typical office day). +It is important to enter the correct times for the simulation, in particular when using natural ventilation. +It is possible to specify a different time for the entry and exit of both the exposed and infected person, however for most cases (where we do not know apriori which of the occupants is infected), it is recommended to set these to the same values as the activity start and end.

    +

    When is the event?


    +

    This is included for completeness in all simulations, however it is of particular relevance to those using natural ventilation because of variations in outside air temperature.

    +

    Only the month is used by the model to retrieve the average outdoor air temperatures for the Geneva region.

    +
    +

    Breaks

    +
    +

    Lunch Break

    +
    +

    You have the option to specify a lunch break. +This will be useful if you plan to simulate a typical full working day. +During the lunch break it is assumed that all occupants will leave the simulated space (to go eat lunch somewhere else - restaurant or break room). +If you plan to eat lunch in the same area where you have been working, you should select 'No' even if a lunch break will be taken, since the risk of infection is related to the occupation of the simulated space. +See 'Split Breaks' if the occupants do not break at the same time.

    +

    It should also be noted that the infection probabilities presented in the report does not take into account any potential exposures during the break times.

    +
    +

    Coffee Breaks

    +
    +

    You have the option to choose 0(No breaks), 2 or 4 coffee breaks during the simulated period. +It is assumed that all occupants vacate the space during the break period. +If coffee breaks are taken in-situ, this option should be set to 'No breaks'.

    +

    When enabled, the breaks are spread equally throughout the day - for example if we simulate the period from 9:00 to 18:00, with a lunch break from 13:00 to 14:00 and considering 2 coffee breaks, the tool will schedule the first coffee break around 11:00 and the second around 16:00. +The exact timing of the breaks within the day is not particularly critical to an accurate simulation, so you do not need to be concerned about major differences if you take a coffee break at 10:00 instead of 11:00. +The variation of coffee breaks can be altered in 5 minute increments up to 30 minutes in length. +Note that this doesn't necessarily have to be a coffee break, it can represent any period where the simulated space is vacated. +See 'Split Breaks' if the occupants do not break at the same time.

    +

    It should also be noted that the infection probabilities presented in the report does not take into account any potential exposures during the break times.

    +
    +

    Split breaks

    +
    +

    You have the option to specify whether the exposed and infected person(s) break at the same time. +If not, then you can input separate breaks. This is particularly different when specifying coffee breaks as they are spread evenly throughout the activity times specified.

    +

    If we take an example where the exposed person(s) activity time is from 9:00 to 18:00 and the infected person(s) is from 10:00 to 17:00, with both having a lunch break from 13:00 to 14:00 and have 2 coffee breaks each, we can have two different results:

    +
      +
    1. Specify the default situtaion where both exposed and infected persons(s) have their breaks at the same time: in this case the coffee break times are calculated based on the activity time of the exposed - both will have their first coffee break around 11:00 and the second around 16:00.

      +
    2. +
    3. Specify separate breaks for the infected person(s): in this case the coffee breaks will be calculated based on the different activity times (i.e. exposed from 9:00 to 18:00 and infected from 10:00 to 17:00) - the exposed person(s) will have their first coffee break around 11:00 and the second around 16:00, whereas the infected will have their first coffee break around 11:30 and the second around 15:30.

      +
    4. +
    +
    +

    Face Masks

    +
    +

    The model allows for a simulation with either a continuous wearing of face masks throughout the duration of the event, or have the removed at all times - i.e. all occupants (infected and exposed alike) wear or not masks for the duration of the simulation. +Please bear in mind the user inputs shall be aligned with the current applicable public health & safety instructions. +Please check what are the applicable rules, before deciding which assumptions are used for the simulation.

    +

    If you have selected the Training activity type, this equates to the trainer and all participants either wearing masks throughout the training (Yes), or removing them when seated/standing at their socially distanced positions within the training room (No). +Please confirm what are the applicable rules, before deciding which assumptions are used for the simulation

    +

    For the time being only the Type 1 surgical and FFP2 masks can be selected.

    +
    +

    Generate Report

    +
    +

    When you have entered all the necessary information, please click on the Generate Report button to execute the model. With the implementation of Monte Carlo simulations, the browser might take a few secounds to react.

    +

    Report


    +

    The report will open in your web browser. +It contains a summary of all the input data, which will allow the simulation to be repeated if required in the future as we improve the model.

    +
    +

    Results

    +
    +

    This part of the report shows the P(I) or probability of one exposed person getting infected. +It is estimated based on the emission rate of virus into the simulated volume, and the amount which is inhaled by exposed individuals. +This probability is valid for the simulation duration - i.e. the start and end time. +If you are using the natural ventilation option, the simulation is only valid for the selected month, because the following or preceding month will have a different average temperature profile. +The expected number of new cases for the simulation is calculated based on the probability of infection, multiplied by the number of exposed occupants.

    +

    The graph shows the variation in the concentration of virions within the simulated volume. +It is determined by:

    +
      +
    • The presence of the infected person, who emits airborne viruses in the volume.
    • +
    • The emission rate is related to the type of activity of the infected person (sitting, light exercise), their level of vocalisation (breathing, talking or shouting).
    • +
    • The accumulation of virions in the volume, which is driven, among other factors, by ventilation (if applicable).
        +
      • In a mechanical ventilation scenario, the removal rate is constant, based on fresh airflow supply in and out of the simulated space.
      • +
      • Under natural ventilation conditions, the effectiveness of ventilation relies upon the hourly temperature difference between the inside and outside air temperature.
      • +
      • A HEPA filter removes virions from the air at a constant rate and is modelled in the same way as mechanical ventilation, however air passed through a HEPA filter is recycled (i.e. it is not fresh air).
      • +
      +
    • +
    +
    +

    QR code

    +
    +

    At the end of the report you can find a unique QR code / hyperlink for this report. This provides an automatic way to review the calculator form with the corresponding specified parameters. +This allows for:

    +
      +
    • sharing reports by either scanning or clicking on the QR code to obtain a shareable link.
    • +
    • easily regenerating reports with any new versions of the CARA model released in the future.
    • +
    +
    +

    Conclusion

    +
    +

    This tool provides informative comparisons for COVID-19 (long-range) airborne risk only - see Disclaimer +If you have any comments on your experience with the app, or feedback for potential improvements, please share them with the development team Send email.

    +
    + +{% endblock main %} diff --git a/cara/apps/calculator/templates/userguide.html.j2 b/cara/apps/calculator/templates/userguide.html.j2 index a7f99c9e..6b34bc4d 100644 --- a/cara/apps/calculator/templates/userguide.html.j2 +++ b/cara/apps/calculator/templates/userguide.html.j2 @@ -1,259 +1,2 @@ -{% extends "layout.html.j2" %} - -{% block main %} - -
    -

    Instructions for use


    -

    This is a guide to help you use the calculator app. - If you are using the expert version of the tool, you should look at the expert notes.

    -

    For more information on the Airborne Transmission of SARS-CoV-2, feel free to check out the HSE Seminar: https://cds.cern.ch/record/2743403

    -

    The methodology, mathematical equations and parameters of the model are described here in the CERN Report: CERN-OPEN-2021-004

    -
    - -
    - -
    - -
    -
    -

    - CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. -

    -

    - CARA models the concentration profile of potential virions in enclosed spaces with clear and intuitive graphs. - The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. - The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. -

    -

    - The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 airborne transmission therein. - The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. - Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. -

    -

    - The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. - It can be used to compare the effectiveness of different airborne-related risk mitigation measures. -

    -

    - Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. - Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. - The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and - the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. -

    -

    - This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. - The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. - While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. - Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. -

    -

    - CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered - as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. -

    -
    -
    - - -
    -

    How to use this tool


    -

    Simulation Name & Room number

    -
    -

    In order to be able to trace back the simulations in your workplace risk assessments, performed with the tool, you can give each one a unique name - for example "Office use on Tuesday mornings". -The simulation name has no bearing on the calculation.

    -

    A room number is included, if you do not wish to use a formal room number any reference will do - for example "57/2-004"

    -

    Virus Data


    -

    Please choose the correct virus strain or any reported Variant of Concern (VOC) from the list. -Changing this setting alters the properties of the virus which are used for the simulation. -This has a significant effect on the probability of infection. -The choices are:

    -
      -
    • SARS-CoV-2 (nominal strain), covering typical strains and variants which are not of concern from an epidemiologic point of view of the virus;
    • -
    • SARS-CoV-2 (Alpha VOC), first identified in the UK at the end of 2020 which is found to be approximately 1.5x more transmissible compared to the non-VOCs;
    • -
    • SARS-CoV-2 (Gamma VOC), first identified in Brazil in January 2021 which is found to be approximately 2.2x more transmissible compared to the non-VOCs.
    • -
    • SARS-CoV-2 (Delta VOC), first identified in India towards the end of 2020 which is found to be approximately 60% more transmissible compared to the ALPHA VOC.
    • -
    -

    The user can modify the selected variant from the default, according to the prevalence of the different variants in the local area. Access to this information can be found here:

    - -

    N.B. The transmission data for the Gamma variant has been taken from a study data gathered in Manaus, Brazil where the variant was first observed. -The local population in Manaus had very high levels of Covid-19 antibodies (>67%) in recent months. -This factor has been taken into account by the authors of the study, via statistical adjustments to the transmission value (i.e. it has been increased, to account for spread in a population with significant acquired Covid-19 immunity). -However, this value may be revised in the future as more studies of the Gamma VOC transmission in different geographical locations become available.

    -
    -

    Room Data

    -
    -

    Please enter either the room volume (in m³) or both the floor area (m²) and the room height (m). -This information is available via GIS Portal (https://gis.cern.ch/gisportal/).

    -
    -

    Room heating system

    -
    -

    The use of central heating (e.g. radiators) reduces relative humidity of the indoor air, which can decrease the decay rate of viral infectivity. If your space is heated with such water radiators, select 'Yes'. If your space does not have such heating, or they are not in use in the period of the simulation (e.g. summer), select 'No'.

    -
    -

    Ventilation type

    -
    -

    There are three main options:

    -
    -

    Mechanical ventilation

    -
    -

    If the room has mechanical ventilation, suppling fresh air from outside (either a local or centralised system), you should select this option. -In order to make an accurate calculation you will need to know either the flow rate of fresh air supplied in the room or th total number of air changes per hour with fresh air.

    -

    Please bear in mind that any of the two inputs only consider the supply of fresh air. If a portion of air is recirculated, it shall not be accounted for in the inputs.

    -
    -

    Natural ventilation

    -
    -

    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 -Window type
    • -
    -

    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 Sliding or Side-Hung option, the length the window is moved open. -Window opening distance example (image of open window and measuring tape): -Window Opening Distance
    • -
    • In case of Top- or Bottom-Hung, the distance between the fixed frame and the movable glazed part when open.
    • -
    -

    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.

    -

    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 if the windows are open permanently (at all the times), or periodically (in intervals for a certain duration and frequency - both in minutes) - e.g. open the window for 10 minutes (duration) every 60 minutes (frequency).

    -
    -

    No ventilation

    -
    -

    This option assumes there is neither Mechanical nor Natural ventilation in the simulation.

    -
    -

    HEPA filtration

    -
    -

    A HEPA filter is a high efficiency particulate matter filter, which removes small airborne particles from the air. -They can be very useful for removing particles with viruses from the air in an enclosed space. -The calculator allows you to simulate the installation of a HEPA air filter within the room. -The recommended airflow rate for the HEPA filter should correspond to a total air exchange rate of 3 - 6 ACH (the higher the better, even beyond 6).

    -
    -

    Event Data

    -
    -

    Here we capture the information about the event being simulated. -First enter the number of occupants in the space, if you have a (small) variation in the number of people, please input the average or consider using the expert tool. -Within the number of people occupying the space, you should specify how many are infected.

    -

    As an example, for a shared office with 4 people, where one person is infected, we enter 4 occupants and 1 infected person.

    -
    -

    Activity type

    -
    -

    There are a few predefined activities in the tool at present.

    -
      -
    • Office = All persons seated, talking occasionally (1/3rd of the time, with normal breathing the other 2/3rds of the time). Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Meeting = All persons seated, having a conversation (approximately each occupant is 1/N % of the time talking, where N is the number of occupants). Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Library = All persons seated, breathing only (not talking), all the time.
    • -
    • Call Centre = All persons seated, all talking simultaneously, all the time. This is a conservative profile, i.e. will show an increased P(i) compared to office/meeting activity. Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Control Room (day shift) = All persons seated, all talking 50% of the time. This is a conservative profile, i.e. will show an increased P(i) compared to office/meeting activity. Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Control Room (night shift) = All persons seated, all talking 10% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Lab = Based on a typical lab or technical working area, all persons are doing light activity and talking 50% of the time. Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Workshop = Based on a mechanical assembly workshop or equipment installation scenario, all persons are doing moderate activity and talking 50% of the time. This activity is equally applicable to bicycling, or walking on a gradient, in the LHC tunnels. Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    • Training = Based on a typical training course scenario. -One individual (the trainer) is standing and talking, with all other individuals seated and talking quietly (whispering). -In this case it is assumed that the infected person is the trainer, because this is the worst case in terms of viral shedding.
    • -
    • Gym = All persons are doing heavy exercise and breathing (not talking). Everyone (exposed and infected occupants) is treated the same in this model.
    • -
    -

    Timings

    -

    You should enter the time (hours:minutes) for the start and end of the simulation period (i.e. 8:30 to 17:30 for a typical office day). -It is important to enter the correct times for the simulation, in particular when using natural ventilation. -It is possible to specify a different time for the entry and exit of both the exposed and infected person, however for most cases (where we do not know apriori which of the occupants is infected), it is recommended to set these to the same values as the activity start and end.

    -

    When is the event?


    -

    This is included for completeness in all simulations, however it is of particular relevance to those using natural ventilation because of variations in outside air temperature.

    -

    Only the month is used by the model to retrieve the average outdoor air temperatures for the Geneva region.

    -
    -

    Breaks

    -
    -

    Lunch Break

    -
    -

    You have the option to specify a lunch break. -This will be useful if you plan to simulate a typical full working day. -During the lunch break it is assumed that all occupants will leave the simulated space (to go eat lunch somewhere else - restaurant or break room). -If you plan to eat lunch in the same area where you have been working, you should select 'No' even if a lunch break will be taken, since the risk of infection is related to the occupation of the simulated space. -See 'Split Breaks' if the occupants do not break at the same time.

    -

    It should also be noted that the infection probabilities presented in the report does not take into account any potential exposures during the break times.

    -
    -

    Coffee Breaks

    -
    -

    You have the option to choose 0(No breaks), 2 or 4 coffee breaks during the simulated period. -It is assumed that all occupants vacate the space during the break period. -If coffee breaks are taken in-situ, this option should be set to 'No breaks'.

    -

    When enabled, the breaks are spread equally throughout the day - for example if we simulate the period from 9:00 to 18:00, with a lunch break from 13:00 to 14:00 and considering 2 coffee breaks, the tool will schedule the first coffee break around 11:00 and the second around 16:00. -The exact timing of the breaks within the day is not particularly critical to an accurate simulation, so you do not need to be concerned about major differences if you take a coffee break at 10:00 instead of 11:00. -The variation of coffee breaks can be altered in 5 minute increments up to 30 minutes in length. -Note that this doesn't necessarily have to be a coffee break, it can represent any period where the simulated space is vacated. -See 'Split Breaks' if the occupants do not break at the same time.

    -

    It should also be noted that the infection probabilities presented in the report does not take into account any potential exposures during the break times.

    -
    -

    Split breaks

    -
    -

    You have the option to specify whether the exposed and infected person(s) break at the same time. -If not, then you can input separate breaks. This is particularly different when specifying coffee breaks as they are spread evenly throughout the activity times specified.

    -

    If we take an example where the exposed person(s) activity time is from 9:00 to 18:00 and the infected person(s) is from 10:00 to 17:00, with both having a lunch break from 13:00 to 14:00 and have 2 coffee breaks each, we can have two different results:

    -
      -
    1. Specify the default situtaion where both exposed and infected persons(s) have their breaks at the same time: in this case the coffee break times are calculated based on the activity time of the exposed - both will have their first coffee break around 11:00 and the second around 16:00.

      -
    2. -
    3. Specify separate breaks for the infected person(s): in this case the coffee breaks will be calculated based on the different activity times (i.e. exposed from 9:00 to 18:00 and infected from 10:00 to 17:00) - the exposed person(s) will have their first coffee break around 11:00 and the second around 16:00, whereas the infected will have their first coffee break around 11:30 and the second around 15:30.

      -
    4. -
    -
    -

    Face Masks

    -
    -

    The model allows for a simulation with either a continuous wearing of face masks throughout the duration of the event, or have the removed at all times - i.e. all occupants (infected and exposed alike) wear or not masks for the duration of the simulation. -Please bear in mind the user inputs shall be aligned with the current applicable public health & safety instructions. -Please check what are the applicable rules, before deciding which assumptions are used for the simulation.

    -

    If you have selected the Training activity type, this equates to the trainer and all participants either wearing masks throughout the training (Yes), or removing them when seated/standing at their socially distanced positions within the training room (No). -Please confirm what are the applicable rules, before deciding which assumptions are used for the simulation

    -

    For the time being only the Type 1 surgical and FFP2 masks can be selected.

    -
    -

    Generate Report

    -
    -

    When you have entered all the necessary information, please click on the Generate Report button to execute the model. With the implementation of Monte Carlo simulations, the browser might take a few secounds to react.

    -

    Report


    -

    The report will open in your web browser. -It contains a summary of all the input data, which will allow the simulation to be repeated if required in the future as we improve the model.

    -
    -

    Results

    -
    -

    This part of the report shows the P(I) or probability of one exposed person getting infected. -It is estimated based on the emission rate of virus into the simulated volume, and the amount which is inhaled by exposed individuals. -This probability is valid for the simulation duration - i.e. the start and end time. -If you are using the natural ventilation option, the simulation is only valid for the selected month, because the following or preceding month will have a different average temperature profile. -The expected number of new cases for the simulation is calculated based on the probability of infection, multiplied by the number of exposed occupants.

    -

    The graph shows the variation in the concentration of virions within the simulated volume. -It is determined by:

    -
      -
    • The presence of the infected person, who emits airborne viruses in the volume.
    • -
    • The emission rate is related to the type of activity of the infected person (sitting, light exercise), their level of vocalisation (breathing, talking or shouting).
    • -
    • The accumulation of virions in the volume, which is driven, among other factors, by ventilation (if applicable).
        -
      • In a mechanical ventilation scenario, the removal rate is constant, based on fresh airflow supply in and out of the simulated space.
      • -
      • Under natural ventilation conditions, the effectiveness of ventilation relies upon the hourly temperature difference between the inside and outside air temperature.
      • -
      • A HEPA filter removes virions from the air at a constant rate and is modelled in the same way as mechanical ventilation, however air passed through a HEPA filter is recycled (i.e. it is not fresh air).
      • -
      -
    • -
    -
    -

    QR code

    -
    -

    At the end of the report you can find a unique QR code / hyperlink for this report. This provides an automatic way to review the calculator form with the corresponding specified parameters. -This allows for:

    -
      -
    • sharing reports by either scanning or clicking on the QR code to obtain a shareable link.
    • -
    • easily regenerating reports with any new versions of the CARA model released in the future.
    • -
    -
    -

    Conclusion

    -
    -

    This tool provides informative comparisons for COVID-19 (long-range) airborne risk only - see Disclaimer -If you have any comments on your experience with the app, or feedback for potential improvements, please share them with the development team Send email.

    -
    - -{% endblock main %} +{# The main calculator report, this template is intended to be implemented by themes #} +{% extends "base/userguide.html.j2" %} \ No newline at end of file diff --git a/cara/apps/themes/cern/templates/calculator.form.html.j2 b/cara/apps/themes/cern/templates/calculator.form.html.j2 new file mode 100644 index 00000000..79a879d9 --- /dev/null +++ b/cara/apps/themes/cern/templates/calculator.form.html.j2 @@ -0,0 +1,7 @@ +{% extends "base/calculator.form.html.j2" %} + +{% block room_data %} +
    + ? +
    +{% endblock room_data %} \ No newline at end of file diff --git a/cara/apps/themes/cern/templates/userguide.html.j2 b/cara/apps/themes/cern/templates/userguide.html.j2 new file mode 100644 index 00000000..28ab09db --- /dev/null +++ b/cara/apps/themes/cern/templates/userguide.html.j2 @@ -0,0 +1,5 @@ +{% extends "base/userguide.html.j2" %} + +{% block room_volume_guide %} +This information is available via GIS Portal (https://gis.cern.ch/gisportal/).

    +{% endblock room_volume_guide %} \ No newline at end of file From de5b4f6ec4117571467aec58c76e7af1bd205e61 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 29 Nov 2021 17:23:35 +0100 Subject: [PATCH 10/41] All theme files elevated to app directory. --- cara/apps/calculator/__init__.py | 2 +- cara/apps/calculator/__main__.py | 1 - .../{calculator => }/templates/base/calculator.form.html.j2 | 0 .../{calculator => }/templates/base/calculator.report.html.j2 | 0 cara/apps/{calculator => }/templates/base/userguide.html.j2 | 0 cara/apps/{calculator => }/templates/calculator.form.html.j2 | 0 cara/apps/{calculator => }/templates/calculator.report.html.j2 | 0 .../cern/templates => templates/cern}/calculator.form.html.j2 | 0 .../cern/templates => templates/cern}/calculator.report.html.j2 | 0 .../{themes/cern/templates => templates/cern}/index.html.j2 | 0 .../{themes/cern/templates => templates/cern}/layout.html.j2 | 0 .../{themes/cern/templates => templates/cern}/userguide.html.j2 | 0 cara/apps/{calculator => }/templates/userguide.html.j2 | 0 13 files changed, 1 insertion(+), 2 deletions(-) rename cara/apps/{calculator => }/templates/base/calculator.form.html.j2 (100%) rename cara/apps/{calculator => }/templates/base/calculator.report.html.j2 (100%) rename cara/apps/{calculator => }/templates/base/userguide.html.j2 (100%) rename cara/apps/{calculator => }/templates/calculator.form.html.j2 (100%) rename cara/apps/{calculator => }/templates/calculator.report.html.j2 (100%) rename cara/apps/{themes/cern/templates => templates/cern}/calculator.form.html.j2 (100%) rename cara/apps/{themes/cern/templates => templates/cern}/calculator.report.html.j2 (100%) rename cara/apps/{themes/cern/templates => templates/cern}/index.html.j2 (100%) rename cara/apps/{themes/cern/templates => templates/cern}/layout.html.j2 (100%) rename cara/apps/{themes/cern/templates => templates/cern}/userguide.html.j2 (100%) rename cara/apps/{calculator => }/templates/userguide.html.j2 (100%) diff --git a/cara/apps/calculator/__init__.py b/cara/apps/calculator/__init__.py index 407382e3..c5b50385 100644 --- a/cara/apps/calculator/__init__.py +++ b/cara/apps/calculator/__init__.py @@ -229,7 +229,7 @@ def make_app( calculator_templates = Path(__file__).parent / "templates" templates_directories = [cara_templates, calculator_templates] if theme_dir: - templates_directories.insert(0, theme_dir / 'templates') + templates_directories.insert(0, theme_dir) loader = jinja2.FileSystemLoader([str(path) for path in templates_directories]) template_environment = jinja2.Environment( loader=loader, diff --git a/cara/apps/calculator/__main__.py b/cara/apps/calculator/__main__.py index 7ec61206..7ec8b69a 100644 --- a/cara/apps/calculator/__main__.py +++ b/cara/apps/calculator/__main__.py @@ -36,7 +36,6 @@ def main(): if theme_dir is not None: theme_dir = Path(theme_dir).absolute() assert theme_dir.exists() - assert (theme_dir / 'templates').exists() app = make_app(debug=args.no_debug, calculator_prefix=args.prefix, theme_dir=theme_dir) app.listen(args.port) IOLoop.instance().start() diff --git a/cara/apps/calculator/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/calculator.form.html.j2 rename to cara/apps/templates/base/calculator.form.html.j2 diff --git a/cara/apps/calculator/templates/base/calculator.report.html.j2 b/cara/apps/templates/base/calculator.report.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/calculator.report.html.j2 rename to cara/apps/templates/base/calculator.report.html.j2 diff --git a/cara/apps/calculator/templates/base/userguide.html.j2 b/cara/apps/templates/base/userguide.html.j2 similarity index 100% rename from cara/apps/calculator/templates/base/userguide.html.j2 rename to cara/apps/templates/base/userguide.html.j2 diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/templates/calculator.form.html.j2 similarity index 100% rename from cara/apps/calculator/templates/calculator.form.html.j2 rename to cara/apps/templates/calculator.form.html.j2 diff --git a/cara/apps/calculator/templates/calculator.report.html.j2 b/cara/apps/templates/calculator.report.html.j2 similarity index 100% rename from cara/apps/calculator/templates/calculator.report.html.j2 rename to cara/apps/templates/calculator.report.html.j2 diff --git a/cara/apps/themes/cern/templates/calculator.form.html.j2 b/cara/apps/templates/cern/calculator.form.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/calculator.form.html.j2 rename to cara/apps/templates/cern/calculator.form.html.j2 diff --git a/cara/apps/themes/cern/templates/calculator.report.html.j2 b/cara/apps/templates/cern/calculator.report.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/calculator.report.html.j2 rename to cara/apps/templates/cern/calculator.report.html.j2 diff --git a/cara/apps/themes/cern/templates/index.html.j2 b/cara/apps/templates/cern/index.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/index.html.j2 rename to cara/apps/templates/cern/index.html.j2 diff --git a/cara/apps/themes/cern/templates/layout.html.j2 b/cara/apps/templates/cern/layout.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/layout.html.j2 rename to cara/apps/templates/cern/layout.html.j2 diff --git a/cara/apps/themes/cern/templates/userguide.html.j2 b/cara/apps/templates/cern/userguide.html.j2 similarity index 100% rename from cara/apps/themes/cern/templates/userguide.html.j2 rename to cara/apps/templates/cern/userguide.html.j2 diff --git a/cara/apps/calculator/templates/userguide.html.j2 b/cara/apps/templates/userguide.html.j2 similarity index 100% rename from cara/apps/calculator/templates/userguide.html.j2 rename to cara/apps/templates/userguide.html.j2 From a0108026f387eaf4ab9216d2277373cddbb24ea5 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 29 Nov 2021 18:26:52 +0100 Subject: [PATCH 11/41] Remove GIS Portal info from room data tooltip --- cara/apps/templates/calculator.form.html.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cara/apps/templates/calculator.form.html.j2 b/cara/apps/templates/calculator.form.html.j2 index 57adeeff..aebbb2ee 100644 --- a/cara/apps/templates/calculator.form.html.j2 +++ b/cara/apps/templates/calculator.form.html.j2 @@ -77,7 +77,7 @@
    Room data: -
    +
    ?
    From e3f1c166f89dd58cef340818a523875035737b08 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 29 Nov 2021 18:40:28 +0100 Subject: [PATCH 12/41] Error on form file directory fix --- .../templates/base/calculator.form.html.j2 | 29 +- cara/apps/templates/calculator.form.html.j2 | 597 +----------------- 2 files changed, 17 insertions(+), 609 deletions(-) diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index 75f06c16..5880730e 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -77,11 +77,9 @@
    Room data: - {% block room_data %}
    ?
    - {% endblock room_data %}
    @@ -124,17 +122,17 @@
    -
    -
    +
    +
    - - - + + +

    @@ -262,15 +260,18 @@
    Are masks worn when occupants are at workstations?
    - + - +
    - Type of masks used: - - - -
    + +
    diff --git a/cara/apps/templates/calculator.form.html.j2 b/cara/apps/templates/calculator.form.html.j2 index aebbb2ee..368da022 100644 --- a/cara/apps/templates/calculator.form.html.j2 +++ b/cara/apps/templates/calculator.form.html.j2 @@ -1,595 +1,2 @@ -{% extends "layout.html.j2" %} - -{% set DEBUG=False %} -{% set active_page="calculator/" %} - -{% block extra_headers %} - - - -{% endblock extra_headers %} - -{% block body_scripts %} - - - -{% endblock body_scripts %} - - -{% block main %} - -v{{ calculator_version }} - -
    -
    -
    -

    Calculator

    - -
    -
    -
    - -{% if DEBUG %} -
    -{% else %} - -{% endif %} -{{ xsrf_form_html }} - - - -
    -
    -
    -
    - - -
    - - -
    - -
    - - -
    - -
    - - Virus data: - -
    - ? -

    - -
    -
    -
    - -
    -
    - -
    - - Room data: -
    - ? -
    - -
    - -
    -
    - - -
    -
    - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    - -
    -
    Central heating system in use:
    -
    - - - - -
    -
    -
    -
    -
    -
    -
    - - - - -
    - -
    - - - Ventilation data: -
    - ? -
    - -
    - -
    Ventilation type:
    - -
    -
    - - - - -
    -
    - -
    -
    -
    - - - - - - - - -
    HEPA filtration:
    -
    -
    - - - - -
    -
    - -
    -
    -
    - - Face masks: -
    - ? -
    - -
    - -
    Are masks worn when occupants are at workstations?
    - - - -
    - - -
    - -
    -
    - - - Event data: -
    - ? -

    - -
    -
    -
    -
    - -
    -
    -
    -
    - - -
    - -
    -
    -
    - -
    -
    - - -
    -
    -
    Exposed person(s) presence:
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    - -
    -
    Infected person(s) presence:
    -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    -
    -
    - - - Activity breaks: -
    - ? -
    -

    - - -
    - - - -

    -
    - -
    - Lunch break: - - - -
    -
    -
    - Start: -
    -
    - Finish:
    -
    -
    - - -
    -
    - Coffee Breaks: -
    -
    - - - - - -
    -
    -
    - -
    - - Duration (minutes): -
    -
    -
    -
    - -
    - Infected person(s) breaks: -
    - Lunch break: - - - -
    - -
    -
    - Start: -
    -
    - Finish:
    -
    -
    - - -
    -
    - Coffee Breaks: -
    -
    - - - - - -
    -
    -
    - -
    - - Duration (minutes): -
    -
    -
    -
    - -
    - Coffee breaks are spread evenly throughout the day.
    - - -

    -
    -
    - -
    - -
    - -
    - -

    - -
    - Quick Guide:
    - 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.
    - Virus data:
    - SARS-CoV-2 covers the original "wild type" strain of the virus and three variants of concern (VOC):
    -
      -
    • Alpha (also known as B.1.1.7, first identified in UK, Dec 2020),
    • -
    • Gamma (also known as P.1, first identified in Brazil/Japan, Jan 2021).
    • -
    • Delta (also known as B.1.617.2, first identified in India, Oct 2020).
    • -
    - Modify the default as necessary, according to local area prevalence e.g. for Geneva - or Ain (France).
    - Ventilation data:
    -
      -
    • Mechanical ventilation = the HVAC supply of fresh air. Check the flow rates with the concerned technical department.
    • -
    • Natural ventilation = the type of window opening. The opening distance is between the fixed frame and movable part when open (commonly used values are window height of 1.6m and window opening between 0.15m and 0.6m). In case of periodic opening, specify the duration (e.g. for 10 min) and frequency (e.g. every 60 min).
    • -
    • HEPA filtration = the air flow of the device. The following values are based on the different fan velocities of a specific commercial device proposed by the HSE Unit:
    • -
        -
      • Level 6 (max) = 430 m3/h (noisy),
      • -
      • Level 5 = 250 m3/h (ok w.r.t. noise, recommended),
      • -
      • Level 4 = 130 m3/h (silent),
      • -
      • Level 3 = 95 m3/h (silent).
      • -
      -
    - Activity types:
    - The type of activity applies to both the infected and exposed persons: -
      -
    • Office = all seated, talking 33% of the time,
    • -
    • Meeting = all seated, talking time shared between all persons,
    • -
    • Call Centre = all seated, continuous talking,
    • -
    • Control Room (day shift) = all seated, talking 50% of the time,
    • -
    • Control Room (night shift) = all seated, talking 10% of the time,
    • -
    • Library = all seated, no talking, just breathing,
    • -
    • Laboratory = light physical activity, talking 50% of the time,
    • -
    • Workshop = moderate physical activity, talking 50% of the time,
    • -
    • Training = trainer standing and talking, rest seated and talking quietly. - Trainer assumed infected (worst case scenario),
    • -
    • Gym = heavy exercise, no talking, just breathing.
    • -
    - Activity breaks:
    -
      -
    • If coffee breaks are included, they are spread out evenly throughout the day, - in addition to any lunch break (if applicable).
    • -
    - Refer to COVID Calculator App user guide - for more detailed explanations on how to use this tool.
    -
    - -
    - - -
    - -
    -
    -

    - CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions. -

    -

    - CARA models the concentration profile of virions in enclosed spaces with clear and intuitive graphs. - The user can set a number of parameters, including room volume, exposure time, activity type, mask-wearing and ventilation. - The report generated indicates how to avoid exceeding critical concentrations and chains of airborne transmission in spaces such as individual offices, meeting rooms and labs. -

    -

    - The risk assessment tool simulates the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming a homogenous mixture, and estimates the risk of COVID-19 airborne transmission therein. - The results DO NOT include short-range airborne exposure (where the physical distance is a significant factor) nor the other known modes of SARS-CoV-2 transmission. - Hence, the output from this model is only valid when the other recommended public health & safety instructions are observed, such as adequate physical distancing, good hand hygiene and other barrier measures. -

    -

    - The model used is based on scientific publications relating to airborne transmission of infectious diseases, dose-response exposures and aerosol science, as of February 2021. - It can be used to compare the effectiveness of different airborne-related risk mitigation measures. -

    -

    - Note that this model applies a deterministic approach, i.e., it is assumed at least one person is infected and shedding viruses into the simulated volume. - Nonetheless, it is also important to understand that the absolute risk of infection is uncertain, as it will depend on the probability that someone infected attends the event. - The model is most useful for comparing the impact and effectiveness of different mitigation measures such as ventilation, filtration, exposure time, physical activity and - the size of the room, only considering long-range airborne transmission of COVID-19 in indoor settings. -

    -

    - This tool is designed to be informative, allowing the user to adapt different settings and model the relative impact on the estimated infection probabilities. - The objective is to facilitate targeted decision-making and investment through comparisons, rather than a singular determination of absolute risk. - While the SARS-CoV-2 virus is in circulation among the population, the notion of 'zero risk' or 'completely safe scenario' does not exist. - Each event modelled is unique, and the results generated therein are only as accurate as the inputs and assumptions. -

    -

    - CARA has not undergone review, approval or certification by competent authorities, and as a result, it cannot be considered - as a fully endorsed and reliable tool, namely in the assessment of potential viral emissions from infected hosts to be modelled. -

    -
    - -
    - -{% endblock main %} +{# The main calculator form, this template is intended to be implemented by themes #} +{% extends "base/calculator.form.html.j2" %} From 1705a2c96d9d940ed92c0dca2946fb15014970c1 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Tue, 30 Nov 2021 10:10:28 +0100 Subject: [PATCH 13/41] room_data tooltip missing from form --- cara/apps/templates/base/calculator.form.html.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index 5880730e..3872475e 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -77,9 +77,11 @@
    Room data: + {% block room_data %}
    ?
    + {% endblock room_data %}
    From d3d5b2ae6b83f6f4238f9e338c9cec14ab20370c Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Tue, 30 Nov 2021 10:18:39 +0100 Subject: [PATCH 14/41] Changed README on how to run CARA with CERN theme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6d770f9..4d747be7 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ python -m cara.apps.calculator To run with the CERN theme: ``` -python -m cara.apps.calculator --theme=cara/apps/calculator/themes/cern +python -m cara.apps.calculator --theme=cara/apps/templates/cern ``` To run the calculator on a different URL path: From 344204ef1b2b6f2db36d643c898d5ace49226d4c Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 2 Dec 2021 16:51:12 +0100 Subject: [PATCH 15/41] Added placeholders from rebase --- cara/apps/templates/base/calculator.form.html.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index 3872475e..1947ebb3 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -190,7 +190,7 @@
    -
    +
    @@ -199,7 +199,7 @@
    -
    +
    @@ -207,11 +207,11 @@
    @@ -287,7 +287,7 @@
    -
    +
    From 91eee9aa5afa5989456932de98a728ae11f15437 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 2 Dec 2021 16:51:53 +0100 Subject: [PATCH 16/41] changed test for cern theme path --- cara/tests/apps/calculator/test_webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cara/tests/apps/calculator/test_webapp.py b/cara/tests/apps/calculator/test_webapp.py index fc41e8a5..65f3b216 100644 --- a/cara/tests/apps/calculator/test_webapp.py +++ b/cara/tests/apps/calculator/test_webapp.py @@ -72,7 +72,7 @@ class TestBasicApp(tornado.testing.AsyncHTTPTestCase): class TestCernApp(tornado.testing.AsyncHTTPTestCase): def get_app(self): - cern_theme = Path(cara.apps.calculator.__file__).parent / 'themes' / 'cern' + cern_theme = Path(cara.apps.calculator.__file__).parent.parent / 'themes' / 'cern' return cara.apps.calculator.make_app(theme_dir=cern_theme) @tornado.testing.gen_test(timeout=_TIMEOUT) From a5b28998ec4d78661b1f5e3df832f4fc7512d80d Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Fri, 3 Dec 2021 11:30:46 +0100 Subject: [PATCH 17/41] Added mask icons fixes #223 --- .../calculator/templates/calculator.form.html.j2 | 6 ++++-- cara/apps/static/css/style.css | 4 ++++ cara/apps/static/images/masks/ffp2.png | Bin 0 -> 3714 bytes cara/apps/static/images/masks/t1.png | Bin 0 -> 3395 bytes 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 cara/apps/static/images/masks/ffp2.png create mode 100644 cara/apps/static/images/masks/t1.png diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index 57adeeff..d6d7fbd9 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -266,11 +266,13 @@

    diff --git a/cara/apps/static/css/style.css b/cara/apps/static/css/style.css index 008f833a..7e701ebc 100644 --- a/cara/apps/static/css/style.css +++ b/cara/apps/static/css/style.css @@ -170,6 +170,10 @@ body { display: block; } +.mask_icons { + height: 4em; +} + /*===== FIXED BACKGROUND IMG =====*/ .fixed-background { diff --git a/cara/apps/static/images/masks/ffp2.png b/cara/apps/static/images/masks/ffp2.png new file mode 100644 index 0000000000000000000000000000000000000000..57de5fc1422dc87f5e23cdc1bca74310525d8573 GIT binary patch literal 3714 zcmZ`+owUqiYD_Xht_8jY>#6X(R^H-CY8Lz~~YL zQD1(4zgtB)#2& zY`Vlrf_OOoKMX^#o?BADExP?c^Z?8`IT5S69>EM3D0vC*-#tT2bS5YHKks3WE2lM0# z%BjViwlh%emEFD>PHb`Ow)1WjzS&!SreJ&z)-i@hFOJR`FGEFEGMh<=d#%)r-cc|Y zzNaZkVbrM;h=+E-je>^ZgRXi;2|;&H#7h&rPc{q`JN5YMSlz~wlrWzKO2*K#Ix&T^ zcp?Aw+V6GLoWSx7Mz>nw$<$x3!wNivZMPr)Ay7{8`EA|r2`F!y%MX>af;o-4-!s3F9mzaCr_mD6Ubc)s8BzUnJl8D2Mzc@tq-{6 z)Y!W80O=OAkkN z{+vmZ`+K_M7r{qOu-?OIjxMgL%Z`Ci} z*4FOn-HYp*3QXC@sNyU8jC;-3)YfraC7UP{5weAF0*S9qD?+y+v4Y88w`{gp-KSy@ z^Jtl1@Gm{C7O|MJJyKP^rhb;P07w}VDKu}gBp8}$DI<)S!YX+)z@|auMw+9fA0762 z7BjKmxU~gYe+?B#vX?z;sks!0(CvO(iNIoYF~v1;5epyhNSXxUO8A%J0@vZZCmRck zabP`uK5zW){gE={54v%?WI2+Du!HkUc_O?3Dj|s9X1eJ(O7gF+8rERGmG1#;i z)enZ>2Al>)zI>@N{QH}e0stgIU>nF^ITIA*+im+RzaFp z<0|B$n2S#=^*jkzH=TD^cOZc~12bvzLeQWLHq#)?!fyCG?wLB}Gfqz#dq(^*W^>cG+M{9eKnv8cOU~e~_t1wSJudX@% zLnXxh$)3G^qktde;WI+=eMhDsC-0c?dD?)45L2xri|_m~@~6sY{Rw(*8j>c4Nw!o? zO074gB`V0MEj6QDuCd@0rxc53DYg$2hl5#VFKXSdUMioHNN16N4fl{?wJOBuBkrop zBSQ3;DvZTB*-^GpwTS$?n&SOOlDMGtZ{cVYxs4uL)udrq_F>26ebPBvg`E^tF<8lS@=DW-4FO+7)7RPAdvgGzUKvC}d zeAD*DwoG0j^c4kjYao>0=b-Z744$%a^X{?rKoR0cJ1v$k==jhq=`XF?r?)sKfxE<( zt6{J|73NV}s8J`CWQ`QH#uPZXrqSje(vN2T$n|bT;Ai&K&Fmle1s(FX1>My;KUMedjpPUbK?|J;7xumZX9A@R6{!z-PtM4Q`+ zhBEWzZv9Tt%Nrh|{$pU=n*R1|CCym3e-m^02D?+`UF3#nm1SeNQ(ZWIo}hqcV8c#S zeUaYvTLWpji&lPHH6``$#TvqmOWAVi34)7S9o;Xr2xEyFr{mlKb}*}mGkTxCU##z{ zZQ4?Qw(|}abGYuBT~`?T@AT)+Z&|s*6C9MKs8Nv4?uXZ;;yPaRuHdYGd6qAn-%Ob| zrQ@E)qZ$lVS>lnB!1Tq&B-%4&P^9Ld zn;zz}T?k6!i&PTb&0fG!Hz%-W8q|=B`@E6S{g(*G{ULs`Nz#ZRRtnf9VEiZ-5F0X) zvoHm~bp#!=AkW$r*1^>4+J0{0s)n3?zU><-K9ux*m-#e>9%mOL`ad zBbV8W-{(}^=?+O4c0%pI8TRiBJDATM=*}G|qI-4TAi0+kf5TtT^t9tHTCJs2&QW+uyZp z2j}=2yn3t(NB=P)sd@%7b9luxIRo04>_nqv#Kf)Ri&U=%xHeFnZTvBKiV~oU4G|J8 zM~!xd_ge9?%oBatV|YGy!I;kQ^qHb$TRN8&)smjO6~1E!c!b~*Tm2YJ8~R``_Z+}D z`}sVbSt_7El)`0WL<<^4p9|Z3rm-_>=J}DB|lV-FXnNCZ4P7*zwG(25Axqwj==$B45D1yEGQiPAoS!fMU(+{+&dEmP?#7Hk=c zotumO>Z+XRe2_UfU;N{_t_PX*JW+Z3ybuL@Iz}_OqN2}B;&@Dd^uJ44dOb@#rkB4Q zl70kDu@)6j^)Bn!eMQ_FIr!$8V_G=SClumVUAHqAakWk)=ad-vkGMrGciB`i9p0-- zn}pSGFWYRwR5Va#^QW+~VCoW5WKYC4Tlwi%F7Dd*oW#Jr8p}|!l(>X-=Ajz93|Xq; zy>Fq3P6#Eh(U(s8hUV2)NM@jkZ8~8-4)@1MW65M(LoH6^waPS+#t_a%!pMJ3YVvW@K4R~Owg2w#Yb<&cXj?YY$cILxV?%t(g!c`fUkM^mlj-#)(G766bL z4H~L#OVooHVmnxc;RO>{P)ItfpLKi+4oz(2@i;A|LaIB3CW zQg4$3JUK>#*=jQpi4q;HqoRFZ5C7OsbKdAt#?uM(f}S$%717Eui)YfrF%`b4p1k^} zh`1LE^SSt}lX1{3b2FhX=zaVmJ}XR=D9^N%U1U<2V#A?%IC5eM-6ljcSzR;2vR9=Br7+6*1cgU;$Ib-Dc*d6nJQUt0{~z$aj%T?H=5FLX=cvF zFN={00W&_&Cf?#fOnO6<O7}0}IBp1NlIu#t73+o0@&$ z`RB8XswN|pi+bTUFl+!@*U+|`O)H>Sta7!VIFktEF4+USO=~vilm?{6SG|=?COP^+kU9fNo2;DUTzY)I)jW_o&L&zXFc3 zRC6T-IZ2h261(yMsU@uUeq)n-(U&q)KmDGir4Q4f+Zjp;&z$>4Naw{Giu{?tTUXH6 zK{%+u8f#f~j-jo4%1m~YfP+p~79eLJa`xs1C9a9}%FKeG;I^tBf%r;cL>wS*fU5RJ zREobZrWy`?ov!A`=10SF71TxRI%DGr(j)ie*RxaD77OZ4lysu-d^H&hZP$^q*o<#E zQW2~e&v6-#N0tlUM&y`;Vp`Hbm7)D_W1gqKOO(Yj={jo`EHIr|?OEQM!wg*=OOd}O z%Y_5eo&Nb1+Wh#F;5M}ZGdB!p#ymr9wC#lWXkdb$X-_X7-%etvwVu$&($SG&MMr9D z&`MK+I8JG?#|1Mr(&n2}6Ii-Zmo2>edo7>A6QelM9 zwuf~2gj&j+tAf?qlh&#u8klvc`h{W}8DJBKs|*-5#k-qU)xM!!Y*y+ITh!)`U=E1S zbAQaiorFM0XJpuPpvWRuW~>`#t{bsvgDgLKg#vZ5R|UTp3ASqqQ0#Mwk_dj8R2HkK1Gj5vlAI4qqjTHYiw4jeTFc{%VjX*_!Mt@ zT?)|bswZ5EX^V}(&@@Br1G85sa;q=<&8{f0fT(W(#j4GbA?XX+`_QarrDa;ii7Qaf z24&4k4BsOn9Y$KIL*@jJJ^jZo^Fc%l3S`hYw)4c)eO70cXFgI3ii`9$i^dZCUmP;6{ z<2n*Bj@EJ3siIH}CYpDoJ@@wX!@Xen=cBF8Y(z>k?<$YCQ1EwK9gpyVBn*%pbNsj3 z?2MFE{xEVn^D{j|_T=0}n97o@#sx9JT-zveqe1cbt5eFaVhCjc53>~gp7AX@2y^H| zfix0w@4UglUx|cQ^OlO>I7>j&WyhYBPi4K5;?aEGg~P&UOcI?43}snG6^DfMZB2$kVvsUmELGRIWe4MAHwV5pUTPy+ z4O5_B;J49NK&>nM#gWw1{q{XN1#UyU5&^W{u1A6h{sNh?!kN*h?k{K}X%{O-eLF^= zdVx`L>3#FR_*iSEchT-?oMYgDgh$!}t=#;?4mQApzC%pUCMEV4PbGvQ;i+6kxWbdj zD%mUQ!`t_$6t+e&>sXbC4OeioLv)+!=1>1u;J26*l|U1o_|}P6| zDt178IN}dm0Y30OgkFmP|bUnrPihY=8WxDc%lqWS%^g17}@^Wo7s>2{_tbT)hPx~nQZhLpouZ(iAH<$N748c%2F-sGV7F1Ju zG^z?IR}WJXJrbYw=$DjShM!SK60k2?z`1p+F;2G! zx?Lb%O2(&@c_wc%HSF`%iV_=)XZR4wYZ)K&xZRT4q|J#JbqXxja!+(~1gPr-@Sahj+W)N~|bv^kHH5K4cY787A< zq}(^8FJeUJb18DTG4~+tq~Pb^2=HvE>5H}$e>F;X+M_c|W*{=fnI)QeVCzz{FY=vB8<&1 z3`BIlBybd1%FWL!n$OFY8NwGKqg)3+Vxy70j(q088!rByWmbc>PICq2lvNJB-o?h= zD{GkP?uW_k&>iOTvk4Ec%-^I$8CSh*wj%am?QN?9cLMQUIQE6p4JDOHcbIn#yYt0) zoS`Q2KdQ|{=-pjwLc@>gK*Or0?IB)CPEar9q7V1Vl)!eW=|dL!+4+o~ztD_lLAxvm zK8~*%UHyA%&!Z>OKdQ^nC3QDUJhM^w{^h?c-q-sQQnGx1$@_O^j%f~NJ{ri@#$`Ha zQl@i_HI`h*>Af)@K2AmhdenC;9LEo_LL!%zJ2@9y#P73nOxl0&KWPgEFWV`x1Qu+_ ze3lb_)9tT0xiEwdZDj5sim)`~Z(Kl^gEc_ge+*`yIMt#Bx(jme2TLz~ zD?lo2;{d;ya%~P0O1a^0U_hrwXfGu>*T<#a;%AewlT8V`-z#1|-oFS0$!&J%blmh< zSYUrV9QHXKHXaNaUSys0>2v2C!NKnRF?3)uz+``Fp732tKentmy-pSPf^>*{+{)`ZYerrt3R&qqW>RuZX9Qe|Bzmd Xe;aXW46?p^e28>44K-@j9HRaQ6eW4< literal 0 HcmV?d00001 From b7575d0f9f8c3f5d728cb0b0890e43f0967d14e5 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Fri, 3 Dec 2021 12:00:25 +0100 Subject: [PATCH 18/41] Changed 1 to I and turned mask icon clickable --- .../calculator/templates/calculator.form.html.j2 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index d6d7fbd9..ab163e1c 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -268,11 +268,15 @@
    From 8e9123462874af93b558f07fbdf5a46f690d5db1 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 6 Dec 2021 14:23:35 +0100 Subject: [PATCH 19/41] COVID level scale update #225 --- cara/apps/calculator/report_generator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cara/apps/calculator/report_generator.py b/cara/apps/calculator/report_generator.py index a4d88bd9..59ab1302 100644 --- a/cara/apps/calculator/report_generator.py +++ b/cara/apps/calculator/report_generator.py @@ -308,9 +308,9 @@ class ReportGenerator: context['permalink'] = generate_permalink(base_url, self.calculator_prefix, form) context['calculator_prefix'] = self.calculator_prefix context['scale_warning'] = { - 'level': 'yellow-2', - 'incidence_rate': 'lower than 25 new cases per 100 000 inhabitants', - 'onsite_access': 'of about 8000', + 'level': 'orange-3', + 'incidence_rate': 'somewhere in between 25 and 100 new cases per 100 000 inhabitants', + 'onsite_access': 'of about 5000', 'threshold': '' } return context From 08432e2a0ea0bb4c0d5b68529faf5a9eaeb9383d Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Tue, 7 Dec 2021 17:08:58 +0100 Subject: [PATCH 20/41] Changed FFP2 label --- .../templates/calculator.form.html.j2 | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/cara/apps/calculator/templates/calculator.form.html.j2 b/cara/apps/calculator/templates/calculator.form.html.j2 index ab163e1c..bf936c63 100644 --- a/cara/apps/calculator/templates/calculator.form.html.j2 +++ b/cara/apps/calculator/templates/calculator.form.html.j2 @@ -267,16 +267,22 @@
    From 79f51c641160c43c34d2b75b7f5f97a1790833ae Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 9 Dec 2021 14:26:29 +0100 Subject: [PATCH 21/41] Consideration on the time the first person (either infected or exposed) arrives at the enclosed space --- cara/apps/calculator/model_generator.py | 2 +- cara/models.py | 5 ++++- cara/tests/apps/calculator/test_model_generator.py | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cara/apps/calculator/model_generator.py b/cara/apps/calculator/model_generator.py index 06c29229..aa161dbc 100644 --- a/cara/apps/calculator/model_generator.py +++ b/cara/apps/calculator/model_generator.py @@ -303,7 +303,7 @@ class FormData: # Initializes a ventilation instance as a window if 'natural_ventilation' is selected, or as a HEPA-filter otherwise if self.ventilation_type == 'natural_ventilation': if self.window_opening_regime == 'windows_open_periodically': - window_interval = models.PeriodicInterval(self.windows_frequency, self.windows_duration) + window_interval = models.PeriodicInterval(self.windows_frequency, self.windows_duration, min(self.infected_start, self.exposed_start)) else: window_interval = always_on diff --git a/cara/models.py b/cara/models.py index 272b6b47..012e453e 100644 --- a/cara/models.py +++ b/cara/models.py @@ -123,11 +123,14 @@ class PeriodicInterval(Interval): #: occurring, a value of 0 signifies that the event never happens. duration: float + #: Time at which the first person (infected or exposed) arrives at the enclosed space. + start: float = 0.0 + def boundaries(self) -> BoundarySequence_t: if self.period == 0 or self.duration == 0: return tuple() result = [] - for i in np.arange(0, 24, self.period / 60): + for i in np.arange(self.start, 24, self.period / 60): # NOTE: It is important that the time type is float, not np.float, in # order to allow hashability (for caching). result.append((float(i), float(i+self.duration/60))) diff --git a/cara/tests/apps/calculator/test_model_generator.py b/cara/tests/apps/calculator/test_model_generator.py index 6ee821c0..dd635946 100644 --- a/cara/tests/apps/calculator/test_model_generator.py +++ b/cara/tests/apps/calculator/test_model_generator.py @@ -48,7 +48,7 @@ def test_ventilation_slidingwindow(baseline_form: model_generator.FormData): assert isinstance(baseline_window, models.SlidingWindow) window = models.SlidingWindow( - active=models.PeriodicInterval(period=120, duration=10), + active=models.PeriodicInterval(period=120, duration=10, start=minutes_since_midnight(9 * 60)), inside_temp=models.PiecewiseConstant((0, 24), (293,)), outside_temp=baseline_window.outside_temp, window_height=1.6, opening_length=0.6, @@ -80,7 +80,7 @@ def test_ventilation_hingedwindow(baseline_form: model_generator.FormData): assert isinstance(baseline_window, models.HingedWindow) window = models.HingedWindow( - active=models.PeriodicInterval(period=120, duration=10), + active=models.PeriodicInterval(period=120, duration=10, start=minutes_since_midnight(9 * 60)), inside_temp=models.PiecewiseConstant((0, 24), (293,)), outside_temp=baseline_window.outside_temp, window_height=1.6, window_width=1., opening_length=0.6, @@ -141,7 +141,7 @@ def test_ventilation_window_hepa(baseline_form: model_generator.FormData): # Now build the equivalent ventilation instance directly, and compare. window = models.SlidingWindow( - active=models.PeriodicInterval(period=120, duration=10), + active=models.PeriodicInterval(period=120, duration=10, start=minutes_since_midnight(9 * 60)), inside_temp=models.PiecewiseConstant((0, 24), (293,)), outside_temp=baseline_window.outside_temp, window_height=1.6, opening_length=0.6, From f44817307867b282ec9e95ed90081de006fe565e Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 6 Dec 2021 11:55:58 +0100 Subject: [PATCH 22/41] Added locust test file and README --- simulation-tests/README.md | 18 ++++++++++++++++++ simulation-tests/locust.py | 10 ++++++++++ 2 files changed, 28 insertions(+) create mode 100644 simulation-tests/README.md create mode 100644 simulation-tests/locust.py diff --git a/simulation-tests/README.md b/simulation-tests/README.md new file mode 100644 index 00000000..59052dd2 --- /dev/null +++ b/simulation-tests/README.md @@ -0,0 +1,18 @@ +# locust + +A simple open source load testing tool that allows to define user behavior. + +In order to set it up for the first time, we followed the documentation at https://locust.io/. In particular, we: + +* Defined a class for the users that will be simulating. +* Defined a ``wait_time`` variable that will make the simulated users wait between the specified seconds after each task executed. +* Decorated our method with ``@Task`` that creates a micro-thread that calls this method. +* Defined the ``self.client`` attribute that makes it possible to make HTTP calls that will be logged by Locust. + +To use, open the terminal on this folder and run the following command: + +``locust -f locust.py --host https://cara.web.cern.ch`` + +Then, open up a browser and point it to http://localhost:8089. +By default we pointed out the test to our own web server. +``Start swarming`` will trigger the simulation. \ No newline at end of file diff --git a/simulation-tests/locust.py b/simulation-tests/locust.py new file mode 100644 index 00000000..c697a39b --- /dev/null +++ b/simulation-tests/locust.py @@ -0,0 +1,10 @@ +import time +from locust import HttpUser, task, between + +class WebsiteUser(HttpUser): + '''Time (in seconds) between the execution of each task.''' + wait_time = between(10, 20) + + @task + def baseline_model(self): + self.client.get(url="/calculator-open/baseline-model/result") \ No newline at end of file From 4a45e9c2631dfa3fe6fa4063ffe970d26b814f7e Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Mon, 13 Dec 2021 10:39:27 +0000 Subject: [PATCH 23/41] Renamed files and added docstrings on each method. --- .../README.md | 2 +- server-performance-tests/locust.py | 42 +++++++++++++++++++ simulation-tests/locust.py | 10 ----- 3 files changed, 43 insertions(+), 11 deletions(-) rename {simulation-tests => server-performance-tests}/README.md (86%) create mode 100644 server-performance-tests/locust.py delete mode 100644 simulation-tests/locust.py diff --git a/simulation-tests/README.md b/server-performance-tests/README.md similarity index 86% rename from simulation-tests/README.md rename to server-performance-tests/README.md index 59052dd2..7bf5e43b 100644 --- a/simulation-tests/README.md +++ b/server-performance-tests/README.md @@ -9,7 +9,7 @@ In order to set it up for the first time, we followed the documentation at https * Decorated our method with ``@Task`` that creates a micro-thread that calls this method. * Defined the ``self.client`` attribute that makes it possible to make HTTP calls that will be logged by Locust. -To use, open the terminal on this folder and run the following command: +To use, uncomment the desired method on ``lucust.py``` file, open the terminal on this folder and run the following command: ``locust -f locust.py --host https://cara.web.cern.ch`` diff --git a/server-performance-tests/locust.py b/server-performance-tests/locust.py new file mode 100644 index 00000000..1cee4ae0 --- /dev/null +++ b/server-performance-tests/locust.py @@ -0,0 +1,42 @@ +from locust import HttpUser, task, between +from gevent.pool import Group +import time + +''' +Method no. 1 - Simulation with each single user +running x requests in parallel. +Specify the desired number of parallel requests in +"num_of_parallel_requests" variable (35 by default). + +This method was used in simulations with one single +user perfoming 35 requests in parallel. +''' +# num_of_parallel_requests = 35 +# class User(HttpUser): +# wait_time = between(0.05, 0.1) + +# @task(1) +# def test_api(self): +# group = Group() +# for i in range(0, num_of_parallel_requests): +# group.spawn(lambda:self.client.get("/calculator-open/baseline-model/result")) +# group.join() +# while(1): +# time.sleep(1) + +''' +Method no. 2 - Simulation with different users +running x requests concurrently. +With this method, each user is intended to +perform one single request. + +This method was used in simulations with different +number of users requesting once at the same time. +''' +# class User(HttpUser): + +# @task(1) +# def test_api(self): +# self.client.get("/calculator-open/baseline-model/result") +# while(1): +# time.sleep(1) \ No newline at end of file diff --git a/simulation-tests/locust.py b/simulation-tests/locust.py deleted file mode 100644 index c697a39b..00000000 --- a/simulation-tests/locust.py +++ /dev/null @@ -1,10 +0,0 @@ -import time -from locust import HttpUser, task, between - -class WebsiteUser(HttpUser): - '''Time (in seconds) between the execution of each task.''' - wait_time = between(10, 20) - - @task - def baseline_model(self): - self.client.get(url="/calculator-open/baseline-model/result") \ No newline at end of file From 091bd1bdc224f5bf12f2592237f817905e0e58d0 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 16 Dec 2021 11:37:11 +0100 Subject: [PATCH 24/41] Remove ExpertApp from mobile and tablet screen sizes --- cara/apps/static/css/style.css | 30 +++++++++++++++--------------- cara/apps/templates/index.html.j2 | 7 +++---- cara/apps/templates/layout.html.j2 | 26 ++++++++++++++++---------- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/cara/apps/static/css/style.css b/cara/apps/static/css/style.css index 7e701ebc..022b4ca6 100644 --- a/cara/apps/static/css/style.css +++ b/cara/apps/static/css/style.css @@ -234,6 +234,10 @@ footer img { width: 25%; } + #mobile_calculator_option { + display: none; + } + #nat_vent_image { height: 15em; } @@ -246,7 +250,7 @@ footer img { height: 6em; margin: 1%; } - #mobile-app-buttons { + #calculator_app_button { display: none!important; } .feedback { @@ -286,6 +290,9 @@ footer img { .nav-link { padding: .5rem .5rem!important; } + #apps_dropdown { + display: none; + } #report_version { font-size: .5rem; } @@ -302,13 +309,6 @@ footer img { #mobile_link { display: inline!important; } - #desktop_logo { - display: none!important; - } - - #mobile_logo { - display: block!important; - } .feedback { float:right; font-size:.75rem; @@ -328,16 +328,16 @@ footer img { } */ -/* Large (lg) devices (desktops, 992px and up) */ -@media (max-width: 992px) { - #download-pdf { +/* Large (lg) devices (tablets) */ +@media (max-width: 64em) { + .expert_app_button { display: none; } - #link_reproduce_results { - display: none; + #desktop_logo { + display: none!important; } - #mobile_link { - display: inline!important; + #mobile_logo { + display: block!important; } } diff --git a/cara/apps/templates/index.html.j2 b/cara/apps/templates/index.html.j2 index 30ed7f07..f589e476 100644 --- a/cara/apps/templates/index.html.j2 +++ b/cara/apps/templates/index.html.j2 @@ -11,12 +11,11 @@
    -
    +
    -
    +

    Introduction


    @@ -43,7 +42,7 @@


    - +

    diff --git a/cara/apps/templates/layout.html.j2 b/cara/apps/templates/layout.html.j2 index 15020daa..d9559be3 100644 --- a/cara/apps/templates/layout.html.j2 +++ b/cara/apps/templates/layout.html.j2 @@ -35,16 +35,22 @@
    {% endblock main %} From 54a791709fb1bd53cc21ee34a18b25cdbbf32bb0 Mon Sep 17 00:00:00 2001 From: James Devine Date: Thu, 6 Jan 2022 17:51:18 +0100 Subject: [PATCH 32/41] Added omicron, based on 3 early studies. --- cara/apps/calculator/__init__.py | 2 +- cara/apps/calculator/model_generator.py | 2 +- cara/apps/templates/base/calculator.form.html.j2 | 8 ++++++-- cara/apps/templates/base/calculator.report.html.j2 | 4 ++++ cara/apps/templates/base/userguide.html.j2 | 2 ++ cara/models.py | 4 ++++ cara/monte_carlo/data.py | 12 +++++++++++- 7 files changed, 29 insertions(+), 5 deletions(-) diff --git a/cara/apps/calculator/__init__.py b/cara/apps/calculator/__init__.py index c5b50385..fbb35b89 100644 --- a/cara/apps/calculator/__init__.py +++ b/cara/apps/calculator/__init__.py @@ -33,7 +33,7 @@ from .user import AuthenticatedUser, AnonymousUser # calculator version. If the calculator needs to make breaking changes (e.g. change # form attributes) then it can also increase its MAJOR version without needing to # increase the overall CARA version (found at ``cara.__version__``). -__version__ = "3.2.0" +__version__ = "3.3.0" class BaseRequestHandler(RequestHandler): diff --git a/cara/apps/calculator/model_generator.py b/cara/apps/calculator/model_generator.py index aa161dbc..d237a3fc 100644 --- a/cara/apps/calculator/model_generator.py +++ b/cara/apps/calculator/model_generator.py @@ -694,7 +694,7 @@ MECHANICAL_VENTILATION_TYPES = {'mech_type_air_changes', 'mech_type_air_supply', MASK_TYPES = {'Type I', 'FFP2'} MASK_WEARING_OPTIONS = {'mask_on', 'mask_off'} VENTILATION_TYPES = {'natural_ventilation', 'mechanical_ventilation', 'no_ventilation'} -VIRUS_TYPES = {'SARS_CoV_2', 'SARS_CoV_2_B117', 'SARS_CoV_2_P1', 'SARS_CoV_2_B16172'} +VIRUS_TYPES = {'SARS_CoV_2', 'SARS_CoV_2_B117', 'SARS_CoV_2_B1351','SARS_CoV_2_P1', 'SARS_CoV_2_B16172', 'SARS_CoV_2_B11529'} VOLUME_TYPES = {'room_volume_explicit', 'room_volume_from_dimensions'} WINDOWS_OPENING_REGIMES = {'windows_open_permanently', 'windows_open_periodically', 'not-applicable'} WINDOWS_TYPES = {'window_sliding', 'window_hinged', 'not-applicable'} diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index e9b6cb18..45b8ec76 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -68,8 +68,10 @@
    @@ -516,9 +518,11 @@ Virus data:
    SARS-CoV-2 covers the original "wild type" strain of the virus and three variants of concern (VOC):
      -
    • Alpha (also known as B.1.1.7, first identified in UK, Dec 2020),
    • +
    • Alpha (also known as B.1.1.7, first identified in UK, Sept 2020),
    • +
    • Beta (also known as B.1.351, first identified in South Africa, May 2020).
    • Gamma (also known as P.1, first identified in Brazil/Japan, Jan 2021).
    • Delta (also known as B.1.617.2, first identified in India, Oct 2020).
    • +
    • Omicron (also known as B.1.1.529, first identified in South Africa, November 2021).
    Modify the default as necessary, according to local area prevalence e.g. for Geneva or Ain (France).
    diff --git a/cara/apps/templates/base/calculator.report.html.j2 b/cara/apps/templates/base/calculator.report.html.j2 index 84fac045..d6df2b41 100644 --- a/cara/apps/templates/base/calculator.report.html.j2 +++ b/cara/apps/templates/base/calculator.report.html.j2 @@ -202,10 +202,14 @@ SARS-CoV-2 (nominal strain) {% elif form.virus_type == "SARS_CoV_2_B117" %} SARS-CoV-2 (Alpha VOC) + {% elif form.virus_type == "SARS_CoV_2_B1351" %} + SARS-CoV-2 (Beta VOC) {% elif form.virus_type == "SARS_CoV_2_P1" %} SARS-CoV-2 (Gamma VOC) {% elif form.virus_type == "SARS_CoV_2_B16172" %} SARS-CoV-2 (Delta VOC) + {% elif form.virus_type == "SARS_CoV_2_B11529" %} + SARS-CoV-2 (Omicron VOC) {% endif %}

  • Room Volume: {{ model.concentration_model.room.volume }} m³

  • diff --git a/cara/apps/templates/base/userguide.html.j2 b/cara/apps/templates/base/userguide.html.j2 index 74e6452d..e94e7514 100644 --- a/cara/apps/templates/base/userguide.html.j2 +++ b/cara/apps/templates/base/userguide.html.j2 @@ -70,8 +70,10 @@ The choices are:

    • SARS-CoV-2 (nominal strain), covering typical strains and variants which are not of concern from an epidemiologic point of view of the virus;
    • SARS-CoV-2 (Alpha VOC), first identified in the UK at the end of 2020 which is found to be approximately 1.5x more transmissible compared to the non-VOCs;
    • +
    • SARS-CoV-2 (Beta VOC), first identified in South Africa in May 2020 which is found to be approximately 1.25x more transmissible compared to the non-VOCs;
    • SARS-CoV-2 (Gamma VOC), first identified in Brazil in January 2021 which is found to be approximately 2.2x more transmissible compared to the non-VOCs.
    • SARS-CoV-2 (Delta VOC), first identified in India towards the end of 2020 which is found to be approximately 60% more transmissible compared to the ALPHA VOC.
    • +
    • SARS-CoV-2 (Omicron VOC), first identified in South Africa in November 2021 which is found to be at least 2.53x more transmissible compared to the DELTA VOC.

    The user can modify the selected variant from the default, according to the prevalence of the different variants in the local area. Access to this information can be found here:

      diff --git a/cara/models.py b/cara/models.py index 012e453e..bbf4557e 100644 --- a/cara/models.py +++ b/cara/models.py @@ -481,6 +481,10 @@ Virus.types = { viral_load_in_sputum=1e9, infectious_dose=30/1.6, ), + 'SARS_CoV_2_B11529': SARSCoV2( + viral_load_in_sputum=1e9, + infectious_dose=50/4.9841, + ), } diff --git a/cara/monte_carlo/data.py b/cara/monte_carlo/data.py index 4415efbb..330d21ab 100644 --- a/cara/monte_carlo/data.py +++ b/cara/monte_carlo/data.py @@ -40,6 +40,8 @@ symptomatic_vl_frequencies = LogCustomKernel( # From CERN-OPEN-2021-04 and refererences therein +# NB the infectious dose is inversely proportional to infectiousness of the strain +# i.e. an infectious dose of 80 is 25% more infectious than a dose of 100, (1/(80/100)) virus_distributions = { 'SARS_CoV_2': mc.SARSCoV2( viral_load_in_sputum=symptomatic_vl_frequencies, @@ -49,6 +51,10 @@ virus_distributions = { viral_load_in_sputum=symptomatic_vl_frequencies, infectious_dose=60, ), + 'SARS_CoV_2_B1351': mc.SARSCoV2( + viral_load_in_sputum=symptomatic_vl_frequencies, + infectious_dose=80, + ), 'SARS_CoV_2_P1': mc.SARSCoV2( viral_load_in_sputum=symptomatic_vl_frequencies, infectious_dose=100/2.25, @@ -56,7 +62,11 @@ virus_distributions = { 'SARS_CoV_2_B16172': mc.SARSCoV2( viral_load_in_sputum=symptomatic_vl_frequencies, infectious_dose=60/1.6, - ), + ), + 'SARS_CoV_2_B11529': mc.SARSCoV2( + viral_load_in_sputum=symptomatic_vl_frequencies, + infectious_dose=(1/4.9841)*100, + ), } From 3594783c2e94aa3dd8bbfba725fa0a8dad493acf Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Thu, 6 Jan 2022 19:44:26 +0100 Subject: [PATCH 33/41] wrong cern theme directory fix --- app-config/docker-compose.yml | 2 +- cara/scripts/themes/cern/cara_script.command | 2 +- cara/scripts/themes/cern/cara_script.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app-config/docker-compose.yml b/app-config/docker-compose.yml index 18d9d0a0..e96da5fd 100644 --- a/app-config/docker-compose.yml +++ b/app-config/docker-compose.yml @@ -12,7 +12,7 @@ services: - COOKIE_SECRET - APP_NAME=cara-webservice - CARA_CALCULATOR_PREFIX=/calculator-cern - - CARA_THEME=cara/apps/calculator/themes/cern + - CARA_THEME=cara/apps/templates/cern user: ${CURRENT_UID} cara-calculator-open: diff --git a/cara/scripts/themes/cern/cara_script.command b/cara/scripts/themes/cern/cara_script.command index 0d957e2f..952d852a 100755 --- a/cara/scripts/themes/cern/cara_script.command +++ b/cara/scripts/themes/cern/cara_script.command @@ -12,4 +12,4 @@ pip3 install -e . echo "############################################" echo "CARA is now running at http://localhost:8080" echo "############################################" -python3 -m cara.apps.calculator --theme=cara/apps/calculator/themes/cern \ No newline at end of file +python3 -m cara.apps.calculator --theme=cara/apps/templates/cern \ No newline at end of file diff --git a/cara/scripts/themes/cern/cara_script.sh b/cara/scripts/themes/cern/cara_script.sh index dcd21d3f..4a25af3e 100755 --- a/cara/scripts/themes/cern/cara_script.sh +++ b/cara/scripts/themes/cern/cara_script.sh @@ -6,4 +6,4 @@ pip install -e . echo "############################################" echo "CARA is now running at http://localhost:8080" echo "############################################" -python -m cara.apps.calculator --theme=cara/apps/calculator/themes/cern \ No newline at end of file +python -m cara.apps.calculator --theme=cara/apps/templates/cern \ No newline at end of file From 095329bf1e89b236009752b297a3086201837ca6 Mon Sep 17 00:00:00 2001 From: Luis Aleixo Date: Fri, 7 Jan 2022 09:36:30 +0100 Subject: [PATCH 34/41] Changed Virus variant dropdown size --- cara/apps/templates/base/calculator.form.html.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cara/apps/templates/base/calculator.form.html.j2 b/cara/apps/templates/base/calculator.form.html.j2 index 45b8ec76..5ec3caed 100644 --- a/cara/apps/templates/base/calculator.form.html.j2 +++ b/cara/apps/templates/base/calculator.form.html.j2 @@ -63,8 +63,8 @@

    -
    -
    +
    +