ansys / pyadditive

Pythonic interface client to Ansys additive simulation service

Home Page:https://additive.docs.pyansys.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prevention of duplicate simulations inputs is not working

pkrull-ansys opened this issue Β· comments

πŸ” Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

The same simulations are being added to a study each time a script is executed resulting in duplicate simulations.

πŸ“ Steps to reproduce

Run the following script multiple times without removing ms-study.ps in between runs. 7 simulations will be added each time the script is run. The study should only contain the 7 simulations added the first time the script was run. The print call should write 7 every time the script is run.

from ansys.additive.core import Additive
from ansys.additive.core.parametric_study import ParametricStudy

study = ParametricStudy("ms-study")
additive = Additive()
material = "316L"

study.generate_microstructure_permutations(
    material_name=material,
    laser_powers=[100, 200, 300, 400, 500, 600, 700],
    scan_speeds=[1],
    size_x=1e-3,
    size_y=1e-3,
    size_z=1.1e-3,
    sensor_dimension=1e-4,
    layer_thicknesses=[30e-6],
    iteration=1,
)

print(len(study.data_frame()))

πŸ’» Which operating system are you using?

Windows

πŸ“€ Which ANSYS version are you using?

24.2

🐍 Which Python version are you using?

3.9

πŸ“¦ Installed packages

ansys-api-additive==1.6.7
ansys-api-platform-instancemanagement==1.0.0
ansys-platform-instancemanagement==1.1.2
anyio==4.3.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
async-timeout==4.0.3
attrs==23.2.0
Babel==2.14.0
beautifulsoup4==4.12.3
bleach==6.1.0
bokeh==3.3.4
cachetools==5.3.3
certifi==2024.2.2
cffi==1.16.0
cfgv==3.4.0
chardet==5.2.0
charset-normalizer==3.3.2
cmocean==3.1.3
colorama==0.4.6
colorcet==3.0.1
comm==0.2.1
contourpy==1.2.0
coverage==7.4.3
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
dill==0.3.8
distlib==0.3.8
exceptiongroup==1.2.0
executing==2.0.1
fastjsonschema==2.19.1
filelock==3.13.1
fonttools==4.49.0
fqdn==1.5.1
frozenlist==1.4.1
google-api-core==2.17.1
google-api-python-client==2.119.0
google-auth==2.28.1
google-auth-httplib2==0.2.0
googleapis-common-protos==1.62.0
grpcio==1.62.0
grpcio-health-checking==1.62.0
h11==0.14.0
httpcore==1.0.4
httplib2==0.22.0
httpx==0.27.0
identify==2.5.35
idna==3.6
imageio==2.34.0
importlib-metadata==7.0.1
importlib_resources==6.1.2
iniconfig==2.0.0
ipykernel==6.29.3
ipython==8.18.1
ipywidgets==8.1.2
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
json5==0.9.17
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter-events==0.9.0
jupyter-lsp==2.2.3
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.5
jupyter_server_proxy==4.1.0
jupyter_server_terminals==0.5.2
jupyterlab==4.1.2
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.3
jupyterlab_widgets==3.0.10
jupytext==1.16.1
kiwisolver==1.4.5
linkify-it-py==2.0.3
Markdown==3.5.2
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.3
matplotlib-inline==0.1.6
mdit-py-plugins==0.4.0
mdurl==0.1.2
meshio==5.3.5
mistune==3.0.2
more-itertools==10.2.0
multidict==6.0.5
nbclient==0.9.0
nbconvert==7.16.1
nbformat==5.9.2
nest-asyncio==1.6.0
nodeenv==1.8.0
notebook_shim==0.2.4
numpy==1.26.4
overrides==7.7.0
packaging==23.2
pandas==2.2.1
pandocfilters==1.5.1
panel==1.3.8
param==2.0.2
parso==0.8.3
pillow==10.2.0
platformdirs==4.2.0
plotly==5.19.0
pluggy==1.4.0
pooch==1.8.1
pre-commit==3.6.2
prometheus_client==0.20.0
prompt-toolkit==3.0.43
protobuf==4.25.3
psutil==5.9.8
pure-eval==0.2.2
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
pyct==0.5.0
Pygments==2.17.2
pyparsing==3.1.1
pyproject-api==1.6.1
pytest==8.0.2
pytest-cov==4.1.0
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2024.1
pyvista==0.43.3
pyviz_comms==3.0.1
pywin32==306
pywinpty==2.0.13
PyYAML==6.0.1
pyzmq==25.1.2
referencing==0.33.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.7.1
rpds-py==0.18.0
rsa==4.9
scooby==0.9.2
Send2Trash==1.8.2
simpervisor==1.0.0
six==1.16.0
sniffio==1.3.1
soupsieve==2.5
stack-data==0.6.3
tenacity==8.2.3
terminado==0.18.0
tinycss2==1.2.1
toml==0.10.2
tomli==2.0.1
tornado==6.4
tox==4.13.0
tqdm==4.66.2
traitlets==5.14.1
trame==3.5.2
trame-client==2.16.1
trame-server==2.17.2
trame-vtk==2.8.5
trame-vuetify==2.4.2
types-python-dateutil==2.8.19.20240106
typing_extensions==4.10.0
tzdata==2024.1
uc-micro-py==1.0.3
uri-template==1.3.0
uritemplate==4.1.1
urllib3==2.2.1
virtualenv==20.25.1
vtk==9.3.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0
widgetsnbextension==4.0.10
wslink==1.12.4
xyzservices==2023.10.1
yarl==1.9.4
zipp==3.17.0