ΛΟΓΙΣΜΙΚΟ ΠΡΟΣΟΜΟΙΩΣΗΣ ΗΛΙΑΚΟΥ ΘΕΡΜΙΚΟΥ ΣΥΣΤΗΜΑΤΟΣ ΓΙΑ ΖΕΣΤΟ ΝΕΡΟ ΧΡΗΣΗΣ Επιμέλεια: Αλέξανδρος Τσιμπούκης, 19/5/17 Τροποποιήσεις και προσθήκες κώδικα βασικού ΗΘΣ Στο υπάρχον λογισμικό υπάρχουν οι εξής προϋποθέσεις: Σταθερό φορτίο T T T st L, out f, in Για να προσομοιωθούν τα συστήματα ζεστού νερού χρήσης πρέπει να εφαρμοστούν οι εξής αλλαγές στον υπάρχοντα κώδικα: Εισάγονται μεταβλητές ελέγχου για να προσδιορίζεται πότε ένα σύστημα είναι για ΖΝΧ, πότε έχει χρονομεταβαλλόμενο φορτίο και αν έχει εναλλάκτη. Insert type of solar thermal system, idhw=1 for domestic how water idhw=0 Insert type of load, for constant load sload=0, for time dependent load sload=1 sload=0 Insert heat exchanger, iheat=1 if there is an heat exchanger, or iheat=0 if we dont have iheat=1 Αν η θερμοκρασία της δεξαμενής αποθήκευσης είναι μικρότερη από τη θερμοκρασία του φορτίου τότε ένα ποσοστό του φορτίου πάλι δίνεται από την ηλιακή ενέργεια, έστω και μικρό. Άρα, χρειάζεται συνθήκη ελέγχου που θα καθορίζει ότι το ηλιακό θερμικό σύστημα είναι ζεστού νερού χρήσης και στη συνέχεια προστίθεται η συνθήκη ελέγχου Tst t Tsup η οποία κλείνει το κύκλωμα χρήσης όταν ισχύει η συνθήκη. Επίσης, όταν Tst t Tload ισχύει, το φορτίο κάλυψης δίνεται από: Tst Tsup f T T load sup Το φορτίο ΖΝΧ συνήθως είναι μεταβλητό και η παροχή νερού είναι διαφορετική για κάθε ώρα της ημέρας. Άρα, χρειάζεται να εισαχθεί στο κώδικα ένας πίνακας όπου για κάθε ώρα υπάρχει μια ωριαία παροχή νερού. Συνήθως το προφίλ του φορτίου είναι ίδιο για κάθε μέρα οπότε τα στοιχεία είναι για 24 ώρες. if (sload==1 ) then Load input, sload=1 for time dependent load otherwise sload=0 for contant load Insert load time in minutes, 24 points hr = (/ 360, 420, 480, 540, 600,660,720,780,840,900,960,1020,1080,1140,1200,1260,1320,1380,1440,60,120,180,240,300 /) Insert load in kg/h, 24 points if it is DHW system ml_u=(/ 5.9,14.4,20.0,23.8,20.3,12.5,10.6,13.8,8.4,6.3,6.0,10.0,20.2,32.0,26.4,20.7,14.5,14.2,0.3,5.9,0.0,0.0,0.0,0.0 /) bqload=0 hr_load=24 Hours of the RAND profile DO i=1,hr_load
mload=ml_u(i)/3600 print*,ml_u(i),hr(i) qload=mload*(tlmin-tsup)*c if (qload>bqload) then bqload=qload Find maximum load in order to find flow rate for stratified storage END DO Ql=0; Insert load mass flow ml [Kg/s] mload= Insert load QL [W] qload=451.8 bqload=qload ql=qload Επειδή στο συστήματα ΖΝΧ τοποθετείται βάνα ανάμιξης, το θερμικό φορτίο που μεταφέρεται από το δοχείο αποθήκευσης Q L t δίνεται από Q L t m L t ctst t Tsup με Q Load m L t ct st t Tsup Άρα, το Q L t είναι διαφορετικό από το Q Load. if (sload==1) then Do i=1,hr_load if (hr(i)==((t-(daycount-1)*24*60))) then mload=ml_u(i)/3600 qload=mload*(tlmin-tsup)*c end do if (idhw==1) then if (itypst==0) then For stratified storage tlin=tstrat(1) ml=qload/((tlin-tsup)*c) ql=ml*(tlin-tsup)*c Υπολογίζεται η μέγιστη παροχή μάζας ανάμεσα στο κύκλωμα του συλλέκτη και του φορτίου έτσι ώστε συγκριθεί και να εφαρμοστεί η εξίσωση του Κεφαλαίου 6 για εναλλάκτη θερμότητας: F R AFRU mc 1 1 F R mc mc min 1 Επίσης, όταν έχουμε εναλλάκτη δεν ισχύει πλέον Tst TL, out Tf, in και το T f, out υπολογίζεται από τη σχέση:
F R b FT R a f, out Tf, in TL, out tb eff a If we have heat exchanger, then Fr'/Fr is calculated if (iheat==1) then if (mc*c>ml*c.and. ml>0) then Find minimum mass flow rate Fr_h=Fr/(1+((A*Fr*U)/(mc*c))*(((mc*c)/(eps*ml*c))-1d0)) Fr_h=Fr/(1+((A*Fr*U)/(mc*c))*(((mc*c)/(eps*mc*c))-1d0)) if (iheat==1) then Tfout is different if we have heat exchanger Tfout=Tfin-Tlout*(Fr_h*b/g)+Fr_h*Tam/g*(ta_eff*qs/qref+b*Ta/Tam) Tfout=Tfin*(1-Fr*b/g)+Fr*Tam/g*(ta_eff*qs/qref+b*Ta/Tam) Υπολογίζεται η επιφάνεια δεξαμενής σε περίπτωση που δίνεται ο όγκος της δεξαμενής και ο λόγος μήκος προς διάμετρο της δεξαμενής. Storage area calculation if Ast is not given and the volume storage is given if (Ast<0) then Vst=mst/(rho*c) Lst=(4.*Vst*(Rlndia**2)/pi)**0.333 dst=lst/rlndia Ast=pi*(dst/2+lst) Παράρτημα: Πηγαίο λογισμικό για ΖΝΧ Program SolSys IMPLICIT REAL(kind=8) (A H,O Z) real,parameter::pi=3.141592 real::t,trise,td,qs,qmax,qref,ta,tam,dta,a,ta_eff,b,fr,u,mc,c,qu,qst,ust,ast,pinv,qly ear,f,ce,s,qusef,cp& &,Ql,ml,g,Tfin,Tfout,DTl,Tlmin,Tst,Tstmax,Tstag,dc,dl,tr,sum_st,Tlin,Tlout,n,sum_dl,su m_pr,ai,jp,je,csc,sin,& Gp,Ge,Pe,Pp,iefe,iefp,sum_s,sum_us,sum_n,sum_n2,n2,sum_dl2,Vst,Lst,dst,rlndia,mload,q load & &,sum_l2,mstrat,delta,sum_fm,sum_gm,tsup,time,rho,bqload,flwmax,iflag,eps,fr_h Integer::daycount,M,years,it,hr_load,itypst,idhw,nodiv,iheat Real, DIMENSION(10)::cld,ldd,Fm,Gm,Tsttmp,Tstrat Real, Dimension(24)::hr,ml_u Insert type of solar thermal system, idhw=1 for domestic how water, for anything idhw=0 idhw=1
Insert heat exchanger, iheat=1 if there is an heat exchanger, or iheat=0 if we dont have iheat=1 Insert heat exchanger effectiveness eps=0.6d0 Enviromental Data Input Insert reference heat flux Qs,ref [W/mA2] qref=400 Insert max heat flux Qs,max [W/mA2] qmax=400 Insert mean temperature Ta,mean [K] Tam=276.6 Insert temperature variation DTa [K] DTa=8 Insert time of sunrise in minutes trise=426 Insert time of daylight in minutes td=576 Collector Data Input Insert collector surface A [ma2] A=5.02 Insert collector property ta_eff ta_eff=0.85 Insert collector heat removal parameter FR Fr=0.854 Insert collector heat transfer coefficient U [W/mA2*K] or collector value b can be inserted and then U is computed U=4.21 Insert collector mass flow rate mc [Kg/s] mc=4.94/(60) Insert specific heat of working fluid [J/kg*K] c=4183 Insert density of the fluid [kg/m3] rho=1000 Load Data Input Insert type of load, for constant load sload=0, for time dependent load sload=1 sload=1 Insert water main supply temperature Tsup [K] Tsup=289 Insert load minimum temperature Tl,min [K] Tlmin=322 Storage Data Input Insert storage capacity Mst*Cp [J/K] mst=1294*1000 Insert storage surface Ast [ma2] otherwise insert volume storage [m3] and lengthdiameter ratio of tank [m] Ast=3 Vst=0.31 Rlndia=3 Insert storage heat transfer coefficient Ust [W/mA2*K] Ust=0.931 Insert maximum storage temperature Tst,max Tstmax=373 Insert initial storage temperature Tst,initial [K] Tst=300
Calculation Data Input Insert time between outpout in minutes tr=60 Enter number of time steps [integer] maxi=240 Solar process economics Annual interest % ai=4.93 Annual rise for fuel prices % jp= 4.96 Petrol je=4.92 Electricity Cost of solar collector per m^2 [Euro/m^2] csc=300 Cost of installation and rest of the materials [Euro] cin=2000 Years of depreciation years=10 Cost of electricity[euro/kwh] ce=0.09460 Cost of petrol[euro/kwh] ce=0.09460 cp=0.0744 M=5, number for each Area collector value simulation Ieffective for economic results iefe=(ai*0.01 je*0.01)/(1+je*0.01) iefp=(ai*0.01 jp*0.01)/(1+jp*0.01) Open files for results open(10,file='solsys_econ_results.dat') open(20,file='solsys_results.dat') Different print header for different type of storage Write(20,'(2x,"Day",6x,"Time[min]",4x,"Tfin",11x,"Tfout",11x,"Tst",10x,"Tlin",12x,"Tl out",10x,"dc",10x,"dl",& 10x,"qs[W]",10x,"Qu[W]",8x,"Ql[W]",8x,"Qst[W]",5x,"Efficiency(%)")') Write(10,'(8x,"Α[m^2]",5x,"Coverage[%]",5x,"Gelectr",7x,"Gpetrol",7x,"Pelectr",6x,"Pp etrol",9x,"pinv")') Do I=1,M If we want to get results for more surface storages A=A+10 if (sload==1 ) then Load input, sload=1 for time dependent load otherwise sload=0 for contant load Insert load time in minutes, 24 points hr = (/ 360, 420, 480, 540, 600,660,720,780,840,900,960,1020,1080,1140,1200,1260,1320,1380,1440,60,120,180,240,30 0 /) Insert load in kg/h, 24 points if it is DHW system ml_u=(/ 5.9,14.4,20.0,23.8,20.3,12.5,10.6,13.8,8.4,6.3,6.0,10.0,20.2,32.0,26.4,20.7,14.5,14.2,0.3,5.9,0.0,0.0,0.0,0.0 /) bqload=0 hr_load=24 Hours of the RAND profile DO i=1,hr_load
mload=ml_u(i)/3600 print*,ml_u(i),hr(i) qload=mload*(tlmin Tsup)*c if (qload>bqload) then bqload=qload Find maximum load in order to find flow rate for stratified storage END DO Ql=0; Insert load mass flow ml [Kg/s] mload= Insert load QL [W] qload=451.8 bqload=qload ql=qload if iddhw=0 then it is not a Domestic Hot Water system and the load is constant if (idhw==0.and. sload==0) then Insert load mass flow ml [Kg/s] ml=0.1666 flwmax=ml Insert load QL [W] ql=4200 Storage area calculation if Ast is not given and the volume storage is given if (Ast<0) then Vst=mst/(rho*c) Lst=(4.*Vst*(Rlndia**2)/pi)**0.333 dst=lst/rlndia Ast=pi*(dst/2+lst) print*,ast Initial values t=trise dc=0 dl=0 if (U>0) then b=u*tam/qref Collector value b based on U U=b*qref/Tam Collector value U based on b g=mc*c*tam/qref/a Gamma coefficient daycount=1 tlin=tst;tfin=tst;tfout=300 n=0;qu=0;qs=0;qst=0;sum_dl=0;sum_l=0;sum_s=0;sum_st=0;sum_u=0;it=0;sum_us=0;sum_n=0;s um_n2=0;sum_dl2=0;sum_l2=0 if (idhw==1) then Domestic hot water tlout=tsup; tlout=300;
if (sload==0) then Write(20,'(i4,8F14.1,5F14.2)') Daycount,((t (daycount 1)*24*60)),tfin,tfout,tst,Tlin,Tlout,dc,dl,Qs,Qu,Ql,Qst,n Write(20,'(i4,8F14.1,5F14.2)') Daycount,((t (daycount 1)*24*60)),tfin,tfout,tst,Tlin,Tlout,dc,dl,Qs,Qu,Qload,Qst,n Do While (t<=(maxi 60/tr)*tr+trise) Daycount=t/60/24+1 qst=0 Load calculation if (sload==1) then Do i=1,hr_load if (hr(i)==((t (daycount 1)*24*60))) then mload=ml_u(i)/3600 qload=mload*(tlmin Tsup)*c end do if (idhw==1) then ml=qload/((tlin Tsup)*c) ql=ml*(tlin Tsup)*c If we have heat exchanger, then Fr'/Fr is calculated if (iheat==1) then if (mc*c>ml*c.and. ml>0) then Find minimum mass flow rate Fr_h=Fr/(1+((A*Fr*U)/(mc*c))*(((mc*c)/(eps*ml*c)) 1d0)) Fr_h=Fr/(1+((A*Fr*U)/(mc*c))*(((mc*c)/(eps*mc*c)) 1d0)) If (t>=(daycount 1)*24*60+trise.and. t<=(daycount 1)*24*60+trise+td) then qs=qmax*sin(pi*((t (daycount 1)*24*60) trise)/td) qs=0 Ta=Tam+DTa*Sin(2*Pi*(t (trise+360))/1440) Tfin=Tst Tstag=Ta+ta_eff*qs/b/qref*Tam if (iheat==1) then Tfout is different if we have heat exchanger Tfout=Tfin Tlout*(Fr_h*b/g)+Fr_h*Tam/g*(ta_eff*qs/qref+b*Ta/Tam) Tfout=Tfin*(1 Fr*b/g)+Fr*Tam/g*(ta_eff*qs/qref+b*Ta/Tam) If (Tstag Tfin>6) then If (Tst>Tstmax) then dc=0 If (Tfout Tfin>2) then dc=1
dc=0 dc=0 Endif if (ml==0) then when the flow rate of the load is zero, then the temperature difference is also zero in order to avoid NAN DTL=0 DTl=Ql/ml/c If (DTl>0) then if (idhw==1) then If the system is dhw then the control about the load is different If (Tst<Tsup) then dl=0 dl=1 If (Tst<Tlmin) then dl=0 dl=1 dl=0 Qu=dc*mc*c*(Tfout Tfin) if (idhw==1) then If the system is dhw then the load outlet is different Tlout=Tsup Tlout=Tlin Dtl Tlin=Tst Qst=dc*Qu dl*ql Ust*Ast*(Tst Ta) Tst=Tst+Qst*60/mst If (Qs>0 ) then n=(100*qu/(qs*a)) n=0 If (mod(t trise,tr)==0 ) then if (ml==0) then sum_dl2=sum_dl2+1
sum_dl=sum_dl+dl Different way to calculate the solar fraction by seeing when the valve is open sum_l=sum_l+ql sum_s=sum_s+qs*a sum_us=sum_us+qu If (mod(t trise,tr)==0 ) then Write(20,'(i4,8F14.1,8F14.1)') Daycount,((t (daycount 1)*24*60)+tr),tfin,tfout,tst,Tlin,Tlout,dc,dl,Qs,Qu,Ql,Qst,n t=t+1 End do Qload in a year qlyear=sum_l*365*24/1000 Load coverage if (sum_us/sum_l<1) then f=((sum_us/sum_l)) f=1 Economic calculations Pinv=csc*A+cin Ge=f*qlyear*ce Gp=f*qlyear*cp Pp=Gp*(((1+iefp)**years) 1)/(iefp*((1+iefp)**years)) Pe=Ge*(((1+iefe)**years) 1)/(iefe*((1+iefe)**years)) write(10,'(7f14.1)') A,f*100,Ge,Gp,Pe,Pp,Pinv write(*,'(a20,2f14.3)') 'Fraction of load=', f write(*,'(a20,2f14.3)') 'Time load pump is on=', sum_dl/(maxi sum_dl2) write(*,'(a26,2f14.2)') 'Daily average efficiency=', sum_us/sum_s End do End