cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

mathcad: help with Numerical Soln to Differential Eqn

hrishibhor
1-Visitor

mathcad: help with Numerical Soln to Differential Eqn

Please help to implement following differential equation numerical solution in mathcad

Numerical solution for single degree of freedom elastic system.
Spring stiffness = k = 2000 lbf/ft
Weight = W = 64 lbf

Force function:
F(t) = 500t+50 if t <=0.1
=-1250t+225 if 0.1 <=t<= 0.14
= 50 if t>=0.14
Acceleration function:
A(t) = ½ F(t) – 1000 *Y

Say time step = dt = 0.02
Initial Condition:
Displacement:
Y0 = 0 that is displacement is zero when t = 0
Y1 = ½ * A0 *dt^2 that is first time step which t = 0.02 this gives displacement but in terms of Acceleration at t =
Acceleration:
A0 = 0 when t = 0

Solution:
Y (t+dt) = 2 * Y (t) – Y(t-dt) + A(t) * dt^2
For t – 0 to 0.4 with dt = 0.02

Return:
Y, A

12 REPLIES 12

Please provide a worksheet.


Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

attached is the mathcad sheet. This is all i could do

RichardJ
19-Tanzanite
(To:hrishibhor)

Please post the worksheet in the other thread you started, where everyone has been commenting.

This is why we don't like cross posts.

this all i coul do. This is the first time i am posting question on mathcad so by mistake i have opened up another discussion in "programming...." pleas bear with me.

Here's how you might do it using Mathcad's inbuilt ode solver block (which might or might not be what you are looking for!).

Alan

Thanks for your help.

Although how would one solve it using the the numerical procedure i explained in my original post ?

The step by step solution is kind of easier to understand as to whats going. What i am not able to get right is that

---------

dt = time step.

Y(t+dt) is in terms of a(t) (Please see the original post) so should there be loop inside a loop ?

---------------------------

Please bear with me i am not good at programming at all.

hrishi bhor wrote:

Thanks for your help.

Although how would one solve it using the the numerical procedure i explained in my original post ?

The step by step solution is kind of easier to understand as to whats going. What i am not able to get right is that

---------

dt = time step.

Y(t+dt) is in terms of a(t) (Please see the original post) so should there be loop inside a loop ?

---------------------------

Please bear with me i am not good at programming at all.

I'll see if I can find time to look at this next week. Meantime, note that there was an error in the way I removed the units of k in my earlier file. Corrected version attached (well, corrected as far as k is concerned - who knows what other errors may still be there!!).

Alan

Appreciate that Alan.

Ok, found some time. See Example_13ptc2.

Also, corrected (yet again!) my original approach using Odesolve (see Example13_ptc1c). It's those pesky Imperial units - they get me every time!

Alan

Really appreciate your help.

Thanks

Took a bit of work, but:

Thanks for your help.

Announcements

Top Tags