CfdOF icon indicating copy to clipboard operation
CfdOF copied to clipboard

CFD_Mesh not using multi threaded parameter for mesh case writing surface enumaration

Open FCLC opened this issue 4 years ago • 13 comments

Much as the title.

Essentially, Cfd OF seems to only use the multi threaded parameter in the CFD mesh workbench when calling GMSH/snappyhexmesh or CFmesh, but does not use it when writting the case itself.

This is fine for small meshes (number of faces smaller than 100k) but means that larger cases can take more time to write the mesh case file than actually mesh.

FCLC avatar Aug 17 '21 13:08 FCLC

Could you elaborate - is this something that is already available in the mesh workbench (or elsewhere) for triangulating the surface meshes, or is this a new feature request?

oliveroxtoby avatar Aug 17 '21 13:08 oliveroxtoby

This is already available and used for both surfaces and meshes in different work benches such as Mesh Design and OpenSCAD

FCLC avatar Aug 17 '21 13:08 FCLC

Brilliant, didn't know that! Thanks!

oliveroxtoby avatar Aug 17 '21 14:08 oliveroxtoby

Oops, didnt meant to close the issue!

FCLC avatar Aug 17 '21 14:08 FCLC

Worth noting, the same issue applies when using "all faces" on a body in for selecting walls/inlet/outlet etc. tho this mostly applies to walls.

For example a very complex f1 style front to midsection with front wing and barge board can have 250k+ faces in a 2m1m0.5m space, and selecting "all faces" will select each one at a time (I suspect something along the lines of a while/for loop of i in get.[number of faces] ?)

FCLC avatar Aug 17 '21 14:08 FCLC

This is already available and used for both surfaces and meshes in different work benches such as Mesh Design and OpenSCAD

I had a look at Mesh Design and I don't see any multithreading being used in the standard MeshPart.meshFromShape() function. gmsh supports multithreading as you say, but I don't actually see it being activated. Is this what you are suggesting using? Otherwise could you give me some specific instructions to find this feature?

oliveroxtoby avatar Aug 18 '21 20:08 oliveroxtoby

Worth noting, the same issue applies when using "all faces" on a body in for selecting walls/inlet/outlet etc. tho this mostly applies to walls.

For example a very complex f1 style front to midsection with front wing and barge board can have 250k+ faces in a 2m_1m_0.5m space, and selecting "all faces" will select each one at a time (I suspect something along the lines of a while/for loop of i in get.[number of faces] ?)

After a recent update it's possible to select whole objects instead of addressing faces individually. Hopefully that improves this situation...

oliveroxtoby avatar Aug 18 '21 20:08 oliveroxtoby

Worth noting, the same issue applies when using "all faces" on a body in for selecting walls/inlet/outlet etc. tho this mostly applies to walls. For example a very complex f1 style front to midsection with front wing and barge board can have 250k+ faces in a 2m_1m_0.5m space, and selecting "all faces" will select each one at a time (I suspect something along the lines of a while/for loop of i in get.[number of faces] ?)

After a recent update it's possible to select whole objects instead of addressing faces individually. Hopefully that improves this situation...

Sounds good, will pull the update and take a look this evening!

FCLC avatar Aug 19 '21 18:08 FCLC

This is already available and used for both surfaces and meshes in different work benches such as Mesh Design and OpenSCAD

I had a look at Mesh Design and I don't see any multithreading being used in the standard MeshPart.meshFromShape() function. gmsh supports multithreading as you say, but I don't actually see it being activated. Is this what you are suggesting using? Otherwise could you give me some specific instructions to find this feature?

Not certain how the mechanism is working in that case, tho it may be that they were bulk selecting the features using the same mechanism changed above.

FCLC avatar Aug 19 '21 19:08 FCLC

Took a quick look just now:

the full model selection for adding an object will all faces worked perfectly! Would it be possible to also have a button in the UI in addition to the double click functionality? when selecting models inside other walls/other geometry can be cumbersome to have to disable individual pieces one at a time to "dig" out the object you want to add

Writing the mesh case still seems to select one face at a time, tho I'm not certain if that was addressed by the latest commit.

FCLC avatar Aug 19 '21 19:08 FCLC

the full model selection for adding an object will all faces worked perfectly! Would it be possible to also have a button in the UI in addition to the double click functionality? when selecting models inside other walls/other geometry can be cumbersome to have to disable individual pieces one at a time to "dig" out the object you want to add

This should be possible using the "Select from list" function? Just don't choose "Select individual components" - then you can select whole objects at a time.

oliveroxtoby avatar Aug 24 '21 13:08 oliveroxtoby

Is this on a (soft) roadmap ? just wondering

luzpaz avatar May 13 '22 21:05 luzpaz

Is this on a (soft) roadmap ? just wondering

Yes - I am planning on looking at this next.

oliveroxtoby avatar May 14 '22 16:05 oliveroxtoby

I have added the (experimental) functionality to do the surface meshing in parallel using gmsh. It can be activated using the 'undocumented' boolean switch called SurfaceTriangulationUsingGMSH (set it using Tools | Parameter editor, in Preferences/Mod/CfdOF).

Seems to work for me but not giving me any speed advantage over the default method.

I'm closing this now, but you are welcome to provide more detailed input or testing if you want to take this further.

oliveroxtoby avatar Jan 02 '23 12:01 oliveroxtoby