"Variable already defined by value of another type error"

"Variable already defined by value of another type error" - Messages

#1 Posted: 8/6/2025 1:53:31 AM
Dave

Dave

0 likes in 6 posts.

Group: User

Beam Analysis for Sawn Lumber.sm (351.2 KiB) downloaded 1112 time(s).
Hi,

I've encountered this issue before and posted before but still not seeing a workaround and it's kind of stopping my project in it's tracks at the moment. This is my FEA beam solver program, I've gotten it quite far, but I can't find a work around for this particular issue. I noticed that if I have a beam from x=0 to x=10 for example, but put my one of my supports at x=2 or x=8 ft, the calculator will not run. The error is seen on Pg. 22 of the file. It will only work if the an all zero load vector is either encountered right away or at the very end. If somewhere in the middle, it must be that that my user defined function is no longer valid after its already been fed units from another vector. It can't go back to blank units after receiving units it seems. I don't really understand but I'm hoping somebody can do some digging and tell me how to get around this behavior other than completely stripping units out of the calculation (which I've already had to do in order to get a mixed-units stiffness matrix to run).
Edited 8/6/2025 2:04:57 AM
#2 Posted: 8/6/2025 1:56:34 AM
Dave

Dave

0 likes in 6 posts.

Group: User

I wanted to add... If you go to page 2 of the file and change the supports to say 0 and L, you'll notice everything I have so far will run as intended.
#3 Posted: 8/7/2025 12:48:33 PM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 likes in 179 posts.

Group: User

Greetings,

I wasn't able to get the sheet to work, but just some critical thinking: is is because there is nothing defined at "zero" for your FEA matrix support? When I have created similar FEA models in the past, I defined 'free' joints as a form of reactions, such as below:
2025-08-07_smathPost.png

I know that is not how it is supported for your sheet, but maybe worth looking into it and see if you NEED to have zero defined as I surmise, or if you can ignore '0' if it is not a support reaction.

May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#4 Posted: 8/8/2025 9:59:22 AM
ioan92

ioan92

180 likes in 120 posts.

Group: User

Hi Dave,

Take care, you hadn't defined yet the variables "Lefts", "Grads" and "Rights" before using them on the page 6.

Regards,
Ioan
Edited 8/8/2025 10:01:10 AM
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov
#5 Posted: 8/9/2025 8:42:44 PM
Dave

Dave

0 likes in 6 posts.

Group: User

Wrote

Hi Dave,

Take care, you hadn't defined yet the variables "Lefts", "Grads" and "Rights" before using them on the page 6.

Regards,
Ioan



Hi, thanks for taking the time to check it out. That shouldn't affect it, it's meant to only consider the types of loads that are present. So if there's no linear distributed loads those variables don't populate and you can just ignore them.
#6 Posted: 8/9/2025 8:56:44 PM
Dave

Dave

0 likes in 6 posts.

Group: User

Wrote

Greetings,

I wasn't able to get the sheet to work, but just some critical thinking: is is because there is nothing defined at "zero" for your FEA matrix support? When I have created similar FEA models in the past, I defined 'free' joints as a form of reactions, such as below:
2025-08-07_smathPost.png

I know that is not how it is supported for your sheet, but maybe worth looking into it and see if you NEED to have zero defined as I surmise, or if you can ignore '0' if it is not a support reaction.

May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ



Hi, thanks for the reply first off! I'll have to play around with it. I wrote another FEA beam solver in python that, like this one, always started from 0. In that one it didn't require any special treatment of 0, you were free to define supports anywhere along the beam. I was able to get the same answers as textbook and youtube examples and such. Are you saying that a free node is a different assumption than just any node placed on the beam that doesn't have a boundary condition? Like the node that would need to be created under a point load between two supports for example. That's kind of how I think of "free" nodes, but maybe that's a misunderstanding?
#7 Posted: 8/13/2025 8:28:53 PM
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 likes in 179 posts.

Group: User

Greetings,

Yes, you are correct, a "Free" node would be no reaction (resolves no force, no moment), but is free to move (translate and rotate). You can technically declare all of the nodes in your stiffness matrix that are NOT reactions "Free" and still get the same answers as if you didn't declare them at all.


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
  • New Posts
  • No New Posts