Convert SG Data#
sgio.convert() reads one format and writes another in a single call. The
sgio convert CLI command exposes the same operation.
import sgio
sgio.convert(
file_name_in='input.inp',
file_name_out='output.sg',
file_format_in='abaqus',
file_format_out='vabs',
sgdim=2,
model_type='BM2',
model_space='xy',
)
sgio convert input.inp output.sg -ff abaqus -tf vabs -d 2 -m BM2 -ms xy
Python |
CLI |
Purpose |
|---|---|---|
|
|
source and target format |
|
|
format version, e.g. VABS |
|
|
structural model, when the input format does not imply it |
|
|
SG dimension, when the input format does not imply it |
|
|
input mesh axes of a 1D/2D SG ( |
|
|
|
|
|
|
|
|
SwiftComp |
|
|
convert geometry only |
There are no defaults for these SG arguments: omitting one the input format
cannot supply raises IncompleteModelDataError.
Thermoelastic Conversion#
physics selects what the analysis covers. It is the one argument that is
better left out than defaulted: an input file carries its own setting, and
overriding it silently would change the analysis the file describes.
sgio convert weave.inp weave.sc -ff abaqus -tf sc -d 3 -m SD1 -p thermoelastic
A thermoelastic conversion needs a coefficient of thermal expansion on every
material. Abaqus *Expansion data is read into the material model; a material
without it raises ValueError naming the material, rather than writing a file
the solver cannot use.
Format identifiers and the conversion matrix are in Formats and Model Types; the full signature is in I/O Functions.
See Examples for worked conversions.