-
Notifications
You must be signed in to change notification settings - Fork 4
/
teststableforce.pro
34 lines (26 loc) · 1.12 KB
/
teststableforce.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;program to test if the conveyor is transversely stable at a given
;axial position.
function teststableforce,stableroot,ap,np,nm,lambda,eta1,eta2
;Check if it's transversly stable
nptsx = 5
forcesx = conveyorxforce(stableroot,ap,np,nm,lambda,eta1,eta2,$
norm=1,int=1,npts=nptsx)
forcesy = conveyoryforce(stableroot,ap,np,nm,lambda,eta1,eta2,$
norm=1,int=1,npts=nptsx)
forcesx[1,*] = -forcesx[1,*];For some reason transverse force is opposite what
;it should be. FIX ME
forcesy[2,*] = -forcesy[2,*];For some reason transverse force is opposite what
;it should be. FIX ME
;if n_elements(fr_filename) ne 0 then write_gdf,forcesx,fr_filename
dforcesxdx = deriv(forcesx[0,*],forcesx[1,*])
dforcesydy = deriv(forcesy[0,*],forcesy[2,*])
xstiffness = -dforcesxdx[nptsx/2.+1]
ystiffness = -dforcesydy[nptsx/2.+1]
;print,"stable root", stableroot
;print,"x stiffness ",xstiffness
;print,"y stiffness ",ystiffness
if xstiffness lt 0 or ystiffness lt 0 then begin
return, 0
endif
return,1
end