KratosMultiphysics / GiDInterface

The graphical user interface of Kratos for GiD. Featuring CFD, CSM, DEM, PFEM, etc
Other
30 stars 16 forks source link

Geometries in mdpa #939

Closed jginternational closed 8 months ago

jginternational commented 1 year ago

We are trying to define a way to write the mdpa file, replacing the elements and conditions for geometries. image

What we have now:

Begin nodes 1 0 1 0 2 0 0 0 3 1 0 0 End nodes

Begin Elements Triangle2D2N 1 1 2 3 End elements

Begin Conditions LineCondition2D2N 1 1 2 2 2 3 3 3 1 End Conditions

Begin Submodelpart sm1 Begin SubModelPartNodes 1 2 3 End SubModelPartNodes Begin SubModelPartElements 1 End SubModelPartElements End Submodelpart

Begin Submodelpart sm2 Begin SubModelPartNodes 1 2 3 End SubModelPartNodes Begin SubModelPartConditions 1 2 3 End SubModelPartConditions End Submodelpart . .

Then in the json, we refer to the submodelparts to apply processes.

What we want:

Begin nodes 1 0 0 0 2 1 0 0 3 0 1 0 End nodes

Begin Geometry Triangle2D2N 1 1 2 3 End Geometry

Begin Geometries Line2D2 2 1 2 3 2 3 4 3 1 End Geometry

Begin Submodelpart sm1 Begin SubModelPartNodes 1 2 3 End SubModelPartNodes Begin SubModelPartGeometries 1 End SubModelPartGeometries
End Submodelpart

Begin Submodelpart sm2 Begin SubModelPartNodes 1 2 3 End SubModelPartNodes Begin SubModelPartGeometries 2 3 4 End SubModelPartGeometries End Submodelpart

And, in the json, we can assign the element or condition to the submodelpart

Changes

@rubenzorrilla @RiccardoRossi https://github.com/KratosMultiphysics/GiDInterface/issues/80

loumalouomega commented 1 year ago

At last!

sunethwarna commented 1 year ago

Is the sections such as ElementData gonna be removed from mdpa as well (no complaints) which is used to have LOCAL_AXIS information? How will this change for cases with something like beams?

jginternational commented 1 year ago

You can now use the MDPA Generator to create this geometries.

On top of the tree you can choose the write mode between classical "Element and conditions" and "Geometries". See https://github.com/KratosMultiphysics/GiDInterface/pull/940#issuecomment-1602959782 for more information

I have added support for NodalData such as Radius for circles/spheres, so I hope we can add the ElementData also @sunethwarna

jginternational commented 8 months ago

This is in the latest release 9.4.2

Fluid and Geomechanics applications can use it Check Kratos preferences in order to enable it