Matlab Codes and Plots For Equations Step 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Matlab codes and plots for equations

Step 1:
Step 1 is to calculate the raw poer for the PEMFC , generated by the stack. The raw is calculated
by the compressor power, net power and auxiliaries power. This is shown in equation below

Code:
The matlab code for this equation is given below.
clc
clear all
close all
% next are input arguments to get output
pcomp_air= 28.24
pnet= 83
pauxiliaries= 47
Praw=pcomp_air+pnet+pauxiliaries
stem(Praw) %command for ploting the discret values

title('raw power generated by the Stack')


Table for input and outputs:

Inputs Outputs
Pcom,air pnet Paxiliaries Praw
28.24W 83W 47W 154.24W
Plot:
Explanations:
By observing the plot for raw power, it is clear that raw generated by the stack has a value of
158.24W. we use stem command to plot the raw power. As Raw power has a discrete value.

Step 2:
Secondly, we have to calculate the refrigerator power by adding net power to auxiliaries power.
Equation 2 deals with power of refrigerator. Equation is shown below

Code:
The matlab code for this equation is given below.
pnet= 83
pauxiliaries= 47
Prefrigerator=pnet+pauxiliaries
stem(Prefrigerator) %command for ploting the discret values
title('Prefrigerator')

Inputs Outputs
pnet Paxiliaries Prefrigerator
83W 47W 130W
Explanations:
This plot shows that refrigerator power has a constant value near 130W. The discrete value is
shown in plot.

Step 3:
Another way to calculate the raw power is using cell voltage, cell current and total number of
cells which are present in fuel cell. Simply mulitplying these parameters we can evaluate raw
power.

Code:
The matlab code for this equation is given below.
Vcell=0.69
ncell=60
I= 3.8224

Praw=Vcell*I*ncell
stem(Praw)
title('Praw')

Inputs Outputs
Vcell I ncell Praw
0.69v 3.8224A 60 154.24W

Raw power estimated from cell parametrs is shown in plot. Discrete value of raw power is
estimated about 154.24W.
Step 4:
Air compressor power is avaluated by approximating it 25% of stack power. The parameters
“Pcomp, in” and “Pcomp, out” are the pressures of the air compressor at the input and output
respectively.

Code:
The matlab code for this equation is given below.
Tin= 25
cp= 1004
eta_c= 0.8
Pcom_out= 303975.03
Pcom_in= 101325.01
gamma= 1.4
mair=0.0128
% equation 4
Pcom_air=((mair*Tin*cp)/eta_c)*(((Pcom_out/Pcom_in)^((gamma-1)/gamma))-1)
stem(Pcom_air)
title('air compressor power')

Inputs Outputs
Tin cp Eta_c Pcom pcomin gamma 𝒑𝒄𝒐𝒎
out − 𝒂𝒊𝒓
25 1004 0.8 303975.03 101325.01 1.4 148.0852
pa
This plot is showing that compressor air power has a value of 148.08.

Step 5: For 𝒎̇air, we will code equation 5 first


The air flow rate is also calculated through raw power as it is a function of raw power.

