From 11f8aa420269475211e019566d10030719ff5fb0 Mon Sep 17 00:00:00 2001 From: Thibault Simon Date: Tue, 23 Apr 2024 11:00:42 +0200 Subject: [PATCH] slightly updated reference factors to match greencloud study --- boaviztapi/data/factors.yml | 6 +++--- docs/docs/Explanations/components/cpu.md | 6 +++--- docs/docs/Explanations/components/hdd.md | 2 +- docs/docs/Explanations/components/ssd.md | 2 +- tests/api/test_cloud.py | 22 +++++++++++----------- tests/api/test_component.py | 10 +++++----- tests/api/test_server.py | 6 +++--- tests/data/factors.yml | 10 +++++----- tests/unit/test_bottom_up.py | 18 +++++++++--------- tests/unit/test_verbose.py | 2 +- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/boaviztapi/data/factors.yml b/boaviztapi/data/factors.yml index 1104152a..66e7aba5 100644 --- a/boaviztapi/data/factors.yml +++ b/boaviztapi/data/factors.yml @@ -38,14 +38,14 @@ "impact": 156.00 }, "adp": { - "die_impact": 5.80e-09, + "die_impact": 5.87e-09, "impact": 2.04e-02 } } "hdd": { "gwp": { - "impact": 31.10 + "impact": 31.11 }, "pe": { "impact": 276.00 @@ -101,7 +101,7 @@ }, "pe": { "die_impact": 27.30, - "impact": 76.90 + "impact": 73.98 }, "adp": { "die_impact": 6.30e-05, diff --git a/docs/docs/Explanations/components/cpu.md b/docs/docs/Explanations/components/cpu.md index 573cf83f..3bc1c256 100644 --- a/docs/docs/Explanations/components/cpu.md +++ b/docs/docs/Explanations/components/cpu.md @@ -81,9 +81,9 @@ with: | Constant | Units | Value | |--------------------------------------------------|-------------|----------| -| $\text{CPU}_\text{embedded_die}^{\text{gwp}}$ | kgCO2eq/cm2 | 1.97 | -| $\text{CPU}_\text{embedded_die}^{\text{adp}}$ | kgSbeq/cm2 | 5.80E-07 | -| $\text{CPU}_\text{embedded_die}^{\text{pe}}$ | MJ/cm2 | 26.50 | +| $\text{CPU}_\text{embedded_die}^{\text{gwp}}$ | kgCO2eq/mm2 | 1.97e−02 | +| $\text{CPU}_\text{embedded_die}^{\text{adp}}$ | kgSbeq/mm2 | 5.87e-09 | +| $\text{CPU}_\text{embedded_die}^{\text{pe}}$ | MJ/mm2 | 0.265 | | $\text{CPU}_\text{embedded_base}^{\text{gwp}}$ | kgCO2eq | 9.14 | | $\text{CPU}_\text{embedded_base}^{\text{adp}}$ | kgSbeq | 2.04E-02 | | $\text{CPU}_\text{embedded_base}^{\text{pe}}$ | MJ | 156.00 | diff --git a/docs/docs/Explanations/components/hdd.md b/docs/docs/Explanations/components/hdd.md index 061635b0..73cff61f 100644 --- a/docs/docs/Explanations/components/hdd.md +++ b/docs/docs/Explanations/components/hdd.md @@ -46,7 +46,7 @@ The HDD disk manufacturing impact is considered as a constant. | Constant | Unit | Value | |-----------------------------------------------|---------|----------| -| $\text{HDD}_{\text{embedded}}^{\text{gwp}}$ | kgCO2eq | 31.10 | +| $\text{HDD}_{\text{embedded}}^{\text{gwp}}$ | kgCO2eq | 31.11 | | $\text{HDD}_{\text{embedded}}^{\text{adp}}$ | kgSbeq | 2.50E-04 | | $\text{HDD}_{\text{embedded}}^{\text{pe}}$ | MJ | 276.00 | diff --git a/docs/docs/Explanations/components/ssd.md b/docs/docs/Explanations/components/ssd.md index 6a3eb09a..1b71d66e 100644 --- a/docs/docs/Explanations/components/ssd.md +++ b/docs/docs/Explanations/components/ssd.md @@ -72,7 +72,7 @@ with: | $\text{SSD}_\text{embedded_die}^\text{pe}$ | MJ/cm2 | 27.30 | | $\text{SSD}_\text{embedded_base}^\text{gwp}$ | kgCO2eq | 6.34 | | $\text{SSD}_\text{embedded_base}^\text{adp}$ | kgSbeq | 5.63E-04 | -| $\text{SSD}_\text{embedded_base}^\text{pe}$ | MJ | 76.90 | +| $\text{SSD}_\text{embedded_base}^\text{pe}$ | MJ | 73.98 | !!!info If there are more than 1 SDD we multiply $\text{SSD}_\text{embedded}^\text{criteria}$ by the number of SSD given in `units`. diff --git a/tests/api/test_cloud.py b/tests/api/test_cloud.py index a1610d19..8930b82c 100644 --- a/tests/api/test_cloud.py +++ b/tests/api/test_cloud.py @@ -124,7 +124,7 @@ async def test_empty_usage_with_url_params_r5ad(): ImpactOutput(11170.0, 214.0, 4000.0), ), PEImpact( - ImpactOutput(21470.0, 7596.0, 13000.0, END_OF_LIFE_WARNING), + ImpactOutput(21470.0, 7590.0, 13000.0, END_OF_LIFE_WARNING), ImpactOutput(5808000.0, 121.0, 100000.0), ), ) @@ -278,7 +278,7 @@ async def test_verbose_output_with_empty_usage(): ImpactOutput(11170.0, 214.0, 4000.0), ), PEImpact( - ImpactOutput(21470.0, 7596.0, 13000.0, END_OF_LIFE_WARNING), + ImpactOutput(21470.0, 7590.0, 13000.0, END_OF_LIFE_WARNING), ImpactOutput(5808000.0, 121.0, 100000.0), ), verbose_output={ @@ -393,7 +393,7 @@ async def test_verbose_output_with_empty_usage(): "max": 32, "min": 32, "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "value": 32, }, @@ -410,7 +410,7 @@ async def test_verbose_output_with_empty_usage(): "max": "Naples", "min": "Naples", "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "value": "Naples", }, @@ -418,7 +418,7 @@ async def test_verbose_output_with_empty_usage(): "max": 0.9, "min": 0.023, "source": "https://www.sciencedirect.com/science/article/pii/S0306261921012149: \n" - "Average of 27 european countries", + "Average of 27 european countries", "status": "DEFAULT", "unit": "kg CO2eq/kWh", "value": 0.38, @@ -476,7 +476,7 @@ async def test_verbose_output_with_empty_usage(): "max": "AMD", "min": "AMD", "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "value": "AMD", }, @@ -484,7 +484,7 @@ async def test_verbose_output_with_empty_usage(): "max": "EPYC", "min": "EPYC", "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "value": "EPYC", }, @@ -517,7 +517,7 @@ async def test_verbose_output_with_empty_usage(): "max": 200, "min": 200, "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "unit": "W", "value": 200, @@ -526,7 +526,7 @@ async def test_verbose_output_with_empty_usage(): "max": 64, "min": 64, "source": "Completed from name name based on " - "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", + "https://docs.google.com/spreadsheets/d/1DqYgQnEDLQVQm5acMAhLgHLD8xXCG9BIrk-_Nv6jF3k/edit#gid=224728652.", "status": "COMPLETED", "value": 64, }, @@ -694,7 +694,7 @@ async def test_verbose_output_with_empty_usage(): "max": 0.9, "min": 0.023, "source": "https://www.sciencedirect.com/science/article/pii/S0306261921012149: \n" - "Average of 27 european countries", + "Average of 27 european countries", "status": "DEFAULT", "unit": "kg CO2eq/kWh", "value": 0.38, @@ -867,7 +867,7 @@ async def test_verbose_output_with_empty_usage(): "max": 0.9, "min": 0.023, "source": "https://www.sciencedirect.com/science/article/pii/S0306261921012149: \n" - "Average of 27 european countries", + "Average of 27 european countries", "status": "DEFAULT", "unit": "kg CO2eq/kWh", "value": 0.38, diff --git a/tests/api/test_component.py b/tests/api/test_component.py index 3b7f87a6..9674656a 100644 --- a/tests/api/test_component.py +++ b/tests/api/test_component.py @@ -679,7 +679,7 @@ async def test_wrong_manuf_ssd(): 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', 'embedded': {'max': 1365000.0, - 'min': 2807.0, + 'min': 2804.0, 'value': 600.0, 'warnings': ['End of life is not included in ' 'the calculation', @@ -714,9 +714,9 @@ async def test_complete_ssd(): 'unit': 'kgCO2eq', 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', - 'embedded': {'max': 292.7, - 'min': 292.7, - 'value': 292.7, + 'embedded': {'max': 289.8, + 'min': 289.8, + 'value': 289.8, 'warnings': ['End of life is not included in the ' 'calculation']}, 'unit': 'MJ', @@ -752,7 +752,7 @@ async def test_empty_ssd(): 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', 'embedded': {'max': 1365000.0, - 'min': 2807.0, + 'min': 2804.0, 'value': 600.0, 'warnings': ['End of life is not included in the ' 'calculation', diff --git a/tests/api/test_server.py b/tests/api/test_server.py index c257a5d5..5d1db880 100644 --- a/tests/api/test_server.py +++ b/tests/api/test_server.py @@ -65,9 +65,9 @@ async def test_complete_config_server(): 'unit': 'kgCO2eq', 'use': {'max': 26430.0, 'min': 337.7, 'value': 7000.0}}, 'pe': {'description': 'Consumption of primary energy', - 'embedded': {'max': 15430.0, + 'embedded': {'max': 15420.0, 'min': 14450.0, - 'value': 15430.0, + 'value': 15420.0, 'warnings': ['End of life is not included in the ' 'calculation']}, 'unit': 'MJ', @@ -261,7 +261,7 @@ async def test_partial_server_1(): 'use': {'max': 26430.0, 'min': 337.7, 'value': 7000.0}}, 'pe': {'description': 'Consumption of primary energy', 'embedded': {'max': 2796000.0, - 'min': 14810.0, + 'min': 14800.0, 'value': 20000.0, 'warnings': ['End of life is not included in the ' 'calculation', diff --git a/tests/data/factors.yml b/tests/data/factors.yml index e965c716..6477d4e0 100644 --- a/tests/data/factors.yml +++ b/tests/data/factors.yml @@ -30,22 +30,22 @@ "cpu": { "gwp": { - "die_impact": 0.0197, + "die_impact": 1.97e-02, "impact": 9.14 }, "pe": { - "die_impact": 0.2650, + "die_impact": 0.265, "impact": 156.00 }, "adp": { - "die_impact": 5.80e-09, + "die_impact": 5.87e-09, "impact": 2.04e-02 } } "hdd": { "gwp": { - "impact": 31.10 + "impact": 31.11 }, "pe": { "impact": 276.00 @@ -101,7 +101,7 @@ }, "pe": { "die_impact": 27.30, - "impact": 76.90 + "impact": 73.98 }, "adp": { "die_impact": 6.30e-05, diff --git a/tests/unit/test_bottom_up.py b/tests/unit/test_bottom_up.py index 344052d5..1eea2500 100644 --- a/tests/unit/test_bottom_up.py +++ b/tests/unit/test_bottom_up.py @@ -111,7 +111,7 @@ def test_bottom_up_component_ssd_empty(empty_ssd_model): 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', 'embedded': {'max': 1365000.0, - 'min': 2807.0, + 'min': 2804.0, 'value': 600.0, 'warnings': ['End of life is not included in the ' 'calculation', @@ -141,9 +141,9 @@ def test_bottom_up_component_ssd_complete(complete_ssd_model): 'unit': 'kgCO2eq', 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', - 'embedded': {'max': 292.7, - 'min': 292.7, - 'value': 292.7, + 'embedded': {'max': 289.8, + 'min': 289.8, + 'value': 289.8, 'warnings': ['End of life is not included in the ' 'calculation']}, 'unit': 'MJ', @@ -169,8 +169,8 @@ def test_bottom_up_component_ssd_incomplete(incomplete_ssd_model): 'unit': 'kgCO2eq', 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', - 'embedded': {'max': 2624.0, - 'min': 127.8, + 'embedded': {'max': 2621.0, + 'min': 124.9, 'value': 600.0, 'warnings': ['End of life is not included in the ' 'calculation']}, @@ -344,9 +344,9 @@ def test_bottom_up_component_hdd(hdd_model): 'unit': 'kgSbeq', 'use': 'not implemented'}, 'gwp': {'description': 'Total climate change', - 'embedded': {'max': 31.1, - 'min': 31.1, - 'value': 31.1, + 'embedded': {'max': 31.11, + 'min': 31.11, + 'value': 31.11, 'warnings': ['End of life is not included in the ' 'calculation']}, 'unit': 'kgCO2eq', diff --git a/tests/unit/test_verbose.py b/tests/unit/test_verbose.py index 781682ca..886e5dfe 100644 --- a/tests/unit/test_verbose.py +++ b/tests/unit/test_verbose.py @@ -142,7 +142,7 @@ def test_verbose_component_ssd(empty_ssd_model): 'use': 'not implemented'}, 'pe': {'description': 'Consumption of primary energy', 'embedded': {'max': 1365000.0, - 'min': 2807.0, + 'min': 2804.0, 'value': 600.0, 'warnings': ['End of life is not included in ' 'the calculation',