Digital Simulation-Ii Lab (Type Text) Page 0
Digital Simulation-Ii Lab (Type Text) Page 0
Digital Simulation-Ii Lab (Type Text) Page 0
REPORT
> structural
Pre-processor >
>
EXY = 2e5,
PRXY = 0.3, Ok then close
Modelling > create > Keypoints > In Active CS >
0, 0, 0, Apply
0, 100, 0, ok
Modelling > Create > Lines > Lines >Straight Lines >
Join all the keypoints in order
Meshing > Mesh Attributes > Picked Lines >
Pick the all line Ok
Meshing > Size Cntrls > Manual Size > Lines >
Leave the No of Divisions column blank (not zero or
anything else)
Give the Element Edge Length as 5
Meshing > Mesh > Lines >
Pick all the lines, Ok
Main menu > Plot Ctrls > Style > Size and Shape >
Tick in the box against Display of Element (on)
Main menu > Plots > Multi Plots
Solution > Define Loads > Apply > Structural > Displacement > Keypoints >
Select the first point, Ok
Select all degrees of freedom, Ok
Solution > Define Loads > Apply > Structural > Force/Moment > on key points
Select the 2nd key point, Ok
Select FY and give the value as -1000, Ok
Solution > solve > Current LS > Ok
General Postproc > Plot results > Deformed shape > Def + Undef edge
Click Ok
General Postproc > Element Table > define Elem Table > Add >
From the first list in the window select By Sequence No,
From the second list select SMISC 2, Apply
Similarly select SMISC 6, SMISC 8, SMISC 12, Ok, Close
Plot results > Contour Plot > Line Elem Res >
Select SMICS 2 & SMISC 8 for SFD, Ok
Select SMISC 6 & SMISC 12 for BMD, Ok
Result:1
NODAL SOLUTION
SEP
STEP=1
SUB =1
TIME=1
UY
(AVG)
RSYS=0
DMX =.005
SMN =-.005
MN
5 2010
14:22:56
Y
MX Z
-.005
09-05 column
-.004444
-.003889
-.003333
-.002778
X
-.002222
-.001667
-.001111
-.556E-03
NODAL SOLUTION
SEP 5 2010
14:24:25
STEP=1
SUB =1
TIME=1
SZ
(AVG)
RSYS=0
DMX =.005
Y
MX Z X
MN
09-05 column
NODAL SOLUTION
SEP 5 2010
14:24:47
STEP=1
SUB =1
TIME=1
SEQV
(AVG)
DMX =.005
SMN =10
SMX =10
Y
MX Z X
MN
09-05 column
1
1
NODAL SOLUTION
SEP 5 2010
14:23:49
STEP=1
SUB =1
TIME=1
SY
(AVG)
RSYS=0
DMX =.005
09-05 column
NODAL SOLUTION
SEP 5 2010
14:23:34
STEP=1
SUB =1
TIME=1
SX
(AVG)
RSYS=0
DMX =.005
SMN =-10
SMX =-10
MX Z X
MN
MX Z X
MN
09-05 column
AIM:- To Determine the stresses acting on a cantilever beam with a point load of -10000 N
acting at one of its ends and perpendicular to the axis of the beam.
Length of the beam = 2m = 2000mm
Depth of the beam = 10 cm = 100mm
Width of the beam = 50mm
Cross sectional area = width * depth = 5000 mm2
Moment of Inertia about Z axis = Izz = (depth*width*3)/12
PROCEDURE
PRE PROCESSING
STEP 1: From the Main menu select preferences
Select structural and press OK
STEP 2: From the main menu select Pre-processor
Element type Add / edit/Delete Add BEAM 2D Elastic 3
Real constants Add Geometric Properties Area = 5000, Izz = 1250, Height =
50
Material properties material models Structural Linear Elastic Isotropic
EX = 2e5;
PRXY = 0.3
STEP 3: From the main menu select Pre-processor Modelling
0
0
2000
0
Click APPLY to all the points and for the last point click OK
1. Nodal solution
AIM:- To Determine the stresses acting on a plate which has a thickness of 10 mm and a
width of 100 mm
PREPROCESSING
STEP 1: From the Main menu select preferences
Select structural and press OK
STEP 2: From the main menu select Pre-processor
Element type Add / edit/Delete Add Link 2D spar 1
Real constants Add Geometric Properties Area = 3250
Material properties material models Structural Linear Elastic Isotropic
EX = 2e5;
PRXY = 0.3; Density = 2700
STEP 3: : Modelling - From the main menu select Pre-processor
Modelling Create Areas Rectangle by center and corner width = 100 and
Height = 10
Modelling operate extrude area By XYZ offset
Pick all, x=0, y=0, z=100, Ok
STEP 4: Meshing the geometry - From the main menu select Preprocessor
Meshing > Size Controls > smart size > Basics >
Change the size level to 10( coarse), OK
Meshing > Mesh > Volume > free
Pick all
STEP 5: From the ANSYS main menu open Solution
Solution Analysis type New analysis Modal
Solution Analysis type Analysis option No of nodes to extract =5 , Ok
Solution Define Loads Apply displacement on line
Select the front and last line, Ok
Select UY, Ok
STEP 6: Solving the system
Solution Solve Current LS
Node1:
Node2:
Node3:
Node4:
Node5:
166.82
173.031
235.562
85.343
191.502
1
SEP
STEP=1
SUB =4
FREQ=85.343
DMX =4.653
DISPLACEMENT
SEP 5 2010
15:02:57
STEP=1
SUB =5
FREQ=191.502
DMX =5.121
DISPLACEMENT
5 2010
15:02:39
Y
Z
Y
Z
09-05 plate
09-05 plate
DISPLACEMENT
SEP 5 2010
15:02:01
STEP=1
SUB =3
DMX =3.491
Y
Z
09-05 plate
AIM:- To Determine the nodal deflections, reaction forces, and stress for the truss system
shown below (E = 200GPa, A = 3250mm2).
PREPROCESSING
STEP 1: From the Main menu select preferences
Select structural and press OK
STEP 2: From the main menu select Preprocessor
Element type Add / edit/Delete Add Link 2D spar 1
Real constants Add Geometric Properties Area = 3250
Material properties material models Structural Linear Elastic Isotropic
EX = 2e5;
PRXY = 0.3
STEP 3: From the main menu select Pre-processor Modelling
0
0
1800
3118
3600
0
5400
3118
7200
0
9000
0
10800
3118
3600
6236
7200
6236
Click APPLY to all the points and for the last point click OK
2. Deformation
From the main menu select General post processing
General post processing Plot Results Deformed Shape
Select 'Def + undef edge' and click 'OK' to view both the deformed and the undeformed
object.
3. DEFLECTION
From the 'General Postproc' menu select Plot results Contour Plot Nodal
Solution.
Select 'DOF solution' and 'USUM' in the window. Leave the other selections as the
default values. Click 'OK'.
From the Utility Menu select Plot Controls Style Contours Uniform
Contours...
0
0
10
0
10
1
1
1
1
9
10
9
10
10
0
10
Click APPLY to all the points and for the last point click OK
Mode 2:
Mode 3:
Mode 4:
Mode5:
Frequency obtained :
0.002127
Deflection Maximum
Frequency obtained :
0.002127
Deflection Maximum
Frequency obtained :
0.0071
Deflection Maximum
Frequency obtained :
0.007881
Deflection Maximum
Frequency obtained :
0.008833
Deflection Maximum
0.9565e-03
0.9565e-03
0.00114
0.0854e-03
0.001085
From this modal analysis we conclude that in mode 5 the frequency is high which
results sinusoidal wave which indicates failure so the design change is preferred.
0
0.1
X
y
0.9
0.91
0.1
0.11
0.2
0.14
0.3
0.19
0.4
0.26
0.5
0.35
0.6
0.46
0.7
0.59
0.8
0.74
0
0.93
0.9
0.93
Modelling Create Lines Straight line Select the above two keypoints and
OK
Modelling Operate Extrude Areas Along lines Select the area First and
the keypoints of the Axis line later and OK
The Volume is created
Mode 2:
Mode 3:
Mode 4:
Mode5:
Frequency obtained :
0.005844
Deflection Maximum
Frequency obtained :
0.006063
Deflection Maximum
Frequency obtained :
0.008271
Deflection Maximum
Frequency obtained :
0.008285
Deflection Maximum
Frequency obtained :
0.010321
Deflection Maximum
0.226e-03
0.234e-03
0.259e-03
0.259e-03
0.187e-03
From this modal analysis we conclude that in mode 5 the frequency is high.
ei=input('enter ei');
l=input('enter length of beam');
dl=input('enter deflection of beam');
if length(load)~=(l/dl+1)
error('Check inputs')
end
y=0:dl:l;
m=sum((y.*load))*dl;
v=sum(load)*dl;
u_4=load/ei;
u_3=v/ei;
for i=2:length(load)
u_3(i)=u_3(i-1)-u_4(i-1)*dl;
end
u_2=m/ei;
for i=2:length(load)
u_2(i)=u_2(i-1)-u_3(i-1)*dl;
end
u_1=0;
for i=2:length(load)
u_1(i)=u_1(i-1)+u_2(i-1)*dl;
end
u=0;
for i=2:length(load)
u(i)=u(i-1)+u_1(i-1)*dl;
end
deflection=u;
plot(y,u_2*ei)
hold on
plot(y,u_3*ei,'r')
legend('bending moment','shear force')
xlabel('length along the beam')
ylabel(' bending moment and shear force (SI units)')
grid
hold off
figure,plot(y,u,'r')
xlabel('length along the beam')
ylabel('deflection')
grid
title('Deflection')
enter
enter
enter
enter
load valuesrepmat(10,1,101)
ei2
length of beam2
deflection of beam0.02
ans =
Columns 1 through 11
0.0590
0.0040
0.0120
0.0239
0.1087
0.1388
0.1723
0.0820
0.0396
Columns 12 through 22
0.2091
0.2493
0.2926
0.3390
0.3885
0.4964
0.5546
0.6156
0.6794
0.7457
0.4410
Columns 23 through 33
0.8147
0.8861
0.9600
1.0363
1.1149
1.2788
1.3640
1.4513
1.5406
1.6318
1.1957
Columns 34 through 44
1.7250
1.8200
1.9169
2.0154
2.1157
2.3210
2.4260
2.5325
2.6404
2.7497
2.2175
Columns 45 through 55
2.8603
2.9722
3.0854
3.1998
3.3153
3.5496
3.6683
3.7879
3.9086
4.0301
3.4319
Columns 56 through 66
4.1525
4.2757
4.3996
4.5244
4.6498
4.9027
5.0301
5.1580
5.2865
5.4155
4.7759
Columns 67 through 77
5.5450
5.6749
5.8053
5.9360
6.0671
6.3304
6.4624
6.5948
6.7273
6.8601
6.1986
Columns 78 through 88
6.9931
7.1263
7.2597
7.3931
7.5267
7.7942
7.9281
8.0620
8.1960
8.3300
7.6604
Columns 89 through 99
8.4640
8.5980
8.7320
8.8659
8.9999
9.2677
9.4015
9.5353
9.6690
9.8026
Columns 100 through 101
9.9361
10.0696
9.1338
%
ke = element stiffness matrix
%
kb = element stiffness matrix for bending
%
ks = element stiffness matrix for shear
%
f = element force vector
%
stiffness = system stiffness matrix
%
force = system vector
%
displacement = system nodal displacement vector
%
coordinates = coordinate values of each node
%
nodes = nodal connectivity of each element
%
index = a vector containing system dofs associated with
each element
%
pointb = matrix containing sampling points for bending
term
%
weightb = matrix containing weighting coefficients for
bending term
%
points = matrix containing sampling points for shear term
%
weights = matrix containing weighting coefficients for
shear term
%
bcdof = a vector containing dofs associated with boundary
conditions
%
bcval = a vector containing boundary condition values
associated with
%
the dofs in 'bcdof'
%
B_pb = matrix for kinematic equation for bending
%
D_pb = matrix for material property for bending
%
B_ps = matrix for kinematic equation for shear
%
D_ps = matrix for material property for shear
clear
clc
%
disp('Please wait Programme is under Run')
% Input data
load coordinates.dat ;
% Input data for nodal connectivity for each element
load nodes.dat ;
nel = length(nodes) ;
% number of elements
nnel=4;
% number of nodes per element
ndof=3;
% number of dofs per node
nnode = length(coordinates) ;% total number of nodes in system
sdof=nnode*ndof;
% total system dofs
edof=nnel*ndof;
% degrees of freedom per element
% Geometrical and material properties of plate
a = 1 ;
% Length of the plate (along
X-axes)
b = 1 ;
% Length of the plate (along
Y-axes)
E = 10920;
% elastic modulus
nu = 0.3;
% Poisson's ratio
t = 0.1 ;
% plate thickness
I = t^3/12 ;
%
PlotMesh(coordinates,nodes)
% Order of Gauss Quadrature
nglb=2;
% 2x2 Gauss-Legendre quadrature
for bending
ngls=1;
% 1x1 Gauss-Legendre quadrature
for shear
% Initialization of matrices and vectors
force = zeros(sdof,1) ;
% System Force Vector
stiffness=zeros(sdof,sdof);
% system stiffness matrix
index=zeros(edof,1);
% index vector
B_pb=zeros(3,edof);
% kinematic matrix for bending
B_ps=zeros(2,edof);
% kinematic matrix for shear
% Transverse uniform pressure on plate
P = -1.*10^0 ;
%Computation of element matrices and vectors and their
% For bending stiffness
[pointb,weightb]=GaussQuadrature('second');
% sampling
points & weights
D_pb= I*E/(1-nu*nu)*[1 nu 0; nu 1 0; 0 0 (1-nu)/2];
% bending material property
%
% For shear stiffness
%
[points,weights] = GaussQuadrature('first');
% sampling
points & weights
G = 0.5*E/(1.0+nu);
% shear modulus
shcof = 5/6;
% shear correction factor
D_ps=G*shcof*t*[1 0; 0 1];
% shear material property
for iel=1:nel
% loop for the total number of elements
for i=1:nnel
node(i)=nodes(iel,i); %extract connected node for (iel)-th
element
xx(i)=coordinates(node(i),1);
% extract x value of the node
yy(i)=coordinates(node(i),2);
% extract y value of the node
end
ke = zeros(edof,edof);
% initialization of
element stiffness matrix
kb = zeros(edof,edof);
% initialization of
bending matrix
ks = zeros(edof,edof);
% initialization of shear matrix
f = zeros(edof,1) ;
% initialization of force vector
% Numerical integration for bending term
for intx=1:nglb
xi=pointb(intx,1);
% sampling point in x-axis
wtx=weightb(intx,1);
% weight in x-axis
for inty=1:nglb
eta=pointb(inty,2);
% sampling point in y-axis
wty=weightb(inty,2) ;
% weight in y-axis
[shape,dhdr,dhds]=Shapefunctions(xi,eta);
% compute shape functions and derivatives at sampling point
[detjacobian,invjacobian]=Jacobian(nnel,dhdr,dhds,xx,yy); %
compute Jacobian
[dhdx,dhdy]=ShapefunctionDerivatives(nnel,dhdr,dhds,invjacobia
n);
% derivatives w.r.t. physical coordinate
B_pb=PlateBending(nnel,dhdx,dhdy);
% bending kinematic
matrix
% compute bending element matrix
kb=kb+B_pb'*D_pb*B_pb*wtx*wty*detjacobian;
end
end
% end of numerical integration loop
for bending term
% numerical integration for shear term
for intx=1:ngls
xi=points(intx,1);
% sampling point in x-axis
wtx=weights(intx,1);
% weight in x-axis
for inty=1:ngls
eta=points(inty,2);
% sampling point in yaxis
wty=weights(inty,2) ;
% weight in y-axis
[shape,dhdr,dhds]=Shapefunctions(xi,eta);
% compute shape functions and derivatives at sampling
point
[detjacobian,invjacobian]=Jacobian(nnel,dhdr,dhds,xx,yy);
compute Jacobian
[dhdx,dhdy]=ShapefunctionDerivatives(nnel,dhdr,dhds,invjacobia
n);
% derivatives w.r.t. physical coordinate
fe = Force(nnel,shape,P) ;
% Force vector
B_ps=PlateShear(nnel,dhdx,dhdy,shape);
% shear
kinematic matrix
% compute shear element matrix
ks=ks+B_ps'*D_ps*B_ps*wtx*wty*detjacobian;
f = f+fe*wtx*wty*detjacobian ;
end
end
% end of numerical integration loop
for shear term
% compute element matrix
ke = kb+ks ;
index=elementdof(node,nnel,ndof);% extract system dofs
associated with element
[stiffness,force]=assemble(stiffness,force,ke,f,index);
% assemble element stiffness and
force matrices
end
% Boundary conditions
typeBC = 'ss-ss-ss-ss' ;
% Boundary Condition type
% typeBC = 'c-c-c-c'
;
bcdof = BoundaryCondition(typeBC,coordinates) ;
bcval = zeros(1,length(bcdof)) ;
[stiffness,force] = constraints(stiffness,force,bcdof,bcval);
% Solution
displacement = stiffness\force ;
% Output of displacements
[w,titax,titay] = mytable(nnode,displacement,sdof) ;
% Deformed Shape
x = coordinates(:,1) ;
y = coordinates(:,2) ;
f3 = figure ;
set(f3,'name','Postprocessing','numbertitle','off') ;
plot3(x,y,w,'.') ;
title('plate deformation') ;
% Maximum transverse displacement
format long
D1 = E*t^3/12/(1-nu^2) ;
minw = min(w)*D1/(P*a^4)
% Contour Plots
PlotFieldonMesh(coordinates,nodes,w)
title('Profile of UZ/w on plate')
PlotFieldonDefoMesh(coordinates,nodes,w,w)
title('Profile of UZ on deformed Mesh') ;
RESULTS:
Where,
Where,
The unit vectors irand idenote the radial and southward directions in the
local horizon frameattached to the test mass. Due to a nonzero transverse gravity component,
g, the direction of g differs from the radial direction, while its radial component, gr, is
smaller in magnitude compared to that predicted by a spherical gravity model. These
deviations are quite important in applications such as the flight of an atmospheric entry
vehicle, and the long-range navigation of airplanes and missiles. For example, by ignoring the
non - spherical gravity, one may commit an error of several hundred kilometres in an entry
trajectory from a low earth orbit.
ALGORITHM: For simulating the longitudinal motion of an aircraft, firstly a gravity .mfile must be
executed which calculates the acceleration due to gravity .
The m.file is executed in matlab.
After the execution, inputs are to be given in the command window, like the values of
radius of earth, latitude, gc, gnorth.
Based on the above values given matlab gives the six degrees of freedom of motion
values which are required for simulating the aircrafts longitudinal motion.
PROGRAM:function [gc,gnorth]=gravity(r,lat)
phi=pi/2-lat;
mu=3.986004e14;%mu=GMe
Re=6378.135e3;
J2=1.08263e-3;
J3=2.532153e-7;
J4=1.6109876e-7;
gc=mu*(1-1.5*J2*(3*cos(phi)^2-1)*(Re/r)^2-2*J3*cos(phi)*(5*cos(phi)^2- 3)*(Re/r)^3(5/8)*J4*(35*cos(phi)^4-30*cos(phi)^2+3)*(Re/r)^4)/r^2;
gnorth=-3*mu*sin(phi)*cos(phi)*(Re/r)*(Re/r)*(J2+0.5*J3*(5*cos(phi)^2-1)*(Re/r)/cos(phi)
+(5/6)*J4*(7*cos(phi)^2-1)*(Re/r)^2)/r^2;
RESULTS:>>r= 6378135+2000
>>r = 6380135
>>lat=45*pi/180
>>0.7854
>>[gc, gnorth] = gravity (r, lat)
>>gc = 9.7842
>>gnorth = -0.0159
ATMOSPHERE .m FILE:function Y = atmosphere(h, vel, CL)
%(c) 2005 AshishTewari
R = 287; %sea-level gas constant for air (J/kg.K)
go = 9.806; %sea level acceleration due to gravity (m/s^2)
Na = 6.0220978e23; %Avogadros number
sigma = 3.65e-10; %collision diameter (m) for air
S = 110.4; %Sutherlands temperature (K)
Mo = 28.964; %sea level molecular weight (g/mole)
To = 288.15; %sea level temperature (K)
Po = 1.01325e5; %sea level pressure (N/m^2)
when a small disturbance, x(0), y(0), is applied. At a subsequent time, the angular
velocity components can be expressed as z = n +_, and x, y. Since a small disturbance
has been applied, we can treat _, x, y as small quantities and solve Eulers equations. If the
solution indicates that _, x, y grow with time in an unbounded fashion, it will be evident
that our assumption of small deviations remaining small is false, and we are dealing with an
unstable equilibrium. Otherwise, we have a stable equilibrium. Hence, with the assumption of
small deviation from equilibrium, we can write the approximate, linearized Euler equations.
xdot(6,1)=x(3)-(sin(x(6))*cos(x(5))*x(1)+cos(x(6))*cos(x(5))*x(2))/sin(x(5));
RESULT:>> [t,x]=ode45(@spacerotation,[0 40],[0.1 -0.2 0.5 0 0.5*pi 0]);
>> subplot(121),plot(t,x(:,1:3)*180/pi),hold on,.
>>subplot(122),plot(t,x(:,4:6)*180/pi)%time evolution of motion variables
PLOTS:-