Assignment 2 Name: Pranav Kimothi Roll No: 182053: Q1: Code in C For Transformer Design

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

ASSIGNMENT 2

Name: Pranav Kimothi


Roll no: 182053

Q1: Code in C for transformer design.


Ans: This program will allow the user to have the design of single-phase core
type, single phase shell type, 3 phase power type and 3 phase distribution type
transformers.

The algorithm of this program has been taken by analyzing the design
problems given from page 435-447 in AK Sawhney book.

Problems with the algorithm:

• The mean diameter of LV and HV windings is to be entered by the user


as the no of coils, winding type and orientation is vast and is dependent
upon the dimensions of transformer too. As, a result from the resistance
calculation part error is bound to occur in the program. However, I have
still tried to formulate the program.
• The algorithm for all the 4 types of transformers is same except that
they will have different values of flux density, dimension, Kw, Hw/Ww
ratio, phase voltages, current density etc. To make the program more
readable I have made 4 different functions instead of clubbing them
altogether.
#include<conio.h>

#include<math.h>

#include<stdio.h>

#include<stdlib.h>

#include<windows.h>

#include<dos.h>

void sound() // JUST TO MAKE PROGRAM SOUND MORE INTERESTING

Beep(1500,1000);Beep(1500,1000);Beep(1500,1000);

return;

void single_phase_core_type()

double kVA,HV,LV,frequency;

printf("\nPLEASE ENTER THE kVA: ");scanf("%lf",&kVA);

printf("\nPLEASE ENTER THE H.V.VOLTAGE IN kV: ");scanf("%lf",&HV);

printf("\nPLEASE ENTER THE L.V.VOLTAGE IN kV: ");scanf("%lf",&LV);

printf("\nPLEASE ENTER THE frequency: ");scanf("%lf",&frequency);

double k = 0.8; // as per table given in AK SAWHNEY

double emf_per_turn = k*sqrt(kVA);

double flux = emf_per_turn / (4.44*frequency);

// CALCULATION OF FLUX DENSITY ACCORDING TO VARIOUS VOLTAGE LEVEL ( USING CRGO


STEEL)

double flux_density;

if(HV<132)

flux_density = 1.55;
}

if(HV>=132 && HV<275)

flux_density = 1.6;

if(HV>=275)

flux_density = 1.7;

double iron_area = flux / flux_density ;

double stacking_factor = 0.9;

double diameter;

double net_area_of_core = stacking_factor*iron_area;

double length_of_largest_stamping;

double length_of_second_stamping;

double length_of_third_stamping;

//calculation of largest stamping

int choice;

printf("\nWHICH TYPE OF CORE WOULD YOU LIKE TO USE?\nPRESS 1 FOR SQUARE\nPRESS 2 FOR
TWO STEPPED\nPRESS 3 FOR THREE STEPPED\nPRESS 4 FOR FOUR STEPPED\n REMEMBER FOR LOW
RATING TRANSFORMERS YOU MUST GO WITH SQUARE/TWO STEPPED AND FOR HIGH RATING
TRANSFORMER GO WITH THREE/FOUR STEPPED. THE HIGHER THE STEPS, THE MORE WILL BE THE
COST OF YOUR TRANSFOMRER ");

scanf("%d",&choice);

switch(choice)

case 1: diameter = sqrt(stacking_factor*iron_area/0.45); length_of_largest_stamping = 0.707*diameter; break;

case 2: diameter = sqrt(stacking_factor*iron_area/0.56); length_of_largest_stamping = 0.85*diameter;


length_of_second_stamping = 0.53*diameter; break;

case 3: diameter = sqrt(stacking_factor*iron_area/0.60); length_of_largest_stamping =


0.9*diameter;length_of_second_stamping = 0.7*diameter; length_of_third_stamping = 0.42*diameter;break;

case 4: diameter = sqrt(stacking_factor*iron_area/0.62); length_of_largest_stamping = 0.92*diameter;break;

}
//calculation of Kw

double window_factor;

if(kVA<50)

window_factor = 8 / (30 + HV);

if(kVA>=50 && kVA<500)

window_factor = 10 / (30 + HV);

if(kVA>=500)

window_factor = 12 / (30 + HV);

//CALCULATION OF CURRENT DENSITY in A/mm2

double current_density;

if(HV<50)

current_density = 1.5; //FOR SMALL POWER TRANSFORMER

if(HV>=50 && HV<275)

current_density = 2.5; //ASSUMING AIR BLAST CIRCULATION

if(HV>=275)

current_density = 5.5; //ASSUMING FORCED OIL CIRCULATION

//CALCULATION OF WINDOW AREA using Q=2.22*f*Bm*delta*Kw*Ai

double window_area;

window_area = (kVA) / (1000*2.22*frequency*flux_density*current_density*window_factor*net_area_of_core);


double height_of_window;

double width_of_window; //ASSUMING Hw/Ww == 2.5

height_of_window = sqrt(2.5*window_area);

width_of_window = sqrt(window_area / 2.5);

double distance_between_limbs = diameter + width_of_window;

double depth_of_yoke = length_of_largest_stamping;

double overall_height = height_of_window + 2*length_of_largest_stamping;

double overall_width = distance_between_limbs + length_of_largest_stamping;

//FINDING OF WINDING TYPE;

char LVwinding [20];

char HVwinding [20];

if(kVA <= 1000 && HV<= 33 && LV<=0.440)

strcpy(HVwinding,"Foil"); strcpy(LVwinding,"Helix");

else if(kVA > 1000 && kVA <= 30000 && HV<= 66 && LV<=11)

strcpy(HVwinding,"Disc"); strcpy(LVwinding,"Disc");

else if(kVA > 30000 && HV<= 500 && LV <= 66)

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

else

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

double turns_in_HV_winding = ceil( HV*1000 / emf_per_turn );

double turns_in_LV_winding = ceil( LV*1000 / emf_per_turn );

double LV_current = ceil ( kVA / LV );

double HV_current = ceil ( kVA / HV );


double mean_dia_of_HV_turns;

double mean_dia_of_LV_turns;

printf("\nPlease enter the mean diameter for HV turns in mm: ");

scanf("%lf",&mean_dia_of_HV_turns);

printf("\nPlease enter the mean diameter for LV turns in mm: ");

scanf("%lf",&mean_dia_of_LV_turns);

//CALCULATION OF RESISTANCE

double length_of_mean_turn_in_HV = 3.1416*mean_dia_of_HV_turns / 1000; //converting into meter

double length_of_mean_turn_in_LV = 3.1416*mean_dia_of_LV_turns / 1000;

double resistance_of_HV_winding =
0.021*length_of_mean_turn_in_HV*turns_in_HV_winding/(100*current_density); // 0.021 is resistivity in micro-
ohms, length of mean turn is in meter and current density is in A/mm2 so that resistance is in ohms.

double resistance_of_LV_winding =
0.021*length_of_mean_turn_in_LV*turns_in_LV_winding/(100*current_density);

