Selecting internal faces of a pressure vessel

About the development of the FEM module/workbench.

Moderator: bernd

Serchu
Posts: 107
Joined: Tue Feb 10, 2015 12:33 pm
Location: General Pacheco (Buenos Aires) - Argentina
Contact:

Selecting internal faces of a pressure vessel

Post by Serchu »

Hi, I want to apply an internal pressure to a vessel, but I'm struggled trying to select the internal faces of the part (is a closed cilinder). I have tryied using the cliping plane, but when is active is not possible to follow with the boundary condition definition.

Any advice?

Regards.
fandaL
Posts: 440
Joined: Thu Jul 24, 2014 8:29 am

Re: Selecting internal faces of a pressure vessel

Post by fandaL »

Make a backup of your file and try this:
1) create a mesh of your vessel
2) create a material
3) in the Draft module use Downgrade to get faces from volume (volume is lost and I think connection of mesh to it)
4) create constraints on this faces - fix and pressure
5) run analysis

This worked to me at sphere cut by smaller sphere, but when using a clipping plane, I don't see the inner elements of the mesh, only surfaces are visible.
sphere_in_sphere_cut.png
sphere_in_sphere_cut.png (83.89 KiB) Viewed 4661 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Selecting internal faces of a pressure vessel

Post by DeepSOIC »

Hi!
Option 1 is to use Draft Section, which can cut the view in "real time".
Option 2 is to get inside by switching to perspective view and doing some navigation. But in FreeCAD, it is very uncomfortable to be inside objects, navigation styles are really not made for the purpose..
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Selecting internal faces of a pressure vessel

Post by HoWil »

DeepSOIC wrote:Hi!
Option 1 is to use Draft Section, which can cut the view in "real time".
Can you please explain a bit more where to find this real time cutted view.
Thanks in advance,
Howil
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Selecting internal faces of a pressure vessel

Post by HoWil »

Hi,
I wrote a script/FC-Macro which enables the selection of hidden or inner faces or edges.
Attached you find the script and a screencast introducing the interface on the standard part-design example-part after creating a inner cut.

Hints: To get best results on positioning your selection-click, set the element to 'Selectable=False' (see screencast).
This script does work all elements of the Part- and Part-Design-Next- workbenches except the 'Part'-element of PDN. The reason for this is until now unknown.

Hope it is helpful, and maybe it can be integrated into the selection dialog for FEM conditions and Mesh-regions.
BR,
HoWil
FC_element_selector_v1p0.py
First version of the (inner/hidden) element selector.
(5.56 KiB) Downloaded 290 times
sreenfc3.webm.zip
Screencast starting from the std. part-design-next example using a body and a subtractive sphere. Finally the inner face of the sub. sphere is selected for FEM.
(609.77 KiB) Downloaded 115 times
Selection of the inner face for a fixed-boundary-condition in FEM-wb.
Selection of the inner face for a fixed-boundary-condition in FEM-wb.
Screenshot from 2017-01-05 20-39-34_cut.png (202.12 KiB) Viewed 4360 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Selecting internal faces of a pressure vessel

Post by bernd »

It is a very useful tool. I had to remove the trailing white spaces to get it running in FreeCAD. Works great here. The face of a spere is added twice to the list I assume this because it is twice under the mouse. It would be cool if we would not need to change the select ability of the object around. Ah the window should stay on top over the FreeCAD main window even if the user clicks in FreeCAD main window.

We would need it on any constraint. I need to think how we could add it to the FEM WB.
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Selecting internal faces of a pressure vessel

Post by HoWil »

Disabling of "selectable" is because otherwise the first face below the mouse is highlighted (in yellow) hiding everything below.
Maybe it can be done automatically (disabling for each element under mouse and store it in an list ; restore it afterwards).
bernd wrote: Ah the window should stay on top over the FreeCAD main window even if the user clicks in FreeCAD main window.
Have no clue about this yet. Any suggestions about this?
A switch to use it also for domains is also needed to fully use it in Fem-wb.
Br
Howil
User avatar
makkemal
Posts: 395
Joined: Wed Apr 29, 2015 12:41 pm
Location: South Africa
Contact:

Re: Selecting internal faces of a pressure vessel

Post by makkemal »

Very usefull tool !
It should be incorporated into master :D
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Selecting internal faces of a pressure vessel

Post by HoWil »

bernd wrote:I had to remove the trailing white spaces to get it running in FreeCAD.
Interesting... had nothing like that on my Ubuntu16.04.1 but will look into your 'Python coding standard' maybe I can identify the problem.

I want to post a updated version of the above discussed script.
Now it is no more necessary to disable 'selectable' for bodies and found bodies are also listed in the combobox.
A small flaw is that the first element (first found body) has to be selected again to have it highlighted.
FC_element_selector_v1p1p1.py
(6.95 KiB) Downloaded 230 times
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Selecting internal faces of a pressure vessel

Post by mario52 »

hi
i add this line before self.dialog.show() and the window StaysOnTopHint

Code: Select all

        self.dialog.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)    # 

        self.dialog.show()
        self.dialog.exec_()
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply