Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug located in accessing Tsai Wu coefficients #553

Open
2 tasks done
roosre opened this issue Dec 11, 2024 · 0 comments
Open
2 tasks done

Bug located in accessing Tsai Wu coefficients #553

roosre opened this issue Dec 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@roosre
Copy link
Collaborator

roosre commented Dec 11, 2024

🔍 Before submitting the issue

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

🐞 Description of the bug

The Tsai-Wu coefficients are defined in the attached XML but the output in PyDPF Composites is 0. The expected value is -1.ply_type.zip

📝 Steps to reproduce

import os

from ansys.dpf.composites.composite_model import CompositeModel
from ansys.dpf.composites.constants import FailureOutput
from ansys.dpf.composites.failure_criteria import CombinedFailureCriterion, MaxStressCriterion, TsaiWuCriterion
from ansys.dpf.composites.server_helpers import connect_to_or_start_server
from ansys.dpf.composites.data_sources import ContinuousFiberCompositesFiles
from ansys.dpf.composites.layup_info.material_properties import MaterialProperty

result_path = r"D:\tmp\PyDPFComp-APDL\ply_type"

composite_files = ContinuousFiberCompositesFiles(
rst = [os.path.join(result_path, "file.rst")],
composite = {},
engineering_data=os.path.join(result_path, "EngineeringData.xml"),
)

server = connect_to_or_start_server()

composite_model = CompositeModel(composite_files, server)

combined_failure_criterion = CombinedFailureCriterion(failure_criteria=[TsaiWuCriterion()])
failure_result = composite_model.evaluate_failure_criteria(combined_failure_criterion)

irf_field = failure_result.get_field({"failure_label": FailureOutput.FAILURE_VALUE})
irf_field.plot()

mp = MaterialProperty.Tsai_Wu_Constant_xy
values = composite_model.get_constant_property_dict([mp])
print(values)

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2025 R1

🐍 Which Python version are you using?

3.9

📦 Installed packages

aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
ansys-api-dbu==0.3.6
ansys-api-geometry==0.4.11
ansys-api-meshing-prime==0.1.3
ansys-api-tools-filetransfer==0.1.0
-e git+https://tfs.ansys.com:8443/tfs/ANSYS_Development/ANSYS-CH/_git/ansys_devops_tools@10d4c7e3557bcf45b3b8ddf184ecc4c14fbad5d2#egg=ansys_devops_tools
ansys-dpf-composites==0.6.1
ansys-dpf-core==0.13.0
ansys-tools-filetransfer==0.1.0
ansys-tools-local-product-launcher==0.1.0
ansys-tools-path==0.6.0
ansys-tools-visualization-interface==0.4.5
anyio==4.6.2.post1
appdirs==1.4.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-timeout==4.0.3
attrs==24.2.0
backports.entry-points-selectable==1.3.0
beartype==0.19.0
beautifulsoup4==4.12.3
bleach==6.1.0
bottle==0.12.25
cachetools==5.5.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
comm==0.2.2
conan==1.60.2
contourpy==1.3.0
cycler==0.12.1
debugpy==1.8.7
decopatch==1.4.10
decorator==5.1.1
defusedxml==0.7.1
exceptiongroup==1.2.2
executing==2.1.0
fasteners==0.19
fastjsonschema==2.20.0
flexcache==0.3
flexparser==0.3.1
fonttools==4.54.1
fqdn==1.5.1
frozenlist==1.4.1
google-api-core==2.19.2
google-api-python-client==2.143.0
google-auth==2.34.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.65.0
grpcio==1.67.0
grpcio-health-checking==1.62.3
httplib2==0.22.0
idna==3.10
importlib_metadata==8.4.0
iniconfig==2.0.0
ipython==8.28.0
ipywidgets==8.1.5
isodate==0.6.1
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.4
jmespath==1.0.1
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter-events==0.10.0
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_pygments==0.3.0
jupyterlab_widgets==3.0.13
kiwisolver==1.4.7
makefun==1.15.6
MarkupSafe==3.0.2
matplotlib==3.9.2
matplotlib-inline==0.1.7
mistune==3.0.2
more-itertools==10.5.0
msgpack==1.1.0
msrest==0.6.21
multidict==6.1.0
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.4.1
node-semver==0.6.1
numpy==2.1.2
oauthlib==3.2.2
overrides==7.7.0
packaging==24.1
pandocfilters==1.5.1
parso==0.8.4
patch-ng==1.17.4
pillow==11.0.0
Pint==0.24.3
platformdirs==4.3.6
pluggy==1.5.0
pluginbase==1.0.1
pooch==1.8.2
prometheus_client==0.21.0
prompt_toolkit==3.0.48
propcache==0.2.0
proto-plus==1.24.0
protobuf==4.25.5
psutil==6.1.0
pure_eval==0.2.3
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
Pygments==2.18.0
PyJWT==2.8.0
pyparsing==3.2.0
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
pyvista==0.44.1
pywin32==308
pywinpty==2.0.14
PyYAML==6.0.2
pyzmq==26.2.0
referencing==0.35.1
requests==2.32.3
requests-oauthlib==1.3.1
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.20.0
rsa==4.9
scipy==1.14.1
scooby==0.10.0
semver==3.0.2
Send2Trash==1.8.3
simpervisor==1.0.0
six==1.16.0
sniffio==1.3.1
soupsieve==2.6
stack-data==0.6.3
terminado==0.18.1
tinycss2==1.3.0
tomli==2.0.2
tornado==6.4.1
tqdm==4.66.1
traitlets==5.14.3
trame==3.7.0
trame-client==3.4.0
trame-server==3.2.3
trame-vtk==2.8.11
trame-vuetify==2.7.1
types-python-dateutil==2.9.0.20241003
typing_extensions==4.12.2
uri-template==1.3.0
uritemplate==4.1.1
urllib3==2.2.3
vsts==0.1.25
vtk==9.3.1
wcwidth==0.2.13
webcolors==24.8.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==13.1
widgetsnbextension==4.0.13
wslink==2.2.1
yarl==1.15.5
zipp==3.20.1
@roosre roosre added the bug Something isn't working label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant