Tagged: mechanical, mesh, meshing
-
-
March 5, 2023 at 6:37 pm
Rameez_ul_Haq
SubscriberHello there. Below picture shows a simple 20 by 40 mm surface body, where I have generated mesh of the size 2 mm, with a total elements equal to 200. The highlighted mesh element in green color represents the mesh element which has been assigned an element ID of 1 by the software randomly.
As observed, the element with ID = 1 lies somewhere in the middle of the surface body, which is not desired. Instead, what I desire is that the element which has to have an element ID = 1 should begin from the the lower left corner, and continue from there horizontally, and then move up the row, and continue until the last element on the top right corner has been assigned the final element ID of 200. How can I achieve this task? Kindly help.
I have a few ideas in mind, which might be viable but I don't know how to proceed with each. First idea suggests that I shall manually assign an ID number to each element on the Mechanical interface, possibly through options under the mesh settings. Other idea suggests that I shall be able to import the complete mesh data into a text file, modify the element IDs and then import it back into the mechanical and implement that mesh onto the surface body. For both of these ideas, I don't know they can actually be executed. Please assist. Thanks.
PS: I am using ANSYS Workbench 2021R1 version.
-
March 6, 2023 at 7:39 am
Erik Kostson
Ansys EmployeeHi
If you use the meshing inside mechanical then we do not have any or much control of numbering (e.g., element).
The best way to do what you want is to write a small script (python, matlab, etc.) that writes the nodes and element numbers as you want (this can be done for regular geometry shown). So in essence you will write a .cdb or ds.dat file with the node numbers (using N command or NBLOCK) as you want, and element numbers (using E command or EBLOCK) as needed, and then read that in via external model (that should preserve the numbering defined in the files).
All the best
Erik -
March 6, 2023 at 9:10 am
Rameez_ul_Haq
SubscriberThank you for your response. Yes sure I can write a MATLAB code, which explicitly shall define which elements and nodes should be assigned what numbers. However, I am unaware of what should be the format and pattern of the code, such that it could smoothly be imported into the external model module. Could you kindly provide an example here?
Plus, the type of MATLAB file where code is written would be .m, and I don’t know how to relate this type of file with the required types, as like you have mentioned in your reply, namely .cdb or ds.dat.
And one more thing, does there exist a possibility to insert an APDL command in the mechanical interface, under any of the tabs like Geometry or Mesh located in the Model tree, such that it can enable me to achieve what I want? Thanks.
-
March 6, 2023 at 10:04 am
Erik Kostson
Ansys EmployeeHi
Perhaps it is much easier to do it in mapdl where we can use *DO (for loops) to create nodes (N commands) as needed, and elements (E commands). See the help manual for more info on logic and looping, and the N command on how to define nodes and E for elements.
When the mesh is done, then we can issue the CDWRITE command in mapdl. This will write the .cdb file that can be read into external model in WB.
All the best
Erik
-
March 6, 2023 at 3:28 pm
peteroznewman
SubscriberHi Rameez,
I find that if the surface is in the XY plane, the elements are numbered in your preferred order. Look for the ID number on the bottom edge of the image.
When the surface is in the YZ plane, the element IDs are numbered in an odd way that you showed.
Why do you need the elements ordered in a particular way?
Users sometimes need to map results from one analysis to be the load on a new analysis. For example a Steady State Thermal analysis calculates the temperature distribution on a surface. Those temperatures are to be input into a Static Structural analysis to calculate thermal expansion in the structure. The way Ansys imports result data from an external program to use as a load is by XYZ coordinates. In that way, the element numbers used in either analysis are irrelevant and the mesh can even be different.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- Solver Pivot Warning in Beam Element Model
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- whether have the difference between using contact and target bodies
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- Colors and Mesh Display
- User manual
- material damping and modal analysis
-
3660
-
2534
-
1745
-
1226
-
580
© 2023 Copyright ANSYS, Inc. All rights reserved.