-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEA: fix 1d beam cross section orientation #12833
Conversation
When I run this modified version of FreeCAD and try to submit the analysis in your test file (011_beam.FCStd), I get the following error:
Same with a simple test file with an inclined rectangular beam. The ones aligned with global axes are working. |
Thank you for noticing! TL;DRThe real issue is with CalculiX, see Dhondtguido/CalculiX/issues/40. It might be better to change the directions of the cross section the way they were, though it's not a panacea Long versionFirsty, I reproduced your results on a 011 beam. Then I decided to run a simulation on a all_dirs.FCStd (a bunch of beams, looking at different directions) and strangely there were no errors. After that I wrote an example, that generates standalone beams in all directions The CalculiX issue is not fixed in the version, which one can find on the official site. It is fixed in the original github repo (but I had to revert this commit Dhondtguido/CalculiX@004538d in order to compile) As I see it, the best action is to update CalculiX, that's bundled with FreeCAD, the easiest - to have the directions of a cross section the FreeCAD way: unless a rotation is applied, it doesn't fail in any direction (the most common cases) To run the example: FEM -> Utilities -> Open FEM examples -> "run me" example. It will generate 26 files, then will run all of them. Failed directions (if any) will be printed after all the files are ran [1] - code can be found here https://github.com/lyphrowny/FreeCAD/tree/all_dirs_examples_generation |
Since it's a bug in the current (2.21) release of CalculiX and the next one likely won't happen anytime soon, perhaps it's better to leave it the FreeCAD way as you say. Using non-stable CalculiX build would be risky. But maybe we could implement a fix for another related limitation and make it possible to use multiple FEM ElementRotation1D objects assigned to different beams. Currently, all beams use the same rotation. What do you think? |
Yeah, let's leave the directions the FreeCAD way (though I still stand my ground on updating the version of the bundled CalculiX (it's still 2.17 in FreeCAD 0.21.2 on Windows)) We could make it possible to have multiple ElementRotation1D, but it wouldn't solve the issue of For 1,1,0 beam, which cross section I wanted to be rotated 90 degrees, I managed to rotate it by 73 and 107 degrees, all degrees between 73 and 107 gave me the error in cascade. Is a 17-degrees-off rotation acceptible? :) |
The CalculiX binary provided with FreeCAD definitely needs to be updated (it seems to be 2.21 in weekly builds already though). It should always be the newest ccx version available when preparing the FreeCAD release (related: #10865) . I’m just unsure about including our own build of ccx created long before the next official release (in which this bug will be fixed) since CalculiX development is in progress and there might be some issues because of that. Multiple beam rotations are needed mostly for other reasons (more flexibility) but I assumed that they can also help with this issue at least to some extent. |
I've reverted the change to the directions and tested it locally via |
I recompiled it. Looks good. It seems to be the best solution for now. But let's keep the issue open or create a new one since there's still some area for improvement once the next version of CalculiX is released. |
Thank you for the review! |
Previous commit changes the 1-direction to -y axis, however originally it was directed at +y axis. This commit makes the 1-direction face +y axis
@FEA-eng please, take a look. I changed the normal for 1-direction from -y to +y as it was in the previous version (only for consistency as -y worked too) Not all FEM tests were ran via |
It's ok for me, works well enough. We have to live with that CalculiX bug for now but at least we know that it should be fixed in the next release.
No idea TBH. I just submit a PR, check the automatic tests and correct what's needed ;-) |
@chennes could you please start the bulding workflow? |
@chennes could you please run the workflow? Should be ok to merge |
closes #12818
Changes not only the rotation of the cross section, but the order of the 1,2-dimensions for the RECT beam section - now matches with CalculiX docs. This might be a breaking change for some 3rd Parties (if any), but it doesn't break anything in FreeCAD
Tested on Windows
.FCStd files are in the forum thread: https://forum.freecad.org/viewtopic.php?t=85951