ansys / ansys/pyprimemesh

ExportLSDynaKeywordFileParams

Open
#942 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
35
Forks
14
Avg merge
3d 5h
Merged PRs (30d)
11

Description

### 🔍 Before submitting the issue

- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment

### 🐞 Description of the bug

The output is inconsistent with what is written in the documentation:

`class ExportLSDynaKeywordFileParams(model=None, material_properties=None, database_keywords=None, output_format=None, analysis_type=None, compute_spotweld_thickness=None, json_data=None, **kwargs)`

the output file contains all the keywords and not just the ones related to the geometry (model) even if the parameters value should be set to None by default. Setting the parameters to None explicitly doesn't help.

### 📝 Steps to reproduce

export_params = prime.ExportLSDynaKeywordFileParams(model=model)
export_result = file_io.export_lsdyna_keyword_file(output_file, export_params)

### 💻 Which operating system are you using?

Windows

### 📀 Which ANSYS version are you using?

2024 R2

### 🐍 Which Python version are you using?

3.11

### 📦 Installed packages

```shell
aiohappyeyeballs==2.4.3
aiohttp==3.11.6
aiosignal==1.3.1
ansys-api-dyna==0.4.1
ansys-api-mechanical==0.1.2
ansys-api-meshing-prime==0.1.3
ansys-api-platform-instancemanagement==1.1.0
ansys-dpf-core==0.10.0
ansys-dpf-gate==0.4.1
ansys-dpf-gatebin==0.4.1
ansys-dyna-core==0.6.0
ansys-grpc-dpf==0.8.1
ansys-mechanical-core==0.11.10
ansys-mechanical-env==0.1.8
ansys-mechanical-stubs==0.1.4
ansys-meshing-prime==0.6.2
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc4
ansys-tools-path==0.7.0
anyio==4.6.2.post1
appdirs==1.4.4
archspec @ file:///croot/archspec_1697725767277/work
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru @ file:///C:/b/abs_e0hjkvwwb5/croot/async-lru_1699554572212/work
attrs==24.2.0
Babel @ file:///C:/ci_311/babel_1676427169844/work
backcall @ file:///home/ktietz/src/ci/backcall_1611930011877/work
beautifulsoup4==4.12.3
bleach==6.2.0
boltons @ file:///C:/ci_311/boltons_1677729932371/work
Bottleneck @ file:///C:/ci_311/bottleneck_1676500016583/work
Brotli @ file:///C:/ci_311/brotli-split_1676435766766/work
cachetools==5.3.2
certifi @ file:///C:/b/abs_1fw_exq1si/croot/certifi_1725551736618/work/certifi
cffi @ file:///C:/b/abs_924gv1kxzj/croot/cffi_1700254355075/work
charset-normalizer @ file:///tmp/build/80754af9/charset-normalizer_1630003229654/work
click==8.1.7
clr-loader==0.2.6
colorama @ file:///C:/ci_311/colorama_1676422310965/work
comm==0.2.2
conda @ file:///C:/b/abs_f5n1kle6av/croot/conda_1699303158682/work
conda-content-trust @ file:///C:/b/abs_e3bcpyv7sw/croot/conda-content-trust_1693490654398/work
conda-libmamba-solver @ file:///C:/b/abs_02v6nijijw/croot/conda-libmamba-solver_1700150953092/work/src
conda-package-handling @ file:///C:/b/abs_b9wp3lr1gn/croot/conda-package-handling_1691008700066/work
conda_package_streaming @ file:///C:/b/abs_6c28n38aaj/croot/conda-package-streaming_1690988019210/work
contourpy==1.3.1
cryptography @ file:///C:/b/abs_f4do8t8jfs/croot/cryptography_1694444424531/work
cycler==0.12.1
debugpy @ file:///C:/b/abs_c0y1fjipt2/croot/debugpy_1690906864587/work
decorator==5.1.1
defusedxml==0.7.1
dynareadout==24.5
et-xmlfile==1.1.0
executing==2.1.0
fastjsonschema==2.20.0
fonttools==4.55.0
fqdn==1.5.1
frozenlist==1.5.0
google-api-core==2.15.0
google-api-python-client==2.114.0
google-auth==2.26.2
google-auth-httplib2==0.2.0
googleapis-common-protos==1.62.0
grpcio==1.68.0
hollerith==0.4.1
httplib2==0.22.0
idna @ file:///C:/ci_311/idna_1676424932545/work
imageio==2.33.1
importlib_metadata==8.5.0
ipykernel @ file:///C:/b/abs_07rkft_vaz/croot/ipykernel_1691121700587/work
ipython==8.29.0
ipywidgets==8.1.5
isoduration==20.11.0
jedi==0.19.2
Jinja2==3.1.4
json5 @ file:///tmp/build/80754af9/json5_1624432770122/work
jsonpatch @ file:///tmp/build/80754af9/jsonpatch_1615747632069/work
jsonpointer==2.1
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter @ file:///C:/ci_311/jupyter_1678249952587/work
jupyter-console @ file:///C:/b/abs_82xaa6i2y4/croot/jupyter_console_1680000189372/work
jupyter-events==0.10.0
jupyter-lsp @ file:///C:/b/abs_ecle3em9d4/croot/jupyter-lsp-meta_1699978291372/work
jupyter_client==8.6.3
jupyter_core==5.7.2
jupyter_server==2.14.2
jupyter_server_proxy==4.4.0
jupyter_server_terminals==0.5.3
jupyterlab @ file:///C:/b/abs_aergn8zopq/croot/jupyterlab_1700518316761/work
jupyterlab_pygments==0.3.0
jupyterlab_server @ file:///C:/b/abs_e08i7qn9m8/croot/jupyterlab_server_1699555481806/work
jupyterlab_widgets==3.0.13
kiwisolver==1.4.7
libmambapy @ file:///C:/b/abs_efpsdwt4ya/croot/mamba-split_1698782663578/work/libmambapy
MarkupSafe==3.0.2
matplotlib==3.9.2
matplotlib-inline==0.1.7
menuinst @ file:///C:/ci_311/menuinst_1678730372782/work
mistune==3.0.2
mkl-fft @ file:///C:/b/abs_19i1y8ykas/croot/mkl_fft_1695058226480/work
mkl-random @ file:///C:/b/abs_edwkj1_o69/croot/mkl_random_1695059866750/work
mkl-service==2.4.0
more-itertools==10.5.0
msgpack==1.1.0
multidict==6.1.0
munkres==1.1.4
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
notebook @ file:///C:/b/abs_26737osg4x/croot/notebook_1700582146311/work
notebook_shim @ file:///C:/b/abs_a5xysln3lb/croot/notebook-shim_1699455926920/work
numexpr @ file:///C:/b/abs_5fucrty5dc/croot/numexpr_1696515448831/work
numpy==2.1.3
openpyxl @ file:///C:/b/abs_764brjadj1/croot/openpyxl_1714158895873/work
overrides==7.7.0
packaging @ file:///C:/b/abs_28t5mcoltc/croot/packaging_1693575224052/work
pandas @ file:///C:/b/abs_81b3npjrl8/croot/pandas_1697477219064/work/dist/pandas-2.1.1-cp311-cp311-win_amd64.whl#sha256=1732f3b07ba52119320a2b01aa09f2627f6258176e492b728daf60efb4f4d78e
pandocfilters==1.5.1
parso==0.8.4
pickleshare @ file:///tmp/build/80754af9/pickleshare_1606932040724/work
pillow==11.0.0
platformdirs @ file:///C:/b/abs_b6z_yqw_ii/croot/platformdirs_1692205479426/work
pluggy @ file:///C:/ci_311/pluggy_1676422178143/work
ply==3.11
pooch==1.8.2
prometheus_client==0.21.0
prompt_toolkit==3.0.48
propcache==0.2.0
protobuf==4.25.5
psutil==6.1.0
pure_eval==0.2.3
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycosat @ file:///C:/b/abs_31zywn1be3/croot/pycosat_1696537126223/work
pycparser @ file:///tmp/build/80754af9/pycparser_1636541352034/work
Pygments==2.18.0
pyOpenSSL @ file:///C:/b/abs_08f38zyck4/croot/pyopenssl_1690225407403/work
pyparsing==3.2.0
PyQt5==5.15.10
PyQt5-sip @ file:///C:/b/abs_c0pi2mimq3/croot/pyqt-split_1698769125270/work/pyqt_sip
PySocks @ file:///C:/ci_311/pysocks_1676425991111/work
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
pytz @ file:///C:/b/abs_19q3ljkez4/croot/pytz_1695131651401/work
pyvista==0.44.1
pywin32==308
pywinpty==2.0.14
PyYAML==6.0.2
pyzmq==26.2.0
qtconsole @ file:///C:/b/abs_4awqjtg1ug/croot/qtconsole_1700160696631/work
QtPy @ file:///C:/b/abs_derqu__3p8/croot/qtpy_1700144907661/work
referencing==0.35.1
requests @ file:///C:/b/abs_316c2inijk/croot/requests_1690400295842/work
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.21.0
rsa==4.9
ruamel.yaml @ file:///C:/ci_311/ruamel.yaml_1676439214109/work
scipy==1.11.3
scooby==0.10.0
Send2Trash==1.8.3
simpervisor==1.0.0
sip @ file:///C:/b/abs_edevan3fce/croot/sip_1698675983372/work
six==1.16.0
sniffio==1.3.1
soupsieve==2.6
stack-data==0.6.3
terminado==0.18.1
tinycss2==1.4.0
tornado==6.4.1
tqdm @ file:///C:/b/abs_f76j9hg7pv/croot/tqdm_1679561871187/work
traitlets==5.14.3
trame==3.7.0
trame-client==3.5.0
trame-server==3.2.3
trame-vtk==2.8.12
trame-vuetify==2.7.2
truststore @ file:///C:/b/abs_55z7b3r045/croot/truststore_1695245455435/work
types-python-dateutil==2.9.0.20241003
typing_extensions==4.12.2
tzdata @ file:///croot/python-tzdata_1690578112552/work
uri-template==1.3.0
uritemplate==4.1.1
urllib3 @ file:///C:/b/abs_9cmlsrm3ys/croot/urllib3_1698257595508/work
vtk==9.3.1
wcwidth==0.2.13
webcolors==24.11.1
webencodings==0.5.1
websocket-client==1.8.0
widgetsnbextension==4.0.13
win-inet-pton @ file:///C:/ci_311/win_inet_pton_1676425458225/work
wslink==2.2.1
yarl==1.17.2
zipp==3.21.0
zstandard==0.19.0
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with ExportLSDynaKeywordFileParams(model=model) and file_io.export_lsdyna_keyword_file(output_file, export_params). Read the parameter class and export_lsdyna_keyword_file entry points to compare documented defaults with the generated output. Done means the output contains only geometry-related keywords when the other parameters are omitted or set to None.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.