double resistance_reffered_to_HV = resistance_of_HV_winding +


(pow((turns_in_HV_winding/turns_in_LV_winding),2)*resistance_of_LV_winding);

double resistance_reffered_to_LV = resistance_of_LV_winding +


(pow((turns_in_LV_winding/turns_in_HV_winding),2)*resistance_of_HV_winding);

//CALCULATION OF P.U. RESISTANCE

double per_unit_resistance = resistance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF LEAKAGE RESISTANCE

double Lmt = (length_of_mean_turn_in_HV + length_of_mean_turn_in_LV) / (2*1000);//converting into meters

double x = (15 + ( (mean_dia_of_HV_turns /2 ) + (mean_dia_of_LV_turns /2) )/3 ) / 1000;

double axial_coil_length = 0.65*height_of_window; //JUST AN APPROXIMATION

double leakage_reactance_reffered_to_HV = 2*3.141*frequency*4*3.141*Lmt*pow(turns_in_HV_winding,2)*x /


(100000*axial_coil_length);

//CALCULATION OF P.U. LEAKAGE RESISTANCE

double per_unit_reactance = leakage_reactance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF P.U. IMPEDANCE

double per_unit_impedance = pow(pow(per_unit_reactance,2) + pow(per_unit_resistance,2) , 0.5);

//CALCULATION OF VOLTAGE REGULATION AT DIFFERENT POWER FACTOR


double vr1 = per_unit_reactance*0.6 + per_unit_resistance*0.8; //VR at 0.8 pf LAG

double vr2 = per_unit_reactance*0.66 + per_unit_resistance*0.75; //VR at 0.75 pf LAG

double vr3 = per_unit_reactance*0.71 + per_unit_resistance*0.7; //VR at 0.7 pf LAG

//CALCULATION OF COPPER LOSS AND CORE LOSS

double copper_loss = pow(HV_current,2)* resistance_reffered_to_HV;

double total_weight_of_iron = 7800*4*net_area_of_core*height_of_window; //only that area where loss would occur
i.e. in the 2 limbs + 2 yokes

double core_loss_in_limbs = 1.2 * total_weight_of_iron; //assuming 1.2 W/kg core loss for the chosen flux density

//CALCULATION OF EFFICIENCY at 0.8 PF LAG AT FULL LOAD

double efficiency = ((kVA*0.8) / ((kVA*0.8) + copper_loss + core_loss_in_limbs + 0.15*copper_loss));


//0.15*copper loss to cover stray load losses as well

double max_efficiency_load = pow((core_loss_in_limbs/(1.15*copper_loss)),0.5)*100;

//CALCULATION OF NO LOAD CURRENT

double Ic = core_loss_in_limbs / HV ;

double Im = flux*10000000*(2*distance_between_limbs + 2*width_of_window + depth_of_yoke)/


(4*3.141*1.414*turns_in_HV_winding*net_area_of_core); //neglecting MMF at joints

double Io = pow(pow(Ic,2)+pow(Im,2),0.5);

//CALCULATION OF DUCTS

double new_overall_height = overall_height + 0.6; //0.6 meter or 600 mm for lead oil etc.

double new_overall_width = overall_height + 2*0.08 + 2*length_of_largest_stamping; // 0.08 meter for clearence

double new_overall_depth = overall_height + 0.02 + 2*length_of_largest_stamping; // 0.02 meter or 200 mm for


clearence

double tank_area = new_overall_height * new_overall_width * new_overall_depth;

// assuming length of duct as 1.5 meter and diameter of 50 mm or 0.05 meter

double theta;

printf("\nPLEASE ENTER THE MAXIMUM TEMPERATURE LIMIT in degree Celsius: ");

scanf("%lf",&theta);

double number_of_ducts = ceil(((((1.15*copper_loss + core_loss_in_limbs)/theta)- 12.5*tank_area ) /


(8.8*3.141*0.05*1.5)));

printf("\n-----------------------------------------------SPECIFICATION SHEET----------------------------------------------------
-");
printf("\nkVA is: %lf",kVA);

printf("\nHV voltage in (kV) is: %lf",HV);

printf("\nLV voltage in (kV) is: %lf",LV);

printf("\nFrequency in (Hz) is: %lf",frequency);

printf("\nk is: 0.8");

printf("\nEMF per turn is: %lf",emf_per_turn);

printf("\nFlux in (Weber) is: %lf",flux);

printf("\nFlux in (weber/m^2) is: %lf",flux_density);

printf("\nIron area in (m^2) is: %lf",iron_area);

printf("\nStacking factor is: 0.9");

printf("\nNet area of core in (m^2) is: %lf",net_area_of_core);

printf("\nLength of largest stamping in (m) is: %lf",length_of_largest_stamping);

printf("\nWindow factor Kw is: %lf",window_factor);

printf("\nCurrent density in (A/mm^2) is: %lf",current_density);

printf("\nHeight of window in (m) is: %lf",height_of_window);

printf("\nWidth of window in (m) is: %lf",width_of_window);

printf("\nWindow are in (m^2) is: %lf",window_area);

printf("\nDistance between limbs in (m) is: %lf",distance_between_limbs);

printf("\nTotal turns in HV winding are: %lf",turns_in_HV_winding);

printf("\nTotal turns in LV winding are: %lf",turns_in_LV_winding);

printf("\nHV current in (A) is: %lf",HV_current);

printf("\nLV current in (A) is: %lf",LV_current);

printf("\nWinding type in HV is: %s",HVwinding);

printf("\nWinding type in LV is: %s",LVwinding);

printf("\nResistance of HV winding in (ohm) is: %lf",resistance_of_HV_winding);

printf("\nResistance of LV winding in (ohm) is: %lf",resistance_of_LV_winding);

printf("\nResistance referred to HV winding in (ohm) is: %lf",resistance_reffered_to_HV);

printf("\nResistance referred to LV winding in (ohm) is: %lf",resistance_reffered_to_LV);

printf("\nPer unit resistance in (p.u.) is: %lf",per_unit_resistance);

printf("\nLeakage Reactance referred to HV winding in (ohm) is: %lf",leakage_reactance_reffered_to_HV);

printf("\nPer unit reactance in (p.u.) is: %lf",per_unit_reactance);

printf("\nPer unit impedance in (p.u.) is: %lf",per_unit_impedance);

printf("\nVoltage regulation at 0.80 pf lag is: %lf percent",vr1*1000);

printf("\nVoltage regulation at 0.75 pf lag is: %lf percent",vr2*1000);


printf("\nVoltage regulation at 0.70 pf lag is: %lf percent",vr3*1000);

printf("\nTotal (I^2)R loss in (Watts) is: %lf",1.15*copper_loss);

printf("\nCore loss in (Watts) is: %lf",core_loss_in_limbs);

printf("\nEfficiency at upf at 0.8 pf lag is: %lf percent",efficiency*100);

printf("\nMaximum efficiency occur at %lf of full load",max_efficiency_load);

printf("\nCore loss component of current is: %lf A",Ic);

printf("\nMagnetizing component of current is: %lf A",Im);

printf("\nNo component of current is: %lf A",Io);

printf("\nOverall height of the tank is: %lf m",new_overall_height);

printf("\nOverall width of the tank is: %lf m",new_overall_width);

printf("\nOverall depth of the tank is: %lf m",new_overall_depth);

printf("\nArea of the tank is: %lf m^2",tank_area);

printf("\nNumber of ducts required for maximum allowable temperature %lf oC is: %lf ",theta,number_of_ducts);

getch();

void single_phase_shell_type()

double kVA,HV,LV,frequency;

printf("\nPLEASE ENTER THE kVA: ");scanf("%lf",&kVA);

printf("\nPLEASE ENTER THE H.V.VOLTAGE IN kV: ");scanf("%lf",&HV);

printf("\nPLEASE ENTER THE L.V.VOLTAGE IN kV: ");scanf("%lf",&LV);

printf("\nPLEASE ENTER THE frequency: ");scanf("%lf",&frequency);

double k = 1.1; // as per table given in AK SAWHNEY

double emf_per_turn = k*sqrt(kVA);

double flux = emf_per_turn / (4.44*frequency);

// CALCULATION OF FLUX DENSITY ACCORDING TO VARIOUS VOLTAGE LEVEL ( USING CRGO


STEEL)

