Anda di halaman 1dari 5

DEPARTMENT OF MECHANICAL ENGINEERING

Prepared by :

Sahil Madaan (0801ME32)

Pallav Surabathuni (0801ME33)


THE PROGRAM :

The programming has been done in JAVA (Sun Microsystems, USA) and the output has been
obtained on Windows 7.

TECHNICAL SPECIFICATIONS :

Since the arrangements of rivets under eccentric loading is varied we have only considered the case
of 2X2 and 3X3 rivet matrix on a square plate.

THE PROGRAM IS AS FOLLOWS:

import java.io.*;

class eccentricrivet

public static void main(String args[]) throws Exception

System.out.println("****************************WELCOME TO DESIGN PROJECT**************************");

System.out.println("TOPIC : ECCENTRIC LOADING OF RIVETS ON SQUARE PLATES");

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.println("WHICH ARRANGEMENT OF RIVETS WOULD YOU LIKE?\nPress 1 or 2 for choice\n1.2 X 2\n2.3 X 3");

int ch=Integer.parseInt(br.readLine());

if(ch==2)

System.out.println("Enter the side of the sqaure plate between centers of extreme rivets in millimeters:");

double d = Double.parseDouble(br.readLine());

double hor= d/2;

double dia = Math.sqrt(2*hor*hor);

System.out.println("Enter the eccentricity from the centerline in millimeters:");

Double s = Double.parseDouble(br.readLine());

System.out.println("Enter the value of the force applied in Newtons:");

double forc= Double.parseDouble(br.readLine());

double pd= forc/9;


double pdd = forc*s*hor/(4*dia*dia + 4*hor*hor);

System.out.println("Enter the value of permissible shear stress:");

double ss = Double.parseDouble(br.readLine());

System.out.println("****************************RESULT**************************");

double ans = Math.sqrt(pdd*pdd + ((pd+pdd)*(pd+pdd)));

System.out.println("The diameter of the rivets required is:"+Math.sqrt(4*ans/(3.14*ss))+"mm");

else if(ch==1)

System.out.println("Enter the side of the sqaure plate between centers of extreme rivets in millimeters:");

double d = Double.parseDouble(br.readLine());

double hor= d/2;

double dia = Math.sqrt(2*hor*hor);

System.out.println("Enter the eccentricity from the centerline in millimeters:");

Double s = Double.parseDouble(br.readLine());

System.out.println("Enter the value of the force applied in Newtons:");

double forc= Double.parseDouble(br.readLine());

double pd= forc/4;

double pdd = forc*s*hor/(4*dia*dia);

System.out.println("Enter the value of permissible shear stress:");

double ss = Double.parseDouble(br.readLine());

System.out.println("****************************RESULT**************************");

double ans = Math.sqrt(pdd*pdd + ((pd+pdd)*(pd+pdd)));

System.out.println("The diameter of the rivets required is:"+Math.sqrt(4*ans/(3.14*ss))+"mm");

}}
HOW TO RUN THIS PROGRAM :

1. Install jdk software available free of cost on your PC from www.sunmicrosystems.com


2. Change the appropriate environment variables.
3. Compile and run the program from the containing directory in command prompt
Syntax : javac eccentricrivet.java
java eccentricrivet

and follow the instruction on the screen……………

SAMPLE OUTPUT :

The force applied was 50kN with 300 mm eccentricity for a 3X3 matrix riveted square plate

The plate had dimensions of 200 x 200 mm between the centers of rivets.

Permissible shear stress = 60 N/mm2

The margin has been taken 30 mm (1.5d approx.)

The answer is 21.59 mm.

The output window was as obtained:


DESIGN DIAGRAM (FOR REFRENCE PURPOSE ONLY)

Anda mungkin juga menyukai