XANSYS Forum Index
    Register    

FAQ    Search    Memberlist    Usergroups    SmartFeedSmartFeed    Profile    Log in
[Xansys] How to split selected nodes using APDL command?
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
Author Message
joseph.metrisin
User


Joined: 07 May 2009
Posts: 404

PostPosted: Tue May 26, 2015 10:54 am  Reply with quote

Here's a macro I wrote several years ago for just this purpose.



/com

/com Macro to break the element connectivity at a set of selected nodes in

/com order to simulate a crack at that location. User preselects a set of

/com nodes and elements where the crack is to be placed. The macro creates a

/com duplicate node at this location and modifies the element connectivity on

/com one side of the crack to use the new node. Any temperatures applied at

/com the crack nodes are also duplicated and applied to the new node. This

/com macro should work for ALL element types.

/com

/com Instructions: 1: Create two components:

/com Face1_ - Elements on one face of the crack.

/com CrackNode_ - Nodes at the crack face.

/com

/com 2: Run this macro. Connectivity will be broken

/com at the selected nodes.

/com

/com Written by: Joe Metrisin - Florida Turbine Technologies, Inc.

/com Date: August 9, 2001.

/com

/prep7

modmsh,nocheck ! Deactivate solid model checking.

cm,currelem_, elem ! Store current element selection.

!

cmsel,s,cracknode_ ! Select crack face nodes.

cmsel,s,face1_ ! Select elements on one crack face.

!

*get,numnode_,node,0,count ! Retrieve number of nodes in current set.

*do, loop1_, 1, numnode_, 1 ! Do loop for all nodes.

nnum_=ndnext(0) ! Retrieve lowest node number from current set.

newnode_=ndinqr(0,14)+1 ! Determine next available node number.

n,newnode_,nx(nnum_),ny(nnum_),nz(nnum_) ! Create new node.

*get,ntemp_, node, nnum_, ntemp ! Get temperature applied to node.

bf, newnode_, temp, ntemp_ ! Apply temperature to new node.

esln,s ! Select all elements using this node.

cmsel,u,face1_ ! Unselect elements from one face that uses this node.

!

nesel_=elmiqr(0,13) ! Get number of elements in current selection.

*do, loop2_, 1, nesel_, 1 ! Do for all elements connected to node.

ecrack1_=enextn(nnum_,1) ! Get next element to be modified.

*if, ecrack1_, eq, 0, then ! Test if position loop3_ is correct for node.

*exit ! Exit do loop when correct position is found.

*endif !

!

*do, loop3_, 1, 20, 1 ! Do loop to find position number of node.

npos_=nelem(ecrack1_,loop3_) ! Get node number in position loop3_

*if, nnum_, eq, npos_, then ! Test if position loop3_ is correct for node.

posnum_=loop3_ ! If true, set posnum_ = to position number.

*exit ! Exit do loop when correct position is found.

*endif ! End if statement.

*enddo ! End do loop.



cm, work_, node ! Store current node set in temporary component.

nsle,s ! Select nodes on current element.

nsel,a,node,,newnode_ ! Add new node to selection.

emodif, ecrack1_, -posnum_, newnode_ ! Change element connectivity to use new node.

cmsel, s, work_ ! Restore working node set.

esel,u,elem,,ecrack1_ ! Remove modified element from selection.

*enddo ! End do loop.

!

nsel,u,node,,nnum_ ! Unselect current node number.

*enddo ! End do loop.

!

modmsh,check ! Restore solid model checking.

cmsel,s,currelem_ ! Restore original element selection.

nsle,s ! Select nodes on current element group.

cmdel,work2_ ! Delete working components.







Joseph T Metrisin
Structures Lead

[cid:fttsmfandd63b9] Florida Turbine Technologies, Inc
1701 Military Tr. Suite 110 | Jupiter, FL 33458 USA
+1 (561)427-6346 Office | (561)427-6191 Fax |
JMetrisin@fttinc.com
Visit our website: www.fttinc.com<http://www.fttinc.com/>








FTT's public email encryption keys are stored in the FTT Verified Directory at http://keys.fttinc.com

Confidentiality Note:
The information contained in this transmission and any attachments are proprietary and may be privileged, intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you received this communication in error, please delete the message and immediately notify the sender via the contact information listed above.

________________________________

+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
View user's profile Send private message
ernst.hustedt
User


Joined: 22 Oct 2010
Posts: 127

PostPosted: Tue May 26, 2015 3:03 pm  Reply with quote

Joe,

I wrote the same thing in Oct. 1994 :),
(didn't care about temps, but included an optional xyz-shift to 'open a
crack').
One thing I remember is that ANSYS at the time did not pick up that the
face of the unchanged element had become a surface, no matter what. So
hidden didn't work that well after that. Just wondering.

Ernst Hustedt
AMES Ltd.
Chch. N.Z.

On 27/05/2015 05:19, Metrisin, Joe wrote:
Quote:
Here's a macro I wrote several years ago for just this purpose.

+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
View user's profile Send private message
joseph.metrisin
User


Joined: 07 May 2009
Posts: 404

PostPosted: Wed May 27, 2015 3:59 am  Reply with quote

Interesting Ernst. It seems to work now, at least for my little test case. Could be a bug back in 1994 when you were probably running version 6.0 or whatever it was then.


Joseph T Metrisin
Structures Lead
Florida Turbine Technologies, Inc
1701 Military Tr. Suite 110
Jupiter, FL 33458 U.S.A.
+1 (561)427-6346 Office

(561)427-6191 Fax
JMetrisin@fttinc.com

Visit our website: www.fttinc.com

FTT's public email encryption keys are stored on the FTT Verified Directory at http://keys.fttinc.com

-----------------------------------------------------------------------------------------------------
Confidentiality Note:
The information contained in this transmission and any attachments are proprietary and may be privileged, intended only for the use of the individual or entity named above. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you received this communication in error, please delete the message and immediately notify the sender via the contact information listed above.
-----------------------------------------------------------------------------------------------------


-----Original Message-----
From: Xansys [mailto:xansys-bounces@xansys.org] On Behalf Of Ernst Hustedt
Sent: Tuesday, May 26, 2015 6:03 PM
To: ANSYS User Discussion List
Subject: [FTT_SPAM] - Re: [Xansys] How to split selected nodes using APDL command?

Joe,

I wrote the same thing in Oct. 1994 :),
(didn't care about temps, but included an optional xyz-shift to 'open a crack').
One thing I remember is that ANSYS at the time did not pick up that the face of the unchanged element had become a surface, no matter what. So hidden didn't work that well after that. Just wondering.

Ernst Hustedt
AMES Ltd.
Chch. N.Z.


+-------------------------------------------------------------+
| XANSYS web - www.xansys.org/forum |
| The Online Community for users of ANSYS, Inc. Software |
| Hosted by PADT - www.padtinc.com |
| Send administrative requests to xansys-mod@tynecomp.co.uk |
+-------------------------------------------------------------+

Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    XANSYS Forum Index -> XANSYS
All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

sleek template created by Andrew Charron