コード例 #1
0
# Creates the material
steel = dnl.Material("Steel")
steel.setHardeningLaw(hardLaw)
steel.youngModulus = young
steel.poissonRatio = poisson
steel.density = density
steel.heatCapacity = heatCapacity
steel.taylorQuinney = taylorQuinney
steel.initialTemperature = T0

# Finaly link the material to the structure
model.add(steel, allES)

# Declaration of a boundary condition for left part
leftBC = dnl.BoundaryRestrain('BC_left')
leftBC.setValue(1, 1, 1)
model.attachConstantBC(leftBC, leftNS)

# Declaration of a boundary condition for right part
rightBC = dnl.BoundaryRestrain('BC_right')
rightBC.setValue(0, 1, 1)
model.attachConstantBC(rightBC, rightNS)

# Declaration of a ramp function to apply the load
ramp = dnl.RampFunction("constantFunction")
ramp.setFunction(dnl.RampFunction.Constant, 0, stopTime)

# Declaration of a boundary condition for right part
rightSpeed = dnl.BoundarySpeed()
rightSpeed.setValue(displacement, 0, 0)
コード例 #2
0
ファイル: Shear.py プロジェクト: bstaber/DynELA
# Creates the material
steel = dnl.Material("Steel")
steel.setHardeningLaw(hardLaw)
steel.youngModulus = young
steel.poissonRatio = poisson
steel.density = density
steel.heatCapacity = heatCapacity
steel.taylorQuinney = taylorQuinney
steel.initialTemperature = T0

# Finaly link the material to the structure
model.add(steel, allES)

# Declaration of a boundary condition for bottom part
bottomBC = dnl.BoundaryRestrain('BC_bottom')
bottomBC.setValue(1, 1, 1)
model.attachConstantBC(bottomBC, bottomNS)

# Declaration of a boundary condition for top part
topBC = dnl.BoundaryRestrain('BC_top')
topBC.setValue(0, 1, 1)
model.attachConstantBC(topBC, topNS)

# Declaration of a ramp function to apply the load
ramp = dnl.RampFunction("constantFunction")
ramp.setFunction(dnl.RampFunction.Constant, 0, stopTime)

# Declaration of a boundary condition for top part
topSpeed = dnl.BoundarySpeed()
topSpeed.setValue(displacement, 0, 0)
コード例 #3
0
ファイル: BarNecking.py プロジェクト: bstaber/DynELA
# Creates the material
steel = dnl.Material("Steel")
steel.setHardeningLaw(hardLaw)
steel.youngModulus = young
steel.poissonRatio = poisson
steel.density = density
steel.heatCapacity = heatCapacity
steel.taylorQuinney = taylorQuinney
steel.initialTemperature = T0

# Finaly link the material to the structure
model.add(steel, esAll)

# Declaration of a boundary condition for bottom line
bottomBC = dnl.BoundaryRestrain('BC_bottom')
bottomBC.setValue(0, 1, 1)
model.attachConstantBC(bottomBC, bottomNS)

# Declaration of a boundary condition for axis line
axisBC = dnl.BoundaryRestrain('BC_axis')
axisBC.setValue(1, 0, 1)
model.attachConstantBC(axisBC, axisNS)

# Declaration of a ramp function to apply the load
ramp = dnl.RampFunction("constantFunction")
ramp.setFunction(dnl.RampFunction.Constant, 0, stopTime)

# Declaration of a boundary condition for top line
speedBC = dnl.BoundarySpeed('BC_speed')
speedBC.setValue(0, displacement, 0)