sgio.read_load_csv#

sgio.read_load_csv(fn: str, smdim: int, model: str | int, load_tags: list = [], load_type: int = 0, disp_tags: list = ['u1', 'u2', 'u3'], rot_tags: list = ['c11', 'c12', 'c13', 'c21', 'c22', 'c23', 'c31', 'c32', 'c33'], loc_tags: list = ['loc'], cond_tags: list = [], loc_vtypes: list = [], cond_vtypes: list = [], delimiter: str = ',', nhead: int = 1, encoding: str = 'utf-8-sig') list[StateCase]#

Read a CSV file containing load data for a given structure.

The file should have the following format:

loc, cond, u1, u2, u3, c11, c12, c13, c21, c22, c23, c31, c32, c33, f1, f2, … 1, 1, 1, 2, 3, 0, 0, 1, 0, 1, 0, 0, 0, 1, 4, 5, …

Parameters:
  • fn (str) – The filename of the CSV file to read.

  • smdim (int) – The dimension of the structure model.

  • model (str or int) – The model type of the structure.

  • load_tags (list, optional) – The tags of the loads to be read. Defaults to an empty list.

  • load_type (int, optional) – The type of the loads. Defaults to 0.

  • disp_tags (list, optional) – The tags of the displacements to be read. Defaults to [‘u1’, ‘u2’, ‘u3’].

  • rot_tags (list, optional) – The tags of the rotations to be read. Defaults to [‘c11’, ‘c12’, ‘c13’, ‘c21’, ‘c22’, ‘c23’, ‘c31’, ‘c32’, ‘c33’].

  • loc_tags (list, optional) – The tags of the locations to be read. Defaults to [‘loc’,].

  • cond_tags (list, optional) – The tags of the conditions to be read. Defaults to an empty list.

  • loc_vtypes (list, optional) – The value types of the locations to be read. Defaults to an empty list.

  • cond_vtypes (list, optional) – The value types of the conditions to be read. Defaults to an empty list.

  • delimiter (str, optional) – The delimiter of the CSV file. Defaults to ‘,’.

  • nhead (int, optional) – The number of header lines to skip. Defaults to 1.

  • encoding (str, optional) – The encoding of the CSV file. Defaults to ‘utf-8-sig’.

Returns:

State cases read from the CSV file. Each case stores location and condition metadata in StateCase.case and the macro response fields in StateCase.states.

Return type:

list[StateCase]