Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


3 Pages<123>
Options
Go to last post Go to first unread
Offline mkraska  
#21 Posted : 21 April 2022 11:11:57(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,986
Germany

Was thanked: 1124 time(s) in 721 post(s)
In the 1D beam analysis application BeamFEA, I use hinge elements for rotary dof release (to insert a hinge in the beam). They connect coincident nodes of adjacent beam elements.

In the 1D case, the element matrix is just parametrized by the stiffness EI and the length l. The dofs are w1, phi1, w2, phi2. A hinge element is generated if l=0. Then the EI value is taken als spring stiffness between the w dofs of the nodes. This means that equal w for both nodes is not enforced by reduction of the system but by a penalty term.

2022-04-21 09_52_31-SMath Solver - [BeamFEA.sm_].png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Alvaro Gavilán  
#22 Posted : 21 April 2022 13:07:12(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Originally Posted by: wb.c Go to Quoted Post
I verified the results in the attached file with some 2D structural analysis software and it appears to be correct correct. Take a look and let me know.


I made some mistakes creating the stiffness matrices for rigid-hinged and hinged-rigid. In my post I edited the image. What was wrong? Well, as it was new to me this stiffness factor of 6 for the rotation around the hinge, I tested and found that it was non-sense, because the adjacent member rotating would not introduce displacements in the hinged element. (Further considerations like friction (end-moment) transmitted through the hinge could be studied, if relevant).

For now I have made tests with this simple model of 6 members. Beam 6 was tested for rigid-rigid, rigid-hinged, hinged-rigid, and hinged-hinged conditions. Comparing with FTOOL (recommended! very simple and useful tool) I all those 4 cases, I've found the same results for the x, y displacements and z rotations with 4 significant digits each (probably more but didn't look at).


model.png


Please comment if you test more complex models and loads.

Major improvement: Units! The beauty of SMath Studio.

Frames with FEM (internal releases) v2.sm (94kb) downloaded 27 time(s). 6-element frame test.pdf (367kb) downloaded 21 time(s).

Offline Alvaro Gavilán  
#23 Posted : 21 April 2022 13:45:47(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Originally Posted by: mkraska Go to Quoted Post
This means that equal w for both nodes is not enforced by reduction of the system but by a penalty term.


I see that this penalty approach could be implemented also in the frame case. I've recently tested a purely hinged connection (at node 6 in my model) and it did not worked (non-invertible Kr matrix) until I had specified in the constraints matrix R, that rotation in that node is a constraint.

I understand that this as a workaround, since the reduced stiffness matrix is non-invertible (trying to get, via qr = invert(Kr)*Fr, a rotation value that doesn't introduce efforts in the adjacent members means a row of zeros in Kr)
Offline wb.c  
#24 Posted : 26 April 2022 00:18:35(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
Displacements and reactions seem to be working fine, but internal member forces at nodes is giving me some trouble.
Maybe I've done something wrong here, but I thought it was fairly straight forward {P}=[k'e][le]{Q}, for each of the members.
Any ideas?

Frames with FEM (internal releases) v2-Example.sm (200kb) downloaded 23 time(s).

Edit:
This more simple example seems to be working just right. Getting the exact same results in another program. So, I'm not sure what is going on.

Frames with FEM (internal releases) v2-Example1.sm (112kb) downloaded 26 time(s).

Edited by user 26 April 2022 01:02:13(UTC)  | Reason: Not specified

Offline Alvaro Gavilán  
#25 Posted : 26 April 2022 10:47:29(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Here I attach the correct matrix MF2. What I wrote is in magenta. When calling the displacements you should use the DOF vector of the element to index them.

Frames with FEM (internal releases) v2-Example.sm (207kb) downloaded 45 time(s). Frames with FEM (internal releases) v2-Example1.sm (116kb) downloaded 26 time(s).
thanks 1 user thanked Alvaro Gavilán for this useful post.
on 26/04/2022(UTC)
Offline wb.c  
#26 Posted : 07 March 2023 21:33:09(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
Hi Alvaro,

It's been a while since I had time to work on this project. I went through and simplified the program for a specific case I was looking at.
The basic calculation is the same as you had it in your last corrected example, but I'm not getting the correct results. Specifically looking at member forces.
I went through everything, and I can't figure out where things are wrong. As far as I can see, everything looks good, so I'm a bit stuck.
Any ideas?

New Frame FEM Example.sm (160kb) downloaded 14 time(s).

Edited by user 07 March 2023 23:21:08(UTC)  | Reason: Not specified

Offline Alvaro Gavilán  
#27 Posted : 08 March 2023 00:12:10(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Hi wb.c,

Attached the corrected worksheet. I modified three things:

1. Connectivity for the three rigid-hinged bars. They must be coherent with the elementary matrix: start node is rigid and the end node is hinged.
2. Rotation value must be assigned as a constraint, otherwise you will have a singular Kr matrix. (there is a previous comment that I did on this post)
3. Cosinus formula should be avoided for angle calculations, as cos(alpha)=cos(-alpha), I think that the best way is to use xy2pol. (For example, for the vertical bar, if you change the node order, you will obtain 90 deg as well (instead of the correct value of -90 deg with xy2pol)).