double flux_density;

if(HV<132)

flux_density = 1.55;
}

if(HV>=132 && HV<275)

flux_density = 1.6;

if(HV>=275)

flux_density = 1.7;

double iron_area = flux / flux_density ;

double stacking_factor = 0.85;

double diameter;

double net_area_of_core = stacking_factor*iron_area;

double length_of_largest_stamping;

double length_of_second_stamping;

double length_of_third_stamping;

//calculation of largest stamping

int choice;

printf("\nWHICH TYPE OF CORE WOULD YOU LIKE TO USE?\nPRESS 1 FOR SQUARE\nPRESS 2 FOR
TWO STEPPED\nPRESS 3 FOR THREE STEPPED\nPRESS 4 FOR FOUR STEPPED\n REMEMBER FOR LOW
RATING TRANSFORMERS YOU MUST GO WITH SQUARE/TWO STEPPED AND FOR HIGH RATING
TRANSFORMER GO WITH THREE/FOUR STEPPED. THE HIGHER THE STEPS, THE MORE WILL BE THE
COST OF YOUR TRANSFOMRER ");

scanf("%d",&choice);

switch(choice)

case 1: diameter = sqrt(stacking_factor*iron_area/0.45); length_of_largest_stamping = 0.707*diameter; break;

case 2: diameter = sqrt(stacking_factor*iron_area/0.56); length_of_largest_stamping = 0.85*diameter;


length_of_second_stamping = 0.53*diameter; break;

case 3: diameter = sqrt(stacking_factor*iron_area/0.60); length_of_largest_stamping =


0.9*diameter;length_of_second_stamping = 0.7*diameter; length_of_third_stamping = 0.42*diameter;break;

case 4: diameter = sqrt(stacking_factor*iron_area/0.62); length_of_largest_stamping = 0.92*diameter;break;

}
//calculation of Kw

double window_factor;

if(kVA<50)

window_factor = 8 / (30 + HV);

if(kVA>=50 && kVA<500)

window_factor = 10 / (30 + HV);

if(kVA>=500)

window_factor = 12 / (30 + HV);

//CALCULATION OF CURRENT DENSITY in A/mm2

double current_density;

if(HV<50)

current_density = 1.5; //FOR SMALL POWER TRANSFORMER

if(HV>=50 && HV<275)

current_density = 2.5; //ASSUMING AIR BLAST CIRCULATION

if(HV>=275)

current_density = 5.5; //ASSUMING FORCED OIL CIRCULATION

//CALCULATION OF WINDOW AREA using Q=2.22*f*Bm*delta*Kw*Ai

double window_area;

window_area = (kVA) / (1000*2.22*frequency*flux_density*current_density*window_factor*net_area_of_core);


double height_of_window;

double width_of_window; //ASSUMING Hw/Ww == 2.5

height_of_window = sqrt(2.5*window_area);

width_of_window = sqrt(window_area / 2.5);

double distance_between_limbs = diameter + width_of_window;

double depth_of_yoke = 2*2.5*length_of_largest_stamping;

double overall_height = height_of_window + 2*length_of_largest_stamping;

double overall_width = (2*width_of_window) + (4*length_of_largest_stamping);

//FINDING OF WINDING TYPE;

char LVwinding [20];

char HVwinding [20];

if(kVA <= 1000 && HV<= 33 && LV<=0.440)

strcpy(HVwinding,"Foil"); strcpy(LVwinding,"Helix");

else if(kVA > 1000 && kVA <= 30000 && HV<= 66 && LV<=11)

strcpy(HVwinding,"Disc"); strcpy(LVwinding,"Disc");

else if(kVA > 30000 && HV<= 500 && LV <= 66)

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

else

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

double turns_in_HV_winding = ceil( HV*1000 / emf_per_turn );

double turns_in_LV_winding = ceil( LV*1000 / emf_per_turn );

double LV_current = ceil ( kVA / LV );

double HV_current = ceil ( kVA / HV );


double mean_dia_of_HV_turns;

double mean_dia_of_LV_turns;

printf("\nPlease enter the mean diameter for HV turns in mm: ");

scanf("%lf",&mean_dia_of_HV_turns);

printf("\nPlease enter the mean diameter for LV turns in mm: ");

scanf("%lf",&mean_dia_of_LV_turns);

//CALCULATION OF RESISTANCE

double length_of_mean_turn_in_HV = 3.1416*mean_dia_of_HV_turns / 1000; //converting into meter

double length_of_mean_turn_in_LV = 3.1416*mean_dia_of_LV_turns / 1000;

double resistance_of_HV_winding =
0.021*length_of_mean_turn_in_HV*turns_in_HV_winding/(100*current_density); // 0.021 is resistivity in micro-
ohms, length of mean turn is in meter and current density is in A/mm2 so that resistance is in ohms.

double resistance_of_LV_winding =
0.021*length_of_mean_turn_in_LV*turns_in_LV_winding/(100*current_density);

double resistance_reffered_to_HV = resistance_of_HV_winding +


(pow((turns_in_HV_winding/turns_in_LV_winding),2)*resistance_of_LV_winding);

double resistance_reffered_to_LV = resistance_of_LV_winding +


(pow((turns_in_LV_winding/turns_in_HV_winding),2)*resistance_of_HV_winding);

//CALCULATION OF P.U. RESISTANCE

double per_unit_resistance = resistance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF LEAKAGE RESISTANCE

double Lmt = (length_of_mean_turn_in_HV + length_of_mean_turn_in_LV) / (2*1000);//converting into meters

double x = (15 + ( (mean_dia_of_HV_turns /2 ) + (mean_dia_of_LV_turns /2) )/6 ) / 1000;

