Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing a command line to adjust lements in an exiting model

Status
Not open for further replies.

freast

Mechanical
Sep 7, 2006
1
Welcome to my problem,

For the analysis of my current task I have received the required model from a college. This model was made in FEMAP. Due to current licence issues I have received a text file generated to use in ANSYS.

The model contains many rectangular shell 63 elements, which comprise a complicated 3D structure. While the model works fine in FEMAP, ANSYS cannot handle this model due to high warping factors (up to 11) of a number of elements.

This problem should be easily fixed by dividing each rectangular element that generates a warping error into two triangular elements. This seems simple however the model contains a few thousand to these elements. Each element is generated by a separate EN,#, command line in the text file, requiring a rewrite of a few thousand lines of text. This is not a feasible option.

I have selected all elements containing the warping error. These elements have random element and node numbers. To be able to solve this problem I need to write a command which:
- Selects a element out of the selection of elements with a warping error
- Retrieves the node numbers of the selected element
- Creates two new elements by diving the old over a diagonal
- Deletes the old element
- Preferably maintains the original node-numbering
- Repeats this for all elements of the selection of error us elements

I have no idea how to accomplish this. Can anyone assist me?

Regards,

Freast

 
Replies continue below

Recommended for you

Freast, you should be able to write a macro using APDL consisting of *IF-*DO-*ELSE statements to redefine the bad elements. Use the *GET function to get element shape information. Write out your new elements to a command file using the *CFOPEN to initiate that file and *CFWRITE to output the EN command to the file. I don't have time now or else I would try giving you an input to start with. The Ansys documentation has all of the above commands documented rather well so use that as your starting point and maybe make a simple test case to debug your macro.

Good luck,
-Brian
 
Another thing you may consider is to disable shape checking in Ansys. Try adding SHPP,OFF to your input somewhere in /PREP7. I've never done this personally but it should work if you wish to use the elements you presently have without receiving error messages due to poor shapes. Note that the analysis may abort for unbeknownst reasons.

-Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor