예제 #1
0
# Declaration of a boundary condition for top line
speedBC = dnl.BoundarySpeed('BC_speed')
speedBC.setValue(0, displacement, 0)
speedBC.setFunction(ramp)
model.attachConstantBC(speedBC, topNS)

solver = dnl.Explicit("Solver")
solver.setTimes(0, stopTime)
model.add(solver)
solver.setTimeStepMethod(solver.PowerIteration)
#solver.setTimeStepSafetyFactor(0.6)
model.setSaveTimes(0, stopTime, stopTime / nbreSaves)

# Declaration of the history files
vonMisesHist = dnl.HistoryFile("vonMisesHistory")
vonMisesHist.setFileName(dnl.String("vonMises.plot"))
vonMisesHist.add(histES, 0, dnl.Field.vonMises)
vonMisesHist.setSaveTime(stopTime / nbrePoints)
model.add(vonMisesHist)

plasticStrainHist = dnl.HistoryFile("plasticStrainHistory")
plasticStrainHist.setFileName(dnl.String("plasticStrain.plot"))
plasticStrainHist.add(histES, 0, dnl.Field.plasticStrain)
plasticStrainHist.setSaveTime(stopTime / nbrePoints)
model.add(plasticStrainHist)

temperatureHist = dnl.HistoryFile("temperatureHistory")
temperatureHist.setFileName(dnl.String("temperature.plot"))
temperatureHist.add(histES, 0, dnl.Field.temperature)
temperatureHist.setSaveTime(stopTime / nbrePoints)
예제 #2
0
파일: Shear.py 프로젝트: bstaber/DynELA
ramp.setFunction(dnl.RampFunction.Constant, 0, stopTime)

# Declaration of a boundary condition for top part
topSpeed = dnl.BoundarySpeed()
topSpeed.setValue(displacement, 0, 0)
topSpeed.setFunction(ramp)
model.attachConstantBC(topSpeed, topNS)

# Declaration of the explicit solver
solver = dnl.Explicit("Solver")
solver.setTimes(0, stopTime)
model.add(solver)
model.setSaveTimes(0, stopTime, stopTime / nbreSaves)

# Declaration of the history files
vonMisesHist = dnl.HistoryFile("vonMisesHistory")
vonMisesHist.setFileName(dnl.String("vonMises.plot"))
vonMisesHist.add(histNS, dnl.Field.vonMises)
vonMisesHist.setSaveTime(stopTime / nbrePoints)
model.add(vonMisesHist)

StressHist = dnl.HistoryFile("StressHistory")
StressHist.setFileName(dnl.String("Stress.plot"))
StressHist.add(histNS, dnl.Field.StressXX)
StressHist.add(histNS, dnl.Field.StressYY)
StressHist.add(histNS, dnl.Field.StressZZ)
StressHist.add(histNS, dnl.Field.StressXY)
StressHist.setSaveTime(stopTime / nbrePoints)
model.add(StressHist)

temperatureHist = dnl.HistoryFile("temperatureHistory")
예제 #3
0
파일: Taylor.py 프로젝트: bstaber/DynELA
# Declaration of the initial speed
speedBC = dnl.BoundarySpeed('BC_speed')
speedBC.setValue(0, -speed, 0)
model.attachInitialBC(speedBC, allNS)

solver = dnl.Explicit("Solver")
solver.setTimes(0, stopTime)
model.add(solver)
solver.setComputeTimeStepFrequency(1)
solver.setTimeStepMethod(solver.PowerIteration)
#solver.setTimeStepSafetyFactor(1.09)
model.setSaveTimes(0, stopTime, stopTime / nbreSaves)

# Declaration of the history files
vonMisesHist = dnl.HistoryFile("vonMisesHistory")
vonMisesHist.setFileName(dnl.String("vonMises.plot"))
vonMisesHist.add(histES, 0, dnl.Field.vonMises)
vonMisesHist.setSaveTime(stopTime / nbrePoints)
model.add(vonMisesHist)

plasticStrainHist = dnl.HistoryFile("plasticStrainHistory")
plasticStrainHist.setFileName(dnl.String("plasticStrain.plot"))
plasticStrainHist.add(histES, 0, dnl.Field.plasticStrain)
plasticStrainHist.setSaveTime(stopTime / nbrePoints)
model.add(plasticStrainHist)

temperatureHist = dnl.HistoryFile("temperatureHistory")
temperatureHist.setFileName(dnl.String("temperature.plot"))
temperatureHist.add(histES, 0, dnl.Field.temperature)
temperatureHist.setSaveTime(stopTime / nbrePoints)