Code:
The matlab code for this equation is given below.
% the air flow rate is described as
v=2
Vcell=0.69
Xo2= 0.2694
F= 965485
Mair= 28.97
Praw=158.24
mair=(v*Mair*Praw)/(Xo2*4*Vcell*F) %equation 5
stem(mair)
title('air flow rate’)
Equation 4 arguments.

Inputs Outputs
v ̅ air
𝑴 contant Praw Vcell Xo2 F 𝒎̇air
2 28.97 4 158.24W 0.69v 0.2694 96485 1278kg/s
g/mol C
mol-1

This plot is a representation of air flow rate with a value of 0.1278

Step 6:
Then we have to evaluate the air flow rate getting out of the cell. The equation below is
representing it.
Code:
The matlab code for this equation is given below.
Mo2=31.99
Vcell=0.69
Praw=158.24
F= 965485
mair=0.0128
mair_out=mair-((Mo2*Praw)/(4*Vcell*F))
stem(mair_out)
title('air flow rate')

Inputs Outputs
̅ air contant Praw
v 𝑴 Vcell Xo2 F Mo2 𝒎̇air-out
2 28.97 4 158.24W 0.69v 0.2694 96485 31.99g/mol 0.0109kg/s
g/mol C
mol-1

The below graph is showing the flow rate at which air comes out of the cell.
Step 7:
The next step is to evaluate the the hydrogen flow rate through out the cell.

Code:
The matlab code for this equation is given below.
Mh2= 2.02
Vcell=0.69
F= 965485
Praw=158.24
mdot_h2=((Mh2*Praw)/(2*Vcell*F))
stem(mdot_h2)
title('Hydrogen flow rate')

Inputs Outputs
contant Praw Vcell F MH2 𝒎𝒅𝒐𝒕 − 𝒉𝟐
2 158.24W 0.69v 96485 C 2.02g/mol 2.3992e-04
mol-1
The graph is showing the hydrogen flow rate for certain parameters through cell
Step 8:
The next step is to evaluate the the oxygen flow rate through out the cell.

Code:
The matlab code for this equation is given below.
Vcell=0.69
F= 965485
Mo2=31.99
Praw=158.24
mdot_o2=((Mo2*Praw)/(2*Vcell*F))
stem(mdot_o2)
title('oxygen flow rate')

Inputs Outputs
contant Praw Vcell F Mo2 𝒎𝒅𝒐𝒕_𝒐𝟐
2 158.24W 0.69v 96485 C 31.99g/mol 0.0038
mol-1

The plot is showing the oxygen flow rate for PEMFC cell.
Step 9:
The temperature rise whcich is assoiciated with the compression of air can be calculated using
following expression.

Code:
The matlab code for this equation is given below.

Tin= 25
eta_c= 0.8
Pcom_out= 303975.03
Pcom_in= 101325.01
gamma= 1.4

delta_Tcomp=(Tin/eta_c)*(((Pcom_out/Pcom_in)^((gamma-1)/gamma))-1)
stem(delta_Tcomp)
title('Temperature rise')

Inputs Outputs
Tin Eta_c Pcom pcomin gamma 𝒅𝒆𝒍𝒕𝒂_𝑻𝒄𝒐𝒎𝒑
out
25 0.8 303975.03 101325.01 1.4 11.5231
pa
The plot is showing the temperature rise with the effect of different parameters.
Step 10:
The humidity of air is calculated using following expression .

Code:
The matlab code for this equation is given below.
Mh2o=18.01528
Mair= 28.97
Ph2o=47390
Pair=2887762
w=(Mh2o*Ph2o)/(Mair*Pair)
stem(w)
title('humidity')

Inputs Outputs
̅ H2O
𝑴 Mair Ph2o pair w
18.01528 g/mol 28.97 47390 2887762 0.0214

This plot represents the humidity in cell. It has a discrete value which is plotted on the graph.
Step 11:
The rate of water production can be expressed as

Code:
The matlab code for this equation is given below.
Mh2o=18.01528
Praw=158.24
Vcell=0.69
F=96485
mH2O=(Mh2o*Praw)/(2*Vcell*F)
stem(mH2O)
title('rate of water production')

Inputs Outputs
̅ H2O
𝑴 P raw Vcell F 𝒎̇𝑯2O
18.01528 g/mol 158.24W 0.69v 96485 C 0.0214
mol-1

The plot is showing the water production rate in the cell.


Step 12
For the energy recovery option, a turbine can be used to generate power to the system, and to
reduce the exhaust temperature of the air. The following equations summarize the
temperature differences caused by the turbine and the power generated respectively

Code:
The matlab code for this equation is given below.
Pturbine_out=187451.2685
Pturbine_in=2887762785
Tin= 25
eta_c= 0.8
gamma= 1.4
delta_Tturbine=(eta_c*Tin)*(((Pturbine_out/Pturbine_in)^((gamma-1)/gamma))-1)
stem(delta_Tturbine)
title('temperature differences ')

Inputs Outputs
Eta_c Tin Pturbine.out Pturbine.in 𝒅𝒆𝒍𝒕𝒂 − 𝑻𝒕𝒖𝒓𝒃𝒊𝒏𝒆
0.8 25 187451.2685 2887762785 -18.7278
Step 13
The turbine power is expressed in the below expression. Where it depends upon the input and
output pressures.

Code:
The matlab code for this equation is given below.
Pturbine_out=187451.2685
Pturbine_in=2887762785
Tin= 25
mair=0.0128
cp= 1004
eta_c= 0.8
gamma= 1.4
Pturbine=(eta_c*mair*cp*Tin)*(((Pturbine_out/Pturbine_in)^((gamma-1)/gamma))-
1)
stem(Pturbine)
title('turbine power')

Inputs Outputs
Eta_c Tin mair cp Pturbine.out Pturbine.in 𝑷𝒕𝒖𝒓𝒃𝒊𝒏𝒆
0.8 25 0.0128 1004 187451.2685 2887762785 -240.6748

The plot is representing the turbine power in discrete values.


Step 14:
The amount of heat generated by the stack is then calculated using the following equation

Code:
The matlab code for this equation is given below.
Praw=158.24
Vcell=0.69
Q=Praw*((1.25/Vcell)-1)
stem(Q)
title('heat generated by the stack')

Inputs Outputs
Praw Vcell 𝑸̇
158.24W 0.69v 240.6748

The plot represents the discrete value of total amount of heat generated.
Step 15:
The total amount of energy that must be delivered by the batteries is then estimated using the
following equation

Code:
The matlab code for this equation is given below.
Ec=1.41
Llosses=0.03
Ddischarge=0.75
eta_converter=0.9
Ebattery=Ec/(eta_converter*(1-Llosses)*Ddischarge)
stem(Ebattery)
title('total amount of energy ')

Inputs Outputs
Ec Eta- Llosses Ddischarge 𝑬 𝒃𝒂𝒕𝒕𝒆𝒓𝒚
converter
1.41 kWh/day 0.9 0.03 0.75 2153kwh
The plot represents the total amount of battery which is required for cell operations.
Discussion on inputs and outputs:
The PEMFC fuel cell system depends upon different inputs and parameters to provide a suitable
energy outputs. We have to discuss weather these inputs and outputs are good on not. For a
general PEMFC system, the main inputs are compressor motor voltage with which the air is
compressed into the compressor the cell voltage and cell current. The power auxialries is
operating power for raw power. It is enough to produce raw power.
The cell voltage Vcell should be in proportion to the raw power. Oxygen fraction is good because
if its amount will increased it can effects the electrodes and cuses less efficiency. Some inputs
should be modified because we are not operating on much higher output like thousand of
kilowatt. We are marely producing 1-2kw/day that is much smaller than actual systems. So to
operate on this system we should stablies our operating inputs to have desired outputs. We have
manufacutred a system for 1-2kw per day so if we will operate on much higher rate of inputs the
systme will collaps and desired output not available. So we will decrease the oxygen fraction
according to our system. Similarfy stack power should be decreased accordinf to capacity and
output power will be less then actusaly observed system. For a daily production system we have
changed our battery to 240V.
Costing:
[1] PEMFC fuel cell refrigerator system is a event of a grid outage for a variety of applications.
Factors such as prevention of injury, loss of revenue or commodity stock, or continuity of security
and communication in the event of a power outage drive end users to purchase backup power
systems. PEM stack costs were less than 50% of overall system cost for all sizes and production
volumes considered, and were typically less than 15% at higher production volumes (greater than
10,000 units per year). The DC/AC converter represented the largest cost associated with the
balance of plant (BOP), followed by high-pressure regulators to step hydrogen down from its
stored pressure to operating pressure for the PEM fuel cell. At the largest annual production
volume (50,000 units per year), the overall system cost per kilowatt was found to be $518 for a
1-kW system and $700 for a 2-kW system.
[2]The fan speed control based hardware which is basically compressor, which proceed the
inputs into the cell has less cost then PEMFC. The 30% DC fan speed was chosen as the optimal.
This fan speed provides enough oxygen to the fuel cell while limiting power consumption, and
also keeps temperature under control. Humidity is crucial to fuel cell operation as well. Its cost is
10-15$ with overall hardware.
H2 valve is used to control the hydrogen feeded into the cell. Its cost is 2-3$ for a 1-2KW system.
[3]Fuel cell systems operating on compressed hydrogen can provide backup power for a
significantly longer time than batteries, depending on the amount of on-site hydrogen storage,
and provide more reliable backup power than diesel generators. Moreover, compressed
hydrogen is more energy-dense than are batteries, and the storage cylinders require no special
housing or space conditioning.

Manufacturing and assembly costing:


[4]For this system to be ready for real time running, there will be manufacturing costs. These
costs contains manufacturing of assemblies and labour costs. These costs are ranges from 300-
350$ for 1-2KW/day system.

Sensors costs:
[5]The sensors used for different purposes like h2 leakage sensor and pressure sensors are also
necessory to be enlisted for costing. They have addiional costing 50-150$ depending upon the
compnies and capability.
Cost tatble for a 1-2kw system.

Components Costs
H2 valve 20$
Fan(speed) 40-50$

PEMFC STACK 250%

Power regulator 50$

DC/AC converter 130$

Refrigerator 230%

Battery 100$

Refferences:
[1] De Miguel N, Acosta B, Baraldi D, Melideo R, Ortiz Cebolla R, Moretto P. The role of initial tank
temperature on refueling of on-board hydrogen tanks. Int J Hydrogen Energy 2016;41(20):8606e15.

[2] U.S. Department of Energy, Battelle Memorial Institute DOE Contract No. DE-EE0005250

[3] U.S. Department of Energy, Battelle Memorial Institute DOE Contract No. DE-EE0005250
[4] U.S. Department of Energy, Battelle Memorial Institute DOE Contract No. DE-EE0005250
[5] U.S. Department of Energy, Battelle Memorial Institute DOE Contract No. DE-EE0005250

You might also like