sgio.convert#
- sgio.convert(file_name_in: str, file_name_out: str, file_format_in: str, file_format_out: str, file_version_in: str = '', file_version_out: str = '', analysis: str = 'h', sgdim: int | None = None, model_space: str | None = None, prop_ref_y: str = 'x', model_type: str | None = None, physics: int | str | None = None, omega: float | None = None, vabs_format_version: int = 1, str_format_int: str = '8d', str_format_float: str = '20.12e', mesh_only: bool = False) StructureGene#
Convert the Structure Gene data file format.
- Parameters:
file_name_in (str) – File name before conversion
file_name_out (str) – File name after conversion
file_format_in (str) – Format of the input file. Choose one from ‘vabs’, ‘sc’, ‘swiftcomp’.
file_format_out (str) – Format of the output file. Choose one from ‘vabs’, ‘sc’, ‘swiftcomp’.
file_version_in (str, optional) – Version of the input file, by default ‘’
file_version_out (str, optional) – Version of the output file, by default ‘’
analysis (str, optional) –
Indicator of Structure Gene analysis. Default is ‘h’. Choose one from
’h’: Homogenization
’d’ or ‘l’: Dehomogenization
’fi’: Initial failure indices and strength ratios
sgdim (int, optional) – Dimension of the geometry. See
read(). Choose one from 1, 2, 3.model_space (str, optional) – Mapping from input mesh coordinate axes to SG axes. See
read().model_type (str, optional) –
Type of the macro structural model. See
read(); when omitted, the model type of the SG that was read is written. Choose one from’SD1’: Cauchy continuum model
’PL1’: Kirchhoff-Love plate/shell model
’PL2’: Reissner-Mindlin plate/shell model
’BM1’: Euler-Bernoulli beam model
’BM2’: Timoshenko beam model
physics (int or str, optional) – Physics included in the analysis (‘elastic’, ‘thermoelastic’, or the corresponding code). By default the input file’s own setting is kept.
omega (float, optional) – SG measure written to SwiftComp output. By default it is computed from the mesh bounding box.
vabs_format_version (int, optional) – Format for the VABS input, by default 1
str_format_int (str, optional) – String formating integers, by default ‘8d’
str_format_float (str, optional) – String formating floats, by default ‘20.12e’
mesh_only (bool, optional) – If write meshing data only, by default False