You are on page 1of 7

An interactive program on Stress

Transformation along with User Manual


Sonu Kumar Singh

Regd.no.10904590

Roll no.RC4912B44

Lovely Professional University

Chaheru, (Punjab)

I. Abstract IV. Programming Language Used

The project is enlightening us about the stress I have used ‘C’ as a programming language to write
transformation concept and a program on the stress the code for stress transformation equation. Since
transformation using C language, and user manual. Stress transformation can also be done by Graphical
method (Mohr’s Circle) therefore it is also possible to
II. Keywords write the same program in visual C++. Since, To
Introduction to stress transformation, Programming Transform Stress through Graphical Method with
language used, overview of the application, help of the application is a very tough job; therefore I
programming code, about program execution, user designed application only for calculating numerical
manual. conclusion, acknowledgement, reference. value. But All the things I am going to present in this
term paper is completely my own work. As reference,
III. Introduction to Stress transformation I only used my Text Book for theory points of view.

The State of Stress at a point is represented by the


V. Overview of the application
stresses that act on the mutually perpendicular faces
of a volume element enclosing the point. Because the This application is able to solve the following
stresses at a point depend on the inclinations of the problems:-
planes on which they act, the stresses on the faces of
the element vary as the orientation of the element is a) Introduction to General Use & Some
changed. The mathematical relationships that Required Definition:
describe this variation are called the transformation In this part we will get some definition and
equations for stress. knowledge about the input value, etc.
b) Computing Stresses on inclined =0,theta=0,rad=0,a=0,b=0,r=0,s1=
0,s2=0,temp=0,theta2;
planes clrscr();
printf("\n\t\tWelcome To Stress
Using this part we can get new normal after stress Transformation Program\n\t
transformation in both the axis, X-like faces as well ********************************
**************\n\n");
as Y-like faces. New shear stress on X-plane in Y- printf("\n[1] Instruction\n[2]
Direction. Compute Stresses on Inclined
Plane\n[3] Compute Principal
Stresses\n[4] Compute Principal
c) Computing Principal Stresses: Directions\n[5] Compute Maximum
in-plane shear stress\n[6]
Using this part we can get principal stress, since
Exit\n\nEnter Your Choice : ");
principal stress is nothing but the maximum and menu2:
minimum normal stresses at a point. scanf("%d",&choice);
if(choice>0 && choice<7)
{
d) Computing Principal Directions: switch (choice)
{
Using this part we can get principal direction, which case 1:
are the directions perpendicular to the principal {
clrscr();
planes. printf("\n\n\t\tWelcome To the
Introduction Section\n\n");
e) Computing Maximum In-plane shear stress: printf("\nSome important terms
and Their Meanings\n\n");
Using this part we can get maximum value of shear printf("\n[1] Principal Stresses
: The Maximum And Minimum Normal
stress.
Stresses at a Point.\n\n[2]
Principal Directions : The
VI. Programming Code
Directions That Are
Perpendicular to The Principal
All the word written from here in red color is Planes.\n\n[3] Principal
Planes : The Plane on Which The
programming code, of stress transformation, don’t Principal Stresses Act.\n\n[4]
ever try to change in this code, otherwise it will show Angle & its Measurement : The
Angle is Measured
errors;
Counterclockwise From The X-Axis
to a Principal Axis\n\n");
#include<stdio.h> final();
#include<conio.h> break;
#include<stdlib.h> }
#include<math.h> case 2:
{
void main() clrscr();
{ printf("\n\n\t\tEnter Your Value
int choice,choice2; & Find Your Answer\n\n");
char unit[4]; printf("Enter The Unit
double (Mpa/Kpa/Ksi/Psi) : ");
sx=0,sy=0,txy=0,sx1=0,sy1=0,txy1 scanf("%s",&unit);
printf("\nEnter The Value of printf("\nEnter The Value of
Normal Stress on X-Face Normal Stress on Y-Face
: "); : ");
scanf("%lf",&sx); scanf("%lf",&sy);
printf("\nEnter The Value of printf("\nEnter The Value of
Normal Stress on Y-Face Shear Stress on X-Face in Y-
: "); Direction : ");
scanf("%lf",&sy); scanf("%lf",&txy);
printf("\nEnter The Value of temp=0;
Shear Stress on X-Face in Y- temp=(((sx-sy)/2)*((sx-sy)/2))+
Direction : "); (txy*txy);
scanf("%lf",&txy); r=sqrt(temp);
printf("\nEnter The Angle of s1=((sx+sy)/2)+r;
Orientation of the Two Sets of s2=((sx+sy)/2)-r;
Axis (in degree) : "); printf("\n\nPrinciple Stresses 1
scanf("%lf",&theta); = %.3lf %s",s1,unit);
rad=2*3.141592*theta/180; printf("\n\nPrinciple Stresses 2
a=(sx+sy)/2; = %.3lf %s",s2,unit);
b=(sx-sy)/2; final();
sx1=a+(b*cos(rad))+ }
(txy*sin(rad));
sy1=a-(b*cos(rad))- case 4:
(txy*sin(rad)); {
txy1=(txy*cos(rad))- clrscr();
(b*sin(rad)); printf("\n\n\t\tEnter Your Value
printf("\n\n\nAfter & Find Your Answer\n\n");
Transformation, Stresses Are"); printf("Enter The Unit
printf("\n\nNew Value of Normal (Mpa/Kpa/Ksi/Psi) : ");
Stress on X-Like Face : scanf("%s",&unit);
%.3lf %s",sx1,unit); printf("\nEnter The Value of
printf("\nNew Value of Normal Normal Stress on X-Face
Stress in Y-Like Face : : ");
%.3lf %s",sy1,unit); scanf("%lf",&sx);
printf("\nNew Value of Shear printf("\nEnter The Value of
Stress on X-Face in Y- Normal Stress on Y-Face
Direction : %.3lf : ");
%s",txy1,unit); scanf("%lf",&sy);
final(); printf("\nEnter The Value of
} Shear Stress on X-Face in Y-
Direction : ");
case 3: scanf("%lf",&txy);
{ temp=0;
clrscr(); temp=(2*txy)/(sx-sy);
printf("\n\n\t\tEnter Your Value rad=atan(temp);
& Find Your Answer\n\n"); theta= (rad*180)/(2*3.141592);
printf("Enter The Unit theta2=theta+90;
(Mpa/Kpa/Ksi/Psi) : "); printf("\n\nPrinciple Direction
scanf("%s",&unit); 1 = %.2lf\n\nPrinciple Direction
printf("\nEnter The Value of Two = %.2lf",theta,theta2 );
Normal Stress on X-Face final();
: "); }
scanf("%lf",&sx);
case 5: }
{ getch();
clrscr(); }
printf("\n\n\t\tEnter Your Value
& Find Your Answer\n\n");
printf("Enter The Unit final()
(Mpa/Kpa/Ksi/Psi) : "); {
scanf("%s",&unit); char an;
printf("\nEnter The Value of printf("\n\nDo You Want to
Normal Stress on X-Face Proceed Further (y/n) : ");
: "); scanf("%s",&an);
scanf("%lf",&sx); if(an=='y')
printf("\nEnter The Value of main();
Normal Stress on Y-Face else
: "); {
scanf("%lf",&sy); printf("\nThank You For Using
printf("\nEnter The Value of This Application\n\nProgram
Shear Stress on X-Face in Y- Desined by:\n\n\tSonu Kumar
Direction : "); Singh\n\tRC4912B44\n\t10904590")
scanf("%lf",&txy); ;
temp=0; printf("\n\nPress Any Key To
temp=(((sx-sy)/2)*((sx-sy)/2))+ Continue........");
(txy*txy); }
r=sqrt(temp); getch();
if(r>=0) exit (0);
r=r; return 0;
else }
r=(r*(-1));
printf("\n\nMaximum In-Plane
Shear Stress = %.3lf
%s",r,unit); VII. How to Execute the Program
final();
break; Just follow the steps given below
}
case 6:  Install Turbo C++ on your Laptop/Desktop.
{  Copy the code from this file, which are
printf("\nThank You For Using
This Application\n\nProgram shown in red color.
Desined by:\n\n\tSonu Kumar  On your desktop just “Right Click”
Singh\n\tRC4912B44\n\t10904590")
;  Select new and then Text Document.
printf("\n\nPress Any Key To  Rename it as “Tp.c”
Continue........");
getch();  Then open this file, and paste all the codes
exit (0); which you had copied earlier.
break;
 Then save this file by pressing “clt+s”.
}}}
else  Start tour Turbo C++ application & open
{ This File Through Browsing.
printf("Enter The Right Choice :
");
goto menu2;
 Then Press “alt+F9” to make sure that is no
error.
 Then finally press “clt+F9” to run the
program.

VIII. User Manual

After running The program You will see the screen


like this

Since, I have written this program with very simple


in other words you can say, I have tried to make this
program user-friendly. So now just follow the
instruction and put your value and after putting all
values you will get the answer as shown below.

Then as per your requirement enter your choice from


1 to 6, & press “Enter”.

Just suppose you want to calculate the stress on


inclined plane, than as per the option press the button
2 and the press “Enter”, just like this

Now just see I have entered the value Units, normal


stresses, shear stresses, and orientation, and we have
new value of normal stresses, shear stresses,

Notice that at the end of the program it is asking to


you to continue or not, then simply put ‘y’ for yes or
‘n’ for no. Just like this
After pressing “Enter” you will see a screen like as
shown below
Rest of the other option is as easy is it was.

So please enjoy/

IX. Conclusion

It is only difficult to write the program at once, but


when it is complete it is very simple to find out the
After pressing enter you will again get the main answer easily, which will help you to improve your
menu screen skill’ and it will save your time also. But till there are
some problems with this,, so we cannot see
graphically.

X. Acknowledgement

First of all, I would like to thanks my Course


instructure, Mr. Ramesh Babu Bhelumuri, to
encourage me to write this term paper. It was a new
topic for me to study, I enjoyed this topic during
writing my term paper, since it is not only related to
only my course but also contain programming part,
so it was not easy to write a complete description
If press ‘n’ like this
about this topic, Also I would like to thanks Mr.
Kirandeep Singh (Computer Science Department) for
their valuable time and concept to complete this
project.Mr Kirandeep Singh was my teacher during
first Semester of Cse-101.

I would also like to thanks my friend


Prashant kumar and Umesh Bhardwaj (classmates),
for discussing on this topic and gining valuable
suggestion throughout the topic.

Since this topic is related to my Corse, therefore this


As soon as you press any key the program will be
topic is also covered in my class by Mr. Ramesh
exit
Babu, Who has completed their M.Tech From IIT-
Guwahati. He has a brilliant concept about
Mechanics of Solids(Mec-201). He has a great abilty
to handle the topic, And the most important thing, he
is very kind with his nature, he never hesitate to help
student, either inside the classroom or outside the
classroom, even he has given his mobile Number to
contact him during solving the problems, when it is
not college hour.

I think, no word is sufficient for describing


him. Once again I thanks to my teacher. And I hope
we will again meet together as a teacher and student
in rest of the semesters.

XI. Reference

It is my own work and as per as reference is concern,


there is no any reference. This topic is covered in
class room and C Language is taught by this
university in first semester.

You might also like