double axial_coil_length = 0.8*2*width_of_window; //JUST AN APPROXIMATION n = number of HV coils = 2

double leakage_reactance_reffered_to_HV = 3.141*frequency*4*3.141*Lmt*pow(turns_in_HV_winding,2)*x /


(100000*axial_coil_length);

//CALCULATION OF P.U. LEAKAGE RESISTANCE

double per_unit_reactance = leakage_reactance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF P.U. IMPEDANCE

double per_unit_impedance = pow(pow(per_unit_reactance,2) + pow(per_unit_resistance,2) , 0.5);

//CALCULATION OF VOLTAGE REGULATION AT DIFFERENT POWER FACTOR


double vr1 = per_unit_reactance*0.6 + per_unit_resistance*0.8; //VR at 0.8 pf LAG

double vr2 = per_unit_reactance*0.66 + per_unit_resistance*0.75; //VR at 0.75 pf LAG

double vr3 = per_unit_reactance*0.71 + per_unit_resistance*0.7; //VR at 0.7 pf LAG

//CALCULATION OF COPPER LOSS AND CORE LOSS

double copper_loss = pow(HV_current,2)* resistance_reffered_to_HV;

double total_weight_of_iron = 7800*4*net_area_of_core*height_of_window; //only that area where loss would occur
i.e. in the 2 limbs + 2 yokes

double core_loss_in_limbs = 1.2 * total_weight_of_iron; //assuming 1.2 W/kg core loss for the chosen flux density

//CALCULATION OF EFFICIENCY at 0.8 PF LAG AT FULL LOAD

double efficiency = ((kVA*0.8) / ((kVA*0.8) + copper_loss + core_loss_in_limbs + 0.15*copper_loss));


//0.15*copper loss to cover stray load losses as well

double max_efficiency_load = pow((core_loss_in_limbs/(1.15*copper_loss)),0.5)*100;

//CALCULATION OF NO LOAD CURRENT

double Ic = core_loss_in_limbs / HV ;

double Im = flux*10000000*(2*distance_between_limbs + 2*width_of_window + depth_of_yoke)/


(4*3.141*1.414*turns_in_HV_winding*net_area_of_core); //neglecting MMF at joints

double Io = pow(pow(Ic,2)+pow(Im,2),0.5);

//CALCULATION OF DUCTS

double new_overall_height = overall_height + 0.6; //0.6 meter or 600 mm for lead oil etc.

double new_overall_width = overall_height + 2*0.08 + 2*length_of_largest_stamping; // 0.08 meter for clearence

double new_overall_depth = overall_height + 0.02 + 2*length_of_largest_stamping; // 0.02 meter or 200 mm for


clearence

double tank_area = new_overall_height * new_overall_width * new_overall_depth;

// assuming length of duct as 1.5 meter and diameter of 50 mm or 0.05 meter

double theta;

printf("\nPLEASE ENTER THE MAXIMUM TEMPERATURE LIMIT in degree Celsius: ");

scanf("%lf",&theta);

double number_of_ducts = ceil(((((1.15*copper_loss + core_loss_in_limbs)/theta)- 12.5*tank_area ) /


(8.8*3.141*0.05*1.5)));

printf("\n-----------------------------------------------SPECIFICATION SHEET----------------------------------------------------
-");
printf("\nkVA is: %lf",kVA);

printf("\nHV voltage in (kV) is: %lf",HV);

printf("\nLV voltage in (kV) is: %lf",LV);

printf("\nFrequency in (Hz) is: %lf",frequency);

printf("\nk is: 0.8");

printf("\nEMF per turn is: %lf",emf_per_turn);

printf("\nFlux in (Weber) is: %lf",flux);

printf("\nFlux in (weber/m^2) is: %lf",flux_density);

printf("\nIron area in (m^2) is: %lf",iron_area);

printf("\nStacking factor is: 0.9");

printf("\nNet area of core in (m^2) is: %lf",net_area_of_core);

printf("\nLength of largest stamping in (m) is: %lf",length_of_largest_stamping);

printf("\nWindow factor Kw is: %lf",window_factor);

printf("\nCurrent density in (A/mm^2) is: %lf",current_density);

printf("\nHeight of window in (m) is: %lf",height_of_window);

printf("\nWidth of window in (m) is: %lf",width_of_window);

printf("\nWindow are in (m^2) is: %lf",window_area);

printf("\nDistance between limbs in (m) is: %lf",distance_between_limbs);

printf("\nTotal turns in HV winding are: %lf",turns_in_HV_winding);

printf("\nTotal turns in LV winding are: %lf",turns_in_LV_winding);

printf("\nHV current in (A) is: %lf",HV_current);

printf("\nLV current in (A) is: %lf",LV_current);

printf("\nWinding type in HV is: %s",HVwinding);

printf("\nWinding type in LV is: %s",LVwinding);

printf("\nResistance of HV winding in (ohm) is: %lf",resistance_of_HV_winding);

printf("\nResistance of LV winding in (ohm) is: %lf",resistance_of_LV_winding);

printf("\nResistance referred to HV winding in (ohm) is: %lf",resistance_reffered_to_HV);

printf("\nResistance referred to LV winding in (ohm) is: %lf",resistance_reffered_to_LV);

printf("\nPer unit resistance in (p.u.) is: %lf",per_unit_resistance);

printf("\nLeakage Reactance referred to HV winding in (ohm) is: %lf",leakage_reactance_reffered_to_HV);

printf("\nPer unit reactance in (p.u.) is: %lf",per_unit_reactance);

printf("\nPer unit impedance in (p.u.) is: %lf",per_unit_impedance);

printf("\nVoltage regulation at 0.80 pf lag is: %lf percent",vr1*1000);

printf("\nVoltage regulation at 0.75 pf lag is: %lf percent",vr2*1000);


printf("\nVoltage regulation at 0.70 pf lag is: %lf percent",vr3*1000);

printf("\nTotal (I^2)R loss in (Watts) is: %lf",1.15*copper_loss);

printf("\nCore loss in (Watts) is: %lf",core_loss_in_limbs);

printf("\nEfficiency at upf at 0.8 pf lag is: %lf percent",efficiency*100);

printf("\nMaximum efficiency occur at %lf of full load",max_efficiency_load);

printf("\nCore loss component of current is: %lf A",Ic);

printf("\nMagnetizing component of current is: %lf A",Im);

printf("\nNo component of current is: %lf A",Io);

printf("\nOverall height of the tank is: %lf m",new_overall_height);

printf("\nOverall width of the tank is: %lf m",new_overall_width);

printf("\nOverall depth of the tank is: %lf m",new_overall_depth);

printf("\nArea of the tank is: %lf m^2",tank_area);

printf("\nNumber of ducts required for maximum allowable temperature %lf oC is: %lf ",theta,number_of_ducts);

getch();

void three_phase_core_type_power()

double kVA,HV,LV,frequency;

printf("\nPLEASE ENTER THE kVA: ");scanf("%lf",&kVA);

printf("\nPLEASE ENTER THE H.V.VOLTAGE IN kV: ");scanf("%lf",&HV);

printf("\nPLEASE ENTER THE L.V.VOLTAGE IN kV: ");scanf("%lf",&LV);

printf("\nPLEASE ENTER THE frequency: ");scanf("%lf",&frequency);

double k = 0.65; // as per table given in AK SAWHNEY

double emf_per_turn = k*sqrt(kVA);

double flux = emf_per_turn / (4.44*frequency);

// CALCULATION OF FLUX DENSITY ACCORDING TO VARIOUS VOLTAGE LEVEL ( USING CRGO


STEEL)

