Skip to main content

A reader to extract LS-DYNA results

Project description

LS-Reader Project

The LS-Reader is designed to read LS-DYNA results and can extract the data of more than 1300 such as stress, strain, id, history variable, effective plastic strain, number of elements, binout data and so on now. The LS-Reader provides an uniform interface for getting these data. For convenience, input parameters, like number of state, number of integration point, are designed as keyword arguments. More details please see LS-Reader Tutorial.

How to use

# D3plotReader
from lsreader import D3plotReader, DataType as dt

data_path = your/d3plot/file/path
dr = D3plotReader(data_path)

shell_stress = dr.get_data(dt.D3P_SHELL_STRESS, ist=0, ipt=1)
print(shell_stress[0].x())

shell_eps = dr.get_data(dt.D3P_SHELL_EFFECTIVE_PLASTIC_STRAIN, ist=0, ipt=1)
print(shell_eps[0])

thickness = dr.get_data(dt.D3P_SHELL_THICKNESS, ist=11)
print(thickness[0])

num_solid_element = dr.get_data(dt.D3P_NUM_SOLID)
print(num_solid_element)

# Get d3plot data by part
num_solid_pid_4 = dr.get_data(dt.D3P_NUM_SOLID, ipart_user=4)

shell_stress_pid_4 = dr.get_data(dt.D3P_SHELL_STRESS, ist=4, ipt=0, ipart_user=4)

# Get data by part set
num_shells = dr.get_data(dt.D3P_NUM_SHELL, ipartset_user=[1, 2])

# Get numpy array(numpy is required to be installed, using "pip install numpy")
shell_stress = dr.get_data(dt.D3P_SHELL_STRESS, ist=0, ipt=1, ask_for_numpy_array=True)
print(shell_stress)

# BinoutReader
from lsreader import BinoutReader, BINOUT_DataType as bdt

data_path = your/binout/file/path
br = BinoutReader(data_path)

branches = br.get_data(bdt.BINOUT_BRANCHES)
print(branches)

ids = br.get_data(bdt.BINOUT_NODOUT_IDS)
print(ids)
...
...
...

Latest Tutorial

The examples and documents for this project is available here.

Project details


Download files

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

Files for lsreader, version 0.1.29
Filename, size File type Python version Upload date Hashes
Filename, size lsreader-0.1.29-cp36-cp36m-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size lsreader-0.1.29-cp36-cp36m-win_amd64.whl (1.1 MB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size lsreader-0.1.29-cp37-cp37m-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size lsreader-0.1.29-cp37-cp37m-win_amd64.whl (1.1 MB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size lsreader-0.1.29-cp38-cp38-manylinux2010_x86_64.whl (1.6 MB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size lsreader-0.1.29-cp38-cp38-win_amd64.whl (1.1 MB) File type Wheel Python version cp38 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page