I attached a comparison with a model made in FTOOL to validate the results (different than yours, perhaps because the condition of bars 1, 2, 3 is hinged-hinged).

Regards!

Alvaro

New Frame FEM Example.sm (170kb) downloaded 20 time(s).
Offline wb.c  
#28 Posted : 08 March 2023 02:32:19(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
Alvaro,

Thanks for taking a look. I think we should be able to accommodate a hinged-hinged case through the means of a (pinned support)-fixed end--hinged end.
I'm using a program called LinPro 2.7.5, it is a free static and dynamic frame analysis program. https://www.thestructuralengineer.info/software/linpro-275
It handles this case quite well.

It allows you to implement a Study Mode, which shows you the step by step process the program is taking to solve the system.
A couple of notes regarding the program as apposed to what I've seen in other places:
-The modified local stiffness matrix for various member end release conditions seems to be different from what I found in my text book (Matrix Methods for Advanced Structural Analysis - Papadrakakis & Sapountzakis)
For example: Where you might expect to have 3EI/L^3, it seems to have 36EI/L^3, so I'm not sure what exactly they are doing to obtain the modified local stiffness matrix
-The program also always restricts the "fixed" constraints to the end of the DOF numbering.
2023-03-07 18_08_29-Edit connectivity array.png

So what I am trying to do is replicate the frame analysis by FEM, but for this specific case and then be able to apply a load at 360-degrees in order to find the worst case for each "strut".
This can be done without FEM, with just trig and statics, but only up to a certain number of unknowns. So hence the FEM method.
Offline Jean Giraud  
#29 Posted : 08 March 2023 22:24:57(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Alvaro Gavilá Go to Quoted Post
Attached the corrected worksheet.

Does not open ... Incorrect format.

Offline Davide Carpi  
#30 Posted : 09 March 2023 00:01:05(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Does not open ... Incorrect format.


I suspect you are trying to load it in SS 0.98.6179; I'm sorry but at this point in time that is a 7 years old version and even if Andrey has made wonders keeping an almost perfect backward compatibility you can't reasonably expect an almost equal upward compatibility, especially from a program versioned as 0.## with many important missing features requested by the community. To keep it simple the 2016 program simply can't read some data in the xml structure that wasn't even imagined to be there at the time.
Therefore, if this is the case, there is no use in reporting it (emphasis added because it applies to any similar case).

As for the latest SS version, I see no issues. You can upload the worksheet in the cloud if you want to double-check (although you can't load functions and regions from 3rd party plugins there). If you or anyone else experience issues within the latest SS version, we can investigate it further.

Edited by user 09 March 2023 00:24:45(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline wb.c  
#31 Posted : 09 March 2023 03:01:23(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
For the sake of simplicity, I eliminated some of the automated vector assemblies, as I didn't want to spend too much time trying to figure a good way to work with the DOFs as they are shown in LinPro.
Assembly Vector - Manual
Elimination Vector - Manual
Force Vector (global) - Manual

They start with 0, SMath with 1, so keep that in mind.
2023-03-08 18_58_12-Edit connectivity array.png
What they do is restrict the fixed DOFs to the end of the DOF numbering.

Now, my K (global) matches the result from LinPro exactly.
There was some interesting things that had to be done to make that happen:
As Jean has pointed out in the past, the order of matrix multiplication has varied results.
It seems that for this configuration:
2023-03-08 17_23_58-SMath Solver 1.0.8348 - [New Frame FEM Example.sm_].png
I could not get the global k matrix to match the results in LinPro.
I ended up arranging it like this:
2023-03-08 17_24_09-SMath Solver 1.0.8348 - [New Frame FEM Example - Updated.sm_].png
And it worked.

I also removed all units for now, because as it seems, the inverse operation of a matrix requires numeric evaluation, and with units, I get a "units don't match" error, and you can't evaluate the inverse symbolically for some reason (That's a whole different topic for another day...).

In any case, After getting the right complete stiffness matrix K, it seems that things go south. Solving for the reduced displacements vector is way off.
It seems that LinPro produces an updated forces vector after solving "the system of equations" that includes the reactions at the fixed DOFs along with the forces applied.
It makes me wonder if perhaps there is something off in the sequence we have in the SMath sheet.
After we assemble the complete stiffness matrix K, we obtain a reduced K, Kr that eliminates the fixed DOF (in this case, the last 6 DOF, 19-24).
Then we use that Kr along with a reduced F, Fr, to solve for reduced deflections, Qr.
Is all this right?

Maybe a set fresh of eyes can find the problem here:
New Frame FEM Example - Updated.sm (130kb) downloaded 13 time(s).
Offline Jean Giraud  
#32 Posted : 09 March 2023 04:21:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: wb.c Go to Quoted Post
and you can't evaluate the inverse symbolically for some reason

Smath behaves numerically like a conventional CAS
No flaws in over 35000 hrs ... ~ 8 years.
The system you are trying to imitate may not be a CAS,
just to say a home made system, that you will have to crack & QA
Cheers ... Jean

Matrix Inverse Symbolic.PNG
Offline Alvaro Gavilán  
#33 Posted : 09 March 2023 12:30:55(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Hi wb.c,

There was an error in your connectivity table for the last bar. Also, k_prime = L'*k*L (and not L*k*L' ) must be used to retrieve q_prime =L*q. I corrected your transformation matrix L (I shared a good book on this topic, you can take a look at chapter 5 to see the L matrix). You described the correct procedure at the end of your comment.

