Plotting of Concrete Reinforcement Ratio

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: Plotting of Concrete Reinforcement Ratio

Post by thschrader »

HarryvL wrote: Tue May 22, 2018 5:43 pm Did you combine beam and bars into BooleanFragments object with type turned to CompSolid?
Yes.
CompSolid.JPG
CompSolid.JPG (42.89 KiB) Viewed 1591 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Plotting of Concrete Reinforcement Ratio

Post by bernd »

If you use a CompSolid it will mesh it well. To check, export the mesh into unv and open the unv with Gmsh gui. @Thomas gmsh gui is in bin folder of FreeCAD bin. But I had lots of nonpositiv jacobians. I played with MeshRegion, but the geo exporter of FreeCAD has problems with the sweeps nodes. I manually edited the geo file. Attaches the geo, brep and FreeCAD file.

place the brep and the geo in the same directory, open gmsh open the geo file and wait. Befor open the geo file click in gmesh on the status line to get a log console. With this you can watch the meshing process. After some minutes gmsh saves a unv in the same directory. Import this in FreeCAD. The mesh still has some (7) bad elements in sence of nonpositiv jacobian (for me). But it may run in ccx anyway. Mesh has 245870 tets and 87 MB ...

Bernd


BTW: this stuff of this topic is awesome ! We need to get this into FreeCAD result object !

parabolic_rebar_bhb.FCStd
(23.91 KiB) Downloaded 83 times

pic1.JPG
pic1.JPG (781.11 KiB) Viewed 1586 times
pic2.JPG
pic2.JPG (919.46 KiB) Viewed 1586 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Plotting of Concrete Reinforcement Ratio

Post by bernd »

the files for gmsh

remove txt
shape2mesh.geo.txt
(1.87 KiB) Downloaded 73 times
CompoundFilter_Geometry.brep
(56.15 KiB) Downloaded 74 times
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Plotting of Concrete Reinforcement Ratio

Post by HarryvL »

bernd wrote: Tue May 22, 2018 6:33 pm BTW: this stuff of this topic is awesome ! We need to get this into FreeCAD result object !
I think it is of practical value and a great learning experience for me on how to write Python and integrate it with FreeCAD using the FC API.

I am now trying to clean importToolsFem.py up and write a Macro instead, starting from the one done by Mario52 some time ago for Inertial Properties. Once I've got that cracked I will publish it for review and testing. Main remaining learning points / challenges for me:

1) How to create a user dialogue for input of some additional material parameters (e.g. fy for steel and Phi and fck for concrete. Also some display choices (like the number of Reinforcement Ratio values to display - discrete number rather than continues display).

2) How to create a Result object and add this to the object tree

3) How to change the display names of the results in the result object communication box

I f any of this is impossible, then please stop me now :?
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Plotting of Concrete Reinforcement Ratio

Post by HarryvL »

bernd wrote: Tue May 22, 2018 6:33 pm The mesh still has some (7) bad elements in sence of nonpositiv jacobian (for me). But it may run in ccx anyway. Mesh has 245870 tets and 87 MB ...
1) Maybe we should try square x-section rather than round. The shape doesn't matter too much. It's just a way to introduce an internal load.

2) We could try mixed meshes once it can handle embedding 1D or 2D elements in 3D. It would be ideal to model the cable as a string of 1D elements. Or even a 2 D strip would be a great simplification.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Plotting of Concrete Reinforcement Ratio

Post by bernd »

HarryvL wrote: Tue May 22, 2018 7:23 pm
bernd wrote: Tue May 22, 2018 6:33 pm The mesh still has some (7) bad elements in sence of nonpositiv jacobian (for me). But it may run in ccx anyway. Mesh has 245870 tets and 87 MB ...
1) Maybe we should try square x-section rather than round. The shape doesn't matter too much. It's just a way to introduce an internal load.

2) We could try mixed meshes once it can handle embedding 1D or 2D elements in 3D. It would be ideal to model the cable as a string of 1D elements. Or even a 2 D strip would be a great simplification.
+1 and +1
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Plotting of Concrete Reinforcement Ratio

