120 lines
No EOL
6 KiB
JavaScript
120 lines
No EOL
6 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.escopo3rodoviarioDownstream2 = void 0;
|
|
const resposta_1 = require("../../../../resposta");
|
|
const fatorEmissaoCombustivel_1 = require("../../../ListasFatoresEmissao/fatorEmissaoCombustivel");
|
|
const gwp_1 = require("../../../ListasFatoresEmissao/gwp");
|
|
const listaFatorAno_1 = require("../../../ListasFatoresEmissao/listaFatorAno");
|
|
const listas_1 = require("../../../ListasFatoresEmissao/listas");
|
|
const interfaces_1 = require("../../../interfaces");
|
|
exports.escopo3rodoviarioDownstream2 = {
|
|
escopo: "Escopo3",
|
|
idTipoFonte: "escopo3rodoviarioDownstream2",
|
|
descricao: "(Downstream) Rodoviário por tipo de combustível ",
|
|
estruturaCadastro: [
|
|
{
|
|
idCampo: "tipo",
|
|
descricao: "Tipo de combustível",
|
|
tipo: interfaces_1.tiposCamposGee.opcoes,
|
|
opcoes: listas_1.listaRodoviario2combustivel,
|
|
},
|
|
],
|
|
estruturaRegistro: [
|
|
{
|
|
campo: "consumo",
|
|
descricao: "Consumo de combustível em Litros",
|
|
tipo: interfaces_1.tiposCamposGee.numero,
|
|
},
|
|
{
|
|
campo: "unidade",
|
|
descricao: "Unidade de medida consumida",
|
|
tipo: interfaces_1.tiposCamposGee.opcoes,
|
|
opcoes: ["m³ (GNV)", "Litros"],
|
|
},
|
|
],
|
|
formula: ({ cad, reg, inventario }) => {
|
|
//Cadastro
|
|
const combustivel = fatorEmissaoCombustivel_1.listaRodoviario2.find((a) => a.ref == cad.tipo);
|
|
if (!combustivel) {
|
|
return resposta_1.respostaCM.addErro("não foi encontrado tipo de veiculo");
|
|
}
|
|
const consumo = Number(reg.consumo);
|
|
//Fatores de emissão
|
|
let [CH4, CO2, N2O, BIO, QTDCombustivelBio, QTDCombustivelFossil] = [
|
|
0, 0, 0, 0, 0, 0,
|
|
];
|
|
if (combustivel.combustivel == "Biodiesel(B100)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[9].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[9].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[9].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil = consumo;
|
|
}
|
|
else if (combustivel.combustivel == "Etanol Hidratado") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[8].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[8].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[8].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil = consumo;
|
|
}
|
|
else if (combustivel.combustivel == "Gás Liquefeito de Petróleo (GLP)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[3].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[3].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[3].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil = consumo;
|
|
}
|
|
else if (combustivel.combustivel == "Óleo Diesel (comercial)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[22].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[22].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[22].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil = consumo;
|
|
}
|
|
else if (combustivel.combustivel == "Gás Natural Veicular (GNV)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[2].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[2].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[2].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil = consumo;
|
|
}
|
|
else if (combustivel.combustivel == "Gasolina Automotiva (pura)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[0].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[0].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[0].fator_emissao_N2O;
|
|
BIO = 1;
|
|
QTDCombustivelFossil =
|
|
consumo *
|
|
(1 -
|
|
listaFatorAno_1.listaFatorAno[Number(inventario.anoInventario) - 2000].percGasolina);
|
|
QTDCombustivelBio =
|
|
consumo *
|
|
(1 - listaFatorAno_1.listaFatorAno[Number(inventario.anoInventario) - 2000].percBio);
|
|
}
|
|
else if (combustivel.combustivel == "Óleo Diesel (puro)") {
|
|
CH4 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[1].fator_emissao_CH4;
|
|
CO2 = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[1].fator_emissao_CO2;
|
|
N2O = fatorEmissaoCombustivel_1.fatorEmissaoCombustivel[1].fator_emissao_N2O;
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
BIO = 1;
|
|
QTDCombustivelFossil =
|
|
consumo *
|
|
(1 -
|
|
listaFatorAno_1.listaFatorAno[Number(inventario.anoInventario) - 2000].percGasolina);
|
|
QTDCombustivelBio =
|
|
consumo *
|
|
(1 - listaFatorAno_1.listaFatorAno[Number(inventario.anoInventario) - 2000].percBio);
|
|
}
|
|
const emissaoCO2 = (CO2 * QTDCombustivelFossil) / 1000;
|
|
const emissaoCH4 = (CH4 * QTDCombustivelFossil) / 1000 + (CH4 * QTDCombustivelBio) / 1000;
|
|
const emissaoN2O = (N2O * QTDCombustivelFossil) / 1000 + (N2O * QTDCombustivelBio) / 1000;
|
|
//Calculo de carbono Final
|
|
const carbono = emissaoCO2 * Number(gwp_1.gwp[0].gwp) +
|
|
emissaoCH4 * Number(gwp_1.gwp[1].gwp) +
|
|
emissaoN2O * Number(gwp_1.gwp[2].gwp);
|
|
const bio = QTDCombustivelBio;
|
|
//Arredondamento
|
|
return resposta_1.respostaCM.addResultado([carbono, bio]);
|
|
},
|
|
};
|
|
//# sourceMappingURL=rodoviario2.js.map
|