summaryrefslogtreecommitdiff
path: root/3434/CH8/EX8.2/Ex8_2.sce
blob: 7071bddc7c3502fdc3b1fb47385e571de74f603f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
clc
// given data
Gaslight=10*0.227*4 // gas required for lighting in m^3/day
Eleccomp=10*250*6*60*60/1000000.0 // electrical energy required by computers in MJ
effith=0.25 // thermal efficieny
efficonv=0.80 // conversion efficiency
Heat=23.0 // heating value of biogas in MJ/m^3
rho=1090.0 // slurry density in kg/m^3
Engineinput=Eleccomp/(effith*efficonv)

energypump=746*2*2*60*60/1000000.0 // mechanical energy required for pumping in MJ
themalinput=energypump/effith  // required thermal input in MJ
totalinput=themalinput+Engineinput // total thermal input required by engine

Volreq=totalinput/Heat // volume required per day in m^3/day
Totalrq=Volreq+Gaslight // total gas required in m^3 /day

n=Totalrq/(7*0.18*0.34) // solid mass is 18% and n is number of cows required
n=round(n)
printf("The number of cows is %i",n)
feed=7*n // daily feed in kg
slurry=2*feed // in kg
volslurry=slurry/rho // volume of slurry added per day in m^3
totalvol=50*volslurry/0.9 // total volume for 50 days in m^3 when 90 % is occupied by slurry

printf("\n The size of biogas plant is %.2f m^3",totalvol)