Você está na página 1de 15

1

CHAPTER 1

INTRODUCTION

1.0 Introduction

C programming is a system and application software in the computer programs


language. It means you can use the system to create lists of instructions for a computer
to follow. Were given a task to write a computer program to solve problem related to
materials engineering. The main objective for this project is to know how far the
students understand the Computer Programming Course.

Before start the computer programming individual project, Im was make some
research from the internet and book for how to write a C program to solve problem
related to materials engineering. There are so many chapter in material engineering
which is, Atomic Structure, Atomic and Ionic Arrangement, Mechanical Properties,
Strain Hardening and Annealing, Heat Treatment, Nonferrous Alloys, Ceramic
Materials, Polymers, Composites, and another else. Im was chosen Composites chapter
for this individual project. For this project students should be able to identify the
2

4 4
o d i
d
required longitudinal modulus of elasticity E = 3 y and the total tube volume
4 F L3

o4 d i4
Vc d
= L ) of a tubular composite shaft.

4

Lastly, after reviewing and study the longitudinal modulus elasticity and the
total tube volume for a tubular composite shaft formula, Im have come out with one
simple program how to determine longitudinal modulus elasticity and the total tube
volume of a tubular composite shaft by using c programming software in the program.

1.1 Problem Statements

Figure 1 schematic representation of a tubular composite shaft, the subject of computer


programming individual project

o4 d 4i o4 d i4
d d
Longitudinal modulus of elasticity E = 3 y Vc = )
L
4 F L3
4

i. By using this program, it can make easier to determine the required longitudinal
modulus of elasticity and the total tube volume for this tubular composite shaft.
ii. y is the midpoint deflection, and the value for y is no more than 0.0035

m, F is applied force, L is the support point separation distance, E is the modulus


3

elasticity, I is the cross sectional area, d o is the outside diameter for a tube and

d i is the inside diameter for a tube.

iii. For this computer programming Im was changed do as a diameter2 d2 and

di as a diameter1 d1 . y Im was write at the programming as s delta Y.

Since the program cant read the symbol it is changed to the x to replace the
symbol. And the value for the x is 3.142
iv. Lastly, user can choose either one to find the required longitudinal modulus of
elasticity or to find the total volume for the tubular composite shaft. So, with this
computer program we can save our time by just input the value to the computer
program and no need to calculate by using calculator.

1.2 Objective

i. To determine the required longitudinal modulus of elasticity for the tubular


composite shaft by using DEV C++ software.
ii. To determine the total tube volume for the tubular composite shaft by using
DEV C++ software.
iii. To simplify the user and save their time by using this DEV C++ software to
solve the problem related to material engineering especially in chapter
Composites.
iv. To write a C program to solve problem related to materials engineering
4
5

CHAPTER 2

METHODOLOGY

2.0 Introduction
For the methodology will explain about the flowchart and program for this project to
complete this individual computer program project.
6

2.1 Flowchart

Start

X = 3.142,four,F,L,N,deltaY,diameter2,diameter1,E,d1,d2,Gpa,Vc,m

1. APPLIED-FORCE
2. LENGTH L
3. DELTA Y
4. DIAMETER2 = d2
5. DIAMETER1 = d1

number

No==1 F,L,DeltaY,d2,d1

1 Delta Y = 0.00035

o4 d 4i Display E
d
1 E = 3 y
No==2 4 F L3

Display Vc
L, d2, d1 Vc =

o4 d i4
d
L )

4
END
7
8

2.2 Computer Program

#include<stdio.h>

#include<conio.h>

#include<math.h>

int main()

int no;

float x=3.142,four,F,L,N,deltaY,diameter2,diameter1,E,d1,d2,Gpa,VC,m;

printf("\t\t\t\t\t\tMATERIAL ENGINEERING");

printf("\n\n\t\t\t(How To Determine Longitudinal Modulus of Elasticity and The


Total Tube volume for a Tubular Composite Shaft)");

