-
Notifications
You must be signed in to change notification settings - Fork 25
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
Temperature read from rst file seems to differ from nodal values #59
Comments
Quite right. It's a primary result and not a derived result like element stresses (computed at integration points, extrapolated/interpolated to nodes, averaged, etc). Looking into this now, thanks for the thorough explanation! |
I'm seeing the same issue on my end: """Compare temperaturs from ansys-mapdl-reader with mapdl"""
import os
import shutil
import numpy as np
from ansys.mapdl import reader as pymapdl_reader
from ansys.mapdl import core as pymapdl
path = 'structure.rst'
rst = pymapdl_reader.read_binary(path)
# rst.plot()
nnum, temp_from_rst = rst.nodal_temperature(0)
mapdl = pymapdl.launch_mapdl()
shutil.copy(path, os.path.join(mapdl.directory, 'file.rst'))
mapdl.post1()
mapdl.set(1, 1)
temp_from_mapdl = mapdl.post_processing.nodal_temperature
# Identical to: print(mapdl.prnsol('TEMP'))
diff = temp_from_mapdl - temp_from_rst
nnum = mapdl.mesh.nnum
for node_diff, node_num in zip(diff, nnum):
print(f'Node {node_num:3} {node_diff:9.5f}') Returns:
In regards to this being a primary result, I noticed that MAPDL is returning mid-side values, indicating that it's computed temperatures as a primary result. However, the file extension is a rst file and I'm seeing the primary results are displacement values from the result file. Turns out that the Let me dig a little more and see if the temperatures are stored in a different record. |
Actually, I think what's going on is Working on a bug-fix for this. |
Thank you very much for your fast reply and your explanation. I already wondered if the root of this deviation has anything to do with our simulation setup. I'm well aware that we do bend the intended usage quite a bit by using the SURF152 elements together with thermal boundary conditions within a deformation simulation writing a rst file. |
Got a fix, turns out I just ignore 154 elements. Patch coming... |
Resolved in #61 and released in Please let me know if this solves your issue. |
After updating to Thank you very much for the very fast and detailed reply and the version update. Resolved > Closed. |
Hi everybody,
a colleague of mine recently set up a simulation test case where we plan to combine mechanical and thermal loads (basically forces and heatfluxes). To do so,
SURF154
andSURF152
elements for the respective loads, as well asSOLID226
andSOLID227
elements for the volumes in the mesh are being created.In principal this works as expected and when processed in the Ansys Workbench or Tecplot, the results look good. However, we did observe a deviation from the other methods when reading the nodal temperature data using
pyansys.pymapdl.reader
.The image I attached shows the difference between the nodal temperature read from the rst file using Tecplot and the pyansys reader. To read the temperatures I used the following minimum example script (with the latest version 0.51.3 of the reader):
A heat flux boundary condition is applied to the side of the cube facing us (X=Xmin). The top side (Z=Zmax) is prepared to be loaded with a force (which is zero by now).
Although the deviations are relatively small (max. is 0.89K), I wonder what causes them. From what I understand, the nodal temperature should be a state variable that is, once defined by solving the system, not depending on the connectivity or element type of the elements the node is belonging to (other than e.g. a nodal value for the heatflux). Thus, the nodal temperature should be the same when read by any of the tools at hand (Workbench, Tecplot, pyansys), right?
Do you have any idea what the cause of this deviation could be? I assume that it is not connected to the FEM model, but mainly due to how the reader parses the data. I would be very thankful for any hint or explanation.
For now I only attached the results file structure.rst.zip, but as you have probably already guessed, the shown case is a minimum working example and I could easily provide any data (e.g. input file, workbench project), if that helps somehow.
Best regards,
Sebastian
The text was updated successfully, but these errors were encountered: