Professional Documents
Culture Documents
h"
#include"conio.h"
#include"stdio.h"
#include"math.h"
int main()
{
double a1=0,b1=0,c1=0;
double temp=0, d1=0;
double yp=0,xp=0,mp=0,Cp=0;
double Xe1=0,Ye1=0,Xe2=0,mg=0,Cg=0;
double xe1=0,xe2=0,a=0,b=0,xqm=0,yqm=0,mqm=0,cqm=0,aqm=0,bqm=0,Iq=0,Iqy=0;
double nc=0,nf=0,i=0,cqm1=0,aqm1 =0,bqm1 = 0,Yn =0,deln =0,Rn =0,beta = 0,bn = 0
,qn=0,n=0,decl=0;
double xdn=0,ydn=0,mdn=0,Cd=0;
double decls=0,xds=0,yds=0,mds=0,Cds=0,S=0;
//******************************************************************************
**********
//For northern hemisphere
xdn = (2.69338*yp/1.43287)*cos(decl)-(1.26569*yp/1.43287-1.43287)*sin(decl); //x
-coordinate for the seasonal equation
ydn = 2.69338* sin(decl)+(1.26569-1.43287)*cos(decl)+1.43287; //y-coordinate for
the seasonal equation
mdn = tan(43.223+ decl/2)/(2*xdn); //solpe of seasonal equation
Cd =ydn-(mdn)*pow(xdn,2); //y-intercept on nth day of the equation
//disp(['Yn = ' num2str(mdn) ' * x ' num2str(+ Cd) ]);
cout<<"\n"<<"Yn = "<<mdn<<"*x +("<<Cd<<")";
//******************************************************************************
**********
//For southern hemisphere
decls = -decl;
xds = (2.69338*yp/1.43287)*cos(decls)-(1.26569*yp/1.43287-1.43287)*sin(decls); /
/x-coordinate for the seasonal equation
yds = 2.69338* sin(decls)+(1.26569-1.43287)*cos(decls)+1.43287; //y-coordinate f
or the seasonal equation
mds = tan(43.223+ decls/2)/(2*xds); //slope of seasonal equation
Cds = yds-(mds)*pow(xds,2); //Y-intercept on nth day of the equation
cout<<"\n"<<"Ys = "<<mds<<"*x + ("<<Cds<<")";
cout<<"\n"<<"Yg = "<<mg<<"*x + ("<<Cg<<")";
cout<<"\n"<<"Yp = "<<mp<<"*x + ("<<Cp<<")";
//disp(['Ys = ' num2str(mds) ' * x ' num2str(+ Cds) ]);
//disp(['Yg = ' num2str(mg) ' * x ' num2str( Cg) ])
//disp(['Yg = ' num2str(mp) ' * x ' num2str( Cp) ])
S = pow(yp,2)*3.94; //surface area of the Scheffler reflector
cout<<"\nCollector Area ="<<S;
getch ();
}