double flux_density;

if(HV<132)

flux_density = 1.55;
}

if(HV>=132 && HV<275)

flux_density = 1.6;

if(HV>=275)

flux_density = 1.7;

double iron_area = flux / flux_density ;

double stacking_factor = 0.90;

double diameter;

double net_area_of_core = stacking_factor*iron_area;

double length_of_largest_stamping;

double length_of_second_stamping;

double length_of_third_stamping;

//calculation of largest stamping

int choice;

printf("\nWHICH TYPE OF CORE WOULD YOU LIKE TO USE?\nPRESS 1 FOR SQUARE\nPRESS 2 FOR
TWO STEPPED\nPRESS 3 FOR THREE STEPPED\nPRESS 4 FOR FOUR STEPPED\n REMEMBER FOR LOW
RATING TRANSFORMERS YOU MUST GO WITH SQUARE/TWO STEPPED AND FOR HIGH RATING
TRANSFORMER GO WITH THREE/FOUR STEPPED. THE HIGHER THE STEPS, THE MORE WILL BE THE
COST OF YOUR TRANSFOMRER ");

scanf("%d",&choice);

switch(choice)

case 1: diameter = sqrt(stacking_factor*iron_area/0.45); length_of_largest_stamping = 0.707*diameter; break;

case 2: diameter = sqrt(stacking_factor*iron_area/0.56); length_of_largest_stamping = 0.85*diameter;


length_of_second_stamping = 0.53*diameter; break;

case 3: diameter = sqrt(stacking_factor*iron_area/0.60); length_of_largest_stamping =


0.9*diameter;length_of_second_stamping = 0.7*diameter; length_of_third_stamping = 0.42*diameter;break;

case 4: diameter = sqrt(stacking_factor*iron_area/0.62); length_of_largest_stamping = 0.92*diameter;break;

}
//calculation of Kw

double window_factor;

if(kVA<50)

window_factor = 8 / (30 + HV);

if(kVA>=50 && kVA<500)

window_factor = 10 / (30 + HV);

if(kVA>=500)

window_factor = 12 / (30 + HV);

//CALCULATION OF CURRENT DENSITY in A/mm2

double current_density;

if(HV<50)

current_density = 1.5; //FOR SMALL POWER TRANSFORMER

if(HV>=50 && HV<275)

current_density = 2.5; //ASSUMING AIR BLAST CIRCULATION

if(HV>=275)

current_density = 5.5; //ASSUMING FORCED OIL CIRCULATION

//CALCULATION OF WINDOW AREA using Q=2.22*f*Bm*delta*Kw*Ai

double window_area;

window_area = (kVA) / (1000*3.33*frequency*flux_density*current_density*window_factor*net_area_of_core);


double height_of_window;

double width_of_window; //ASSUMING Hw/Ww == 3

height_of_window = sqrt(3*window_area);

width_of_window = sqrt(window_area / 3);

double distance_between_limbs = diameter + width_of_window;

double depth_of_yoke = length_of_largest_stamping;

double overall_height = height_of_window + 2*length_of_largest_stamping;

double overall_width = (2*width_of_window) + (length_of_largest_stamping);

//FINDING OF WINDING TYPE;

char LVwinding [20];

char HVwinding [20];

if(kVA <= 1000 && HV<= 33 && LV<=0.440)

strcpy(HVwinding,"Foil"); strcpy(LVwinding,"Helix");

else if(kVA > 1000 && kVA <= 30000 && HV<= 66 && LV<=11)

strcpy(HVwinding,"Disc"); strcpy(LVwinding,"Disc");

else if(kVA > 30000 && HV<= 500 && LV <= 66)

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

else

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

double turns_in_HV_winding = ceil( 0.577*HV*1000 / emf_per_turn );

double turns_in_LV_winding = ceil( LV*1000 / emf_per_turn );

double LV_current = ceil ( kVA / LV );

double HV_current = ceil ( kVA / (0.577*HV) );


double mean_dia_of_HV_turns;

double mean_dia_of_LV_turns;

printf("\nPlease enter the mean diameter for HV turns in mm: ");

scanf("%lf",&mean_dia_of_HV_turns);

printf("\nPlease enter the mean diameter for LV turns in mm: ");

scanf("%lf",&mean_dia_of_LV_turns);

//CALCULATION OF RESISTANCE

double length_of_mean_turn_in_HV = 3.1416*mean_dia_of_HV_turns / 1000; //converting into meter

double length_of_mean_turn_in_LV = 3.1416*mean_dia_of_LV_turns / 1000;

double resistance_of_HV_winding =
0.021*length_of_mean_turn_in_HV*turns_in_HV_winding/(100*current_density); // 0.021 is resistivity in micro-
ohms, length of mean turn is in meter and current density is in A/mm2 so that resistance is in ohms.

double resistance_of_LV_winding =
0.021*length_of_mean_turn_in_LV*turns_in_LV_winding/(100*current_density);

double resistance_reffered_to_HV = resistance_of_HV_winding +


(pow((turns_in_HV_winding/turns_in_LV_winding),2)*resistance_of_LV_winding);

double resistance_reffered_to_LV = resistance_of_LV_winding +


(pow((turns_in_LV_winding/turns_in_HV_winding),2)*resistance_of_HV_winding);

//CALCULATION OF P.U. RESISTANCE

double per_unit_resistance = resistance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF LEAKAGE RESISTANCE

double Lmt = (length_of_mean_turn_in_HV + length_of_mean_turn_in_LV) / (2*1000);//converting into meters

double x = (15 + ( (mean_dia_of_HV_turns /2 ) + (mean_dia_of_LV_turns /2) )/6 ) / 1000;

double axial_coil_length = 0.8*2*width_of_window; //JUST AN APPROXIMATION n = number of HV coils = 2

double leakage_reactance_reffered_to_HV = 3.141*frequency*4*3.141*Lmt*pow(turns_in_HV_winding,2)*x /


(100000*axial_coil_length);

//CALCULATION OF P.U. LEAKAGE RESISTANCE

double per_unit_reactance = leakage_reactance_reffered_to_HV * HV_current / (0.577*HV*1000) ;

//CALCULATION OF P.U. IMPEDANCE

