len(soil_node), '-mNdNum', len(pile_node), '-dof', 2, 3,
            '-Nodes', *[node.tag for node in ele.nodes], 1e8, 1e8, 0.1)
# print gid
ops.opsfunc('printGID', 'example1.msh')


# recorder
node_list = ops.opsfunc('getNodeTags')
ops.opsfunc('recorder', 'Node', '-file', 'disp.txt', '-node', *node_list,
            '-dof', 1, 2, 3, 'disp')

# analysis option
ops.opsfunc('integrator', 'LoadControl', 0.01)
ops.opsfunc('test', 'EnergyIncr', 1.0e6, 100, 5)
ops.opsfunc('algorithm', 'Newton')
ops.opsfunc('numberer', 'RCM')
ops.opsfunc('constraints', 'Plain')
ops.opsfunc('system', 'ProfileSPD')
ops.opsfunc('analysis', 'Static')
ops.opsfunc('analyze', 100)

ops.opsfunc('printModel', 'ele')
ops.opsfunc('printModel', 'node')

ops.opsfunc('wipe')

disp = np.loadtxt('disp.txt')
otg.node_result(node_list, [disp], ['Displacement'], 'Static', False,
                'example1.res')

Example #2
0
ops.opsfunc('pattern', 'Plain', 1, 1, '{')
load_node = part.Node.search([10.0, 2.0])
load_node = load_node[0]
ops.opsfunc('load', load_node.tag, 0.0, -100, '}')

# recorder
ops.opsfunc('printGID', 'example2.msh')
node_list = ops.opsfunc('getNodeTags')
ops.opsfunc('recorder', 'Node', '-file', 'disp.txt', '-node', *node_list,
            '-dof', 1, 2, 'disp')

# analysis option
ops.opsfunc('integrator', 'DisplacementControl', load_node.tag, 2, -1.0e-3)
ops.opsfunc('test', 'EnergyIncr', 1.0e-6, 100, 5)
ops.opsfunc('algorithm', 'Newton')
ops.opsfunc('numberer', 'RCM')
ops.opsfunc('constraints', 'Transformation')
ops.opsfunc('system', 'ProfileSPD')
ops.opsfunc('analysis', 'Static')
ops.opsfunc('analyze', 500)

ops.opsfunc('printModel', 'node', load_node.tag, 22)
ops.opsfunc('wipe')
# ops.opsfunc()

disp = np.loadtxt('disp.txt')
otg.node_result(node_list, [disp], ['Displacement'],
                'Static Analysis',
                time_column=False,
                file_name='example2.res')
# Convergence test
#                tolerance maxIter displayCode
ops.opsfunc('test', 'EnergyIncr', 1.0e-6, 100, 5)

# Solution algorithm
ops.opsfunc('algorithm', 'Newton')

# DOF numberer
ops.opsfunc('numberer', 'RCM')

# Cosntraint handler
ops.opsfunc('constraints', 'Plain')

# System of equations solver
ops.opsfunc('system', 'ProfileSPD')

# Analysis for gravity load
ops.opsfunc('analysis', 'Static')

# Perform the analysis
ops.opsfunc('analyze', 100)
nodes = ops.opsfunc('getNodeTags')
ops.opsfunc('printModel', 'ele')
ops.opsfunc('printModel', 'node')
ops.opsfunc('wipe')
#
disp = np.loadtxt('disp.txt')
otg.node_result(nodes, [disp], ['displacement'], 'static analysis',
                'model.res')