Skip to main content
10-Marble
June 29, 2023
Solved

Beam bending using finite differences

  • June 29, 2023
  • 2 replies
  • 2558 views

Hi All, 

 

We have been using this worksheet for a while which in theory allow us to look at different restrain configurations. Its always been a bit flakey, but converting to Prime seems to have finally killed it. 

 

I just wonder if anyone has some advice on how to get it to work?

 

 

 

 

 

Best answer by Werner_E

I stopped at the first error thrown

The error about unit mismatch is thrown because you can't add a dimensionless quantity (C) and a quantity with unit N*m/s^2 (P).

Werner_E_1-1688077620736.png

Prime isn't using SUC (static unit check) anymore and so its necessary to apply a unit even if the value is zero!

But even if we fix this, we get a similar error, This time because Load is a vector in N, but add(P) results in a vector in N*m/s^2.

Werner_E_2-1688077831097.png

Haven't look further as this sure has to be fixed first.

It may have worked in Mathcad because all involved values seem to be zero anyway. But you sure can't and shouldn't add quantities of different dimensions!

2 replies

Werner_E25-Diamond IAnswer
25-Diamond I
June 29, 2023

I stopped at the first error thrown

The error about unit mismatch is thrown because you can't add a dimensionless quantity (C) and a quantity with unit N*m/s^2 (P).

Werner_E_1-1688077620736.png

Prime isn't using SUC (static unit check) anymore and so its necessary to apply a unit even if the value is zero!

But even if we fix this, we get a similar error, This time because Load is a vector in N, but add(P) results in a vector in N*m/s^2.

Werner_E_2-1688077831097.png

Haven't look further as this sure has to be fixed first.

It may have worked in Mathcad because all involved values seem to be zero anyway. But you sure can't and shouldn't add quantities of different dimensions!

21-Topaz II
June 30, 2023

Hi,

Here is a fully working sheet with all errors gone.

10-Marble
June 30, 2023

Thank you guys. It was doing my head in that it was working in MathCAD 15 last week, but now I want to use it in Prime it wasn't,

 

What a fantastic community this is!

10-Marble
July 12, 2023

From the snippet of code I recognised this as mine.  (I'm sorry it has proved to be 'flaky', it works OK for me in 'proper' mathcad.)

Of course the Load vector add(P) vector need to be in the same units, which are kN. 

Thought you might like the latest version, I discovered that it only took some small additions

to allow the distributed loads and suppots to be trapezoidal, not just uniformly distributed.