Modeling a bushing
-
Hello all,
I am trying to model a bushing. I would like to impose a torque load on the inner surface of a ring, where the outer diameter is fixed. With other software I modeled this by creating 2 noded rigid elements connecting each node of the inner diameter to a single central node. Then I applied a torque to this single node. I suppose I will need to do the same in Salome / CodeAster, but do not know how to do that. Is there a way, or a better (more elegant) solution in the Salome / CodeAster combination? Any hints would be very much appreciated.
JMB-
JMB wrote:
Hello all,
I am trying to model a bushing. I would like to impose a torque load on the inner surface of a ring, where the outer diameter is fixed. With other software I modeled this by creating 2 noded rigid elements connecting each node of the inner diameter to a single central node. Then I applied a torque to this single node. I suppose I will need to do the same in Salome / CodeAster, but do not know how to do that. Is there a way, or a better (more elegant) solution in the Salome / CodeAster combination? Any hints would be very much appreciated.
JMBHello,
I suggest you a small example how to create ring with edges connecting nodes of inner diameter with central node.
Best Regards,
Grigory
import salome, SMESH
import geompy
import smesh
import NETGENPlugin
rad1=100
rad2=50
height=300
Cylinder_1 = geompy.MakeCylinderRH(rad1, height)
Cylinder_2 = geompy.MakeCylinderRH(rad2, height)
Cut_1 = geompy.MakeCut(Cylinder_1, Cylinder_2)
[Face_0,Face_1,Face_2,Face_3] = geompy.SubShapeAll(Cut_1, geompy.ShapeType["FACE"])
geompy.addToStudy( Cut_1, "Cut_1" )
geompy.addToStudyInFather( Cut_1, Face_1, "Face_1" )
NETGEN_2D_Parameters = smesh.smesh.CreateHypothesis('NETGEN_Parameters_2D', 'libNETGENEngine.so')
NETGEN_2D_Parameters.SetMaxSize( 100 )
NETGEN_2D_Parameters.SetSecondOrder( 0 )
NETGEN_2D_Parameters.SetOptimize( 0 )
NETGEN_2D_Parameters.SetFineness( 1 )
NETGEN_2D_Parameters.SetQuadAllowed( 1 )
Mesh_1 = smesh.Mesh(Face_1)
status = Mesh_1.GetMesh().AddHypothesis( Face_1, NETGEN_2D_Parameters )
Netgen_1D_2D = smesh.smesh.CreateHypothesis('NETGEN_2D', 'libNETGENEngine.so')
status = Mesh_1.GetMesh().AddHypothesis( Face_1, Netgen_1D_2D )
isDone = Mesh_1.Compute()
if not isDone: print 'Mesh', Mesh_1.GetMesh(), ': computation failed'
mesh_editor_0 = Mesh_1.GetMesh().GetMeshEditor()
nodeID = mesh_editor_0.AddNode( 0, 0, 300 )
nodes = Mesh_1.GetMesh().GetNodesId()
for ind in nodes:
coord=Mesh_1.GetMesh().GetNodeXYZ(ind)
rad = coord[0]*coord[0]+coord[1]*coord[1]
if rad > 0.99*rad2*rad2 and rad < 1.01*rad2*rad2:
edge = mesh_editor_0.AddEdge([ ind, nodeID ])
-
