Common commands

class o3seespy.command.common.AlternativeAnalysis(dt=None)[source]

Bases: object

class o3seespy.command.common.EleLoad2DPoint(osi, ele, p_y, x, p_x=None)[source]

Bases: OpenSeesObject

Type of load is ‘beamPoint’

x: float

Position of load as a fraction of element length from node i

op_base_type = 'eleLoad'
op_type = None
class o3seespy.command.common.EleLoad2DUniform(osi, ele, w_y, w_x=None)[source]

Bases: OpenSeesObject

Type of load is ‘beamUniform’

op_base_type = 'eleLoad'
op_type = None
class o3seespy.command.common.EqualDOF(osi, r_node, c_node, dofs)[source]

Bases: OpenSeesObject

Construct a constraint where the constrained node c_node

has the same movement as the retained node r_node

Parameters
  • osi

  • r_node – OpenSeesObject.node.Node() or list of Retained node

  • c_node – OpenSeesObject.node.Node() or list of Constrained node

  • dofs

op_base_type = 'equalDOF'
op_type = None
class o3seespy.command.common.EqualDOFMulti(osi, r_node, c_nodes, dofs)[source]

Bases: OpenSeesMultiCallObject

Construct a constraint where the c_node has the same movement as the r_node

Parameters
  • osi

  • r_node – OpenSeesObject.node.Node() or list of Retained node

  • c_nodes – list of OpenSeesObject.node.Node() Constrained node

  • dofs

