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 100 such as stress, strain, id, history variable, effective plastic strain, number of elements 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

from lsreader import D3plotReader
from lsreader import DataType as dt
from lsreader import BinoutReader

# D3plotReader
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)

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

res = BinoutReader.is_valid(data_path)
print(res)

branches = br.get_branch()
for branch in branches:
    print(branch, end=',')
print("")

br.set_branch('nodout')
ids = br.get_id()
for id in ids:
    print(id, end=',')

br.set_id(1787)
br.set_component('x_acceleration')
x_array = br.get_x_array()
y_array = br.get_y_array()
out_path = your/output/path
BinoutReader.write(output_path, x_array, y_array)

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.0.11
Filename, size File type Python version Upload date Hashes
Filename, size lsreader-0.0.11-cp35-cp35m-manylinux2010_x86_64.whl (701.0 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size lsreader-0.0.11-cp35-cp35m-win_amd64.whl (293.0 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size lsreader-0.0.11-cp36-cp36m-manylinux2010_x86_64.whl (701.0 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size lsreader-0.0.11-cp36-cp36m-win_amd64.whl (292.2 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size lsreader-0.0.11-cp37-cp37m-manylinux2010_x86_64.whl (701.0 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size lsreader-0.0.11-cp37-cp37m-win_amd64.whl (292.3 kB) File type Wheel Python version cp37 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page