# Evaluation of Hydrogen Generation with Hybrid Renewable Energy Sources
## 2 TRNSYS Modelling
It calculates the power output of the WECS based on power versus wind speed characteristics, which is typically provided in a table format stored in an external file. This model considers the impact of changes in air density and the variation in wind speed with height. In essence, this model allows for the simulation of a WECS by considering how the power output varies with wind speed and how it is affected by factors like the air density and changes in wind speed at different heights above the ground. This modelling approach is valuable for understanding and predicting the performance of wind energy systems and optimizing their efficiency under varying conditions. The selected wind turbine has a nominal maximum power rating of 500 W. TRNSYS often employs a model based on the power curve of a wind turbine. The power output (P) of a wind turbine can be calculated using Equation (1) [39]:  
\[P_{w}=\frac{1}{2}\rho Av^{3}C_{p} \tag{1}\]  
\(\bullet\): \(\rho\): air density (kg/m\({}^{3}\));  
\(\bullet\): A: the swept area of the turbine blades (m\({}^{2}\));  
\(\bullet\): v: wind speed (m/s);  
\(\bullet\): Cp: a power coefficient representing the efficiency of the turbine in extracting power from the wind. Solar Panels: Photovoltaic (PV) panels are central to the system. They convert incident solar irradiation into direct current (DC) electricity. When solar irradiation enters the system, only a fraction of it is converted into electricity, while the remainder is transformed into heat [39]. The PV panels can be installed on the rooftop of the laboratory building. The selected PV panels have a nominal maximum power rating of 550 W. Type 94a is the model used to represent photovoltaic panels in this study. TRNSYS typically models the electrical output of a PV system based on the photovoltaic array's characteristics and the incident solar radiation. The electrical power (P) produced by a PV module can be represented by the following equation [39]:  
\[P=\eta\ G\ A \tag{2}\]  
\(\bullet\): \(\eta\): the conversion efficiency of the PV module;  
\(\bullet\): G: incident solar radiation on the module (W/m\({}^{2}\));  
\(\bullet\): A: the area of the PV module (m\({}^{2}\)). Electrolyzer: An electrolyzer is employed to facilitate water electrolysis, a process in which water is split into hydrogen and oxygen. This process is pivotal for producing green hydrogen. In this research, an alkaline electrolyzer is utilized for hydrogen production. The simulation of the alkaline electrolyzer is accomplished using the Type160a component in TRNSYS. The fundamental relationship governing electrolysis is [PERSON]'s law of electrolysis, which relates the amount of chemical reaction to the amount of electrical charge passed through the electrolyte. For the electrolysis of water, the reaction is as follows [39]:  
\(\bullet\): [PERSON]'s law  
\[2H_{2}O\ \rightarrow\ 2H_{2}+O_{2} \tag{3}\]The [PERSON]'s law equation is given by  
\[Q=n\ F \tag{4}\]  
Q: electrical charge (Coulombs);  
n: the number of moles of electrons exchanged in the reaction;  
F: [PERSON]'s constant (approximately 96,485 C/mol). * Cell Voltage  
The cell voltage in an electrolysis system can be related to the standard cell potential and overpotentials:  
\[V_{cell}=E_{cell}-\eta_{activation}-\eta_{Ohmic}-\eta_{Concentration} \tag{5}\]  
E\({}_{\text{cell}}\): the standard cell potential;  
\({}^{\text{n}}\)activation: the activation overpotential;  
\({}^{\text{n}}\)Ohmic: the electrical resistance overpotential;  
\({}^{\text{n}}\)Concentration: the concentration overpotential. These overpotentials depend on factors such as electrode materials, temperature, and electrolyte concentration. Control Unit: This subroutine serves as a collection of control functions for an electrolyzer within an integrated mini-grid that is connected to a wind turbine, electrolyzer, hydrogen storage, and fuel cell system. Specifically, the electrolyzer in this system is configured to operate in a variable power mode.