-
Hi, I am new to pyMAPDL and i need urgent help with this code. If you have any questions or need more context, please do not hesitate to contact me. Context The main goal of this project is to simulate a multi-layered thermal system using ANSYS MAPDL through Python. The simulation includes three distinct volumes: a wooden base table, an EPS (Expanded Polystyrene) block acting as an insulating layer, and a top RC material sample that exchanges heat with the environment via solar absorption, convection, and long-wave radiative cooling. The geometry is defined using block(...) commands, creating structured regions for each material with precise spatial coordinates. The materials have different thermal conductivities, which allows for the study of how heat propagates through the layers and how the final temperature of the upper material (RC) depends on environmental conditions such as ambient temperature (Taire), wind speed (v_vent), dew point (Tdp), relative humidity (HR), time of day (t), and solar irradiation (Irrad). These variables are read from an Excel file (design_points.xlsx) and processed row by row. To analyze the thermal behavior of the system, a custom function called Tmostra(...) iteratively calculates the surface temperature of the RC material until convergence is reached. This function takes into account:
At the end of each iteration, nodal temperatures are extracted using get_array("NODE", item1="TEMP"), and the median or mean is calculated to represent the steady-state temperature of the sample (Tmostra_i). Problem I've been doing some research, but after a long time I still don't know what I'm doing wrong. I am new to pyMAPDL and this is my first code. Any help is welcome, thank you very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @MASV1610 I'll trim down the input file to run just one instance of the model to confirm. But that will take a while. Mike |
Beta Was this translation helpful? Give feedback.
Hi @MASV1610
The mesh sizing just happens to be defined so that the nodes are coincident at the interface between the volumes. But there are duplicate nodes. If you have node numbering turned on when plotting the elements you would see the coincident nodes easier (in MAPDL interactive). Selecting the volumes and meshing does not automatically create a connected mesh between volumes. The volumes need to share area/lines/keypoints for the mesh to share nodes.
Perhaps you have an APDL macro you wrote named CMAP? For example I found this in the script:
However CMAP in PyMAPDL is its version of the APDL com…