New Frame FEM Example - v2 (LinPro validation).sm (130kb) downloaded 11 time(s).


And here the automated (FEM tasks) worksheet:

New Frame FEM Example - v2 (LinPro validation - automated).sm (85kb) downloaded 21 time(s).

Edited by user 09 March 2023 12:57:44(UTC)  | Reason: Not specified

thanks 1 user thanked Alvaro Gavilán for this useful post.
on 09/03/2023(UTC)
Offline Jean Giraud  
#34 Posted : 09 March 2023 14:51:05(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: wb.c Go to Quoted Post
I also removed all units ...

You remove units ... or make them silent
or simply leave units, select all disable units option.

Offline Jean Giraud  
#35 Posted : 09 March 2023 16:52:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Alvaro Gavilá Go to Quoted Post
And here the automated (FEM tasks) worksheet:

Up until doctored wrt to my SS, only MP plots.
Above my head anyway !
Few more matrix utilities ... more than minimalist !
Cheers ... Jean

Page3 Utilities.sm (38kb) downloaded 5 time(s).




Offline Jean Giraud  
#36 Posted : 09 March 2023 17:28:23(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
If you or anyone else experience issues within the latest SS version, we can investigate it further.

The automated version opens fine.
Of the 1000's documents I downloaded since stable "0.98.6179.21440"
I would say, about ½ dozen of various SS didn't open.
More collabs reported as well.
Take care Davide ... Jean.
Let incorrect format RIP
I have latest SS on my on my Win 10 bomb 64 bits.
Never download anything on that machine.
Din't open e-mail for 7 years.



Offline wb.c  
#37 Posted : 10 March 2023 02:15:37(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
Alright, so the FEM sequence is working well. No issues with the values obtained thus far. Thanks Alvaro for that!

I have implemented a loop now to evaluate a specified force at 360-deg.
The issue now is that this loop takes some time. Currently about 22-sec.
I would like to speed things up as much as possible.

I already stripped down the the original sheet and eliminated any unnecessary calculations, but the real time consumer here is obviously the loop containing 360 steps.

Originally I thought that I could only evaluate 180 degrees and that the other 180 would just be opposite, but the results are not quite symmetrical, so 360 it is...
In the loop, I am only calculating member forces for the first 3 members, but before that, displacements must be calculated for the whole system.
The loop is not storing large vectors, in fact the vector being stored only contains 3 smaller vectors, each of length 3, for each of the struts in question.
The stiffness matrix is only assembled once, and the loop is really only for solving for Q as the applied force changes and then the solving for the member forces.
The loop then evaluates if the new value is the biggest so far and if it is, it will save it. if not, it keep the previous value.

Any ideas on how to speed up the loop?
Maybe there is a way to isolate the FEM method to only the three members of interest? So that Q is smaller?
Maybe there is a better way to get the worst case for each strut out of the loop?

Thanks!

FEM Concept v0.0.sm (89kb) downloaded 11 time(s).
Offline Alvaro Gavilán  
#38 Posted : 10 March 2023 04:53:04(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
You're welcome! So, you can do a few things:

* Kr is unique, you can invert it only once outside the loop.

* When calculating Qr, avoid multiplying by zero in the rows of EFr.

These two things reduce computation time to ~ 1.4 sec in my machine.

FEM Concept v1.0.sm (110kb) downloaded 41 time(s).
thanks 3 users thanked Alvaro Gavilán for this useful post.
on 10/03/2023(UTC),  on 10/03/2023(UTC),  on 10/03/2023(UTC)
Offline wb.c  
#39 Posted : 10 March 2023 05:27:51(UTC)
wb.c


Rank: Advanced Member

Groups: Registered
Joined: 02/04/2018(UTC)
Posts: 135
United States

Was thanked: 22 time(s) in 19 post(s)
Wow that is crazy fast now. Less than 1sec for me.
Thanks so much for the input.

Been watching some of your YouTube videos, and it is really great stuff.
Keep it up.
Offline Alvaro Gavilán  
#40 Posted : 10 March 2023 13:03:14(UTC)
Alvaro Gavilán


Rank: Advanced Member

Groups: Registered
Joined: 16/04/2020(UTC)
Posts: 65
Man
Paraguay
Location: France

Was thanked: 25 time(s) in 16 post(s)
Thanks!! 😉
Users browsing this topic
Guest
3 Pages<123>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.