Appendix1 - H * packages that have some differential...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: H * packages that have some differential equations to solve and define some utility functions * L Needs @ "DifferentialEquations`NDSolveProblems`" D ; Needs @ "DifferentialEquations`NDSolveUtilities`" D ; Needs @ "DifferentialEquations`InterpolatingFunctionAnatomy`" D ; Needs @ "GUIKit`" D ; ClearAll @ "Global` * " D ; Off @ General:: spell D ; Off @ General:: spell1 D ; Print @ "Kinematics" D ; m = 2; L = 1; g = 9.81; k = 2000; alpha = 8 0, 0, theta'' @ t D< ; Print @ "angular acceleration of RB: alpha = ", alpha D ; xC = H L 2 L * Cos @ theta @ t DD ; yC = H L 2 L * Sin @ theta @ t DD ; rC = 8 xC, yC, 0 < ; Print @ "position vector of C: rC = ", rC D ; xA = L * Cos @ theta @ t DD ; yA = L * Sin @ theta @ t DD ; rA = 8 xA, yA, 0 < ; Print @ "position vector of A: rA = ", rA D ; Print @ "Forces" D ; G = 8 0,- m g, 0 < ; Print @ "gravitational force at C: G = ", G D ; delta = L Sin @ theta @ t DD- L Sin @ Pi 6 D ; Fe = 8 0,- k delta, 0 < ; Print @ "elastic force at A: Fe = ", Fe D IC = m * L^2 12; Print @ "mass moment of inertia wrt C: ICz = ", IC D ; IO = IC + m * H L 2 L ^2; Print @ "mass moment of inertia wrt O: IOz = ICz + m * H L 2 L ^2 = ", Simplify @ IO DD ; Print @ "Summ of the moments in O at t-> t1:" D eqI = Simplify @ IO * alpha- Cross @ rC, G DD@@ 3 DD ; solutionI = Solve @ eqI 0, theta'' @ t DD@@ 1 DD ; Print @ "moment equation: IO alpha = sum M wrt O = rC x G" D ; Print @ "Solution: theta'' @ t D = ", theta'' @ t D . Simplify @ solutionI DD ; H *------------------* L t0 = 0; soldif = NDSolve @8 eqI 0, theta @ D == N @ Pi D 3, theta' @ D == < , theta, 8 t, t0, Infinity < , Method fi 8 EventLocator, "Event" fi H theta @ t D- Pi 6 L<D ; t1 = InterpolatingFunctionDomain @ First @ theta . soldif DD@@...
View Full Document

This note was uploaded on 08/29/2011 for the course MECH 7630 taught by Professor Marghitu during the Fall '11 term at University of Florida.

Page1 / 8

Appendix1 - H * packages that have some differential...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online