double per_unit_impedance = pow(pow(per_unit_reactance,2) + pow(per_unit_resistance,2) , 0.5);

//CALCULATION OF VOLTAGE REGULATION AT DIFFERENT POWER FACTOR


double vr1 = per_unit_reactance*0.6 + per_unit_resistance*0.8; //VR at 0.8 pf LAG

double vr2 = per_unit_reactance*0.66 + per_unit_resistance*0.75; //VR at 0.75 pf LAG

double vr3 = per_unit_reactance*0.71 + per_unit_resistance*0.7; //VR at 0.7 pf LAG

//CALCULATION OF COPPER LOSS AND CORE LOSS

double copper_loss = pow(HV_current,2)* resistance_reffered_to_HV;

double total_weight_of_iron = 7800*4*net_area_of_core*height_of_window; //only that area where loss would occur
i.e. in the 2 limbs + 2 yokes

double core_loss_in_limbs = 1.2 * total_weight_of_iron; //assuming 1.2 W/kg core loss for the chosen flux density

//CALCULATION OF EFFICIENCY at 0.8 PF LAG AT FULL LOAD

double efficiency = ((kVA*0.8) / ((kVA*0.8) + copper_loss + core_loss_in_limbs + 0.15*copper_loss));


//0.15*copper loss to cover stray load losses as well

double max_efficiency_load = pow((core_loss_in_limbs/(1.15*copper_loss)),0.5)*100;

//CALCULATION OF NO LOAD CURRENT

double Ic = core_loss_in_limbs / HV ;

double Im = flux*10000000*(2*distance_between_limbs + 2*width_of_window + depth_of_yoke)/


(4*3.141*1.414*turns_in_HV_winding*net_area_of_core); //neglecting MMF at joints

double Io = pow(pow(Ic,2)+pow(Im,2),0.5);

//CALCULATION OF DUCTS

double new_overall_height = overall_height + 0.6; //0.6 meter or 600 mm for lead oil etc.

double new_overall_width = overall_height + 2*0.08 + 2*length_of_largest_stamping; // 0.08 meter for clearence

double new_overall_depth = overall_height + 0.02 + 2*length_of_largest_stamping; // 0.02 meter or 200 mm for


clearence

double tank_area = new_overall_height * new_overall_width * new_overall_depth;

// assuming length of duct as 1.5 meter and diameter of 50 mm or 0.05 meter

double theta;

printf("\nPLEASE ENTER THE MAXIMUM TEMPERATURE LIMIT in degree Celsius: ");

scanf("%lf",&theta);

double number_of_ducts = ceil(((((1.15*copper_loss + core_loss_in_limbs)/theta)- 12.5*tank_area ) /


(8.8*3.141*0.05*1.5)));

printf("\n-----------------------------------------------SPECIFICATION SHEET----------------------------------------------------
-");
printf("\nkVA is: %lf",kVA);

printf("\nHV voltage in (kV) per phase is: %lf",0.577*HV);

printf("\nLV voltage in (kV) is: %lf",LV);

printf("\nFrequency in (Hz) is: %lf",frequency);

printf("\nk is: 0.8");

printf("\nEMF per turn is: %lf",emf_per_turn);

printf("\nFlux in (Weber) is: %lf",flux);

printf("\nFlux in (weber/m^2) is: %lf",flux_density);

printf("\nIron area in (m^2) is: %lf",iron_area);

printf("\nStacking factor is: 0.9");

printf("\nNet area of core in (m^2) is: %lf",net_area_of_core);

printf("\nLength of largest stamping in (m) is: %lf",length_of_largest_stamping);

printf("\nWindow factor Kw is: %lf",window_factor);

printf("\nCurrent density in (A/mm^2) is: %lf",current_density);

printf("\nHeight of window in (m) is: %lf",height_of_window);

printf("\nWidth of window in (m) is: %lf",width_of_window);

printf("\nWindow are in (m^2) is: %lf",window_area);

printf("\nDistance between limbs in (m) is: %lf",distance_between_limbs);

printf("\nTotal turns in HV winding are: %lf",turns_in_HV_winding);

printf("\nTotal turns in LV winding are: %lf",turns_in_LV_winding);

printf("\nHV current in (A) is: %lf",HV_current);

printf("\nLV current in (A) is: %lf",LV_current);

printf("\nWinding type in HV is: %s",HVwinding);

printf("\nWinding type in LV is: %s",LVwinding);

printf("\nResistance of HV winding in (ohm) is: %lf",resistance_of_HV_winding);

printf("\nResistance of LV winding in (ohm) is: %lf",resistance_of_LV_winding);

printf("\nResistance referred to HV winding in (ohm) is: %lf",resistance_reffered_to_HV);

printf("\nResistance referred to LV winding in (ohm) is: %lf",resistance_reffered_to_LV);

printf("\nPer unit resistance in (p.u.) is: %lf",per_unit_resistance);

printf("\nLeakage Reactance referred to HV winding in (ohm) is: %lf",leakage_reactance_reffered_to_HV);

printf("\nPer unit reactance in (p.u.) is: %lf",per_unit_reactance);

printf("\nPer unit impedance in (p.u.) is: %lf",per_unit_impedance);

printf("\nVoltage regulation at 0.80 pf lag is: %lf percent",vr1*1000);

printf("\nVoltage regulation at 0.75 pf lag is: %lf percent",vr2*1000);


printf("\nVoltage regulation at 0.70 pf lag is: %lf percent",vr3*1000);

printf("\nTotal (I^2)R loss in (Watts) is: %lf",1.15*copper_loss);

printf("\nCore loss in (Watts) is: %lf",core_loss_in_limbs);

printf("\nEfficiency at upf at 0.8 pf lag is: %lf percent",efficiency*100);

printf("\nMaximum efficiency occur at %lf of full load",max_efficiency_load);

printf("\nCore loss component of current is: %lf A",Ic);

printf("\nMagnetizing component of current is: %lf A",Im);

printf("\nNo component of current is: %lf A",Io);

printf("\nOverall height of the tank is: %lf m",new_overall_height);

printf("\nOverall width of the tank is: %lf m",new_overall_width);

printf("\nOverall depth of the tank is: %lf m",new_overall_depth);

printf("\nArea of the tank is: %lf m^2",tank_area);

printf("\nNumber of ducts required for maximum allowable temperature %lf oC is: %lf ",theta,number_of_ducts);

getch();

void three_phase_core_type_distribution()

double kVA,HV,LV,frequency;

printf("\nPLEASE ENTER THE kVA: ");scanf("%lf",&kVA);

printf("\nPLEASE ENTER THE H.V.VOLTAGE IN kV: ");scanf("%lf",&HV);

printf("\nPLEASE ENTER THE L.V.VOLTAGE IN kV: ");scanf("%lf",&LV);

printf("\nPLEASE ENTER THE frequency: ");scanf("%lf",&frequency);

double k = 0.45; // as per table given in AK SAWHNEY

double emf_per_turn = k*sqrt(kVA);

double flux = emf_per_turn / (4.44*frequency);

// CALCULATION OF FLUX DENSITY ACCORDING TO VARIOUS VOLTAGE LEVEL ( USING CRGO


STEEL)

