Code: Select all
import Fem
mesh = App.ActiveDocument.Box_Mesh
box = App.ActiveDocument.Box
nodes = mesh.FemMesh.getNodesBySolid(box.Shape)
nodes
bernd
Moderator: bernd
Code: Select all
import Fem
mesh = App.ActiveDocument.Box_Mesh
box = App.ActiveDocument.Box
nodes = mesh.FemMesh.getNodesBySolid(box.Shape)
nodes
OK, when using a square section for the rebars (based on parabolic sketch/extrude)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.
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
For obj in FreeCAD.ActiveDocument.Objects:
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.
Code: Select all
[(<Part::PartFeature>, ('Solid1',)), (<Part::PartFeature>, ('Solid1',)), (<Part::PartFeature>, ('Solid1',))]
Code: Select all
Box001:Solid1
Box002:Solid1
Box:Solid1
Thanks Thomas ... this gives me a practical way forward to run test cases for the routines.thschrader wrote: ↑Wed May 23, 2018 8:34 pmOK, when using a square section for the rebars (based on parabolic sketch/extrude)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.
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
Wow, thanks Bernd. Simply put ... just think of it as a 5-Dimensional Матрёшка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
Great example Thomas. Results look credible and in line with applied reinforcement.thschrader wrote: ↑Tue May 22, 2018 9:43 amHere 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
Worth seeing how reinforcement ratio translates into required area of bars, but what is immediately clear from the first plot: