Erase Selected Elements in a Finite Element Mesh

About the development of the FEM module/workbench.

Moderator: bernd

mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by mac_the_bike »

Kunda1

I have just placed what I think is a Pull Request on Github, 7560.

Could you check that what I have done is correct, as this is my first attempt at git(ting)?

Is there any other data that is needed?

How do I update an existing Wiki page and create a new page if these changes are accepted?

Thanks, in anticipation
User avatar
NewJoker
Veteran
Posts: 3018
Joined: Sun Oct 11, 2020 7:49 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by NewJoker »

@Kunda1 @uwestoehr Could you take a look at this PR ?

https://github.com/FreeCAD/FreeCAD/pull/7560
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by Kunda1 »

CC @bernd (if you have any time in your schedule to take a look at this, that would be awesome)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by mac_the_bike »

Attached is the User's Guide, Version 1.
Attachments
eraseFEMWB.txt
(3.12 KiB) Downloaded 35 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by Kunda1 »

Thanks for all your efforts @mac_the_bike!
Once you get a hang of git, the process will go much faster. I linked a tutorial on the PR comment thread for you. Are you interested in checking it out ?

Edit: also I demonstrated how to build an experimental snap build for testing this PR (notated in the PR as well)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: Erase Selected Elements in a Finite Element Mesh

Post by uwestoehr »

Many hanks for this very valuable new feature!
mac_the_bike wrote: Wed Aug 10, 2022 11:48 am The code is based on "Mesh->Nodes Set" in FreeCAD version 20, the source of which I downloaded in May, 2022.
I just reviewed your PR in GitHub. Before you are making the changes I requested, please rebase your PR on master. This is important since master is the common code base we rely on with the development. Also since May there have been several changes.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by Kunda1 »

mac_the_bike wrote: Fri Oct 28, 2022 1:30 pm Attached is the User's Guide, Version 1.
I'll help you turn this in to wiki page when the Feature is merged ;)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
mac_the_bike
Posts: 42
Joined: Sun Jun 30, 2019 12:56 pm

Re: Erase Selected Elements in a Finite Element Mesh

Post by mac_the_bike »

In the FEM WB, I have added a new output to the "FEM mesh to mesh" option under "Mesh".
The current version is a "FemMesh to Mesh converter", which generates a Mesh from a FemMesh. This new option generates a FemMesh from the Mesh called "Mesh2Fem".

The following is an example of how the "Mesh2Fem" output can be used.
The attached file shows a block with a cylindrical hole to which is added another cylinder whose centre line is offset from the first cylinder by a small amount.

A Mesh is generated using GMesh.

From a distance, the mesh looks satisfactory. If we now create a "Mesh2Fem" and then erase one side of this mesh, you can now see inside and the fact that mesh is invalid.

Obviously, for this contrived simple example if you look at the GMesh mesh you can see that the elements don't connect correctly in the region where the cylinder enters the block.

FEMMeshGmsh001 - the GMesh mesh
Mesh2Fem - the FEM of the surface of the model
NewFemMesh - Mesh2Fem with the lements erased
Mesh - generated by "FEM mesh to mesh"
Attachments
not_touching_circles.FCstd
(148.89 KiB) Downloaded 31 times
Post Reply