Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

DO loop that modifies loads (APDL) (HELP)

Status
Not open for further replies.

julia_page

Mechanical
Nov 26, 2018
11
0
0
ES
Hello,

Im trying to make a transient simulation in wich I introduce a heatflux proportional to the reactionforces in each node.
How can i get the reactin forces of each node manipulate them and input it as a new heatflux in each node? thanks !



/BATCH

!Rectangle
/PREP7
RECTNG,0,0.1,0,0.01,

!Create element
ET,1,PLANE223,11

!Material
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,EX,1,,2e11
MPDATA,PRXY,1,,0.3
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,DENS,1,,7850
MPTEMP,,,,,,,,
MPTEMP,1,0
UIMP,1,REFT,,,
MPDATA,ALPX,1,,0.00015
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,KXX,1,,45
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,C,1,,460

!Meshing
AESIZE,ALL,0.002,
MSHAPE,0,2D
MSHKEY,1
CM,_Y,AREA
ASEL, , , ,1
CM,_Y1,AREA
CHKMSH,'AREA'
CMSEL,S,_Y
AMESH,_Y1
CMDELE,_Y
CMDELE,_Y1
CMDELE,_Y2
! /REPLOT,RESIZE
FINISH

!Solution settings
/SOL
ANTYPE,4
TRNOPT,FULL
LUMPM,0

!Initial temperature
TUNIF,25

!Fixing vertical direction
NSEL,s,loc,y,0
NSEL,a,loc,y,0.01
D,ALL,UY,0
ALLSEL

!Fixing horizontal direction
NSEL,s,loc,y,0
NSEL,r,loc,x,0
D,ALL,Ux,0
ALLSEL

!Loop
*DO, i, 1, 60, 1
TIME,i
KBC,0
NSEL,s,loc,y,0
NSEL,a,loc,y,0.01
SF,ALL,HFLUX,100000,
ALLSEL
SOLVE
FINISH
/POST1
! Here i must get the reaction forces and update the heatflux in some way for the next step
FINISH
/SOLU
*ENDDO


 
Replies continue below

Recommended for you

I'm assuming when you say reaction force, you mean at the restrained nodes. I think this is what you are looking for:

/post1
set,last
NSEL,s,loc,y,0
NSEL,a,loc,y,0.01
cm,fluxnodes,node
ncount=ndinqr(0,14)
*dim,fluxes,table,ncount,,,node
nnum=ndnext(0)
*do,loop,1,ncount
fluxes(loop,0)=nnum
nsel,s,node,,nnum
fsum
*get,reactforc,fsum,0,item,fy
fluxes(loop,1)=10000+reactforc/1e3
cmsel,s,fluxnodes
nnum=ndnext(nnum)
*enddo

/solu

cmsel,s,fluxnodes
sf,all,hflux,%fluxes%
allsel

Fill in whatever math you want at fluxes(loop,1)=

You might want to take a look at your reaction forces at the midside nodes. They are an order of magnitude smaller then at the corner nodes, and that may give you an unwanted flux value there. Maybe use PLANE222?

Rick Fischer
Principal Engineer
Argonne National Laboratory
 
Status
Not open for further replies.
Back
Top