Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B.

Sarkar Department:- Electrical Engineering

// Practical 1-1
// Program to determine Main dimension of 3 phase induction motor

#include <iostream>
#include <cmath>

using namespace std;


int p, f;
double hp, kw, kva, pf, efn, co, Bav, ac, wf, nm, ns, pr, sf, va;
double power, q, D, L, nd, Li;

voidmain()
{
cout<<"hp:-";
cin>>hp;
cout<<"kw:-";
cin>>kw;
cout<<"kva:-";
cin>>kva;
cout<<"pf:-";
cin>>pf;
cout<<"efn:-";
cin>>efn;
cout<<"co:-";
cin>>co;
cout<<"Bav:-";
cin>>Bav;
cout<<"ac:-";
cin>>ac;
cout<<"wf:-";
cin>>wf;
cout<<"p:-";
cin>>p;
cout<<"f:-";
cin>>f;
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cout<<"nm:-";
cin>>nm;
cout<<"ns:-";
cin>>ns;
cout<<"pr:-";
cin>>pr;
cout<<"sf:-";
cin>>sf;
cout<<"va:-";
cin>>va;

if(hp!=0) // hp = output power in hp,

{
kw=hp*0.746; // kw = output power in kw,

}
if(kw!=0)
{
kva=kw/pf; // kva = output power in kva,pf = power factor,

}
if(kva!=0)
{
q=kva/efn; // q = stator slot per pole per phase, efn =efficiency,

}
if(co==0) // co = output coefficient,

{
co=0.011*Bav*ac*wf; // Bav = average flux density in the air gap,

} // ac = ampere conductor per metre,wf = winding factor,

if(p!=0) // p = no. of poles,

{
ns=2*f/p; // ns = synchronous speed in rps,f = frequency,

}
else
{
if(nm!=0) //nm = synchronous speed in rpm,
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
{
ns=nm/60;
}
}
if(pr!=0) // pr=ratio of pole pitch to pole length,

power=(q*p/(co*ns*3.14*pr));
D=pow(power,1.0/3.0); // D=cbrt(power); // D = Bore dia of stator,

L=3.14*D*pr/p; // L = length of the stator core,

nd=L*10-0.2; // nd = no. of duct, sf = stacking factor,

Li=sf*(L-nd*0.1); // Li = net iron length of the stator core,

va=3.14*D*ns; // va = peripheral speed,

else
{

D=va/(3.14*ns);
L=q/(co*ns*D*D);
nd=L*10-0.2;
Li=sf*(L-nd*0.1);
}

cout<<"D="<<D<<endl;
cout<<"L="<<L<<endl;
cout<<"Li="<<Li<<endl;
cout<<"nd="<<nd<<endl;
cout<<"co="<<co<<endl;
cout<<"va="<<va<<endl;
cout<<"p="<<p<<endl;
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering

// Practical 1-2
// Program to determine Main dimension of 3 phase induction motor

#include <iostream>
#include <cmath>

using namespace std;


int p, f;
double hp, kw, kva, pf, efn, co, Bav, ac, wf, nm, ns, pr, sf, va;
double power, q, D, L, nd, Li;

void main()
{
cout<<"hp:-";
cin>>hp;
cout<<"kw:-";
cin>>kw;
cout<<"kva:-";
cin>>kva;
cout<<"pf:-";
cin>>pf;
cout<<"efn:-";
cin>>efn;
cout<<"co:-";
cin>>co;
cout<<"Bav:-";
cin>>Bav;
cout<<"ac:-";
cin>>ac;
cout<<"wf:-";
cin>>wf;
cout<<"p:-";
cin>>p;
cout<<"f:-";
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cin>>f;
cout<<"nm:-";
cin>>nm;
cout<<"ns:-";
cin>>ns;
cout<<"pr:-";
cin>>pr;
cout<<"sf:-";
cin>>sf;
cout<<"va:-";
cin>>va;
if(hp!=0) // hp = output power in hp,

kw=hp*0.746; // kw = output power in kw,

if(kw!=0)
kva=kw/pf; // kva = output power in kva,pf = power factor,

if(kva!=0)
q=kva/efn; // q = stator slot per pole per phase, efn =efficiency,

if(co==0) // co = output coefficient,

co=0.011*Bav*ac*wf; // Bav = average flux density in the air gap,

if(p!=0) // ac = ampere conductor per metre,wf = winding factor,

ns=2*f/p; // ns = synchronous speed in rps,f = frequency,

if(nm==0) //nm = synchronous speed in rpm,

ns=nm/60; // p = no. of poles,

if(pr!=0) // pr=ratio of pole pitch to pole length,

power=(q*p/(co*ns*3.14*pr));
D=pow(power,1.0/3.0); // D=cbrt(power); // D = Bore dia of stator,

L=3.14*D*pr/p; // L = length of the stator core,

nd=L*10-0.2; // nd = no. of duct, sf = stacking factor,

Li=sf*(L-nd*0.1); // Li = net iron length of the stator core,

va=3.14*D*ns; // va = peripheral speed,

else
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
{

D=va/(3.14*ns);
L=q/(co*ns*D*D);
nd=L*10-0.2;
Li=sf*(L-nd*0.1);
}

cout<<"D="<<D<<endl;
cout<<"L="<<L<<endl;
cout<<"Li="<<Li<<endl;
cout<<"nd="<<nd<<endl;
cout<<"co="<<co<<endl;
cout<<"va="<<va<<endl;
cout<<"p="<<p<<endl;
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering

// Practical 1-3
// Program to determine Main dimension of 3 phase induction motor

#include <iostream>
#include <cmath>

using namespace std;


int p, f;
double hp, kw, kva, pf, efn, co, Bav, ac, wf, nm, ns, pr, sf, va;
double power, q, D, L, nd, Li;

void main()
{
cout<<"hp:-";
cin>>hp;
cout<<"kw:-";
cin>>kw;
cout<<"kva:-";
cin>>kva;
cout<<"pf:-";
cin>>pf;
cout<<"efn:-";
cin>>efn;
cout<<"co:-";
cin>>co;
cout<<"Bav:-";
cin>>Bav;
cout<<"ac:-";
cin>>ac;
cout<<"wf:-";
cin>>wf;
cout<<"p:-";
cin>>p;
cout<<"f:-";
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cin>>f;
cout<<"nm:-";
cin>>nm;
cout<<"ns:-";
cin>>ns;
cout<<"pr:-";
cin>>pr;
cout<<"sf:-";
cin>>sf;
cout<<"va:-";
cin>>va;

if(hp!=0) kw=hp*0.746; // hp = output power in hp,// kw = output power in kw,

if(kw!=0) kva=kw/pf; // kva = output power in kva,pf = power factor,

if(kva!=0) q=kva/efn; // q = stator slot per pole per phase, efn =efficiency,

if(co==0) co=0.011*Bav*ac*wf; // co = output coefficient,// Bav = average flux density in the air gap,
if(p!=0) ns=2*f/p; // ac = ampere conductor per metre,wf = winding factor,

if(nm==0) ns=nm/60; // ns = synchronous speed in rps,f = frequency,

//nm = synchronous speed in rpm, p = no. of poles,

if(pr!=0) // pr=ratio of pole pitch to pole length,


{

power=(q*p/(co*ns*3.14*pr));
D=pow(power,1.0/3.0); // D=cbrt(power); // D = Bore dia of stator,

L=3.14*D*pr/p; // L = length of the stator core,

nd=L*10-0.2; // nd = no. of duct, sf = stacking factor,

Li=sf*(L-nd*0.1); // Li = net iron length of the stator core,

va=3.14*D*ns; // va = peripheral speed,


}

else
{

D=va/(3.14*ns);
L=q/(co*ns*D*D);
nd=L*10-0.2;
Li=sf*(L-nd*0.1);
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cout<<"D="<<D<<endl;
cout<<"L="<<L<<endl;
cout<<"Li="<<Li<<endl;
cout<<"nd="<<nd<<endl;
cout<<"co="<<co<<endl;
cout<<"va="<<va<<endl;
cout<<"p="<<p<<endl;
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering

// Practical 1-4
// Program to determine Main dimension of 3 phase induction motor

#include <iostream>
#include <cmath>

using namespace std;


int p, f;
double hp, kw, kva, pf, efn, co, Bav, ac, wf, nm, ns, pr, sf, va;
double power, q, D, L, nd, Li;

void main()
{
cout<<"hp:-";
cin>>hp;
cout<<"kw:-";
cin>>kw;
cout<<"kva:-";
cin>>kva;
cout<<"pf:-";
cin>>pf;
cout<<"efn:-";
cin>>efn;
cout<<"co:-";
cin>>co;
cout<<"Bav:-";
cin>>Bav;
cout<<"ac:-";
cin>>ac;
cout<<"wf:-";
cin>>wf;
cout<<"p:-";
cin>>p;
cout<<"f:-";
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cin>>f;
cout<<"nm:-";
cin>>nm;
cout<<"ns:-";
cin>>ns;
cout<<"pr:-";
cin>>pr;
cout<<"sf:-";
cin>>sf;
cout<<"va:-";
cin>>va;

if(hp!=0) // hp = output power in hp,

{
kw=hp*0.746; // kw = output power in kw,

}
if(kw!=0)
{
kva=kw/pf; // kva = output power in kva,pf = power factor,

}
if(kva!=0)
{
q=kva/efn; // q = stator slot per pole per phase, efn =efficiency,

}
if(co==0) // co = output coefficient,

{
co=0.011*Bav*ac*wf; // Bav = average flux density in the air gap,

} // ac = ampere conductor per metre,wf = winding factor,

if(p!=0) // p = no. of poles,

{
ns=2*f/p; // ns = synchronous speed in rps,f = frequency,

}
else
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
{
if(nm!=0) //nm = synchronous speed in rpm,

{
ns=nm/60;
}
}
if(pr!=0) // pr=ratio of pole pitch to pole length,

power=(q*p/(co*ns*3.14*pr));
D=pow(power,1.0/3.0); // D=cbrt(power); // D = Bore dia of stator,

L=3.14*D*pr/p; // L = length of the stator core,

nd=L*10-0.2; // nd = no. of duct, sf = stacking factor,

Li=sf*(L-nd*0.1); // Li = net iron length of the stator core,

va=3.14*D*ns; // va = peripheral speed,

else
{

D=va/(3.14*ns);
L=q/(co*ns*D*D);
nd=L*10-0.2;
Li=sf*(L-nd*0.1);
}

cout<<"D="<<D<<endl;
cout<<"L="<<L<<endl;
cout<<"Li="<<Li<<endl;
cout<<"nd="<<nd<<endl;
cout<<"co="<<co<<endl;
cout<<"va="<<va<<endl;
cout<<"p="<<p<<endl;
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering

// Practical 1-5
// Program to determine Main dimension of 3 phase induction motor

#include <iostream>
#include <cmath>

using namespace std;


int p, f;
double hp, kw, kva, pf, efn, co, Bav, ac, wf, nm, ns, pr, sf, va;
double power, q, D, L, nd, Li;

void inputfun()
{
cout<<"hp:-";
cin>>hp;
cout<<"kw:-";
cin>>kw;
cout<<"kva:-";
cin>>kva;
cout<<"pf:-";
cin>>pf;
cout<<"efn:-";
cin>>efn;
cout<<"co:-";
cin>>co;
cout<<"Bav:-";
cin>>Bav;
cout<<"ac:-";
cin>>ac;
cout<<"wf:-";
cin>>wf;
cout<<"p:-";
cin>>p;
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
cout<<"f:-";
cin>>f;
cout<<"nm:-";
cin>>nm;
cout<<"ns:-";
cin>>ns;
cout<<"pr:-";
cin>>pr;
cout<<"sf:-";
cin>>sf;
cout<<"va:-";
cin>>va;
}

void fun10()
{
if(hp!=0) // hp = output power in hp,

{
kw=hp*0.746; // kw = output power in kw,

}
if(kw!=0)
{
kva=kw/pf; // kva = output power in kva,pf = power factor,

}
}

void fun20()

{
if(kva!=0)
{
q=kva/efn; // q = stator slot per pole per phase, efn =efficiency,

}
}
void fun30()
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
{
if(nm==0)
{
ns=nm/60;
}
}

void fun40() // pr=ratio of pole pitch to pole length,

{
power=(q*p/(co*ns*3.14*pr));
D=pow(power,1.0/3.0); // D=cbrt(power); // D = Bore dia of stator,

L=3.14*D*pr/p; // L = length of the stator core,

nd=L*10-0.2; // nd = no. of duct, sf = stacking factor,

Li=sf*(L-nd*0.1); // Li = net iron length of the stator core,

va=3.14*D*ns; // va = peripheral speed,

void fun50()
{
D=va/(3.14*ns);
L=q/(co*ns*D*D);
nd=L*10-0.2;
Li=sf*(L-nd*0.1);
}
int main()
{
inputfun()
fun10()
fun20()
if(co==0) // co = output coefficient,

{
co=0.011*Bav*ac*wf; // Bav = average flux density in the air gap,

} // ac = ampere conductor per metre,wf = winding factor,

if(p!=0) // p = no. of poles,


Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering
{
ns=2*f/p; // ns = synchronous speed in rps,f = frequency,

}
else
{
fun30()
}
if(pr!=0) // pr=ratio of pole pitch to pole length,

{
fun40()
}
else
{
fun50()
}
cout<<"D="<<D<<endl;
cout<<"L="<<L<<endl;
cout<<"Li="<<Li<<endl;
cout<<"nd="<<nd<<endl;
cout<<"co="<<co<<endl;
cout<<"va="<<va<<endl;
cout<<"p="<<p<<endl;
}
Subject:- EE-704 Electrical Cad Teacher:- Prof. A. B. Sarkar Department:- Electrical Engineering

You might also like