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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Beam Deflection Plot Question: Macaulay deflection equation has trouble solved by odesolver.

MA_10251892
5-Regular Member

Beam Deflection Plot Question: Macaulay deflection equation has trouble solved by odesolver.

Hello MathCAD People,

 

I am working on a shaft redesign project, and I start out with trying to plot the deflection of a more simplified model. I write the momentum function in Macaulay’s method and think plotting a deflection curve using odesolve should be a fast way to figure out where the max deflection happens by solving the differential equation and the boundary conditions. However, the plot just ended up with part of the deflection curve and say the ode function has limited range. Can you guys help resolve the error and get Mathcad plot the full cure?

I really appreciate if you can guide me through this problem, as I really need a math model to validate my simulation results.

 

Thank you in advance.

 

shaft diagram.png

1.png2.png

ACCEPTED SOLUTION

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

OdeSolve will always use the lowest value in the initial conditions as its starting value and in case of your solve block this is "a".
To get what you are looking for in one go you would have to provide the value for delta.x(0) as initial condition.
You may look up the functions "bvalfit" and especially "sbval" in the help to see if the can be of any help to determine that IC - I lack the experience here as I never have used these functions so far.
https://support.ptc.com/help/mathcad/r6.0/en/index.html#page/PTC_Mathcad_Help%2Fderiving_initial_conditions_for_an_ode.html%23

But Prime allows us to solve from its starting value upwards or downwards. So we can create two separate solve blocks and combine the two functions found.

Werner_E_0-1649386974075.png

Werner_E_1-1649387014729.png

Prime 6 worksheet attached

 

View solution in original post

12 REPLIES 12
LucMeekes
23-Emerald III
(To:MA_10251892)

In your call of the odesolve() function, you have Delta and its parameter x labelled as 'units'. I guess they should be 'variables'.

Other than that, some of your variables are labelled 'automatic', some are labelled 'variable'.

I've set all variables to 'variable' but that didn't remove the error message.

Since it's a Prime 6 file, I hope someone smarter than me, can find what (else) is wrong.

 

Since your differential equation is relatively simple (a second derivative of a function Delta equals a known expression), here's what I did:

LucMeekes_1-1649368650768.png

(Note that some of the expressions continue past the line ).

LucMeekes_2-1649368796420.png

The maximum deflection is 0.033 mm, the minimum is -0.188 mm.

 

Success!
Luc

 

 

 

MA_10251892
5-Regular Member
(To:LucMeekes)

Thank you LucMeekes. I am a newbie to mathcad. Do you mind to tell me what is Φ for? I don't understand its mathematical meaning.

 

Thanks,

 

Mito

Werner_E
25-Diamond I
(To:MA_10251892)


@MA_10251892 wrote:

Thank you LucMeekes. I am a newbie to mathcad. Do you mind to tell me what is Φ for? I don't understand its mathematical meaning.

 

Thanks,

 

Mito


Phi is the Heaviside step function. It returns 1 for positive arguments and 0 for negative ones. And the implementation in Prime returns 0.5 for the zero argument.

https://support.ptc.com/help/mathcad/r6.0/en/index.html#page/PTC_Mathcad_Help%2Fkronecker_delta_and_heaviside_step_functions.html

On contrary to an approach with an "if" or a boolean expression as you had chosen, using the heaviside function makes symbolic operations like taking the derivative easier possible.

MA_10251892
5-Regular Member
(To:Werner_E)

Thank you so much for your information and being supportive for our newbies. I learned a lot today.

LucMeekes
23-Emerald III
(To:MA_10251892)

The function Φ(x) is the Heaviside step function. It is defined as:

Φ(x) = 0 for x<0

Φ(x) = 1 for x>0

For x=0 the function usually delivers 1, but it may be 1 or 1/2, depending on preference. This may cause problems in some cases.

Mathcad is pretty strict:

LucMeekes_1-1649871069718.png

it leaves the numerical answer for Φ(0) symbolically.

Prime (4) gives:

LucMeekes_2-1649871134643.png

I don't know what it delivers symbolically.

 

But in fact you can do a mathematically sound IF function with Φ.

Knowing/using the fact that 1 means true and 0 means false you'll have

Φ(x-a) means ' x > a ', since if x > a, then x-a is positive, and Φ will return 1 (true)

Φ(a-x) means ' x < a ', the opposite.

The symbolic functions in Mathcad don't accept if statements, so if you need the IF construct in symbolics, you can/have to use the function Φ.

 

Success!

Luc

Werner_E
25-Diamond I
(To:MA_10251892)

OdeSolve will always use the lowest value in the initial conditions as its starting value and in case of your solve block this is "a".
To get what you are looking for in one go you would have to provide the value for delta.x(0) as initial condition.
You may look up the functions "bvalfit" and especially "sbval" in the help to see if the can be of any help to determine that IC - I lack the experience here as I never have used these functions so far.
https://support.ptc.com/help/mathcad/r6.0/en/index.html#page/PTC_Mathcad_Help%2Fderiving_initial_conditions_for_an_ode.html%23

But Prime allows us to solve from its starting value upwards or downwards. So we can create two separate solve blocks and combine the two functions found.

Werner_E_0-1649386974075.png

Werner_E_1-1649387014729.png

Prime 6 worksheet attached

 

MA_10251892
5-Regular Member
(To:Werner_E)

Thank you so much for your detailed explanation. I really appreciate your efforts for helping me solve the shaft deflection problem. 😀

rgunwaldsen
15-Moonstone
(To:Werner_E)

Werner - Do you know any reason why your worksheet is good with Prime 6, but the odesolve() fail with Prime 7 and Prime 8?

 

rgunwaldsen_0-1659385463002.png

 

rgunwaldsen
15-Moonstone
(To:Werner_E)

Seems like th community has bn her before:

https://community.ptc.com/t5/Mathcad/Prime-7-and-odesolve/td-p/772661 

Work around is to delete units from right side boundary condition.

Also, seems like a bug to me.

Werner_E
25-Diamond I
(To:rgunwaldsen)

Interesting. And I also would call it a bug.
Since I don't value Prime much and therefore don't use it, and since there is a simple trick to make most Prime 7 & 8 worksheets readable for Prime 6, I still haven't found it worth the trouble to get a new licence file generated and install a more recent Prime version. Therefore, I cannot verify the bug myself.

I realize this has been answered, but I set out to solve this the "old fashioned way" without a solve block (using Prime Express), and the result is attached.  It can be done!  

MA_10251892
5-Regular Member
(To:Fred_Kohlhepp)

Thank you Fred.

Announcements

Top Tags