op_base_type = 'equalDOF'
op_type = None
class o3seespy.command.common.Fix(osi, node, fixities)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix1DOF(osi, node, x)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • node (OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix1DOFMulti(osi, nodes, x, is_none='raise')[source]

Bases: OpenSeesMultiCallObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • nodes (list of OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix2DOF(osi, node, x, y)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • node (OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix2DOFMulti(osi, nodes, x, y, is_none='raise', already_fixed='raise')[source]

Bases: OpenSeesMultiCallObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • nodes (list of OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix3DOF(osi, node, x, y, z_rot)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • node (OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

  • z_rot (int) – Fixity in rotation about z-axis

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix3DOFMulti(osi, nodes, x, y, z_rot, is_none='raise', already_fixed='raise')[source]

Bases: OpenSeesMultiCallObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • nodes (list of OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

  • z_rot (int) – Fixity in rotation about z-axis

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix4DOF(osi, node, x, y, z, pp)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • node (OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

  • z (int) – Fixity in z-direction

  • pp (int) – Fixity in pore-pressure

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix6DOF(osi, node, x, y, z, x_rot, y_rot, z_rot)[source]

Bases: OpenSeesObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • node (OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

  • z (int) – Fixity in z-direction

  • x_rot (int) – Fixity in rotation about x-axis

  • y_rot (int) – Fixity in rotation about y-axis

  • z_rot (int) – Fixity in rotation about z-axis

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.Fix6DOFMulti(osi, nodes, x, y, z, x_rot, y_rot, z_rot, is_none='raise')[source]

Bases: OpenSeesMultiCallObject

Create a homogeneous SP constraint.

Parameters
  • osi (OpenSeesInstance) –

  • nodes (list of OpenSeesObject.node.Node()) –

  • x (int) – Fixity in x-direction

  • y (int) – Fixity in y-direction

  • z (int) – Fixity in z-direction

  • x_rot (int) – Fixity in rotation about x-axis

  • y_rot (int) – Fixity in rotation about y-axis

  • z_rot (int) – Fixity in rotation about z-axis

op_base_type = 'fix'
op_type = None
class o3seespy.command.common.ImposedMotion(osi, node, ory, g_motion_tag)[source]

Bases: OpenSeesObject

op_base_type = 'ImposedMotion'
op_type = None
class o3seespy.command.common.Load(osi, node, load_values)[source]

Bases: OpenSeesObject

op_base_type = 'load'
op_type = None
class o3seespy.command.common.Mass(osi, node, x_mass, y_mass=None, rot_mass=None)[source]

Bases: OpenSeesObject

op_base_type = 'mass'
op_type = None
class o3seespy.command.common.Mass2D(osi, node, x_mass, y_mass=None, rot_mass=None)[source]

Bases: OpenSeesObject

op_base_type = 'mass'
op_type = None
class o3seespy.command.common.Mass3D(osi, node, x, y, z, x_rot, y_rot, z_rot)[source]

Bases: OpenSeesObject

op_base_type = 'mass'
op_type = None
class o3seespy.command.common.ModalDamping(osi, xis)[source]

Bases: OpenSeesObject

ModalDamping class

Notes

  • Need to run eigen() first, do not use ‘fullGenLapack’ option in eigen analysis

  • Cannot be used with Newmark_Explicit, but works with other explicit and implicit methods

  • Creates a full damping matrix, therefore either use solver.FullGen (very slow), or sparse solvers

like UmfPack (when doing this using algorithm.KrylovNewton or algorithm.BFGS, not algorithm.NewtonRaphson, see https://portwooddigital.com/2019/09/12/be-careful-with-modal-damping/ for more details)

Parameters
  • osi

  • xis – array_like List of damping values at each mode, or just provide first value in list.

op_base_type = 'modalDamping'
op_type = None
class o3seespy.command.common.Parameter(osi, ele, section=None, mat=None, pname='')[source]

Bases: OpenSeesObject

Parameters
  • osi

  • ele

  • section

  • mat

  • pname

op_base_type = 'parameter'
op_type = None

Bases: OpenSeesObject

Create a multi-point constraint between nodes.

Parameters
  • rtype (str) – Either ‘bar’ or ‘beam’

  • r_node (OpenSeesObject.node.Node()) – Retained node

  • c_node (Node) – Constrained node

op_base_type = 'rigidLink'
op_type = None
class o3seespy.command.common.SP(osi, node, dof, dof_values)[source]

Bases: OpenSeesObject

op_base_type = 'sp'
op_type = None
o3seespy.command.common.add_fixity_to_dof(osi, dof, nodes)[source]
o3seespy.command.common.analyze(osi, num_inc=1, dt=None, dt_min=None, dt_max=None, jd=None)[source]

Performs an analysis step.

Returns 0 if successful, and <0 if fail

Parameters
  • osi (o3.OpenSeesInstance) –

  • num_inc (int) – Number of analysis increments

  • dt (float) – Time step

  • dt_min (float) – (Only used in VariableTransient analsyis) Minimum allowable time step

  • dt_max (float) – (Only used in VariableTransient analsyis) Maximum allowable time step

  • jd (int) – (Only used in VariableTransient analsyis) Target number of integration steps. In variable transient analysis, time step is scaled by n_iters / jd, and analysis continues until total time increment >= num_inc * dt.

o3seespy.command.common.analyze_w_restart(osi, num_inc=1, dt=None, dt_min=None, dt_max=None, jd=None, alts=None, dtime=1, nfs=1)[source]
o3seespy.command.common.domain_change(osi)[source]
o3seespy.command.common.gen_reactions(osi)[source]
o3seespy.command.common.get_all_ele_node_tags(osi)[source]
o3seespy.command.common.get_all_ele_node_tags_as_dict(osi)[source]
o3seespy.command.common.get_all_ele_node_tags_by_n_nodes(osi)[source]
o3seespy.command.common.get_all_node_coords(osi, ndm=None)[source]
o3seespy.command.common.get_all_node_coords_w_tag(osi, ndm=None)[source]
o3seespy.command.common.get_all_node_disps(osi, dof)[source]
o3seespy.command.common.get_eigen(osi, solver='genBandArpack', n=1)[source]

Gets a list eigen values

o3seespy.command.common.get_ele_response(osi, ele, arg, extra_args=None)[source]
o3seespy.command.common.get_ele_tags(osi, mesh=None)[source]

Returns the OpenSEES numbering of the elements.

o3seespy.command.common.get_node_accel(osi, node, dof)[source]
o3seespy.command.common.get_node_coords(osi, node, ndm=None, node_as_tag=False)[source]
o3seespy.command.common.get_node_disp(osi, node, dof=None, node_as_tag=False)[source]
o3seespy.command.common.get_node_disps(osi, node, dofs, node_as_tag=False)[source]
o3seespy.command.common.get_node_dofs(osi, node)[source]

Returns the DOF numbering of a node.

o3seespy.command.common.get_node_eigen_vector(osi, node, eigen_vector, dof)[source]
o3seespy.command.common.get_node_pressure(osi, node)[source]
o3seespy.command.common.get_node_reaction(osi, node, dof)[source]
o3seespy.command.common.get_node_reactions(osi, node)[source]
o3seespy.command.common.get_node_tags(osi, mesh=None)[source]

Returns the OpenSEES numbering of the nodes.

o3seespy.command.common.get_node_unbalance(osi, node, dof=None)[source]
o3seespy.command.common.get_node_vel(osi, node, dof)[source]
o3seespy.command.common.get_np(osi)[source]

Get total number of processors.

o3seespy.command.common.get_num_threads(osi)[source]

return the total number of threads available

o3seespy.command.common.get_pid(osi)[source]

Get the processor ID of the calling processor.

o3seespy.command.common.get_time(osi)[source]

Get the analysis time

o3seespy.command.common.imposed_motion(osi, node, direct, gm)[source]
o3seespy.command.common.load_constant(osi, time=None)[source]
o3seespy.command.common.loop_for_analyze_w_restart(osi, num_inc=1, dt=None, dt_min=None, dt_max=None, jd=None, alts=None, dtime=None)[source]
o3seespy.command.common.record(osi)[source]

This command is used to cause all the recorders to do a record on the current state of the model.

o3seespy.command.common.remesh(osi, alpha)[source]
o3seespy.command.common.remove(osi, o3_obj)[source]

Generic remover

o3seespy.command.common.remove_load_pattern(osi, load_pattern)[source]
o3seespy.command.common.remove_recorders(osi)[source]

Remove all recorders

o3seespy.command.common.remove_sp(osi, node, dof, pattern=None)[source]
o3seespy.command.common.reset(osi)[source]

Reset the current analysis and save the results to file

o3seespy.command.common.set_ele_rayleigh_damp(osi, ele, alpha_m, beta_k, beta_k0, beta_kc)[source]
o3seespy.command.common.set_element_rayleigh_damping_factors(osi, ele, alpha_m, beta_k, beta_k0, beta_kc)[source]
o3seespy.command.common.set_equal_dof(osi, node_1, node_2, dof)[source]
o3seespy.command.common.set_equal_dofs(osi, node_1, node_2, dofs)[source]
o3seespy.command.common.set_equal_dofs_mixed(osi, node_1, node_2, num_dof, rcdofs)[source]
o3seespy.command.common.set_node_mass(osi, node, x_mass, y_mass, rot_mass)[source]
o3seespy.command.common.set_num_threads(osi, num)[source]

Set the total number of threads

o3seespy.command.common.set_parameter(osi, value, eles=None, ele_range=None, args=None, ele_tag_range=None)[source]

Set a parameter on an element

o3seespy.command.common.set_rigid_diaphragm(osi, r_node, cnodes, perp_dir)[source]

Create a multi-point constraint between nodes.

Parameters
  • r_node (OpenSeesObject.node.Node()) – Retained node

  • c_node (Node) – Constrained node

  • rtype (str) – Either ‘bar’ or ‘beam’

o3seespy.command.common.set_time(osi, time)[source]

Reset the analysis time to a new value

o3seespy.command.common.start(osi)[source]

Start the timer

o3seespy.command.common.stop(osi)[source]

Stop the timer and print timing information.

o3seespy.command.common.update_element_domain(osi)[source]

Update elements in the domain

o3seespy.command.common.update_material_stage(osi, material, stage)[source]
o3seespy.command.common.update_parameter(osi, param, value)[source]

Set a parameter to a new value

o3seespy.command.common.wipe(osi=None)[source]

Wipe the current analysis and save the results to file

o3seespy.command.common.wipe_analysis(osi)[source]