Grillage model#

Factory function#

create_grillage(**kwargs)

Create a bridge deck grillage model.

OspGrillage methods#

create_osp_model([pyfile])

Create model in OpenSees model space.

set_member(grillage_member_obj[, member, ...])

Set GrillageMember instance object to elements of grillage members.

set_boundary_condition([edge_group_counter, ...])

Set or modify customized support conditions of the Mesh

add_load_case(load_case_obj[, load_factor])

Function to add load cases to Ospllage grillage model.

add_load_combination(load_combination_name, ...)

Function to add load combination to analysis.

analyze(**kwargs)

Function to analyze defined load

get_results(**kwargs)

Function to get results from specific or all load cases.

get_nodes([number])

Function to return all information for nodes in grillage model

get_element(**kwargs)

Function to query properties of elements in grillage model.

clear_load_cases(**kwargs)

Function to remove all/specific load cases from model.

Class reference#

OspGrillage#

class OspGrillage(bridge_name, long_dim, width, skew, num_long_grid, num_trans_grid, edge_beam_dist, mesh_type='Ortho', model='3D', **kwargs)#

Bases: object

Base class representing an OpenSees grillage structural model.

Manages the creation, configuration, and analysis of a grillage model, including mesh generation, member assignment, load cases, and result extraction. Provides an interface to OpenSees for static and transient analysis.

Users should not instantiate this class directly; use create_grillage() instead, which returns the appropriate concrete subclass (OspGrillageBeam or OspGrillageShell) based on model_type.

Init the OspGrillage class

Parameters:
  • bridge_name (str) – Name of bridge model and output .py file

  • long_dim (int or float) – Length of the model in the longitudinal direction (default: x axis)

  • width (int or float) – Width of the model in the transverse direction (default: z axis)

  • skew (int or float) – Skew angle of the start and end edges of model

  • num_long_grid (int) – Number of grid lines in longitudinal direction

  • num_trans_grid (int) – Number of grid lines in the transverse direction.

  • edge_beam_dist (int or float) – Distance of edge beam node lines to exterior main beam node lines

  • mesh_type (string) – Type of mesh either “Ortho” for orthogonal mesh or “Oblique” for oblique mesh

  • beam_z_spacing (list of int or float) – Custom spacing of longitudinal members (global z-direction). Supersedes num_long_grid when provided.

  • beam_x_spacing (list of int or float) – Custom spacing of transverse members (global x-direction). Supersedes num_trans_grid when provided.

  • ext_to_int_dist (int, float, or list of int/float) – Distance between internal beams and exterior main beams. If a list of size 2 is provided, the two values are applied to the left and right side respectively.

  • multi_span_dist_list (list of int or float) – List of span lengths (x-direction) for each span in a multi-span model.

  • multi_span_num_points (list of int) – Number of transverse members per span. If not specified, num_trans_grid is applied uniformly to all spans in multi_span_dist_list.

  • continuous (bool) – Set continuity of spans. Default True. If False, spans are separated by non_cont_spacing_x.

  • stitch_slab_elements (bool) – Set stitch elements between spans. Elements are assigned via set_member() with member="stitch_elements".

  • non_cont_spacing_x (float) – Spacing or length of stitch elements for non-continuous spans.

Raises:

ValueError – If skew angle is greater than 90. If number of transverse grid lines is less than 2.

OspGrillageBeam#

class OspGrillageBeam(bridge_name, long_dim, width, skew=0, num_long_grid=0, num_trans_grid=0, edge_beam_dist=1, mesh_type='Ortho', model='3D', **kwargs)#

Bases: OspGrillage

Grillage model composed of beam elements.

Concrete implementation of OspGrillage using elasticBeamColumn or nonlinearBeamColumn elements to represent longitudinal and transverse members. Suitable for skeletal bridge models with distinct beam members.

Init the OspGrillage class

Parameters:
  • bridge_name (str) – Name of bridge model and output .py file

  • long_dim (int or float) – Length of the model in the longitudinal direction (default: x axis)

  • width (int or float) – Width of the model in the transverse direction (default: z axis)

  • skew (int or float) – Skew angle of the start and end edges of model

  • num_long_grid (int) – Number of grid lines in longitudinal direction

  • num_trans_grid (int) – Number of grid lines in the transverse direction.

  • edge_beam_dist (int or float) – Distance of edge beam node lines to exterior main beam node lines

  • mesh_type (string) – Type of mesh either “Ortho” for orthogonal mesh or “Oblique” for oblique mesh

  • beam_z_spacing (list of int or float) – Custom spacing of longitudinal members (global z-direction). Supersedes num_long_grid when provided.

  • beam_x_spacing (list of int or float) – Custom spacing of transverse members (global x-direction). Supersedes num_trans_grid when provided.

  • ext_to_int_dist (int, float, or list of int/float) – Distance between internal beams and exterior main beams. If a list of size 2 is provided, the two values are applied to the left and right side respectively.

  • multi_span_dist_list (list of int or float) – List of span lengths (x-direction) for each span in a multi-span model.

  • multi_span_num_points (list of int) – Number of transverse members per span. If not specified, num_trans_grid is applied uniformly to all spans in multi_span_dist_list.

  • continuous (bool) – Set continuity of spans. Default True. If False, spans are separated by non_cont_spacing_x.

  • stitch_slab_elements (bool) – Set stitch elements between spans. Elements are assigned via set_member() with member="stitch_elements".

  • non_cont_spacing_x (float) – Spacing or length of stitch elements for non-continuous spans.

