Skip to content

Commit

Permalink
some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Nov 5, 2024
1 parent 77ba6cc commit c92094e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions hisim/components/generic_boiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,15 @@ def get_cost_opex(self, all_outputs: List, postprocessing_results: pd.DataFrame,
self.config.consumption_in_kilowatt_hour = round(sum(postprocessing_results.iloc[:, index]) * 1e-3, 1)
break

self.fuel_consumption_in_liter = (
self.config.consumption_in_kilowatt_hour / self.heating_value_of_fuel_in_kwh_per_liter
self.fuel_consumption_in_liter = round(
self.config.consumption_in_kilowatt_hour / self.heating_value_of_fuel_in_kwh_per_liter, 1
)
self.fuel_consumption_in_kg = (
self.fuel_consumption_in_kg = round(
self.fuel_consumption_in_liter
* 1e-3
* PhysicsConfig.get_properties_for_energy_carrier(
energy_carrier=self.config.energy_carrier
).density_in_kg_per_m3
).density_in_kg_per_m3, 1
)
emissions_and_cost_factors = EmissionFactorsAndCostsForFuelsConfig.get_values_for_year(
self.my_simulation_parameters.year
Expand Down
8 changes: 4 additions & 4 deletions hisim/components/generic_heat_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ def get_cost_opex(self, all_outputs: List, postprocessing_results: pd.DataFrame,
break
# calculate fuel consumption in liter if possible
if self.config.fuel in (lt.LoadTypes.PELLETS, lt.LoadTypes.OIL, lt.LoadTypes.GAS):
self.fuel_consumption_in_liter = (
self.config.consumption_in_kilowatt_hour / self.heating_value_of_fuel_in_kwh_per_liter
self.fuel_consumption_in_liter = round(
self.config.consumption_in_kilowatt_hour / self.heating_value_of_fuel_in_kwh_per_liter, 1
)
self.fuel_consumption_in_kg = (
self.fuel_consumption_in_kg = round(
self.fuel_consumption_in_liter
* 1e-3
* PhysicsConfig.get_properties_for_energy_carrier(energy_carrier=self.config.fuel).density_in_kg_per_m3
* PhysicsConfig.get_properties_for_energy_carrier(energy_carrier=self.config.fuel).density_in_kg_per_m3, 1
)

emissions_and_cost_factors = EmissionFactorsAndCostsForFuelsConfig.get_values_for_year(
Expand Down

0 comments on commit c92094e

Please sign in to comment.