double flux_density;

if(HV<132)

flux_density = 1.55;
}

if(HV>=132 && HV<275)

flux_density = 1.6;

if(HV>=275)

flux_density = 1.7;

double iron_area = flux / flux_density ;

double stacking_factor = 0.85;

double diameter;

double net_area_of_core = stacking_factor*iron_area;

double length_of_largest_stamping;

double length_of_second_stamping;

double length_of_third_stamping;

//calculation of largest stamping

int choice;

printf("\nWHICH TYPE OF CORE WOULD YOU LIKE TO USE?\nPRESS 1 FOR SQUARE\nPRESS 2 FOR
TWO STEPPED\nPRESS 3 FOR THREE STEPPED\nPRESS 4 FOR FOUR STEPPED\n REMEMBER FOR LOW
RATING TRANSFORMERS YOU MUST GO WITH SQUARE/TWO STEPPED AND FOR HIGH RATING
TRANSFORMER GO WITH THREE/FOUR STEPPED. THE HIGHER THE STEPS, THE MORE WILL BE THE
COST OF YOUR TRANSFOMRER ");

scanf("%d",&choice);

switch(choice)

case 1: diameter = sqrt(stacking_factor*iron_area/0.45); length_of_largest_stamping = 0.707*diameter; break;

case 2: diameter = sqrt(stacking_factor*iron_area/0.56); length_of_largest_stamping = 0.85*diameter;


length_of_second_stamping = 0.53*diameter; break;

case 3: diameter = sqrt(stacking_factor*iron_area/0.60); length_of_largest_stamping =


0.9*diameter;length_of_second_stamping = 0.7*diameter; length_of_third_stamping = 0.42*diameter;break;

case 4: diameter = sqrt(stacking_factor*iron_area/0.62); length_of_largest_stamping = 0.92*diameter;break;

}
//calculation of Kw

double window_factor;

if(kVA<50)

window_factor = 8 / (30 + HV);

if(kVA>=50 && kVA<500)

window_factor = 10 / (30 + HV);

if(kVA>=500)

window_factor = 12 / (30 + HV);

//CALCULATION OF CURRENT DENSITY in A/mm2

double current_density;

if(HV<50)

current_density = 1.5; //FOR SMALL POWER TRANSFORMER

if(HV>=50 && HV<275)

current_density = 2.5; //ASSUMING AIR BLAST CIRCULATION

if(HV>=275)

current_density = 5.5; //ASSUMING FORCED OIL CIRCULATION

//CALCULATION OF WINDOW AREA using Q=2.22*f*Bm*delta*Kw*Ai

double window_area;

window_area = (kVA) / (1000*3.33*frequency*flux_density*current_density*window_factor*net_area_of_core);


double height_of_window;

double width_of_window; //ASSUMING Hw/Ww = 2

height_of_window = sqrt(2*window_area);

width_of_window = sqrt(window_area / 2);

double distance_between_limbs = diameter + width_of_window;

double depth_of_yoke = 2*length_of_largest_stamping;

double overall_height = height_of_window + 2*length_of_largest_stamping;

double overall_width = (2*width_of_window) + (length_of_largest_stamping);

//FINDING OF WINDING TYPE;

char LVwinding [20];

char HVwinding [20];

if(kVA <= 1000 && HV<= 33 && LV<=0.440)

strcpy(HVwinding,"Foil"); strcpy(LVwinding,"Helix");

else if(kVA > 1000 && kVA <= 30000 && HV<= 66 && LV<=11)

strcpy(HVwinding,"Disc"); strcpy(LVwinding,"Disc");

else if(kVA > 30000 && HV<= 500 && LV <= 66)

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

else

strcpy(HVwinding,"Multilayer"); strcpy(LVwinding,"Helix");

double turns_in_HV_winding = ceil( HV*1000 / emf_per_turn );

double turns_in_LV_winding = ceil( 0.577*LV*1000 / emf_per_turn );

double LV_current = ceil ( kVA / (0.577*LV) );

double HV_current = ceil ( kVA / HV );


double mean_dia_of_HV_turns;

double mean_dia_of_LV_turns;

printf("\nPlease enter the mean diameter for HV turns in mm: ");

scanf("%lf",&mean_dia_of_HV_turns);

printf("\nPlease enter the mean diameter for LV turns in mm: ");

scanf("%lf",&mean_dia_of_LV_turns);

//CALCULATION OF RESISTANCE

double length_of_mean_turn_in_HV = 3.1416*mean_dia_of_HV_turns / 1000; //converting into meter

double length_of_mean_turn_in_LV = 3.1416*mean_dia_of_LV_turns / 1000;

double resistance_of_HV_winding =
0.021*length_of_mean_turn_in_HV*turns_in_HV_winding/(100*current_density); // 0.021 is resistivity in micro-
ohms, length of mean turn is in meter and current density is in A/mm2 so that resistance is in ohms.

double resistance_of_LV_winding =
0.021*length_of_mean_turn_in_LV*turns_in_LV_winding/(100*current_density);

double resistance_reffered_to_HV = resistance_of_HV_winding +


(pow((turns_in_HV_winding/turns_in_LV_winding),2)*resistance_of_LV_winding);

double resistance_reffered_to_LV = resistance_of_LV_winding +


(pow((turns_in_LV_winding/turns_in_HV_winding),2)*resistance_of_HV_winding);

//CALCULATION OF P.U. RESISTANCE

double per_unit_resistance = resistance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF LEAKAGE RESISTANCE

double Lmt = (length_of_mean_turn_in_HV + length_of_mean_turn_in_LV) / (2*1000);//converting into meters

double x = (15 + ( (mean_dia_of_HV_turns /2 ) + (mean_dia_of_LV_turns /2) )/6 ) / 1000;

double axial_coil_length = 0.8*4*width_of_window; //JUST AN APPROXIMATION n = number of HV coils = 4

double leakage_reactance_reffered_to_HV = 3.141*frequency*4*3.141*Lmt*pow(turns_in_HV_winding,2)*x /


(100000*axial_coil_length);

//CALCULATION OF P.U. LEAKAGE RESISTANCE

double per_unit_reactance = leakage_reactance_reffered_to_HV * HV_current / (HV*1000) ;

//CALCULATION OF P.U. IMPEDANCE

double per_unit_impedance = pow(pow(per_unit_reactance,2) + pow(per_unit_resistance,2) , 0.5);

//CALCULATION OF VOLTAGE REGULATION AT DIFFERENT POWER FACTOR


double vr1 = per_unit_reactance*0.6 + per_unit_resistance*0.8; //VR at 0.8 pf LAG

double vr2 = per_unit_reactance*0.66 + per_unit_resistance*0.75; //VR at 0.75 pf LAG

double vr3 = per_unit_reactance*0.71 + per_unit_resistance*0.7; //VR at 0.7 pf LAG