Raises:

ValueError – If skew angle is greater than 90. If number of transverse grid lines is less than 2.

OspGrillageShell#

class OspGrillageShell(bridge_name, long_dim, width, skew, num_long_grid, num_trans_grid, edge_beam_dist, mesh_type='Ortho', model='3D', **kwargs)#

Bases: OspGrillage

Grillage model composed of shell elements.

Concrete implementation of OspGrillage using ShellMITC4 or ShellDKGQ elements to represent the bridge deck as a continuous surface. Suitable for detailed analysis of slab and composite deck systems.

Attributes#

offset_beam_y_distfloat

Vertical offset of beam members from shell surface.

mesh_size_xfloat

Maximum shell mesh element size in longitudinal direction.

mesh_size_zfloat

Maximum shell mesh element size in transverse direction.

Init the OspGrillage class

param bridge_name:

Name of bridge model and output .py file

type bridge_name:

str

param long_dim:

Length of the model in the longitudinal direction (default: x axis)

type long_dim:

int or float

param width:

Width of the model in the transverse direction (default: z axis)

type width:

int or float

param skew:

Skew angle of the start and end edges of model

type skew:

int or float

param num_long_grid:

Number of grid lines in longitudinal direction

type num_long_grid:

int

param num_trans_grid:

Number of grid lines in the transverse direction.

type num_trans_grid:

int

param edge_beam_dist:

Distance of edge beam node lines to exterior main beam node lines

type edge_beam_dist:

int or float

param mesh_type:

Type of mesh either “Ortho” for orthogonal mesh or “Oblique” for oblique mesh

type mesh_type:

string

param beam_z_spacing:

Custom spacing of longitudinal members (global z-direction). Supersedes num_long_grid when provided.

type beam_z_spacing:

list of int or float

param beam_x_spacing:

Custom spacing of transverse members (global x-direction). Supersedes num_trans_grid when provided.

type beam_x_spacing:

list of int or float

param ext_to_int_dist:

Distance between internal beams and exterior main beams. If a list of size 2 is provided, the two values are applied to the left and right side respectively.

type ext_to_int_dist:

int, float, or list of int/float

param multi_span_dist_list:

List of span lengths (x-direction) for each span in a multi-span model.

type multi_span_dist_list:

list of int or float

param multi_span_num_points:

Number of transverse members per span. If not specified, num_trans_grid is applied uniformly to all spans in multi_span_dist_list.

type multi_span_num_points:

list of int

param continuous:

Set continuity of spans. Default True. If False, spans are separated by non_cont_spacing_x.

type continuous:

bool

param stitch_slab_elements:

Set stitch elements between spans. Elements are assigned via set_member() with member="stitch_elements".

type stitch_slab_elements:

bool

param non_cont_spacing_x:

Spacing or length of stitch elements for non-continuous spans.

type non_cont_spacing_x:

float

raises ValueError:

If skew angle is greater than 90. If number of transverse grid lines is less than 2.

Analysis#

class Analysis(analysis_name, ops_grillage_name, pyfile, node_counter, ele_counter, analysis_type='Static', time_series_counter=1, pattern_counter=1, load_case=None, step=1, **kwargs)#

Bases: object

Main class to handle the run/execution of load case, including incremental load cases of a moving load analysis. Analysis class is created and handled by the OspGrillage class.

The following are the roles of Analysis object:

  • store information of ops commands for performing static (default) analysis of single/multiple load case(s).

  • execute the required ops commands to perform analysis using the OspGrillage model instance.

  • if flagged, writes an executable py file instead which performs the exact analysis as it would for an OspGrillage instance instead.

  • manages multiple load case’s ops.load() commands, applying the specified load factors to the load cases for load combinations

Results#

class Results(mesh_obj)#

Bases: object

Main class to store results of an Analysis class object, process into data array output for post processing/plotting. Class object is accessed within OspGrillage class object.