CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Structural Mechanics

Macro for Elastic Stress Check

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2018, 12:15
Angry Macro for Elastic Stress Check
  #1
New Member
 
Reece Gibb
Join Date: Nov 2018
Posts: 1
Rep Power: 0
gibby is on a distinguished road
Hi everyone

I'm a 4th year Mechanical Engineering student completing my individual project on 'Local Plastic Failure Assessment in Pressure Vessel Design by Analysis'.

As part of this I'm trying to run a macro using ANSYS Mechanical APDL to perform the elastic analysis check equation 5.5 (sum of principal stresses less than or equal to 4*design stress) from the ASME code Section 8, Div 2 part 5.3. However, I can't get my macro to run and I'm a bit stuck.

Any help would be appreciated.

Thanks in advance

/CLEAR

*cfopen,stresses6,out,

*GET,NMAX,NODE,,NUM,MAXD

!Define array
*dim,sig1,array,nmax
*dim,sig2,array,nmax
*dim,sig3,array,nmax
*dim,sigsum,array,nmax
*dim,nodnum,array,nmax
*dim,dstres,array,nmax
*dim,design,array,nmax

*do,i,1,nmax

*set,nnum,i
*set,nodnum(i),nnum

*GET, siga, NODE, i, s, 3
*set,sig1(i),siga

*GET, sigb, NODE, i, s, 2
*set,sig2(i),sigb

*GET, sigc, NODE, i, s, 3
*set,sig3(i),sigc

! calculate sum of prin stress

ssum=siga+sigb+sigc
*set,sigsum(i),ssum
*enddo

*set,dstres(i),300000

*do,i,1,nmax

*IF,sigsum(i),LE,4*dstres(i),THEN
*set,design(i),1

*IF,sigsum(i),GT,4*dstres(i),THEN
*set,design(i),0

*enddo

*vwrite,nodnum(1),sigsum(1),design(1)
(f20.4,f20.4,f20.4)


!'SIG1: ',sig1(1),'SIG2: ',sig2(1),'SIG3: ',sig3(1),
gibby is offline   Reply With Quote

Reply

Tags
ansys, apdl, elastic analysis, fea, macro


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stress tangent to path? Ansys 18.2 Workbench. sultzan ANSYS 2 November 20, 2017 18:47
Turbulence models for turbulent stress srv537 Main CFD Forum 5 December 23, 2016 02:34
Fluid wall shear stress Sinead Kelly (Kelly) OpenFOAM Running, Solving & CFD 2 March 30, 2011 07:41
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
Cell check and Boundary check errors AB Siemens 4 October 28, 2004 14:04


All times are GMT -4. The time now is 00:31.