FEM mesh improvements

About the development of the FEM module/workbench.

Moderator: bernd

joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: FEM mesh improvements

Post by joha2 »

Hey bernd,

I just implemented JSON/YAML import/export (PR: https://github.com/berndhahnebach/FreeCAD_bhb/pull/53). There were two questions coming to my mind:

* Why there are no Pyr5/Pyr13 elements in your mesh_data structure? Not necessary or just not implemented?
* What about groups? Wouldn't it be nice to also have them in the mesh_data structure? (export and import is possible, you do not have to read them at the end of the day in the make_femmesh function :mrgreen: )

Best wishes
Johannes
Last edited by joha2 on Sat Apr 20, 2019 8:57 am, edited 1 time in total.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM mesh improvements

Post by bernd »

great!

py5 py 13 are not supported by calculix and thus may be missing, but they supported by smesh. If they are missung we should add them.

Groups are supportrd by smesh but creating them is not supported by python. This has been on my to do.for years. It is time to implement this. May be after I have finished the material improvements I am working on right now. BTW reading and thus exporting group data is posdible already.

cheers bernd
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: FEM mesh improvements

Post by joha2 »

bernd wrote: Fri Apr 19, 2019 6:18 pm great!

py5 py 13 are not supported by calculix and thus may be missing, but they supported by smesh. If they are missung we should add them.
From my point of view they are not missing. I just wondered since I saw the type "Pyramid" somewhere in the mesh creation code, but not in the make_femmesh function. Maybe it is not that much effort to also implement them there, testing is more effort :mrgreen:
bernd wrote: Fri Apr 19, 2019 6:18 pm Groups are supportrd by smesh but creating them is not supported by python. This has been on my to do.for years. It is time to implement this. May be after I have finished the material improvements I am working on right now. BTW reading and thus exporting group data is posdible already.

cheers bernd
Yeah, for the YAML/JSON export I already use the FemMesh.Groups, FemMesh.getGroupName, and FemMesh.getGroupElements functions. I just created a key "Groups" in the exported dict, which can be read by the make_femmesh function, but at the moment the "Groups" key is just ignored. If you like, you can tell me what to do, to implement group creation into the make_femmesh function (I think the right place is there), and then I will begin to implement it. I also traversed through the C++ code, but it seemed quite complicated for me.

If my YAML/JSON PR later is accepted, I think we should move the "convert_femmesh_to_dict" function which is located in the importYAMLJSONMesh.py into the location where the make_femmesh function is and name it like "read_femmesh", such that the two functions build a pair for import/export. I will prepare a PR later for that.

Best wishes
Johannes
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM mesh improvements

Post by bernd »

to be able to create group data by python the C++ methods for creating groups need to be exposed to python. This needs to be done in C++. It is not that difficault to do this. There are lots of examples around how to do such new Python methods. If you are interested I could post some links which will help you. But for this I would need a computer, but I am on the way ... Furthermore it makes sense to make a new topic for this since it is some own topic.

cheers bernd
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM mesh improvements

Post by bernd »

I habe never had such wether on eastern is my live ... It is like summer ...
Attachments
20190420123005.jpg
20190420123005.jpg (286.91 KiB) Viewed 1063 times
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: FEM mesh improvements

Post by joha2 »

Nice photo and very nice weather! Hope you are on vacation :-) :mrgreen:

I will open a new thread for the group exposing feature.

Best wishes and thanks for your fast response
Johannes
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM mesh improvements

Post by bernd »

yeah on river Lech near Füssen! great coutry side for biking without electric energy ... :mrgreen: most people around go with energy ... :shock:
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: FEM mesh improvements

Post by Jee-Bee »

Just before 1 april some gay in the Netherlands want to create a joke for some e-bikers from his bike club.
He created a fake recharching point in the middle of nowhere...
https://www.gelderlander.nl/montferland ... ~a65aed62/
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: FEM mesh improvements

Post by bernd »

Jee-Bee wrote: Sat Apr 20, 2019 7:27 pm Just before 1 april some gay in the Netherlands want to create a joke for some e-bikers from his bike club.
He created a fake recharching point in the middle of nowhere...
https://www.gelderlander.nl/montferland ... ~a65aed62/
:D :D thats a good one ... It is pitty it is all in dutch ... But on the other side even in our family we are 2 : 3, without E : with E already ... but on the holliday hobby bike I will stay withoutneverless what all others do around, not easy they go damn blind fast uphill ...

sorry johannes for being offtopic, nice eastern to all around, even to all who do do not celebrate eastern because of no or an other guy in heaven, cheers bernd
joha2
Posts: 303
Joined: Tue Oct 11, 2016 9:48 pm

Re: FEM mesh improvements

Post by joha2 »

Hehe nice one :D :D :D Thanks @jee-bee for the nice article! @bernd @jee-bee and all others: Happy Easter, too :-)
Post Reply