EnergySystemModels


NameEnergySystemModels JSON
Version 0.1.21.post2 PyPI version JSON
download
home_pagehttps://github.com/ZoheirHADID/EnergySystemModels
SummaryEnergy systems models are the mathematical models that are developed in order to represent as reliably as possible various energy-related problems.
upload_time2024-03-15 08:31:52
maintainer
docs_urlNone
authorZoheir HADID
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            - [1. Thermodynamic Cycles Package](#1-thermodynamic-cycles-package)
  * [1.1. Fluid Source](#11-fluid-source)
    + [1.1.1. Input parameters](#111-Input-parameters)
  * [1.2. Sink](#12-sink)
  * [1.3. Compressor](#13-compressor)
    + [1.3.1. Compressor model](#131-compressor-model)
  * [1.4. Water Heat Storage](#14-water-heat-storage)
    + [1.4.1. Mixed Tank](#141-mixed-tank)

- [2. AHU modules](#2-ahu-modules)
  * [2.1 Fresh AHU Example](#21-fresh-ahu-exemple)
- [3. Chiller Example](#3-Chiller-Example)
  * [3.1. Launch Chiller Application (Tkinter GUI)](#31-Launch-Chiller-Application-(Tkinter-GUI))
  * [3.2. Create Oriented-Object Chiller](#32-Create-Oriented-Object-Chiller)

- [4. Données météo](#4-Données-météo)
  * [4.1. OpenWeaterMap](#41-OpenWeaterMap)
  * [4.2. MeteoCiel](#42-MeteoCiel)
- [5. IPMVP](#5-IPMVP)
- [6. Production solaire] (#6-production-solaire)

# 1. Thermodynamic Cycles Package
## 1.1. Fluid Source
### 1.1.1. Input parameters

| Symbol   |      Description      |  SI Units | Used Units |
|----------|:-------------:|------:|------:|
| Ti_degC |  Inlet temerature | K | °C |
| fluid |  Fluid/Refrigerant name    |  String |"air","ammonia","R134a",...|
| F, F_Sm3s, F_m3s, F_Sm3h, F_m3h, F_kgh | Input Flow rate |   kg/s | kg/s, Sm3/s, m3/s, Sm3/h, m3/h, kg/h |
| Pi_bar | Inlet Pressure |   Pa | bara |

``` python
from ThermodynamicCycles.Source import Source

#Create Compressor Object
SOURCE=Source.Object()

#Data Input
SOURCE.Pi_bar=1.01325
SOURCE.fluid="air"
SOURCE.F=1
#SOURCE.F_Sm3s=2937.482966/3600 #SOURCE.F_m3s=2480.143675/3600
#SOURCE.F_Sm3h=1 #SOURCE.F_m3h=2480.143675 #SOURCE.F_kgh=3600

#Calculate Object
SOURCE.calculate()

#Data output
print(SOURCE.df)
```
## 1.2. Sink

### 1.2.1. Test Sink
``` python
from ThermodynamicCycles.Sink import Sink
#from ThermodynamicCycles.Connect import Fluid_connect

#Create Sink object
SINK=Sink.Object()

#Fluid_connect(SINK.Inlet,SOURCE.Outlet) 
SINK.Inlet.fluid="air"
SINK.Inlet.F=0.334
SINK.Inlet.P=101325
SINK.Inlet.h=420000

#calculate SINK
SINK.calculate()

#Print result

print(SINK.df)
print(SINK.To_degC)
```
### Output data

## 1.3. Compressor
### 1.3.1. Compressor model

```python

from ThermodynamicCycles.Source import Source
from ThermodynamicCycles.Compressor import Compressor
from ThermodynamicCycles.Sink import Sink
from ThermodynamicCycles.Connect import Fluid_connect

#Create Compressor Object with Source and fluid Sink
SOURCE=Source.Object()
COMP=Compressor.Object()
SINK=Sink.Object()

#Data Input
SOURCE.Ti_degC=20
SOURCE.fluid="air"
SOURCE.Pi_bar=1
SOURCE.F_Sm3h=500 # is not considered if  COMP.Q_comp is not None

COMP.eta_is=0.80
COMP.Tdischarge_target=80 # (discharge temperature in degC, after cooler)
COMP.HP=7.5*100000 # discharge pressure in Pa
COMP.Q_comp=48745.761 # if Energy Power is given (W) the Mass flow rate is recalculated


#Calculate and Connect Objects
SOURCE.calculate()
Fluid_connect(COMP.Inlet,SOURCE.Outlet)
COMP.calculate()
Fluid_connect(SINK.Inlet,COMP.Outlet)
SINK.calculate()

#Data output (print DataFrame)
print(SOURCE.df)
print(COMP.df)
print(SINK.df)

```


<img src="https://render.githubusercontent.com/render/math?math=\eta_{is} = 0.8">
# EnergySystemModels
Energy System Models for Energy Efficiency Calculation

## 1.4. Water Heat Storage
### 1.4.1. Mixed Tank
```python
from ThermodynamicCycles import MixedStorage
from ThermodynamicCycles.Source import Source
from ThermodynamicCycles.Sink import Sink
from ThermodynamicCycles.Connect import Fluid_connect


#lecture d'un fichier excel
#pip install pandas
import pandas as pd
import os
data=pd.read_excel( os.path.join(os.path.dirname(__file__), 'HotWaterStorage.xlsx'))
data['Timestamp'] = pd.to_datetime(data['Timestamp'], unit="%d/%m/%y %H:%M:%S")
rows = data.shape[0]
print(rows)
print(data.columns)

#initialiser les table de Outlet
df_result=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)
df_source=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)
df_str=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)
df_sink=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)

#CreateTank Object with Source and fluid Sink
SOURCE=Source.Object()
SINK=Sink.Object()
STR=MixedStorage.Object()

#paramètres
STR.V=4
STR.Tinit_degC=40
STR.t=1*3600 #in seconde

for r in range(1, rows):
#Data Input
    SOURCE.Ti_degC=data["TdegC"][r] 
    SOURCE.fluid="water"
    SOURCE.Pi_bar=1
    SOURCE.F_m3h=data["F_m3h"][r] 

    SOURCE.Timestamp=data["Timestamp"][r]
    STR.Timestamp=data["Timestamp"][r]
    SINK.Timestamp=data["Timestamp"][r]

    #calcul du pas de temps
    Timestamp=data["Timestamp"][r] 
    dt=(data["Timestamp"][r]-data["Timestamp"][r-1]).total_seconds()
    #print(dt)
    STR.t=dt

    SOURCE.calculate()
    Fluid_connect(STR.Inlet,SOURCE.Outlet)
    STR.calculate()
    Fluid_connect(SINK.Inlet,STR.Outlet)
    SINK.calculate()

    df_str=df_str.append(STR.df.T)
    df_source=df_source.append(SOURCE.df.T)
    df_sink=df_sink.append(SINK.df.T)
  
# Add new column to the DataFrame
df_result=df_str.merge(df_sink, on=['Timestamp']).merge(df_source, on=['Timestamp'])
print(df_result)

with pd.ExcelWriter('output_WaterStorage.xlsx') as writer:                #Création d'un fichier de Outlet + Ecriture
    df_result.to_excel(writer, sheet_name='Feuille output',index=False)
    data.to_excel(writer, sheet_name='Feuille input',index=False)

####PLOT#####

# Import Library

import matplotlib.pyplot as plt
df_result.index=df_result['Timestamp']

# to set the plot size
plt.figure(figsize=(16, 8), dpi=100)

# Plot
df_result["str_Ti_degC"].plot(marker="o",label='Tentrèe (°C)', color='orange')
df_result["str_T_degC"].plot(marker="o",label='Tsortie (°C)')
df_result["cumul_Qstr_kWh"].plot(marker="o",label='Energie stockée cumulée (kWh)')
df_result["Qstr_kW"].plot(marker="o",label='Puissance de stockage (kW)')

# Labelling 

plt.xlabel("Date")
plt.ylabel("kWh, kW et °C")
plt.legend()
plt.grid()
plt.title("Stockage d'énergie thermique")

# Display

plt.show()
```

# 2. AHU modules
# 2.1 Fresh AHU Example

``` python

# =============================================================================
# AHU Model (Fresh air + Heating Coil + humidifier)
# =============================================================================

#module de calcul des prop d'air humide
from AHU import FreshAir
#Heating Coil Component
from AHU import HeatingCoil
#composant Humidifier (vapeur ou adiabatique)
from AHU.Humidification import Humidifier
# connexion entre les composants
from AHU.Connect import Air_connect

##########Création des Objects
AN=FreshAir.Object()
BC=HeatingCoil.Object()
HMD=Humidifier.Object()

    
#Récupération des données entrées par l'utilisateur
        #AN
AN.F_m3h=3000 #m3/h
#print("AN.F_m3h = ",AN.F_m3h)
AN.T=14 #°C
AN.RH_FreshAir=71 # %
    #BC
BC.To_target=15 #°C
    #Humidifier
HMD.wo_target=8 #g/Kg dry air

    #calculate les propriétés d'air neuf; !important
AN.calculate()

Air_connect(BC.Inlet,AN.Outlet)
BC.calculate()
    

Air_connect(HMD.Inlet,BC.Outlet)
    
HMD.HumidType="vapeur" #par default : Humdificateur adiabatique
HMD.calculate()


#enregistrer les résultats du module d'air neuf

#Absolute Humidity  g/kg_as

print("Fresh Air Absolute Humidity  g/kg_as",round(AN.w,1))
# print("HA_FreshAir[r-1] = ",HA_FreshAir[r-1])
#Sat Vapor Pressure  " Pa"

print("Fresh Air Sat Vapor Pressure   Pa",round(AN.Pvsat,0))
#Wet-Bulb Temperature  °C

print("Fresh Air Wet-Bulb Temperature  °C",round(AN.T_hum,1))
#Specific Enthalpy  KJ/Kg_as

print("Fresh Air Specific Enthalpy  KJ/Kg_as",round(AN.h,3))

#enregistrer les résultats de la Coil de préchauffage

# Specific Enthalpy KJ/Kg_as
print("Heating Coil Specific Enthalpy KJ/Kg_as",round(BC.ho,1))
# Thermal Power  kW"
print("Heating Coil Thermal Power  kW",round(BC.Qth,1))
# Relative Humidity %"
print("Heating Coil Relative Humidity %",round(BC.RH_out,1))
    
print("Humidifier Steam mass flow rate Kg/s",round(HMD.F_water,3))  
print("Humidifier Dry air mass flow rate Kg/s",round(HMD.F_dry,3)) 

# =============================================================================
# End AHU Model
# =============================================================================

```

# 3. Chiller Example

## 3.1. Launch Chiller Application (Tkinter GUI)
``` python
from TkinterGUI import Chiller
``` 
## 3.2. Create Oriented-Object Chiller

``` python
# =============================================================================
# Chiller Model (Evaporator + Compressor + Desuperheater + Condenser + Expansion_Valve)
# =============================================================================

# #ThermodynamicCycles
import CoolProp.CoolProp as CP
from ThermodynamicCycles.Evaporator import Evaporator
from ThermodynamicCycles.Compressor import Compressor
from ThermodynamicCycles.Desuperheater import Desuperheater
from ThermodynamicCycles.Expansion_Valve import Expansion_Valve
from ThermodynamicCycles.Condenser import Condenser
from ThermodynamicCycles.Connect import Fluid_connect

###############Create chiller component object ##################
EVAP=Evaporator.Object()
COMP=Compressor.Object()
DESURCH=Desuperheater.Object()
COND=Condenser.Object()
DET=Expansion_Valve.Object()
###############################################################

########################Cycle Inlet Parameters########################
#***************Evaporator parameters*******
fluid="R134a"
EVAP.fluid=fluid
EVAP.Inlet.F=1 #Kg/s
# T or P evap :
EVAP.LP_bar=2.930154 #bar
#EVAP.Ti_degC=0 #Tevap 
EVAP.surchauff=2 #superheating
EVAP.Inlet.h= CP.PropsSI('H','P',1*1e5,'T',40+273.15,fluid)   #initialisation pour le calcul en boucle
#******************compresseur parameters***********

# give HP or Tcond
#COMP.HP=1e5*10 #Pa
COMP.Tcond_degC=40
COMP.eta_is=0.8 # isentropic efficiency
COMP.Tdischarge_target=80 #°C compressor outlet temperature, neglected if compressor is not cooled
COMP.Q_comp==100000 #in (W) If this value is given, the mass flow rate is calculated /Write None if not used  #in (W) If this value is given, the mass flow rate is calculated
#*************** Condenser parameters**************
COND.subcooling=2 #°C subcooling


#calculation algorithme
EVAP.calculate() # evaporator initialisation
Fluid_connect(COMP.Inlet,EVAP.Outlet)
COMP.calculate()
Fluid_connect(DESURCH.Inlet,COMP.Outlet)
DESURCH.calculate()
Fluid_connect(COND.Inlet, DESURCH.Outlet)
COND.calculate()
Fluid_connect(DET.Inlet,COND.Outlet)
Fluid_connect(DET.Outlet,EVAP.Inlet)
DET.calculate()
Fluid_connect(EVAP.Inlet,DET.Outlet)
EVAP.calculate() # recalculate evaporator

# Cycle performance
EER=EVAP.Q_evap/COMP.Q_comp
print("EER="+str(round(EER,1))+" ")
Q_condTot=COND.Q_cond+DESURCH.Qdesurch
print("Q_condTot="+str(round(Q_condTot/1000,1))+" kW")
COP=Q_condTot/COMP.Q_comp
print("COP="+str(round(COP,1))+" ")

# ####### Print Results#######################"
print(COMP.df)
print(EVAP.df)
print(DESURCH.df)
print(COND.df)
print(DET.df)

# =============================================================================
# End Chiller Model
# =============================================================================
```

## 3.3. Hydraulique

``` python
from ThermodynamicCycles.Hydraulic import StraightPipe
from ThermodynamicCycles.Source import Source
from ThermodynamicCycles.Sink import Sink
from ThermodynamicCycles.Connect import Fluid_connect

SOURCE=Source.Object()
STRAINGHT_PIPE=StraightPipe.Object()
STRAINGHT_PIPE2=StraightPipe.Object()
SINK=Sink.Object()

SOURCE.fluid="water"
SOURCE.Ti_degC=25
SOURCE.Pi_bar=1
SOURCE.F_m3h=100
SOURCE.calculate()
STRAINGHT_PIPE.d_hyd=0.050
STRAINGHT_PIPE.L=100
STRAINGHT_PIPE.K=0.00002

STRAINGHT_PIPE2.d_hyd=0.2
STRAINGHT_PIPE2.L=100
STRAINGHT_PIPE2.K=0.00002

Fluid_connect(STRAINGHT_PIPE.Inlet,SOURCE.Outlet)
STRAINGHT_PIPE.calculate()
Fluid_connect(STRAINGHT_PIPE2.Inlet,STRAINGHT_PIPE.Outlet)
STRAINGHT_PIPE2.calculate()
Fluid_connect(SINK.Inlet,STRAINGHT_PIPE2.Outlet)
SINK.calculate()

print(SOURCE.df)
print(STRAINGHT_PIPE.df)
print(STRAINGHT_PIPE2.df)
print(SINK.df)


```

# 3. Pinch Analysis 

``` python

from PinchAnalysis.PinchCalculation import PinchCalculation
import pandas as pd
import matplotlib.pyplot as plt

#DataFrame Input Data
df=pd.DataFrame({'id': [1, 2, 3, 4],
                   'name': ['stream1', 'stream2', 'stream3', 'stream4'],
                   'Ti': [200, 50, 125, 45],
                 'To': [50, 250, 124, 195],
                 'mCp': [3, 2,300,4],
                 'dTmin2': [5, 5, 10, 10],
                 'integration': [True, True, True, True]
                 })


#Pinch Calculation
T, plot_GCC, plot_ccf,plot_ccc,utilite_froide,utilite_chaude=PinchCalculation(df)

#Print the results
print("T",T)
print("GCC",plot_GCC[:,0])
print("ccf",plot_ccf[:,0])
print("ccc",plot_ccc[:,0])
print("utilite_froide",utilite_froide)
print("uilite_chaude",utilite_chaude)


# Plot the results

fig, (ax1, ax2) = plt.subplots(1, 2)
ax1.plot(plot_ccf[:,0],T, color='tab:blue')
ax1.plot(plot_ccc[:,0],T, color='tab:red')
ax2.plot(plot_GCC[:,0],T, color='tab:orange')
ax1.set(xlabel='kW', ylabel='Temperature (°C)')
ax2.set(xlabel='kW')
ax1.grid(True)
ax2.grid(True)
plt.show()

```

# 4 Données-météo
## 4.1 OpenWeaterMap
Pour lire la température et l'humidité en fonction d'une position GPS à partir des données de OpenWeaterMap 
``` python
from OpenWeatherMap import OpenWeatherMap_call_location

df=OpenWeatherMap_call_location.API_call_location("48.862725","2.287592")

print(df)
```

<Response [200]>
                   Timestamp  T(°C)  RH(%)
0 2023-03-09 14:09:01.941527  14.39     72

## 4.2 MeteoCiel

Scraper les données historique d'une station Meteociel
``` python
from datetime import datetime
#pip install energysystemmodels
from MeteoCiel.MeteoCiel_Scraping import MeteoCiel_histoScraping

# 0. Données d'entrée#
code2=10637 #station météo
date_debut=datetime(2023,1,1)
date_fin=datetime.now()

print("date_debut:",date_debut)
print("date_fin:",date_fin)

# 1. Utiliser la fonction de scraping
df_histo,df_day, df_month, df_year=MeteoCiel_histoScraping(code2,date_debut,date_fin,base_chauffage=18, base_refroidissement=23)
# la base de calcul DJU par default = base_chauffage=18, base_refroidissement=23

# 2. Entregistrer sous forme d'un fichier Excel
df_histo.to_excel("Meteociel.fr_station_"+str(date_debut.date())+"_to_"+str(date_fin.date())+".xlsx")
df_day.to_excel("day_Meteociel.fr_station_"+str(date_debut.date())+"_to_"+str(date_fin.date())+".xlsx")
df_month.to_excel("month_Meteociel.fr_station_"+str(date_debut.date())+"_to_"+str(date_fin.date())+".xlsx")
df_year.to_excel("year_Meteociel.fr_station_"+str(date_debut.date())+"_to_"+str(date_fin.date())+".xlsx")

```


# 5-IPMVP
``` python
#pip install energysystemmodels
from IPMVP.IPMVP import Mathematical_Models
import os 
from datetime import datetime
import pandas as pd

# Nom du fichier de données
filename="Input-Data.xlsx"
# Nom de la colonne de Date
date="Timestamp"

#lecture des données
directory = os.getcwd()
file_directory=directory+"\\"+filename
df=pd.read_excel(file_directory)

#Transformer la date en index de date horaire. 
df[date] = pd.to_datetime(df[date])
df = df.set_index(df[date])

# définition des périodes de référence et de suivi
start_baseline_period=datetime(2018,1,1,hour=0)
end_baseline_period=datetime(2021,12,31,hour=0)
start_reporting_period=datetime(2022,1,1,hour=0)
end_reporting_period=datetime(2023,3,1,hour=0)

# Modèle IPMVP (Maille journalière)
df = df.resample('D').sum()
X=df[["x1","x2","x3","x4","x5","x6"]] #variables explicatives candidates
y=df["y"] # consommation d'énergie
day_model=Mathematical_Models(y,X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period,degree=3,print_report=True,seuil_z_scores=3)

# Modèle IPMVP Maille hébdo
weekly_X = X.resample('W').sum()
weekly_y =y.resample('W').sum()
day_model=Mathematical_Models(weekly_y,weekly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)

# Modèle IPMVP Maille Mensuelle
monthly_X = X.resample('M').sum()
monthly_y =y.resample('M').sum()
month_model=Mathematical_Models(monthly_y,monthly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)

# Modèle IPMVP Maille annuelle
# yearly_X = X.resample('Y').sum()
# yearly_y =y.resample('Y').sum()
# year_model=Mathematical_Models(yearly_y,yearly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)
```
# 6-Production solaire
``` python
from PV.ProductionElectriquePV import SolarSystem

# Exemple d'utilisation de la classe SolarSystem
system = SolarSystem(48.8566, 2.3522, 'Paris', 34, 'Etc/GMT-1', 180.0, 48.9)
system.retrieve_module_inverter_data()
system.retrieve_weather_data()
system.calculate_solar_parameters()
system.plot_annual_energy()

``` 

# 7-Calcul du TURPE

``` python

from Facture.TURPE import input_Contrat, TurpeCalculator, input_Facture,input_Tarif

facture = input_Facture(start="2022-09-01", end="2022-09-30", heures_depassement=0, depassement_PS_HPB=64, kWh_pointe=0, kWh_HPH=0, kWh_HCH=0, kWh_HPB=26635, kWh_HCB=12846)
#contrat = input_Contrat(domaine_tension="HTA", PS_pointe=129, PS_HPH=129, PS_HCH=129, PS_HPB=129, PS_HCB=250, version_utilisation="LU_pf")
contrat = input_Contrat(domaine_tension="BT > 36 kVA", PS_pointe=129, PS_HPH=129, PS_HCH=129, PS_HPB=129, PS_HCB=250, version_utilisation="LU",pourcentage_ENR =100)
tarif = input_Tarif(
    c_euro_kWh_pointe=0.2,
    c_euro_kWh_HPB=0.15,
    c_euro_kWh_HCB=0.12,
    c_euro_kWh_HPH=0.18,
    c_euro_kWh_HCH=0.16,
    c_euro_kWh_TCFE=0.05,
    c_euro_kWh_certif_capacite=0.03,
    c_euro_kWh_ENR=0.1,
    c_euro_kWh_ARENH=0.09
)
# Utilisez les valeurs du contrat et de la facture pour créer une instance de TurpeCalculator
turpe_calculator = TurpeCalculator(contrat,tarif, facture)

# Calculez le TURPE et les Taxes en utilisant les valeurs de la facture et du contrat
turpe_calculator.calculate_turpe()
#turpe_calculator.calculate_taxes_contrib()

# Imprimez les résultats de la TURPE
print(f"Acheminement (€) : {turpe_calculator.euro_TURPE}")
print(f"Taxes et Contributions (€) : {turpe_calculator.euro_taxes_contrib}")

``` 

Documentation: https://energysystemmodels-tutorial.readthedocs.io


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ZoheirHADID/EnergySystemModels",
    "name": "EnergySystemModels",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "Zoheir HADID",
    "author_email": "zoheir.hadid@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "- [1. Thermodynamic Cycles Package](#1-thermodynamic-cycles-package)\n  * [1.1. Fluid Source](#11-fluid-source)\n    + [1.1.1. Input parameters](#111-Input-parameters)\n  * [1.2. Sink](#12-sink)\n  * [1.3. Compressor](#13-compressor)\n    + [1.3.1. Compressor model](#131-compressor-model)\n  * [1.4. Water Heat Storage](#14-water-heat-storage)\n    + [1.4.1. Mixed Tank](#141-mixed-tank)\n\n- [2. AHU modules](#2-ahu-modules)\n  * [2.1 Fresh AHU Example](#21-fresh-ahu-exemple)\n- [3. Chiller Example](#3-Chiller-Example)\n  * [3.1. Launch Chiller Application (Tkinter GUI)](#31-Launch-Chiller-Application-(Tkinter-GUI))\n  * [3.2. Create Oriented-Object Chiller](#32-Create-Oriented-Object-Chiller)\n\n- [4. Donn\u00c3\u00a9es m\u00c3\u00a9t\u00c3\u00a9o](#4-Donn\u00c3\u00a9es-m\u00c3\u00a9t\u00c3\u00a9o)\n  * [4.1. OpenWeaterMap](#41-OpenWeaterMap)\n  * [4.2. MeteoCiel](#42-MeteoCiel)\n- [5. IPMVP](#5-IPMVP)\n- [6. Production solaire] (#6-production-solaire)\n\n# 1. Thermodynamic Cycles Package\n## 1.1. Fluid Source\n### 1.1.1. Input parameters\n\n| Symbol   |      Description      |  SI Units | Used Units |\n|----------|:-------------:|------:|------:|\n| Ti_degC |  Inlet temerature | K | \u00c2\u00b0C |\n| fluid |  Fluid/Refrigerant name    |  String |\"air\",\"ammonia\",\"R134a\",...|\n| F, F_Sm3s, F_m3s, F_Sm3h, F_m3h, F_kgh | Input Flow rate |   kg/s | kg/s, Sm3/s, m3/s, Sm3/h, m3/h, kg/h |\n| Pi_bar | Inlet Pressure |   Pa | bara |\n\n``` python\nfrom ThermodynamicCycles.Source import Source\n\n#Create Compressor Object\nSOURCE=Source.Object()\n\n#Data Input\nSOURCE.Pi_bar=1.01325\nSOURCE.fluid=\"air\"\nSOURCE.F=1\n#SOURCE.F_Sm3s=2937.482966/3600 #SOURCE.F_m3s=2480.143675/3600\n#SOURCE.F_Sm3h=1 #SOURCE.F_m3h=2480.143675 #SOURCE.F_kgh=3600\n\n#Calculate Object\nSOURCE.calculate()\n\n#Data output\nprint(SOURCE.df)\n```\n## 1.2. Sink\n\n### 1.2.1. Test Sink\n``` python\nfrom ThermodynamicCycles.Sink import Sink\n#from ThermodynamicCycles.Connect import Fluid_connect\n\n#Create Sink object\nSINK=Sink.Object()\n\n#Fluid_connect(SINK.Inlet,SOURCE.Outlet) \nSINK.Inlet.fluid=\"air\"\nSINK.Inlet.F=0.334\nSINK.Inlet.P=101325\nSINK.Inlet.h=420000\n\n#calculate SINK\nSINK.calculate()\n\n#Print result\n\nprint(SINK.df)\nprint(SINK.To_degC)\n```\n### Output data\n\n## 1.3. Compressor\n### 1.3.1. Compressor model\n\n```python\n\nfrom ThermodynamicCycles.Source import Source\nfrom ThermodynamicCycles.Compressor import Compressor\nfrom ThermodynamicCycles.Sink import Sink\nfrom ThermodynamicCycles.Connect import Fluid_connect\n\n#Create Compressor Object with Source and fluid Sink\nSOURCE=Source.Object()\nCOMP=Compressor.Object()\nSINK=Sink.Object()\n\n#Data Input\nSOURCE.Ti_degC=20\nSOURCE.fluid=\"air\"\nSOURCE.Pi_bar=1\nSOURCE.F_Sm3h=500 # is not considered if  COMP.Q_comp is not None\n\nCOMP.eta_is=0.80\nCOMP.Tdischarge_target=80 # (discharge temperature in degC, after cooler)\nCOMP.HP=7.5*100000 # discharge pressure in Pa\nCOMP.Q_comp=48745.761 # if Energy Power is given (W) the Mass flow rate is recalculated\n\n\n#Calculate and Connect Objects\nSOURCE.calculate()\nFluid_connect(COMP.Inlet,SOURCE.Outlet)\nCOMP.calculate()\nFluid_connect(SINK.Inlet,COMP.Outlet)\nSINK.calculate()\n\n#Data output (print DataFrame)\nprint(SOURCE.df)\nprint(COMP.df)\nprint(SINK.df)\n\n```\n\n\n<img src=\"https://render.githubusercontent.com/render/math?math=\\eta_{is} = 0.8\">\n# EnergySystemModels\nEnergy System Models for Energy Efficiency Calculation\n\n## 1.4. Water Heat Storage\n### 1.4.1. Mixed Tank\n```python\nfrom ThermodynamicCycles import MixedStorage\nfrom ThermodynamicCycles.Source import Source\nfrom ThermodynamicCycles.Sink import Sink\nfrom ThermodynamicCycles.Connect import Fluid_connect\n\n\n#lecture d'un fichier excel\n#pip install pandas\nimport pandas as pd\nimport os\ndata=pd.read_excel( os.path.join(os.path.dirname(__file__), 'HotWaterStorage.xlsx'))\ndata['Timestamp'] = pd.to_datetime(data['Timestamp'], unit=\"%d/%m/%y %H:%M:%S\")\nrows = data.shape[0]\nprint(rows)\nprint(data.columns)\n\n#initialiser les table de Outlet\ndf_result=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)\ndf_source=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)\ndf_str=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)\ndf_sink=pd.DataFrame(data=None, index=None, columns=None, dtype=None, copy=False)\n\n#CreateTank Object with Source and fluid Sink\nSOURCE=Source.Object()\nSINK=Sink.Object()\nSTR=MixedStorage.Object()\n\n#param\u00c3\u00a8tres\nSTR.V=4\nSTR.Tinit_degC=40\nSTR.t=1*3600 #in seconde\n\nfor r in range(1, rows):\n#Data Input\n    SOURCE.Ti_degC=data[\"TdegC\"][r] \n    SOURCE.fluid=\"water\"\n    SOURCE.Pi_bar=1\n    SOURCE.F_m3h=data[\"F_m3h\"][r] \n\n    SOURCE.Timestamp=data[\"Timestamp\"][r]\n    STR.Timestamp=data[\"Timestamp\"][r]\n    SINK.Timestamp=data[\"Timestamp\"][r]\n\n    #calcul du pas de temps\n    Timestamp=data[\"Timestamp\"][r] \n    dt=(data[\"Timestamp\"][r]-data[\"Timestamp\"][r-1]).total_seconds()\n    #print(dt)\n    STR.t=dt\n\n    SOURCE.calculate()\n    Fluid_connect(STR.Inlet,SOURCE.Outlet)\n    STR.calculate()\n    Fluid_connect(SINK.Inlet,STR.Outlet)\n    SINK.calculate()\n\n    df_str=df_str.append(STR.df.T)\n    df_source=df_source.append(SOURCE.df.T)\n    df_sink=df_sink.append(SINK.df.T)\n  \n# Add new column to the DataFrame\ndf_result=df_str.merge(df_sink, on=['Timestamp']).merge(df_source, on=['Timestamp'])\nprint(df_result)\n\nwith pd.ExcelWriter('output_WaterStorage.xlsx') as writer:                #Cr\u00c3\u00a9ation d'un fichier de Outlet + Ecriture\n    df_result.to_excel(writer, sheet_name='Feuille output',index=False)\n    data.to_excel(writer, sheet_name='Feuille input',index=False)\n\n####PLOT#####\n\n# Import Library\n\nimport matplotlib.pyplot as plt\ndf_result.index=df_result['Timestamp']\n\n# to set the plot size\nplt.figure(figsize=(16, 8), dpi=100)\n\n# Plot\ndf_result[\"str_Ti_degC\"].plot(marker=\"o\",label='Tentr\u00c3\u00a8e (\u00c2\u00b0C)', color='orange')\ndf_result[\"str_T_degC\"].plot(marker=\"o\",label='Tsortie (\u00c2\u00b0C)')\ndf_result[\"cumul_Qstr_kWh\"].plot(marker=\"o\",label='Energie stock\u00c3\u00a9e cumul\u00c3\u00a9e (kWh)')\ndf_result[\"Qstr_kW\"].plot(marker=\"o\",label='Puissance de stockage (kW)')\n\n# Labelling \n\nplt.xlabel(\"Date\")\nplt.ylabel(\"kWh, kW et \u00c2\u00b0C\")\nplt.legend()\nplt.grid()\nplt.title(\"Stockage d'\u00c3\u00a9nergie thermique\")\n\n# Display\n\nplt.show()\n```\n\n# 2. AHU modules\n# 2.1 Fresh AHU Example\n\n``` python\n\n# =============================================================================\n# AHU Model (Fresh air + Heating Coil + humidifier)\n# =============================================================================\n\n#module de calcul des prop d'air humide\nfrom AHU import FreshAir\n#Heating Coil Component\nfrom AHU import HeatingCoil\n#composant Humidifier (vapeur ou adiabatique)\nfrom AHU.Humidification import Humidifier\n# connexion entre les composants\nfrom AHU.Connect import Air_connect\n\n##########Cr\u00c3\u00a9ation des Objects\nAN=FreshAir.Object()\nBC=HeatingCoil.Object()\nHMD=Humidifier.Object()\n\n    \n#R\u00c3\u00a9cup\u00c3\u00a9ration des donn\u00c3\u00a9es entr\u00c3\u00a9es par l'utilisateur\n        #AN\nAN.F_m3h=3000 #m3/h\n#print(\"AN.F_m3h = \",AN.F_m3h)\nAN.T=14 #\u00c2\u00b0C\nAN.RH_FreshAir=71 # %\n    #BC\nBC.To_target=15 #\u00c2\u00b0C\n    #Humidifier\nHMD.wo_target=8 #g/Kg dry air\n\n    #calculate les propri\u00c3\u00a9t\u00c3\u00a9s d'air neuf; !important\nAN.calculate()\n\nAir_connect(BC.Inlet,AN.Outlet)\nBC.calculate()\n    \n\nAir_connect(HMD.Inlet,BC.Outlet)\n    \nHMD.HumidType=\"vapeur\" #par default : Humdificateur adiabatique\nHMD.calculate()\n\n\n#enregistrer les r\u00c3\u00a9sultats du module d'air neuf\n\n#Absolute Humidity  g/kg_as\n\nprint(\"Fresh Air Absolute Humidity  g/kg_as\",round(AN.w,1))\n# print(\"HA_FreshAir[r-1] = \",HA_FreshAir[r-1])\n#Sat Vapor Pressure  \" Pa\"\n\nprint(\"Fresh Air Sat Vapor Pressure   Pa\",round(AN.Pvsat,0))\n#Wet-Bulb Temperature  \u00c2\u00b0C\n\nprint(\"Fresh Air Wet-Bulb Temperature  \u00c2\u00b0C\",round(AN.T_hum,1))\n#Specific Enthalpy  KJ/Kg_as\n\nprint(\"Fresh Air Specific Enthalpy  KJ/Kg_as\",round(AN.h,3))\n\n#enregistrer les r\u00c3\u00a9sultats de la Coil de pr\u00c3\u00a9chauffage\n\n# Specific Enthalpy KJ/Kg_as\nprint(\"Heating Coil Specific Enthalpy KJ/Kg_as\",round(BC.ho,1))\n# Thermal Power  kW\"\nprint(\"Heating Coil Thermal Power  kW\",round(BC.Qth,1))\n# Relative Humidity %\"\nprint(\"Heating Coil Relative Humidity %\",round(BC.RH_out,1))\n    \nprint(\"Humidifier Steam mass flow rate Kg/s\",round(HMD.F_water,3))  \nprint(\"Humidifier Dry air mass flow rate Kg/s\",round(HMD.F_dry,3)) \n\n# =============================================================================\n# End AHU Model\n# =============================================================================\n\n```\n\n# 3. Chiller Example\n\n## 3.1. Launch Chiller Application (Tkinter GUI)\n``` python\nfrom TkinterGUI import Chiller\n``` \n## 3.2. Create Oriented-Object Chiller\n\n``` python\n# =============================================================================\n# Chiller Model (Evaporator + Compressor + Desuperheater + Condenser + Expansion_Valve)\n# =============================================================================\n\n# #ThermodynamicCycles\nimport CoolProp.CoolProp as CP\nfrom ThermodynamicCycles.Evaporator import Evaporator\nfrom ThermodynamicCycles.Compressor import Compressor\nfrom ThermodynamicCycles.Desuperheater import Desuperheater\nfrom ThermodynamicCycles.Expansion_Valve import Expansion_Valve\nfrom ThermodynamicCycles.Condenser import Condenser\nfrom ThermodynamicCycles.Connect import Fluid_connect\n\n###############Create chiller component object ##################\nEVAP=Evaporator.Object()\nCOMP=Compressor.Object()\nDESURCH=Desuperheater.Object()\nCOND=Condenser.Object()\nDET=Expansion_Valve.Object()\n###############################################################\n\n########################Cycle Inlet Parameters########################\n#***************Evaporator parameters*******\nfluid=\"R134a\"\nEVAP.fluid=fluid\nEVAP.Inlet.F=1 #Kg/s\n# T or P evap :\nEVAP.LP_bar=2.930154 #bar\n#EVAP.Ti_degC=0 #Tevap \nEVAP.surchauff=2 #superheating\nEVAP.Inlet.h= CP.PropsSI('H','P',1*1e5,'T',40+273.15,fluid)   #initialisation pour le calcul en boucle\n#******************compresseur parameters***********\n\n# give HP or Tcond\n#COMP.HP=1e5*10 #Pa\nCOMP.Tcond_degC=40\nCOMP.eta_is=0.8 # isentropic efficiency\nCOMP.Tdischarge_target=80 #\u00c2\u00b0C compressor outlet temperature, neglected if compressor is not cooled\nCOMP.Q_comp==100000 #in (W) If this value is given, the mass flow rate is calculated /Write None if not used  #in (W) If this value is given, the mass flow rate is calculated\n#*************** Condenser parameters**************\nCOND.subcooling=2 #\u00c2\u00b0C subcooling\n\n\n#calculation algorithme\nEVAP.calculate() # evaporator initialisation\nFluid_connect(COMP.Inlet,EVAP.Outlet)\nCOMP.calculate()\nFluid_connect(DESURCH.Inlet,COMP.Outlet)\nDESURCH.calculate()\nFluid_connect(COND.Inlet, DESURCH.Outlet)\nCOND.calculate()\nFluid_connect(DET.Inlet,COND.Outlet)\nFluid_connect(DET.Outlet,EVAP.Inlet)\nDET.calculate()\nFluid_connect(EVAP.Inlet,DET.Outlet)\nEVAP.calculate() # recalculate evaporator\n\n# Cycle performance\nEER=EVAP.Q_evap/COMP.Q_comp\nprint(\"EER=\"+str(round(EER,1))+\" \")\nQ_condTot=COND.Q_cond+DESURCH.Qdesurch\nprint(\"Q_condTot=\"+str(round(Q_condTot/1000,1))+\" kW\")\nCOP=Q_condTot/COMP.Q_comp\nprint(\"COP=\"+str(round(COP,1))+\" \")\n\n# ####### Print Results#######################\"\nprint(COMP.df)\nprint(EVAP.df)\nprint(DESURCH.df)\nprint(COND.df)\nprint(DET.df)\n\n# =============================================================================\n# End Chiller Model\n# =============================================================================\n```\n\n## 3.3. Hydraulique\n\n``` python\nfrom ThermodynamicCycles.Hydraulic import StraightPipe\nfrom ThermodynamicCycles.Source import Source\nfrom ThermodynamicCycles.Sink import Sink\nfrom ThermodynamicCycles.Connect import Fluid_connect\n\nSOURCE=Source.Object()\nSTRAINGHT_PIPE=StraightPipe.Object()\nSTRAINGHT_PIPE2=StraightPipe.Object()\nSINK=Sink.Object()\n\nSOURCE.fluid=\"water\"\nSOURCE.Ti_degC=25\nSOURCE.Pi_bar=1\nSOURCE.F_m3h=100\nSOURCE.calculate()\nSTRAINGHT_PIPE.d_hyd=0.050\nSTRAINGHT_PIPE.L=100\nSTRAINGHT_PIPE.K=0.00002\n\nSTRAINGHT_PIPE2.d_hyd=0.2\nSTRAINGHT_PIPE2.L=100\nSTRAINGHT_PIPE2.K=0.00002\n\nFluid_connect(STRAINGHT_PIPE.Inlet,SOURCE.Outlet)\nSTRAINGHT_PIPE.calculate()\nFluid_connect(STRAINGHT_PIPE2.Inlet,STRAINGHT_PIPE.Outlet)\nSTRAINGHT_PIPE2.calculate()\nFluid_connect(SINK.Inlet,STRAINGHT_PIPE2.Outlet)\nSINK.calculate()\n\nprint(SOURCE.df)\nprint(STRAINGHT_PIPE.df)\nprint(STRAINGHT_PIPE2.df)\nprint(SINK.df)\n\n\n```\n\n# 3. Pinch Analysis \n\n``` python\n\nfrom PinchAnalysis.PinchCalculation import PinchCalculation\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\n#DataFrame Input Data\ndf=pd.DataFrame({'id': [1, 2, 3, 4],\n                   'name': ['stream1', 'stream2', 'stream3', 'stream4'],\n                   'Ti': [200, 50, 125, 45],\n                 'To': [50, 250, 124, 195],\n                 'mCp': [3, 2,300,4],\n                 'dTmin2': [5, 5, 10, 10],\n                 'integration': [True, True, True, True]\n                 })\n\n\n#Pinch Calculation\nT, plot_GCC, plot_ccf,plot_ccc,utilite_froide,utilite_chaude=PinchCalculation(df)\n\n#Print the results\nprint(\"T\",T)\nprint(\"GCC\",plot_GCC[:,0])\nprint(\"ccf\",plot_ccf[:,0])\nprint(\"ccc\",plot_ccc[:,0])\nprint(\"utilite_froide\",utilite_froide)\nprint(\"uilite_chaude\",utilite_chaude)\n\n\n# Plot the results\n\nfig, (ax1, ax2) = plt.subplots(1, 2)\nax1.plot(plot_ccf[:,0],T, color='tab:blue')\nax1.plot(plot_ccc[:,0],T, color='tab:red')\nax2.plot(plot_GCC[:,0],T, color='tab:orange')\nax1.set(xlabel='kW', ylabel='Temperature (\u00c2\u00b0C)')\nax2.set(xlabel='kW')\nax1.grid(True)\nax2.grid(True)\nplt.show()\n\n```\n\n# 4 Donn\u00c3\u00a9es-m\u00c3\u00a9t\u00c3\u00a9o\n## 4.1 OpenWeaterMap\nPour lire la temp\u00c3\u00a9rature et l'humidit\u00c3\u00a9 en fonction d'une position GPS \u00c3\u00a0 partir des donn\u00c3\u00a9es de OpenWeaterMap \n``` python\nfrom OpenWeatherMap import OpenWeatherMap_call_location\n\ndf=OpenWeatherMap_call_location.API_call_location(\"48.862725\",\"2.287592\")\n\nprint(df)\n```\n\n<Response [200]>\n                   Timestamp  T(\u00c2\u00b0C)  RH(%)\n0 2023-03-09 14:09:01.941527  14.39     72\n\n## 4.2 MeteoCiel\n\nScraper les donn\u00c3\u00a9es historique d'une station Meteociel\n``` python\nfrom datetime import datetime\n#pip install energysystemmodels\nfrom MeteoCiel.MeteoCiel_Scraping import MeteoCiel_histoScraping\n\n# 0. Donn\u00c3\u00a9es d'entr\u00c3\u00a9e#\ncode2=10637 #station m\u00c3\u00a9t\u00c3\u00a9o\ndate_debut=datetime(2023,1,1)\ndate_fin=datetime.now()\n\nprint(\"date_debut:\",date_debut)\nprint(\"date_fin:\",date_fin)\n\n# 1. Utiliser la fonction de scraping\ndf_histo,df_day, df_month, df_year=MeteoCiel_histoScraping(code2,date_debut,date_fin,base_chauffage=18, base_refroidissement=23)\n# la base de calcul DJU par default = base_chauffage=18, base_refroidissement=23\n\n# 2. Entregistrer sous forme d'un fichier Excel\ndf_histo.to_excel(\"Meteociel.fr_station_\"+str(date_debut.date())+\"_to_\"+str(date_fin.date())+\".xlsx\")\ndf_day.to_excel(\"day_Meteociel.fr_station_\"+str(date_debut.date())+\"_to_\"+str(date_fin.date())+\".xlsx\")\ndf_month.to_excel(\"month_Meteociel.fr_station_\"+str(date_debut.date())+\"_to_\"+str(date_fin.date())+\".xlsx\")\ndf_year.to_excel(\"year_Meteociel.fr_station_\"+str(date_debut.date())+\"_to_\"+str(date_fin.date())+\".xlsx\")\n\n```\n\n\n# 5-IPMVP\n``` python\n#pip install energysystemmodels\nfrom IPMVP.IPMVP import Mathematical_Models\nimport os \nfrom datetime import datetime\nimport pandas as pd\n\n# Nom du fichier de donn\u00c3\u00a9es\nfilename=\"Input-Data.xlsx\"\n# Nom de la colonne de Date\ndate=\"Timestamp\"\n\n#lecture des donn\u00c3\u00a9es\ndirectory = os.getcwd()\nfile_directory=directory+\"\\\\\"+filename\ndf=pd.read_excel(file_directory)\n\n#Transformer la date en index de date horaire. \ndf[date] = pd.to_datetime(df[date])\ndf = df.set_index(df[date])\n\n# d\u00c3\u00a9finition des p\u00c3\u00a9riodes de r\u00c3\u00a9f\u00c3\u00a9rence et de suivi\nstart_baseline_period=datetime(2018,1,1,hour=0)\nend_baseline_period=datetime(2021,12,31,hour=0)\nstart_reporting_period=datetime(2022,1,1,hour=0)\nend_reporting_period=datetime(2023,3,1,hour=0)\n\n# Mod\u00c3\u00a8le IPMVP (Maille journali\u00c3\u00a8re)\ndf = df.resample('D').sum()\nX=df[[\"x1\",\"x2\",\"x3\",\"x4\",\"x5\",\"x6\"]] #variables explicatives candidates\ny=df[\"y\"] # consommation d'\u00c3\u00a9nergie\nday_model=Mathematical_Models(y,X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period,degree=3,print_report=True,seuil_z_scores=3)\n\n# Mod\u00c3\u00a8le IPMVP Maille h\u00c3\u00a9bdo\nweekly_X = X.resample('W').sum()\nweekly_y =y.resample('W').sum()\nday_model=Mathematical_Models(weekly_y,weekly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)\n\n# Mod\u00c3\u00a8le IPMVP Maille Mensuelle\nmonthly_X = X.resample('M').sum()\nmonthly_y =y.resample('M').sum()\nmonth_model=Mathematical_Models(monthly_y,monthly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)\n\n# Mod\u00c3\u00a8le IPMVP Maille annuelle\n# yearly_X = X.resample('Y').sum()\n# yearly_y =y.resample('Y').sum()\n# year_model=Mathematical_Models(yearly_y,yearly_X,start_baseline_period,end_baseline_period,start_reporting_period,end_reporting_period)\n```\n# 6-Production solaire\n``` python\nfrom PV.ProductionElectriquePV import SolarSystem\n\n# Exemple d'utilisation de la classe SolarSystem\nsystem = SolarSystem(48.8566, 2.3522, 'Paris', 34, 'Etc/GMT-1', 180.0, 48.9)\nsystem.retrieve_module_inverter_data()\nsystem.retrieve_weather_data()\nsystem.calculate_solar_parameters()\nsystem.plot_annual_energy()\n\n``` \n\n# 7-Calcul du TURPE\n\n``` python\n\nfrom Facture.TURPE import input_Contrat, TurpeCalculator, input_Facture,input_Tarif\n\nfacture = input_Facture(start=\"2022-09-01\", end=\"2022-09-30\", heures_depassement=0, depassement_PS_HPB=64, kWh_pointe=0, kWh_HPH=0, kWh_HCH=0, kWh_HPB=26635, kWh_HCB=12846)\n#contrat = input_Contrat(domaine_tension=\"HTA\", PS_pointe=129, PS_HPH=129, PS_HCH=129, PS_HPB=129, PS_HCB=250, version_utilisation=\"LU_pf\")\ncontrat = input_Contrat(domaine_tension=\"BT > 36 kVA\", PS_pointe=129, PS_HPH=129, PS_HCH=129, PS_HPB=129, PS_HCB=250, version_utilisation=\"LU\",pourcentage_ENR =100)\ntarif = input_Tarif(\n    c_euro_kWh_pointe=0.2,\n    c_euro_kWh_HPB=0.15,\n    c_euro_kWh_HCB=0.12,\n    c_euro_kWh_HPH=0.18,\n    c_euro_kWh_HCH=0.16,\n    c_euro_kWh_TCFE=0.05,\n    c_euro_kWh_certif_capacite=0.03,\n    c_euro_kWh_ENR=0.1,\n    c_euro_kWh_ARENH=0.09\n)\n# Utilisez les valeurs du contrat et de la facture pour cr\u00c3\u00a9er une instance de TurpeCalculator\nturpe_calculator = TurpeCalculator(contrat,tarif, facture)\n\n# Calculez le TURPE et les Taxes en utilisant les valeurs de la facture et du contrat\nturpe_calculator.calculate_turpe()\n#turpe_calculator.calculate_taxes_contrib()\n\n# Imprimez les r\u00c3\u00a9sultats de la TURPE\nprint(f\"Acheminement (\u00e2\u201a\u00ac) : {turpe_calculator.euro_TURPE}\")\nprint(f\"Taxes et Contributions (\u00e2\u201a\u00ac) : {turpe_calculator.euro_taxes_contrib}\")\n\n``` \n\nDocumentation: https://energysystemmodels-tutorial.readthedocs.io\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Energy systems models are the mathematical models that are developed in order to represent as reliably as possible various energy-related problems.",
    "version": "0.1.21.post2",
    "project_urls": {
        "Homepage": "https://github.com/ZoheirHADID/EnergySystemModels"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8910e393d0a0953d0bc4a1c9661f1a1dda6f597f392eedda294c6ac1ee11b1d",
                "md5": "87519c55425e5073dcc3fc64e2ea894e",
                "sha256": "f07563c3b374d7eb4ef70c4fad73704c66883e65857d3ec2551c27bc526c2238"
            },
            "downloads": -1,
            "filename": "EnergySystemModels-0.1.21.post2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "87519c55425e5073dcc3fc64e2ea894e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 213563,
            "upload_time": "2024-03-15T08:31:52",
            "upload_time_iso_8601": "2024-03-15T08:31:52.657901Z",
            "url": "https://files.pythonhosted.org/packages/e8/91/0e393d0a0953d0bc4a1c9661f1a1dda6f597f392eedda294c6ac1ee11b1d/EnergySystemModels-0.1.21.post2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-15 08:31:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ZoheirHADID",
    "github_project": "EnergySystemModels",
    "github_not_found": true,
    "lcname": "energysystemmodels"
}
        
Elapsed time: 0.28346s