printf("\n\nPlease Choose 1 Or 2:");

printf("\n\n1 is for Find ELasticity and 2 is to Determine The Total Tube Volume for
a Tubular Composite Shaft:");

printf("\n\nValue for F,L,3.142,Delta Y @ Midpoint Deflection,diameter 2, diameter


1");

printf("\n\n1. APPLIED-FORCE F");

printf("\n\n2. LENGTH L");

printf("\n\n3. DELTA Y @ Midpoint Deflection ");

printf("\n\n4. DIAMETER2 = d2");

printf("\n\n5. DIAMETER1 = d1");

back:

printf("\n\nPlease Select Your Choice:");


9

scanf("%d", &no);

if (no == 1)

printf("\n\nYou Choose To Find Longitudinal Modulus oF elasticity ");

printf("\n\nPlease Insert value of Force Applied,N(Newton) =");

scanf("%f", &F);

printf("\n\nPlease Insert value of a tubular composite shaft Length ,L(m) =");

scanf("%f", &L);

printf("\n\nPlease Insert value of a tubular composite shaft delta y ,delta Y(m) =");

scanf("%f", &deltaY);

printf("\n\nPlease Insert value of a tubular composite shaft Diameter2 ,d2(m) =");

scanf("%f", &d2);

printf("\n\nPlease Insert value of a tubular composite shaft Diameter1 ,d1(m) =");

scanf("%f", &d1);

E = (4*F*pow(L,3))/(3*x*deltaY*(pow(d2,4)-pow(d1,4)));

printf("\n LONGITUDINAL MODULUS OF ELASTICITY = %f GPa",E);

goto back;

if (no==2)

{
10

printf("\n\nYou Choose To Find The Total Tube Volume for a Tubular Composite
Shaft");

printf("\n\nPlease Insert value of Length,L(m) =");

scanf("%f", &L);

printf("\n\nPlease Insert value of Diameter 2 ,d2(m) =");

scanf("%f", &d2);

printf("\n\nPlease Insert value of Diameter 1 ,d1(m) =");

scanf("%f", &d1);

VC = (x*L/4)*(pow(d2,2)-pow(d1,2));

printf("\n Volume Of FIBRE = %f m",VC);

else

printf("\n\nJUST CHOOSE NUMBER 1 AND NUMBER 2 ONLY! Thank You");

printf("\n\nMADE BY AIMY SHA BIN MARBEK");

getch();

}
11

Chapter 3
Result

Figure 2 Result 1

Figure 3 result for longitudinal modulus of elasticity, E (Gpa)


12

Figure 4 result for the total tube volume, Vc (m)

Figure 5 Output error will be occurred when user enter the value either from 1 and
2.

Chapter 4
13

Conclusion

For the conclusion for this computer programming individual project I can
say that the program that I has develop can help student or others to find the required
longitudinal modulus of elasticity for the tubular composite shaft and total tube
volume for the tubular composite shaft. The program was achieved the objective to
ease user and save their time by using this DEV C++ software to solve the problem
related to material engineering especially in chapter Composites. After that, as we all
know the main function of program from this project and subject is to help students
to understand the function of control statement such as if, if-else, while, nested
while, printf, int no(), float, looping, and students know how to write a formula in C
program. This project also encourages student to brainstorm and used their
knowledge in computer programming in order to solve or to achieved their targe

References

i. Materials Science Learning Module 2nd Edition, Ainun Rahmahwati


Ainuddin, Zakiah Kamdi, Nur Azam Badarulzaman, Department of
14

Materials and Design Engineering, Faculty of Mechanical and


Manufacturing Engineering, (UTHM).
ii. Material Science and Engineering: an introduction / William D. Callister; Jr,-
7th ed. Department of Metallurgical Engineering, The University of Utah,
ISBN-13:978-0-471-73696-7
15

APPENDIX

Você também pode gostar