コード例 #1
0
# Constraints
modelSpace.fixNode000_000(1)
modelSpace.fixNodeF00_0F0(2)


# Load definition.
lp0= modelSpace.newLoadPattern(name= '0')
pointLoad=xc.Vector([0,0,0,0,M_y,0])
lp0.newNodalLoad(2,pointLoad)    # applies the point load on node 2 

# We add the load case to domain.
modelSpace.addLoadCaseToDomain(lp0.name)           # reads load pattern "0" and adds it to the domain

# Solve
# analysis= predefined_solutions.plain_newton_raphson(problem)
analysis= predefined_solutions.plain_static_modified_newton(problem, convergenceTestTol= 1e-8)
analOk= analysis.analyze(1)


# printing results
nodes= preprocessor.getNodeHandler
nodes.calculateNodalReactions(True,1e-6)

'''
RN1= nodes.getNode(1).getReaction[0]   # Axial FX reaction (constrained DOF: ux) at node 1
RQY1= nodes.getNode(1).getReaction[1]   # Vertical FY reaction (constrained DOF: uY) at node 1
RQZ1= nodes.getNode(1).getReaction[2]   # Vertical FY reaction (constrained DOF: uZ) at node 1
RMX1= nodes.getNode(1).getReaction[3]   # Bending moment Mx reaction at node 1
RMY1= nodes.getNode(1).getReaction[4]   # Bending moment My reaction at node 1
RMZ1= nodes.getNode(1).getReaction[5]   # Bending moment Mz reaction at node 1
コード例 #2
0
ファイル: beam2dUniformLoad02.py プロジェクト: danicc097/xc
# Constraints
constraints = preprocessor.getBoundaryCondHandler
modelSpace.fixNode000(1)

# Load case definition.
lp0 = modelSpace.newLoadPattern(name='0')

eleLoad = lp0.newElementalLoad("beam2d_uniform_load")
eleLoad.elementTags = xc.ID([1])
eleLoad.transComponent = -P
eleLoad.axialComponent = n
# We add the load case to domain.
modelSpace.addLoadCaseToDomain(lp0.name)

# Solution procedure
analysis = predefined_solutions.plain_static_modified_newton(feProblem)
result = analysis.analyze(1)

nodes.calculateNodalReactions(True, 1e-7)
nod2 = nodes.getNode(2)
delta0 = nod2.getDisp[0]
delta1 = nod2.getDisp[1]
nod1 = nodes.getNode(1)
RN = nod1.getReaction[0]
nod2 = nodes.getNode(2)
RN2 = nod2.getReaction[0]

elem1 = elements.getElement(1)
elem1.getResistingForce()
scc0 = elem1.getSections()[0]
コード例 #3
0
# Constraints
constraints = preprocessor.getBoundaryCondHandler
modelSpace.fixNode000(nod1.tag)

# Loads definition
WzplTeor = IPE200.get('Wzpl')
M0Teor = -WzplTeor * S355JR.fyd()
F = M0Teor * 0.87
# Load definition.
lp0 = modelSpace.newLoadPattern(name='0')
lp0.newNodalLoad(nod2.tag, xc.Vector([0, F, 0]))
# We add the load case to domain.
modelSpace.addLoadCaseToDomain(lp0.name)

# Solution procedure
analysis = predefined_solutions.plain_static_modified_newton(test)
#analysis= predefined_solutions.penalty_modified_newton(test, convergenceTestTol= 1e-2)
result = analysis.analyze(10)

elem1 = elements.getElement(0)
elem1.getResistingForce()
scc = elem1.getSections()[0]
M0 = scc.getStressResultantComponent("Mz")
M = F * L
ratio1 = (M0 - M) / M
ratio2 = (M0 - M0Teor) / M0Teor
'''
print('M0Teor= ', M0Teor/1e3, ' kNm')
print('M0= ', M0/1e3, ' kNm')
print('M= ', M/1e3, ' kNm')
print('ratio1= ', ratio1)