Post by bernd »

HarryvL wrote: Tue May 22, 2018 7:12 pm I am now trying to clean importToolsFem.py up and write a Macro instead, starting from the one done by Mario52 some time ago for Inertial Properties. Once I've got that cracked I will publish it for review and testing. Main remaining learning points / challenges for me:
To be honest, I would like to integrate it in FreeCAD somehow. But it it run as a macro an integration will be posible with not such big effort.
HarryvL wrote: Tue May 22, 2018 7:12 pm 1) How to create a user dialogue for input of some additional material parameters (e.g. fy for steel and Phi and fck for concrete. Also some display choices (like the number of Reinforcement Ratio values to display - discrete number rather than continues display).
see github of old gmsh macro https://www.freecadweb.org/wiki/Macro_GMSH we used it before I made the gmsh object in FreeCAD. The macro should still work. Or use any other macro. There are dozens ...

HarryvL wrote: Tue May 22, 2018 7:12 pm 2) How to create a Result object and add this to the object tree
have a look here https://forum.freecadweb.org/viewtopic.php?f=18&t=28788 for some Python code in the regard of result object. BTW, you can add any FEM object to the document and thus to the TreeView by importing module ObjectsFem and use it's make... methods See https://github.com/FreeCAD/FreeCAD/blob ... ectsFem.py You can even use your prefered name.
HarryvL wrote: Tue May 22, 2018 7:12 pm 3) How to change the display names of the results in the result object communication box
Mhh not at runtime, at least not in easy manner. We need to recode the result task panel and use a combo box. The combo box uses just all available result types. With this it is easy to add any kind of result type even at runtime.

What you could do is use user defined result box. For example strain is not in the radio buttons but if you put in ex in user defined result input field they will be plotted. With this you should be able to plot your results easily.

hope this helps bernd
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Plotting of Concrete Reinforcement Ratio

Post by HarryvL »

bernd wrote: Tue May 22, 2018 8:24 pm To be honest, I would like to integrate it in FreeCAD somehow. But it it run as a macro an integration will be posible with not such big effort.
You're right. No need to write a macro if this gets embedded into FC. So I gave up on this and decided to introduce 4 new parameters in _ViewProviderFemrsultMechanical.py so that I can select them in the User Defined Equation dialog box for now. After updating this, FemrsultMechanical.py and importToolsFem.py I can indeed produce the results via the ResultObject dialog.

However, these results do not get exported to VTK and can therefore not be imported in Paraview :shock: I looked to see if I can easily add results to the VTK export, but it is written in c++ Grrrrrrr. For now I will change back to what I had before ... i.e. dump the results into existing arrays (strains and "user defined") that do get exported. Then I will run a few more tests and critically review the code that produces them. After that, it is over to the UberGuru @Bernd :D !!
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Plotting of Concrete Reinforcement Ratio

Post by HarryvL »

HarryvL wrote: Tue May 22, 2018 11:29 pm For now I will change back to what I had before ...
I am glad I didn't give up. The change to FemVTKTools.cpp was really easy and the whole thing compiled and linked in under 5 minutes.

And now I can select the additional results directly from the drop-down list in Paraview:

FullSizeRender.jpg
FullSizeRender.jpg (54.74 KiB) Viewed 1555 times
Reinforcement Rationx.png
Reinforcement Rationx.png (261.48 KiB) Viewed 1555 times
User avatar
HarryvL
Veteran
Posts: 1283
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: Plotting of Concrete Reinforcement Ratio

Post by HarryvL »

Next refinement;

Currently reinforcement ratios and Mohr Coulomb are evaluated for all stress results. So this includes the stresses in the tension cables. As the tensile stresses in the cables are very high, very large results are obtained and this dwarfs the results for the concrete (where it matters). In previous case studies I therefore had to manually review in Paraview how to scale the output, i.e. visually filter out the results for steel,

Long story, but the question is: how do I know what node is connected to steel material so I can suppress the reinforcement ratios and Mohr Coulomb stresses for those nodes?
Post Reply