//CALCULATION OF COPPER LOSS AND CORE LOSS

double copper_loss = pow(HV_current,2)* resistance_reffered_to_HV;

double total_weight_of_iron = 7800*4*net_area_of_core*height_of_window; //only that area where loss would occur
i.e. in the 2 limbs + 2 yokes

double core_loss_in_limbs = 1.2 * total_weight_of_iron; //assuming 1.2 W/kg core loss for the chosen flux density

//CALCULATION OF EFFICIENCY at 0.8 PF LAG AT FULL LOAD

double efficiency = ((kVA*0.8) / ((kVA*0.8) + copper_loss + core_loss_in_limbs + 0.15*copper_loss));


//0.15*copper loss to cover stray load losses as well

double max_efficiency_load = pow((core_loss_in_limbs/(1.15*copper_loss)),0.5)*100;

//CALCULATION OF NO LOAD CURRENT

double Ic = core_loss_in_limbs / HV ;

double Im = flux*10000000*(2*distance_between_limbs + 2*width_of_window + depth_of_yoke)/


(4*3.141*1.414*turns_in_HV_winding*net_area_of_core); //neglecting MMF at joints

double Io = pow(pow(Ic,2)+pow(Im,2),0.5);

//CALCULATION OF DUCTS

double new_overall_height = overall_height + 0.6; //0.6 meter or 600 mm for lead oil etc.

double new_overall_width = overall_height + 2*0.08 + 2*length_of_largest_stamping; // 0.08 meter for clearence

double new_overall_depth = overall_height + 0.02 + 2*length_of_largest_stamping; // 0.02 meter or 200 mm for


clearence

double tank_area = new_overall_height * new_overall_width * new_overall_depth;

// assuming length of duct as 1.5 meter and diameter of 50 mm or 0.05 meter

double theta;

printf("\nPLEASE ENTER THE MAXIMUM TEMPERATURE LIMIT in degree Celsius: ");

scanf("%lf",&theta);

double number_of_ducts = ceil(((((1.15*copper_loss + core_loss_in_limbs)/theta)- 12.5*tank_area ) /


(8.8*3.141*0.05*1.5)));

printf("\n-----------------------------------------------SPECIFICATION SHEET----------------------------------------------------
-");
printf("\nkVA is: %lf",kVA);

printf("\nHV voltage in (kV) is: %lf",HV);

printf("\nLV voltage in (kV) is: %lf",LV);

printf("\nFrequency in (Hz) is: %lf",frequency);

printf("\nk is: 0.8");

printf("\nEMF per turn is: %lf",emf_per_turn);

printf("\nFlux in (Weber) is: %lf",flux);

printf("\nFlux in (weber/m^2) is: %lf",flux_density);

printf("\nIron area in (m^2) is: %lf",iron_area);

printf("\nStacking factor is: 0.9");

printf("\nNet area of core in (m^2) is: %lf",net_area_of_core);

printf("\nLength of largest stamping in (m) is: %lf",length_of_largest_stamping);

printf("\nWindow factor Kw is: %lf",window_factor);

printf("\nCurrent density in (A/mm^2) is: %lf",current_density);

printf("\nHeight of window in (m) is: %lf",height_of_window);

printf("\nWidth of window in (m) is: %lf",width_of_window);

printf("\nWindow are in (m^2) is: %lf",window_area);

printf("\nDistance between limbs in (m) is: %lf",distance_between_limbs);

printf("\nTotal turns in HV winding are: %lf",turns_in_HV_winding);

printf("\nTotal turns in LV winding are: %lf",turns_in_LV_winding);

printf("\nHV current in (A) is: %lf",HV_current);

printf("\nLV current in (A) is: %lf",LV_current);

printf("\nWinding type in HV is: %s",HVwinding);

printf("\nWinding type in LV is: %s",LVwinding);

printf("\nResistance of HV winding in (ohm) is: %lf",resistance_of_HV_winding);

printf("\nResistance of LV winding in (ohm) is: %lf",resistance_of_LV_winding);

printf("\nResistance referred to HV winding in (ohm) is: %lf",resistance_reffered_to_HV);

printf("\nResistance referred to LV winding in (ohm) is: %lf",resistance_reffered_to_LV);

printf("\nPer unit resistance in (p.u.) is: %lf",per_unit_resistance);

printf("\nLeakage Reactance referred to HV winding in (ohm) is: %lf",leakage_reactance_reffered_to_HV);

printf("\nPer unit reactance in (p.u.) is: %lf",per_unit_reactance);

printf("\nPer unit impedance in (p.u.) is: %lf",per_unit_impedance);

printf("\nVoltage regulation at 0.80 pf lag is: %lf percent",vr1*1000);

printf("\nVoltage regulation at 0.75 pf lag is: %lf percent",vr2*1000);


printf("\nVoltage regulation at 0.70 pf lag is: %lf percent",vr3*1000);

printf("\nTotal (I^2)R loss in (Watts) is: %lf",1.15*copper_loss);

printf("\nCore loss in (Watts) is: %lf",core_loss_in_limbs);

printf("\nEfficiency at upf at 0.8 pf lag is: %lf percent",efficiency*100);

printf("\nMaximum efficiency occur at %lf of full load",max_efficiency_load);

printf("\nCore loss component of current is: %lf A",Ic);

printf("\nMagnetizing component of current is: %lf A",Im);

printf("\nNo component of current is: %lf A",Io);

printf("\nOverall height of the tank is: %lf m",new_overall_height);

printf("\nOverall width of the tank is: %lf m",new_overall_width);

printf("\nOverall depth of the tank is: %lf m",new_overall_depth);

printf("\nArea of the tank is: %lf m^2",tank_area);

printf("\nNumber of ducts required for maximum allowable temperature %lf oC is: %lf ",theta,number_of_ducts);

getch();

int main()

system("color ED");

sound();

int choice;

while(1)

system("cls");

printf("\t\t\t\t ASSIGNMENT 2 - DESIGN OF TRANSFORMERS - PRANAV KIMOTHI (182053)\n");

printf("\n PRESS 1 FOR SINGLE PHASE CORE TYPE TRANSFORMER\n PRESS 2 FOR SINGLE PHASE
SHELL TYPE TRANSFORMER\n PRESS 3 FOR THREE PHASE CORE TYPE POWER TRANSFORMER i.e.
WYE/DELTA connection\n PRESS 4 FOR THREE PHASE CORE TYPE DISTRIBUTION TRANSFORMER i.e.
DELTA/WYE\n PRESS 5 FOR THREE PHASE SHELL TYPE TRANSFORMER\n\n");

scanf("%d",&choice);
switch(choice)

case 1: single_phase_core_type(); break;

case 2: single_phase_shell_type(); break;

case 3: three_phase_core_type_power(); break;

case 4: three_phase_core_type_distribution(); break;

default: printf("\n YOU ENETERED A WRONG VALUE \n");getch();

return 0;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy