JesseBonanno / IndeterminateBeam

A solver for 1D indeterminate beams
MIT License
69 stars 20 forks source link

Problem with simply supported beam with end moment #21

Closed nicoguaro closed 3 years ago

nicoguaro commented 3 years ago

I was testing the example in Figure 12-40 from Hibbeler 8th edition

image

But I obtain the following error message

<lambdifygenerated-7>:2: RuntimeWarning:

invalid value encountered in multiply

<lambdifygenerated-7>:2: RuntimeWarning:

invalid value encountered in double_scalars

<lambdifygenerated-8>:2: RuntimeWarning:

invalid value encountered in multiply

<lambdifygenerated-9>:2: RuntimeWarning:

invalid value encountered in double_scalars

<lambdifygenerated-9>:2: RuntimeWarning:

invalid value encountered in multiply

with the following reactions

image

The code is the following

from indeterminatebeam import Beam
from indeterminatebeam import Support
from indeterminatebeam import PointTorque, DistributedLoadV

beam1 = Beam(12)
beam1.add_loads(DistributedLoadV(-5, (0, 12)),
                PointTorque(20, 0),
                PointTorque(-20, 12))
beam1.add_supports(Support(0, (1, 1, 0)),
                   Support(12, (0, 1, 0)))
beam1.analyse()

If a remove the point moments, or add them in the interior the error disappears.

JesseBonanno commented 3 years ago

Great observation, thank you for finding that issue. I have fixed it in the last commit.

image

image

nicoguaro commented 3 years ago

Hereafter I will test the version in the repo. Is that OK?

JesseBonanno commented 3 years ago

Yes, that sounds great