Skip to main content

I/O for VABS and SwiftComp

Project description

SGIO

Structure Gene (SG) I/O

Python package interfacing VABS and SwiftComp. The package is developed based on meshio, which is used for converting meshing data.

Features

The package can be used to:

  • Read/write SG data from/to different formats
  • Convert SG/mesh data between different formats
  • Read structural property from VABS/SwiftComp output
  • Create 1D SG from layup input

Supported Data Formats

  • For complete SG data:
    • VABS, SwiftComp, Abaqus
  • For mesh data only:
    • All formats supported by meshio

A structure gene (SG) is defined as the smallest mathematical building block of a structure.^1 A cross-section (CS) is a type of 2D SG.

Online documentation

Installation

pip install sgio

Manual Installation

  1. Download the package.
  2. Install dependencies:
    pip install -r <INSTALL_DIR>/sgio/requirements.txt
    
  3. Configure environment variables:
    • Add the package root directory to PYTHONPATH.
    • Add <INSTALL_DIR>/sgio/bin to PATH.

Usage

API

Example: Read Beam Properties from VABS Output File

import sgio

model = sgio.readOutputModel('my_cross_section.sg.k', 'vabs', 'BM1')

Command Line Interface

Example: Convert Cross-Sectional Data from Abaqus (.inp) to VABS Input

Suppose a cross-section has been built in Abaqus and output to cross-section.inp. To convert the data to the VABS input (Timoshenko model) cross-section.sg:

python -m sgio convert cross-section.inp cross-section.sg -ff abaqus -tf vabs -m bm2

Complete Options

usage: sgio [-h] {build,b,convert,c} ...

CS/SG I/O functions

positional arguments:
  {build,b,convert,c}  sub-command help
    build (b)          Build 1D SG
    convert (c)        Convert CS/SG data file

optional arguments:
  -h, --help           show this help message and exit
Convert SG Data
usage: sgio convert [-h] [-ff FROM_FORMAT] [-tf TO_FORMAT] [-d SGDIM] [-m MODEL] [-mo] from to

positional arguments:
  from                  CS/SG file to be read from
  to                    CS/SG file to be written to

optional arguments:
  -h, --help            show this help message and exit
  -ff FROM_FORMAT, --from-format FROM_FORMAT
                        CS/SG file format to be read from
  -tf TO_FORMAT, --to-format TO_FORMAT
                        CS/SG file format to be written to
  -d SGDIM, --sgdim SGDIM
                        SG dimension (SwiftComp only)
  -m MODEL, --model MODEL
                        CS/SG model
  -mo, --mesh-only      Mesh only conversion

Check out the example examples/convert_cs_from_abaqus_to_vabs for more details.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sgio-0.2.1.tar.gz (214.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sgio-0.2.1-py3-none-any.whl (306.8 kB view details)

Uploaded Python 3

File details

Details for the file sgio-0.2.1.tar.gz.

File metadata

  • Download URL: sgio-0.2.1.tar.gz
  • Upload date:
  • Size: 214.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for sgio-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5366480e8e613b4ab5057db944922f5577eab6917e4fb1de6995d76c447dae33
MD5 2142088d2aba4686e0cb6f5d6f5e9696
BLAKE2b-256 88ed81c607ad9872cf0d7f3c4d506889c0120bd16842daa6542b31917f73b385

See more details on using hashes here.

File details

Details for the file sgio-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: sgio-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 306.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for sgio-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31be89ac6c8a1b4a8a2754d6c693178f7e55f9ca8524065bfae5cf2595065392
MD5 c6e09526eb689ddc8bc85be5c52f104c
BLAKE2b-256 2f4c602ed8e44ece2ef277aa9404720d238e4ee06346e151671ce86c46acc0ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page