## Plotting of Concrete Reinforcement Ratio

About the development of the FEM module/workbench.

Moderator: bernd

bernd
Posts: 10528
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: Plotting of Concrete Reinforcement Ratio

- load 3D FEM example analysis

Code: Select all

``````import Fem
mesh = App.ActiveDocument.Box_Mesh
box = App.ActiveDocument.Box
nodes = mesh.FemMesh.getNodesBySolid(box.Shape)
nodes``````
Since it has been calculated before to write the input file, it would be cool to not do it twice. If group meshing is turned on you have a nodes group in the mesh and could directly use this information. Or you explicit create a mesh group with gmsh mesh group object and than use this mesh group.

bernd
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

Thanks Bernd, is this the same node numbering as used in the ResultObject?
bernd
Posts: 10528
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: Plotting of Concrete Reinforcement Ratio

ahh my mistake ... Usually it is, but sometimes not. That is why I introduced the result mesh. Thus you should take not the input mesh but the resultobject.Mesh mesh! This is based on the frd file. If the resultobject.Mesh and the resultobject.NodeNumbers do not fit it is a bug in frd reader. But they will fit!
Posts: 1768
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

### Re: Plotting of Concrete Reinforcement Ratio

HarryvL wrote:
Tue May 22, 2018 7:23 pm
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.
OK, when using a square section for the rebars (based on parabolic sketch/extrude)
instead of using a sweeped circle the mehing/refinement works. And I got more than 500000 cells.
Using 1D elements for the rebars is a good idea...
parabolicRebar.JPG (27.01 KiB) Viewed 500 times
meshRefinement.JPG (77.8 KiB) Viewed 500 times
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

HarryvL wrote:
Wed May 23, 2018 4:47 am
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?
Not knowing the FC API and interpreting Bernd's advice, I was playing with the Python console to try and identify and access relevant methods and properties for the various FemObjects. In the end I am trying to achieve something like this:

Code: Select all

``````Mesh = FreeCAD.ActiveDocument.Result_mesh
if obj.Name[:13] == "SolidMaterial":
if obj.Material.get('Name') == “Concrete”:
for ref in obj.References
nodes = mesh.Mesh.getNodesBySolid(ref)
for n in nodes:
# Calculate rhox, rhoy, rhoz, mc
else:
# rhox = rhoy = rhoz = mc = 0.
``````
I get stuck trying to access the geometric Objects referenced in the MaterialObjects. For example, when I have three separate boxes all referenced in the same material object, then obj.References returns

Code: Select all

``````[(<Part::PartFeature>, ('Solid1',)), (<Part::PartFeature>, ('Solid1',)), (<Part::PartFeature>, ('Solid1',))]
``````
whereas the MaterialObject properties dialog shows

Code: Select all

``````Box001:Solid1
Box002:Solid1
Box:Solid1
``````
So 2 questions:

1) Is there a way to get to the references of the MaterialObject that can be used to get to the associated nodes
2) Am I generally on the right track to get to a point where I can extract nodes for Concrete only?
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

Wed May 23, 2018 8:34 pm
HarryvL wrote:
Tue May 22, 2018 7:23 pm
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.
OK, when using a square section for the rebars (based on parabolic sketch/extrude)
instead of using a sweeped circle the mehing/refinement works. And I got more than 500000 cells.
Using 1D elements for the rebars is a good idea...
parabolicRebar.JPG
meshRefinement.JPG
Thanks Thomas ... this gives me a practical way forward to run test cases for the routines.
bernd
Posts: 10528
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

### Re: Plotting of Concrete Reinforcement Ratio

in the selection parser I use this: https://github.com/FreeCAD/FreeCADhttps ... #L406-L464 It is a bit of a monster because all kind of cases are possible.

<Part::PartFeature> is the document object

harrysMaterial.References is a list of tupels. Each tupel is one line in the widget list. The tupel ref (in your code) itself is a tupel of a document object (the PartFeature Box) and again a tupel of sub elements. But if they are added by the Gui with the widget only one sub element will be in this tupel in any case. OK to get the nodes you need a solid shape. All this is easy if the PartFeature is a solid and not a Compound or BooleanFragment.

Than the shape will be the first solid or the shape of the box since there is only on solid. Thus

harrysMaterial.References[0][0].Shape or harrysMaterial.References[0][0].Solid[0] will return the solid for the getNodesBySolid in case the document object is a simple box. Solid1 names the Solid[0] from the Shapes Solids list.

OK the more difficault one, a BooleanFragment has more than one solid. If you will get the Shape of may be Solid3 of a BooleanFragment

harrysMaterial.References[0][0].Shape will retun the Shape of the BooleanFragment which has more than one solid. This is not usefull, becaus we need Solid3. OK harrysMaterial.References[0][0].Shape.Solid[2] will return the Solid shape for the getNodesBySolid.

Ahh may be it is much more easy as I wrote. Just have a look here ... https://github.com/FreeCAD/FreeCAD/blob ... py#L76-L91

To see the content of any Shape use the tool from Part Workbench check geometry. In the task panel click on Shape content to see what sub element the Shape consits of. Ahh this helps too Topological_data_scripting On the beginning the paragraph Topology helps to understand how a Shape is build.

bernd
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

bernd wrote:
Wed May 23, 2018 11:42 pm
Ahh may be it is much more easy as I wrote. Just have a look here ... https://github.com/FreeCAD/FreeCAD/blob ... py#L76-L91
Wow, thanks Bernd. Simply put ... just think of it as a 5-Dimensional Матрёшка

I will have a closer look at it.

PS: the CCX INP writer must do something similar to create element sets for material properties? Is that information available during post processing? I guess I could approach from the element/mesh side?
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

Tue May 22, 2018 9:43 am
HarryvL wrote:
Mon May 21, 2018 10:35 pm
My experience with concrete design is very limited, so I welcome any practical input or suggestions you may have.
Here is a testcase you can run.
8-m 2-field beam, loading self-weight and constant 20 kN/m. The static calculation
was done with my commercial software.
2_field_beam_static_calculation.pdf
2_Field_Beam.FCStd
testcase.JPG
Great example Thomas. Results look credible and in line with applied reinforcement.

Thomas_Concrete_Beam_ReRa_x.png (50.46 KiB) Viewed 470 times
Thomas_Concrete_Beam_ReRa_z_1.png (50.73 KiB) Viewed 470 times
Thomas_Concrete_Beam_ReRa_z_2.png (71.31 KiB) Viewed 470 times
Thomas_Concrete_Beam_ReRa_y_1.png (112.18 KiB) Viewed 470 times
Thomas_Concrete_Beam_ReRa_y_2.png (71.46 KiB) Viewed 470 times
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

### Re: Plotting of Concrete Reinforcement Ratio

HarryvL wrote:
Thu May 24, 2018 4:41 am
... Results look credible and in line with applied reinforcement.
Worth seeing how reinforcement ratio translates into required area of bars, but what is immediately clear from the first plot:

FreeCAD: Required Ratio_x top ~ 1.3 * Ratio_x_mid_span

Design: 4 Ø 12 at top vs. 3 Ø 12 at mid span, so indeed 1:1.3