Yunpeng Wu
Subscriber
1. When I tried to do a max angle of 155 degrees, the command didn't drive the remesh, even 100 degrees, the remesh can't happens, and the maxium to start the remesh is 90 degree.
2. This structure is a plane, 100*100 elements, and each element is a 1*1 square, when I use the same material for all the elements, it can converge without remesh, but if I choose to use 2 different materials, the non-linear process can't converge.

Do you have any idea about why this problem happens?

The code is shown below:

FINISH
/CLEAR

*do,fid,1,1

/PREP7

!=== Define material 1
ET,1,PLANE182

MP,EX,1,2000
MP,PRXY,1,0.3

!==== Define material 2
ET,2,PLANE182
MP,EX,2,1000
MP,PRXY,2,0.3

/PREP7

NDELE,ALL
EDELE,ALL
DDELE,ALL,ALL
NUMCMP,ALL

!NLADAPTIVE,ALL,ADD,MESH,SKEWNESS,0.9

*set,ntb
*set,etb

filename=strcat('nodes',chrval(fid))
fext='dat'

/INQUIRE,rows1,LINES,%filename%,%fext%
*DIM,ntb,ARRAY,rows1,4
*VREAD,ntb,%filename%,%fext%,,JIK,4,rows1
(4F6.0)    !* read 4 real numbers with maximum 6 digits, use 6 if number is 10000

filename=strcat('elements',chrval(fid))

/INQUIRE,rows2,LINES,%filename%,%fext%
*DIM,etb,ARRAY,rows2,5
*VREAD,etb,%filename%,%fext%,,JIK,5,rows2
(5F6.0)

*do,i,1,rows1
n,ntb(i,1),ntb(i,2),ntb(i,3),ntb(i,4)
*enddo

*do,i,1,rows2
e,etb(i,1),etb(i,2),etb(i,3),etb(i,4)
*enddo

!=== Define element group 1
k=0
nElements=1
*do,i,1,rows2
nElements=nElements+1
*if,etb(i,5),eq,1,then
k=k+1
*endif
*enddo

*status,k
*status,nElements

ESEL,S,elem,,1,k
MPCHG,1,ALL
CM,MATRIX,ELEM

ESEL,S,ELEM,,k+1,nElements
MPCHG,2,ALL
CM,FILLER,ELEM

/SOL
ANTYPE,0,NEW
NLGEOM,1
NSUBST,1000,2000,10
AUTOTS,-1.0

ALLSEL,ALL

NSEL,S,LOC,X,0
D,ALL,UX,0

NSEL,S,LOC,Y,0
D,ALL,UY,0

NSEL,S,LOC,Y,100
CP,NEXT,UY,ALL
ALLSEL,ALL

filename=strcat('nlist',chrval(fid))
/INQUIRE,rows3,LINES,%filename%,%fext%
*DIM,ctb,ARRAY,rows3,3
*VREAD,ctb,%filename%,%fext%,,JIK,3,rows3
(3F6.0)

!=== couple top and bottom nodes for UX
*do,i,1,rows3
CP,NEXT,UX,ctb(i,2),ctb(i,3)
*enddo

*do,i,1,1     !* loop over three displacements

/SOL
u=100*i

NSEL,S,LOC,X,100
D,ALL,UX,u

ANTYPE,0
NLGEOM,1
!AUTOTS,ON
!DTIME,0.01,0.00001,0.1
!ARCLEN,ON
NSUBST,1000,2000,10

NLADAPTIVE,ALL,ADD,MESH,SHAPE,155
NLMESH,BDRA,50

!CUTCONTROL,DSPLIMIT,10e7

ALLSEL,ALL
SOLVE
FINISH

/POST1
PLDISP,1

NSEL,S,LOC,X,0
set,LAST
fsum
*get,fsum,FSUM,0,ITEM,Fx
force=fsum

filename=strcat('res',chrval(fid))

*if,i,eq,1,then
*cfopen,%filename%,txt,,
*else
*cfopen,%filename%,txt,,APPEND
*endif

*vwrite,u,force
(G16.8,G16.8)
*cfclose
tempname=strcat(chrval(fid),'-')
tempname=strcat(tempname,chrval(i))
filename=strcat('nodal_stress_x',tempname)
*cfopen,%filename%,txt,,
*do,xid,1,rows1
*set,strx
*GET,strx, node,xid,s,X
*vwrite,strx
(G16.8)
*enddo
*cfclose

filename=strcat('nodal_stress_y',tempname)
*cfopen,%filename%,txt,,
*do,xid,1,rows1
*set,stry
*GET,stry, node,xid,s,Y
*vwrite,stry
(G16.8)
*enddo
*cfclose

filename=strcat('nodal_stress_xy',tempname)
*cfopen,%filename%,txt,,
*do,xid,1,rows1
*set,strxy
*GET,strxy, node,xid,s,XY
*vwrite,strxy
(G16.8)
*enddo
*cfclose

FINISH
*enddo
/CLEAR

*enddo   !* end of outer loop