summaryrefslogtreecommitdiff
path: root/3875/CH1/EX1.3/Ex1_3.sce
blob: 55cb9d52ef3498e8bb071e6a8e9284edef33ed7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
clc ;
clear ;
m=0.1 // mass in kg
K=100 //spring constant in N/m
c=1 //resistive force in Nsm^-1
F0=2 //force in N
omega=50 //frequency in rad/s

//calculation

omega_n=sqrt(K/m) //in rad/s
r=omega/omega_n 
delta_st=F0/K //in m
damp_ratio=c/(2*m*omega_n)
A=delta_st/(sqrt((1-r^2)^2+(2*r*damp_ratio)^2))
tan_phi=(2*r*damp_ratio)/(1-r^2) //in degree
phi=180+atand(tan_phi) //converting degree to postive form

mprintf("Amplitude of oscillation = %1.2e m\n",A)
mprintf("Phase relative to the applied force is = %1.1f degree",phi) 
//The answers vary due to round of errors