Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Combining ODE with a IF function

AD_10780197
10-Marble

Combining ODE with a IF function

Dear all,

 

May I ask if anyone knows how to combine this 'if' function with these differential equations? k3 is a spring where the stiffness depends on the position of mass 3. In the attachment, I managed to achieve this in Python, but I didn't manage to do this in Mathcad.

 

Could someone help me so that I know for next time?"

 

Thanks in advance.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:AD_10780197)

Hope this helps:

Werner_E_0-1702907626200.png

 

View solution in original post

3 REPLIES 3
Werner_E
25-Diamond I
(To:AD_10780197)

Hope this helps:

Werner_E_0-1702907626200.png

 

Dear Werner_E

 

Thank you it worked perfectly and I have only one remaining question. If I want to add the damping coefficient as add on in a function depending on speed it won't allow me to do this. It is not required for now but if i want to add this how do you handle this?

 

Thank you in advance

 

 

Werner_E
25-Diamond I
(To:AD_10780197)

c3 and k3 are now functions dependent on the current value of x3(t).

So you must change every occurrence of c3 to c3(x3(t)) and the same for k3

 

Announcements

Top Tags