Skip to main content
1-Visitor
May 26, 2017
Solved

ODEsolve with units - is it possible to solve?

  • May 26, 2017
  • 4 replies
  • 2995 views

Hello,

I have a problem with odesolve function in my algorithm in mathcad 15. The puprose is to receive deflection (and deflection curve) of statically determinated beam. The only load is prestressed which generates bending moment. According to Clebsch method I'd like to solve this equation in my case:

Bez tytułu.png

So I was trying with and without units (You can see it in my file) and I didn't get even one working solution. I'd like to ask You for an advice, because I'm trying to use this function for the first time and I've got no more ideas what should be changed here.

Greetings
Piotr

Best answer by Werner_E

I see that Fred was a bit faster than I.

The problem he encountered is due the aforementioned functions missing an otherwise statement (h4, h5, Mp and especially Ics).

Obviously the solver goes beyond the limit of  9 m and then your function(s) will fail.

@Fred: is there a reason you write UnitsOf(m) instead of simply m? is it so it also works in sheets where the default length unit is not meter?

4 replies

24-Ruby IV
May 26, 2017

It is possible in Mathcad Prime.

23-Emerald I
May 26, 2017

Mathcad 15 cannot deal with units in the ode solvers.  I fixed that with "UnitsOf()" function.

Then I get:

When I trace that error, Mathcad points to the function for Mp.  I don't know why it plots, but Mathcad apparently can't evaluate that function in the solve block.

If I change the range of the solve block:

25-Diamond I
May 26, 2017

Mathcad 15 and below can't deal with units in a solve block with odesolve. So you would have to chose a unitless approach (just concerning the solve block),

Fred had shown a way how to do it here -> Re: Problem with the solver Odesolve

Furthermore you have defined a couple of functions using various if statements. You should add an "otherwise" statement every time to cope with the cases not covered by your if-statements.

Werner_E25-Diamond IAnswer
25-Diamond I
May 26, 2017

I see that Fred was a bit faster than I.

The problem he encountered is due the aforementioned functions missing an otherwise statement (h4, h5, Mp and especially Ics).

Obviously the solver goes beyond the limit of  9 m and then your function(s) will fail.

@Fred: is there a reason you write UnitsOf(m) instead of simply m? is it so it also works in sheets where the default length unit is not meter?

24-Ruby IV
May 26, 2017

I do so