pymapdl
pymapdl copied to clipboard
Bug located in MPCOPY and other commands which has unused field
๐ค Before submitting the issue
- [X] I have visited the Troubleshooting section.
- [X] I have searched among the existing issues.
- [X] I am using a Python virtual environment.
- [X] I am using the latest version of PyMAPDL and its dependencies (fully updated virtual environment). You can update them using
pip install --upgrade --upgrade-strategy eager ansys-mapdl-core
in your activated virtual environment.
๐ Description of the bug
Use of MPCOPY results in TypeError as it has an unused field. Looks like it was fixed, or supposed to be, in prior pull: https://github.com/ansys/pymapdl/pull/1675
Received error using 0.68.1 and mapdl 24R1.
๐ต๏ธ Steps To Reproduce
The log will automatically be formatted as Python code! No need to type backticks.
๐ป Which Operating System are you using?
Windows
๐ Which Python version are you using?
3.10
๐พ Which MAPDL version are you using?
24R1
๐ PyMAPDL Report
Show the Report!
# PASTE HERE THE OUTPUT OF `python -c "from ansys.mapdl import core as pymapdl; print(pymapdl.Report())"` here
๐ Installed packages
Show the installed packages!
# PASTE HERE THE OUTPUT OF `python -m pip freeze` here
๐ Logger output file
Show the logger output file.
# PASTE HERE THE CONTENT OF THE LOGGER OUTPUT FILE.
The /post26 command ADD and QUOT still have problems due to multiple blank fields on the command. Also if the data is complex then QUOT using the NAME field returns machine zeros for complex variables.
Interesting... it seems to work for me:
>>> mapdl.mat(1)
>>> mapdl.mp("SONC", 1, 1500) # sonc in m/s
>>> mapdl.mp("DENS", 1, 1000) # Density in kg/m3
>>> mapdl.mpcopy(1, 2)
COPY MATERIAL 1 DENS TO MATERIAL 2
COPY MATERIAL 1 SONC TO MATERIAL 2
The /post26 command ADD and QUOT still have problems due to multiple blank fields on the command. Also if the data is complex then QUOT using the NAME field returns machine zeros for complex variables.
I will need an example for testing and debugging this.
There is an unused/beta field in MPCOPY. So the command should really be mapdl.mpcopy('', 1, 2)
For reference: https://github.com/ansys/pymapdl/discussions/3026#discussion-6554930
GitHub
Given this APDL command: MPCOPY,--,matf,matt where: -- is an "unused" field or, in pythonic terms, an undocumented argument. This undocumented argument can serve different purposes: Maybe it is a d...
This issue is locked until https://github.com/ansys/pymapdl/discussions/3026 gets closure.
GitHub
Given this APDL command: MPCOPY,--,matf,matt where: -- is an "unused" field or, in pythonic terms, an undocumented argument. This undocumented argument can serve different purposes: Maybe it is a d...