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)
# 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 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
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)
The examples and documents for this project is available here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for lsreader-0.0.23-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12e125116d2470aeed8f68faacb82a8f7bf850ea93cd4a44d415068eaa9ce77a |
|
MD5 | 970a17cfa9b3b6b2e9db3eb094278f00 |
|
BLAKE2b-256 | 7de0acfa762a7d77740a0654a278b0c6f3e164af3268661c452225596d13c16c |
Close
Hashes for lsreader-0.0.23-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bde78151d084ca4a2888b386b793121596285c137f1fbe270b2872ebe8bc0500 |
|
MD5 | 2d55fe8e2f0a3f8d31b48f4baeda4251 |
|
BLAKE2b-256 | 98c7407a4f081a32290453ffe934d783cd046644f72bb390ae5e2d1151b4d9d7 |
Close
Hashes for lsreader-0.0.23-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f3b8c1b2f0397c08dc73bfa1b2de0b745a96eb4bbb2ed98f2b347479036bdde |
|
MD5 | 2739f790d049129b4b4e684d444108e8 |
|
BLAKE2b-256 | 373d9427fe060b97b2541b9536678480513bb4693f0d705ab477eeb52f278381 |
Close
Hashes for lsreader-0.0.23-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c8063b28afafc87e704abe2eee5752380f4b87e64f74e2e404b1be7631dfa65 |
|
MD5 | 6dc2c94b7f8832e70b20f9f3af450b99 |
|
BLAKE2b-256 | c255c343fa0c57ede1803ae06ccdee70850963ce21b941742de2eb7e504f148b |
Close
Hashes for lsreader-0.0.23-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40655846d5d94851485534990a73df5b678621a2691f39462fbeb9d39256a78 |
|
MD5 | daec8713fca1d3d7ed196a851a4b05c6 |
|
BLAKE2b-256 | 461a284ae2846837594a180647b4042aa12e23ac938c328b7deafbc32fb1b1c6 |
Close
Hashes for lsreader-0.0.23-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1444249a76eb98e8833f28a787cc068b9eb883f9e2c89c28e6df24c544311ad |
|
MD5 | c351727310f86abc5e427f95910002bc |
|
BLAKE2b-256 | f979eecc602c458fa707b2e2e392e9aaa0293df0dad09f1c8aec6aa304c27e29 |
Close
Hashes for lsreader-0.0.23-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8517d95646b6f40bf6f3e14822b7b45a110b8da49ae20fce25e1d8a000eb91df |
|
MD5 | 139dbf27908415f493511bd4860d1727 |
|
BLAKE2b-256 | fbb69725a8bbd7ad2537f75a28ef30483ae99cc37e9d1c47d53cbbdc5f247b7b |
Close
Hashes for lsreader-0.0.23-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 461695fe0337c30f5ca890899dab5c3cfa8863386f990d1f18ae00e20e930eab |
|
MD5 | da4b0e7ed1ed5f3558f5918314a07646 |
|
BLAKE2b-256 | 47e7a8b82dc20ff21f8c787756be17ee4801533d8403cbd9efac345570175cb3 |