Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Component elec impact factors are set by default when usage location is given #151

Closed da-ekchajzer closed 1 year ago

da-ekchajzer commented 1 year ago

Bug description

"RAM-1": {
      "units": 12,
      "manufacture": {
        "gwp": {
          "value": 120,
          "significant_figures": 2,
          "unit": "kgCO2eq",
          "description": "Effects on global warming"
        },
        "adp": {
          "value": 0.0049,
          "significant_figures": 2,
          "unit": "kgSbeq",
          "description": "Use of minerals and fossil ressources"
        },
        "pe": {
          "value": 1500,
          "significant_figures": 2,
          "unit": "MJ",
          "description": "Consumption of primary energy"
        }
      },
      "capacity": {
        "value": 32,
        "status": "INPUT",
        "unit": "GB"
      },
      "density": {
        "value": 0.625,
        "status": "DEFAULT",
        "unit": "GB/cm2",
        "min": 0.1,
        "max": 1
      },
      "USAGE": {
        "use": {
          "gwp": {
            "value": 30,
            "significant_figures": 2,
            "unit": "kgCO2eq",
            "description": "Effects on global warming"
          },
          "adp": {
            "value": 0.00000513,
            "significant_figures": 3,
            "unit": "kgSbeq",
            "description": "Use of minerals and fossil ressources"
          },
          "pe": {
            "value": 1028,
            "significant_figures": 4,
            "unit": "MJ",
            "description": "Consumption of primary energy"
          }
        },
        "hours_electrical_consumption": {
          "value": 9.088,
          "status": "COMPLETED",
          "unit": "W",
          "min": 1,
          "max": 250
        },
        "time_workload": {
          "value": 50,
          "status": "DEFAULT",
          "unit": "%",
          "min": 0,
          "max": 100
        },
        "usage_location": {
          "value": "FRA",
          "status": "INPUT",
          "unit": "CodSP3 - NCS Country Codes - NATO"
        },
        "adp_factor": {
          "value": 6.42e-8,
          "status": "DEFAULT",
          "unit": "KgSbeq/kWh",
          "source": "ADEME BASE IMPACT",
          "min": 1.32e-8,
          "max": 2.656e-7
        },
        "gwp_factor": {
          "value": 0.38,
          "status": "DEFAULT",
          "unit": "kgCO2e/kWh",
          "source": "https://www.sciencedirect.com/science/article/pii/S0306261921012149 : \nAverage of 27 european countries",
          "min": 0.023,
          "max": 0.9
        },
        "pe_factor": {
          "value": 12.874,
          "status": "DEFAULT",
          "unit": "MJ/kWh",
          "source": "ADPf / (1-%renewable_energy)",
          "min": 0.013,
          "max": 468.15
        },
        "use_time": {
          "value": 8785,
          "status": "INPUT",
          "unit": "hours"
        },
        "params": {
          "value": {
            "a": 9.088
          },
          "status": "COMPLETED",
          "source": "(ram_electrical_factor_per_go : 0.284) * (ram_capacity: 32) "
        }
      }
    },

To Reproduce

On RAM route

{
  "capacity": 32,
  "manufacturer": "Samsung",
  "process": 30,
  "usage":{

   "usage_location":"FRA"
   }
}
da-ekchajzer commented 1 year ago

Corrected in #149