Beruflich Dokumente
Kultur Dokumente
ISSN 1990-9233
© IDOSI Publications, 2012
DOI: 10.5829/idosi.mejsr.2012.12.12.50
Abstract: The project deals with the analysis of critical speed of shafts using C and MATLAB. All the given
shaft parameters such as load conditions, length, diameter, etc. will be determined for the given problem and
analytical solution of critical speed of shaft will be obtained. The material constants like young’s modulus and
load distribution over the given elements will be applied while calculating critical speed using C and MATLAB.
The theory related to the title will be studied from ‘Shigley’s Mechanical Engineering Design’ Ninth edition.
Analytical solution has to be obtained. To obtain computer solution C and MATLAB will be used. And a
comparison of results obtained from analytical calculation and using C and MATLAB will be presented.
1678
Middle-East J. Sci. Res., 12 (12): 1678-1682, 2012
consequently the ANSI (American National Standards Although MATLAB is intended primarily for
Institute) began to work on a standardised definition of numerical computing, an optional toolbox uses the
the ‘C’ Language that makes it powerful. MuPAD symbolic engine, allowing access to symbolic
computing capabilities. An additional package, Simulink,
Design: C’ is an imperative (procedural) systems adds graphical multi-domain simulation and Model-Based
implementation language. It was designed to be compiled Design for dynamic and embedded systems.
using a relatively straightforward compiler, to provide In 2004, MATLAB had around one million users
low-level access to memory, to provide language across industry and academia. MATLAB users come from
constructs that map efficiently to machine instructions various backgrounds of engineering, science and
and to require minimal run-time support. C was therefore economics. MATLAB is widely used in academic and
useful for many applications that had formerly been coded research institutions as well as industrial enterprises.
in assembly language.
Despite its low-level capabilities, the language was History: Cleve Moler, the chairman of the computer-
designed to encourage cross-platform programming. A science department at the University of New Mexico,
standards-compliant and portably written C program can started developing MATLAB in the late 1970s. He
be compiled for a very wide variety of computer platforms designed it to give his students access to.
and operating systems with few changes to its source LINPACK and EISPACK without them having to
code. The language has become available on a very wide learn Fortran. It soon spread to other universities and
range of platforms, from embedded microcontrollers to found a strong audience within the applied mathematics
supercomputers. community. Jack Little, an engineer, was exposed to it
during a visit Moler made to Stanford University in 1983.
Example of C: Recognizing its commercial potential, he joined with Moler
and Steve Bangert. They rewrote MATLAB in C and
#include <iostream.h> founded MathWorks in 1984 to continue its development.
#include<stdio.h> These rewritten libraries were known as JACKPAC. In
Void main() 2000, MATLAB was rewritten to use a newer set of
{ libraries for matrix manipulation, LAPACK.
int a,b,c; MATLAB was first adopted by researchers and
float avg; practitioners in control engineering, Little's specialty, but
printf("Enter a number\n"); quickly spread to many other domains. It is now also used
scanf("%d", &a); in education, in particular the teaching of linear algebra
printf("Enter a number\n"); and numerical analysis and is popular amongst scientists
scanf("%d", &b); involved in image processing.
printf("Enter a number\n");
scanf("%d", &c); Syntax: The MATLAB application is built around the
avg=(a+b+c)/3; MATLAB language and most use of MATLAB involves
printf ("The average of the three number is: ”\n %f,avg); typing MATLAB code into the Command Window (as an
getch(); interactive mathematical shell), or executing text files
} containing MATLAB code and functions.
MATLAB can call functions and subroutines written
Matlab Programming Language: MATLAB (matrix in the C programming language or Fortran. A wrapper
laboratory) is a numerical computing environment and function is created allowing MATLAB data types to be
fourth-generation programming language. Developed by passed and returned. The dynamically loadable object
MathWorks, MATLAB allows matrix manipulations, files created by compiling such functions are termed
plotting of functions and data, implementation of "MEX-files" (for MATLAB executable).
algorithms, creation of user interfaces and interfacing with Libraries written in Java, ActiveX or. NET can be
programs written in other languages, including C, C++, directly called from MATLAB and many MATLAB
Java and Fortran.s libraries (for example XML or SQL support) are
1679
Middle-East J. Sci. Res., 12 (12): 1678-1682, 2012
b jxi
implemented as wrappers around Java or ActiveX =ij (12 − b 2j − xi2 ) when xi ai
libraries. Calling MATLAB from Java is more complicated, 6 EI1
but can be done with MATLAB extension, which is sold 600 × (175) × (7552 − 6002 − 1752 )
11 =
separately by MathWorks, or using an undocumented 18.5 × 1012
mechanism called JMI (Java-to-Matlab Interface), which
should not be confused with the unrelated Java Metadata = 0.00119N/mm
Interface that is also called JMI.
As alternatives to the MuPAD based Symbolic Math 275 × (500) × (7752 − 2752 − 5002 )
12 =
Toolbox available from MathWorks, MATLAB can be 18.5 × 1012
connected to Maple or Mathematical. = 0.00204 mm/N
Analytical Solution of the Problem: Problem: Consider a 600 × (175) × (7752 − 6002 − 1752 )
=
11 =
12
simple supported steel shaft as depicted in fig. with 25mm 18.5 × 1012
diameter and 775mm span between bearings, carrying two = 0.00129 mm/N
gears weighing 175N and 275N.
Now the deflections
Find the influence coefficients.
Find y and y2. y1 = 1 11 + 2 12
y2 = 1 21 + 2 22
= (25) 4 C Program:
64
= 19175 mm4 #include<conio.h>
6EIl = 6×(207000)×(19175) #include<stdio.h>
= 18.5 × 1012 Nmm3 #include<math.h>
void main()
Rayleigh’s Equation: {float I,d,pi=3.14,E=207000,l,k,b,b1,b2,x,x1,x2,S11,S22,S
1680
Middle-East J. Sci. Res., 12 (12): 1678-1682, 2012
1681
Middle-East J. Sci. Res., 12 (12): 1678-1682, 2012
enter the value w1:175 Thus, C and MATLAB programs of the given
w1 = 175 problem has been written and the output obtained and a
enter the value w2:275 comparison between the output of the analytical solution
w2 = 275 and the outputs obtained from the respective programs
enter the value D:25 were successfully compared.
D = 25
enter the value L:775 REFERENCES
L = 775
I = 1.9175e+004 1. “Mechanical Engineering Design”by Sighley’s
FR = 1.8457e+013 (Ninth Edition).
d11 = 0.0012 2. “Fundamental of Machine Design – Dr. T. J. Prabhu
d22 = 0.0020 3. “MATLAB and SIMULINK”-Herbert Shield.
d21 = 0.0013
d12 =0.0013
Y1 = 0.5636
Y2 = 0.7890
EWY = 315.5940
EWY2 = 226.7666
w = 116.8448
1682