Closing Gaps in Shell Meshes?

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Closing Gaps in Shell Meshes?

Post by DamianHarty »

O Learned Denizens, I humbly prostrate myself before your collective wisdom, and apologise in advance for the amount of context-giving to get to the question. I know people on Stack become enraged at anything more than the tersest enquiries.

First up:

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Locale: English/United States (en_US)


Next, the task: I am attempting to:
  • Receive 3D CAD of a fabricated (welded) structure made of tubes and folded sheets, all steel
  • Assess the structural performance of the structure. Just linear to start with, in the crawl, walk, run approach.
I'm old at Finite Element analysis generically and new at 3D CAD. Long story, but basically I am from a land that time forgot, when CAD engineers and analysts were separate humans.

I've previously done this sort of thing with commercial tools like HyperMesh/OptiStruct, Patran/NASTRAN, SDRC I-DEAS (I did say I was old). When hobbying, such tools are out of scope. So some of my knowledge may be rusty; there's no shame in that for me - just correct me when I err.

I've successfully made and analysed individual tubes, so that's no problem. (As an aside, I willfully overmeshed some of my examples to see what the laptop could manage, and laughed out loud when it took 90 seconds to solve a 500k DoF linear problem. When I was a boy that was a "heroic" scale problem that was sent to a Cray XMP somewhere else in the world.)

But I'm looking for a workflow that lets me generate a shell mesh, just on the outer faces for now (I know, I should offset them to find a midplane - that's for the walking part of the exercise - I am still crawling now) and join the parts of the mesh effectively.

I'd like not to regenerate all the data, if possible, but instead to use the existing CAD data.

So far I am fumbling around and have what looks like a workflow of sorts:
  • Defeature and delete details that don't move the needle inside FreeCAD
  • Write out a reduced STEP file
  • Read the STEP file into Gmsh
  • Create a "Physical Group" (unsure of the terminology here, hence the scare quotes)
  • Mesh as desired in Gmsh
  • Run the Coherence Mesh command to merge coincident nodes
  • Export mesh to an I-DEAS universal file (it only exports the Physical Group entities)
  • Import Universal file back into FreeCAD
  • Add an Analysis thingy (again, terminology) and move mesh into it
  • Make material properties and shell thickness on the relevant surfaces of the CAD data
  • Add loads & boundary conditions, then solve
So far, so good. But there are some instances when I want to bridge a gap (the curse of working on the outside surfaces). In Hypermesh I would just locally adjust nodes to sit on top of each other, distorting the mesh, or add small RBE2 elements to cross the gap or... something - something hacky, manual and interactive.

And finally, the question: What I'm missing is the understanding of how to make these manual mesh modifications within either FreeCad or Gmsh. Any tips - or wholesale ridicule on my workflow?

Thanks in advance,

Damian
Last edited by DamianHarty on Sat Sep 03, 2022 4:24 pm, edited 1 time in total.
User avatar
johnwang
Veteran
Posts: 1345
Joined: Sun Jan 27, 2019 12:41 am

Re: First Post, Feels Like a Stupid Question

Post by johnwang »

You can try nastran-95 and mystran too.they are free and open source.
hfc series CAE workbenches for FreeCAD (hfcNastran95, hfcMystran, hfcFrame3DD, hfcSU2 and more)
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: First Post, Feels Like a Stupid Question

Post by DamianHarty »

Thanks for the suggestion, but it's not the solver I am having difficulty with.

I'm trying to get a to viable mesh of a fabricated structure inside FreeCAD.

Cheers,

Damian
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: First Post, Feels Like a Stupid Question

Post by thschrader »

DamianHarty wrote: Fri Sep 02, 2022 12:57 pm ...
And finally, the question: What I'm missing is the understanding of how to make these manual mesh modifications within either FreeCad or Gmsh. Any tips - or wholesale ridicule on my workflow?
...
In general your workflow should work, as described here:
https://www.youtube.com/watch?v=vylt24G7qj4

But for running FEM in FC you need the both, the mesh and the step-file body.
A mesh alone wont help you. Mesh manipulating in FC works with refinement zones, no direkt editing,
as far as I know. FC has some powerful defeaturing tools (the defeaturing workbench).
Maybe ist easier to import the original step in FC, defeature it, export to gmsh and s.o.

In FC you can extract surfaces from 3D-bodies, for running 2D-FEM. Works for simple parts, like
a tube, but for complex parts you must redesign it.
Hope that helps...
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: First Post, Feels Like a Stupid Question

Post by DamianHarty »

So it seems I need a different FE tool than either Gmsh in FreeCAD, or standalone Gmsh for my fabrication analysis, is what I am taking from this. Oh well, it was fun trying.

Great tutorial on Gmsh, by the way. Good to derust my German as well as my FE knowledge...

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

Re: First Post, Feels Like a Stupid Question

Post by NewJoker »

It would be great if FreeCAD had a tool for automatic midsurface extraction. For now, it has to be done manually: Draft Facebinder and then Draft Scale or Part Offset.

Maybe Salome_Meca would be a good choice for meshing in your case. It also can't extract midsurfaces but offers some advanced meshing capabilities. However, it's definitely not user-friendly software.
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: First Post, Feels Like a Stupid Question

Post by DamianHarty »

The midsurface problem is not really the biggest one - I am more than happy to put up with a shell mesh based on the outer surfaces, and all the approximations that entails.

Even if I extract the mid surfaces, I can't join them to each other, it seems.

Cheers,

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

Re: First Post, Feels Like a Stupid Question

Post by NewJoker »

So joining the surfaces or meshes is the biggest issue ? Have you tried using boolean tools (like boolean fragments) ?

This long thread may give you some ideas: https://forum.freecadweb.org/viewtopic. ... 6&start=10
User avatar
DamianHarty
Posts: 48
Joined: Tue Jul 07, 2020 3:50 pm

Re: First Post, Feels Like a Stupid Question

Post by DamianHarty »

Yes, I've spent some time with Boolean tools but it's not been fruitful so far.

I am leaning towards the workflow I identified to make separate tube meshes, then bringing them into Salome to edit them. I can run Calculix standalone, I think.

Cheers,

Damian
heda
Veteran
Posts: 1348
Joined: Sat Dec 12, 2015 5:49 pm

Re: First Post, Feels Like a Stupid Question

Post by heda »

care to put up a mesh on the forum that has the gaps that you want to join?
Post Reply