GSoC2020, FEM: extend examples

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

I was going through Elmer's Gui tutorial here and I found out that the capacitance two balls example is actually the tutorial 6 (page number 28) of that pdf, so should't we rename the example to link it with the tutorial documentation?

Or is it too late since it's already in master?

By the way, Elmer has some really cool examples.

And @Bernd, I had a doubt which my sound silly to you.
Why do we define the materials in the examples, whereas in the GUI we can select the pre-defined materials?
Is it because we can't access the pre-defined ones from code?
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

@Bernd, another doubt.
In the material_multiple_bendingbeam_fiveboxes and the material_multiple_bendingbeam_fivefaces examples, the third material has no reference.
Judging by symmetry, the first and fifth box/face should have the third material.
Though, even if I assign the third material to them it is not changing the result.
But then why is the material there if it isn't assigned to any box/face in these examples?
Or is that material getting auto assigned to the boxes/faces having no material, cause we usually don't explicitly assign material to the model in other examples.
Even if that is happening, I would prefer having explicit assignments for materials in multimaterial examples, for an easy understanding.
raback
Posts: 75
Joined: Fri May 08, 2020 4:02 pm
Location: Finland
Contact:

Re: GSoC2020, FEM: extend examples

Post by raback »

I mimicked the "hinged beam" in this thread and created a test case for Elmer. See

https://github.com/ElmerCSC/elmerfem/tr ... BeamHinged
https://github.com/ElmerCSC/elmerfem/tr ... amHinged3D

This approach cannot really do very large displacements since the constraints are linearized. Just wanted to try out that they work...

-Peter
raback
Posts: 75
Joined: Fri May 08, 2020 4:02 pm
Location: Finland
Contact:

Re: GSoC2020, FEM: extend examples

Post by raback »

On the numbering of Elmer tutorials: We try to have all cases backwards compatible to the extreme but there is no such aim for tutorials numbering. The numbering comes automatically from LaTex and would we write nicer tutorials up front the numbering will change. But once the tutorials have been named I don't think that there is a foreseeable reason to change the name.

-Peter
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

Sudhanshu wrote: Sat Jul 25, 2020 4:54 pm
bernd wrote: Tue Jul 21, 2020 8:25 pm - this very simple example from HoWil for CalculiX and Elmer. the analytical calculation should be added at file top as a coment. https://forum.freecadweb.org/viewtopic. ... 20#p194595
Can I get the FreeCAD file of this one?
Couldn't find it in that thread.
Based on the description given in the post and simscala validation test, I created the following model but I am getting a vonmises stress of 35.6 MPa:

stress_thermomech.png
stress_thermomech.png (30.36 KiB) Viewed 2508 times
Attachments
simple_thermomech.FCStd
(153.78 KiB) Downloaded 45 times
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

raback wrote: Mon Aug 03, 2020 4:21 pm I mimicked the "hinged beam" in this thread and created a test case for Elmer. See

https://github.com/ElmerCSC/elmerfem/tr ... BeamHinged
https://github.com/ElmerCSC/elmerfem/tr ... amHinged3D

This approach cannot really do very large displacements since the constraints are linearized. Just wanted to try out that they work...
Great!
Can you share with us the results you got for hinged beam with Elmer?
User avatar
Sudhanshu
Posts: 357
Joined: Mon Oct 15, 2018 5:22 am

Re: GSoC2020, FEM: extend examples

Post by Sudhanshu »

Sudhanshu wrote: Tue Aug 04, 2020 3:56 am
Sudhanshu wrote: Sat Jul 25, 2020 4:54 pm
bernd wrote: Tue Jul 21, 2020 8:25 pm - this very simple example from HoWil for CalculiX and Elmer. the analytical calculation should be added at file top as a coment. https://forum.freecadweb.org/viewtopic. ... 20#p194595
Can I get the FreeCAD file of this one?
Couldn't find it in that thread.
Based on the description given in the post and simscala validation test, I created the following model but I am getting a vonmises stress of 35.6 MPa:
In the second attempt, I have changed the material property to match those given on the simscala site and made a finer mesh (with max element size 50mm). Then, to get a better look at the results we see the histogram generated by calculix:

ccx_vonmisses_thermomech.png
ccx_vonmisses_thermomech.png (17.32 KiB) Viewed 2465 times

If I quote the result from simscala:
σ
= 24.6 Mpa in the whole beam.
So from the histogram, for the "whole beam" we will get the von Mises stress as 25 Mpa, which is pretty close.

For Elmer, we get a similar result (in MKS):

Results are in MKS
Results are in MKS
elmer_clamped_beam_in_mks.png (29.34 KiB) Viewed 2465 times

Judging from the gradient, for the whole beam, the stress should be around 25 only but I don't know how to get the exact value yet.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Sudhanshu wrote: Mon Jul 27, 2020 4:58 pm
HoWil wrote: Mon Jul 27, 2020 3:13 pm
Sudhanshu wrote: Mon Jul 27, 2020 2:56 pm Also, I noticed that we don't have any examples on the following constraints:

5. Constraint body heat source
6. Constraint fluid boundary
7. Constraint initial flow velocity
5 to 7 should be covered by the "Thermal flow in curved pipe" model mentioned here...
https://forum.freecadweb.org/viewtopic. ... 20#p418076
I think there is no better model to show these constraints in action. Yes this model only works with Elmer.
If I am right than "6. Constraint fluid boundary" is currently not supported. That's why it is in the sub-Menu under "Constraints without solver". This constraint was originally implemented for the use with CFD which never reached a large audience because CfdOF split off and created a new workbench.

You are right "5. Constraint body heat source" is not used in the above mentioned example... but it is used in "Tutorial 1" in the https://www.nic.funet.fi/pub/sci/physic ... orials.pdf which is discussed over here https://forum.freecadweb.org/viewtopic. ... 40#p183704; looks like the model has to be built again.....but should not be much work when importing the mesh from the tutorial files. Will do that.

"7. Constraint initial flow velocity" is in the "Tutorial 9" of the GUI-Tutorials the 2D!!!-model can be found attached:
Screenshot from 2020-08-07 21-43-46.png
Screenshot from 2020-08-07 21-43-46.png (345.85 KiB) Viewed 2404 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: GSoC2020, FEM: extend examples

Post by HoWil »

Here the model for Tutorial1 for the body heat source
Attachments
Screenshot from 2020-08-07 22-30-42.png
Screenshot from 2020-08-07 22-30-42.png (463.41 KiB) Viewed 2394 times
Turorial1.FCStd
(76.14 KiB) Downloaded 138 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: GSoC2020, FEM: extend examples

Post by bernd »

great, good stuff HoWil.
Post Reply