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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Problem with Odesolve in good Old MC15

vlehner
13-Aquamarine

Problem with Odesolve in good Old MC15

Hi,

 

I want to calculate a deflection of a beam with Odesolve in MC15.

 

The deflection consists of two parts: y1(x) and y2(x).

 

I could solve the y1(x), but when trying to solve y2(x), i got an error-message:

"this variable is not defined"

You can see it near the end of the sheet.

11-07-2017 19-03-41.jpg

The boundary-conditions are: deflection in the bearings are zero, the bending moments as well.

 

What am i doing wrong here?

Thank you for your help.

 

ps.: The MC15 File can be uploaded only as a zipped file.

Volker
1 ACCEPTED SOLUTION

Accepted Solutions

You can't use the prime symbol (Ableitungsstrich) for the derivative of y1.

I would suggest to define a function for the derivative.Pic1.png

Pic2.png

 But I don't think that the result is correct. When I look at what the value of the first derivative of y1 at lo (6) is, I sometimes get an error (which I would have suspected at the end of the interval)Pic3.pngand sometimes it will (upon recalculation) evaluate to 0.Pic4.png

So I see two options, Either let the first odesolve block up to lo+0.1 (or something like lo*1.01) or you change the initial condition in your second solove block to y2*(lo)=y1_diff(lo-0.1) or something similar.

This gives a more plausible result:Pic5.png

 

 

 

 

View solution in original post

7 REPLIES 7

You can't use the prime symbol (Ableitungsstrich) for the derivative of y1.

I would suggest to define a function for the derivative.Pic1.png

Pic2.png

 But I don't think that the result is correct. When I look at what the value of the first derivative of y1 at lo (6) is, I sometimes get an error (which I would have suspected at the end of the interval)Pic3.pngand sometimes it will (upon recalculation) evaluate to 0.Pic4.png

So I see two options, Either let the first odesolve block up to lo+0.1 (or something like lo*1.01) or you change the initial condition in your second solove block to y2*(lo)=y1_diff(lo-0.1) or something similar.

This gives a more plausible result:Pic5.png

 

 

 

 

vlehner
13-Aquamarine
(To:Werner_E)

Vielen Dank Werner,

Ich glaube das war der Knackpunkt mit dem definieren der Funktion für die erste Ableitung.

Auf die Schreibweise mit dem Ableitungsstrich wäre ich so schnell nicht gekommen.

 

Jetzt gilt es die Übergangsbedingungen sowie die Grenzen richtig zu finden/festzulegen.

 

Way to go!

Volker
vlehner
13-Aquamarine
(To:vlehner)

...now it's done 🙂

THX Werner!

 

12-07-2017 00-43-40.jpg

Volker

Ah, ja. Das sieht gleich anders aus.

 

Das mit dem Ableitungsstrich geht durchgehend nur in Prime, in Mathcad aber nur in Ausnahmefällen (eben bei den Ableitungen jener Funktionen, nach denen mit odesolve gesucht wird). Ansionsten ist der Differntialoperator zu verwenden.

Den zweiten Lösungsblock kann man auch schreibenm ohne diue Ableitung von y1 extra als Funktion zu definieren, aber ich fand es mit der Funktion übersichtlicher:

Pic1.png

vlehner
13-Aquamarine
(To:Werner_E)


@WernerExinger wrote:

Das mit dem Ableitungsstrich geht durchgehend nur in Prime, in Mathcad aber nur in Ausnahmefällen (eben bei den Ableitungen jener Funktionen, nach denen mit odesolve gesucht wird). Ansionsten ist der Differntialoperator zu verwenden.


...man lernt eben nie aus...

Das werde ich auf jeden Fall so schnell nicht vergessen!

Volker

Mathcad will have issues with Odesolve when the constraints aren't "initial conditions."

 

Attached is a finite difference solution.  You need a stronger beam!

vlehner
13-Aquamarine
(To:Fred_Kohlhepp)

Thanks Fred!

 

Volker
Top Tags