sgio.write#
- sgio.write(sg: StructureGene, filename: str, file_format: str, format_version: str = '', analysis: str = 'h', sg_format: int = 1, model_space: str = '', prop_ref_y: str = 'x', macro_responses: list[StateCase] | None = None, model_type: str = 'SD1', load_type: int = 0, sfi: str = '8d', sff: str = '20.12e', mesh_only: bool = False, binary: bool = False) str#
Write analysis input.
- Parameters:
sg (StructureGene) – Structure gene object.
filename (str) – Name of the input file.
file_format (str) – Format of the SG data file. Choose one from ‘vabs’, ‘sc’, ‘swiftcomp’, ‘gmsh’.
format_version (str, optional) – Version of the format. Default is
''.analysis (str, optional) –
Indicator of SG analysis. Default is
'h'. Choose one from’h’: Homogenization
’d’ or ‘l’: Dehomogenization
’fi’: Initial failure indices and strength ratios
sg_format ({0, 1}, optional) – Format for the VABS input. Default is 1.
model_space (str, optional) – Macro model space orientation; passed through to solver writer.
prop_ref_y (str, optional) – Reference axis selector for material orientation. Default is
'x'.macro_responses (list[StateCase], optional) – Macroscopic responses. Default is
None(treated as empty).model_type (str, optional) – Type of the macro structural model. Default is
'SD1'.load_type (int, optional) – Type of the load. Default is 0.
sfi (str, optional) – String formatting for integers. Default is
'8d'.sff (str, optional) – String formatting for floats. Default is
'20.12e'.mesh_only (bool, optional) – If True, write meshing data only. Default is False.
binary (bool, optional) – For Gmsh output, write binary instead of ASCII. Default is False.
- Returns:
The output filename.
- Return type:
str