General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Cannot converge during simple 2 mateirals non linear large displacement problem

    • Yunpeng Wu
      Subscriber

      I'm trying to doing a simple 2 materials non linear large displacement problem, assigned 2 materials, and a 100*100 element 2D square, do a displacement UX=200 on the right hand side of the square.

      It can be done, when I assign the same material for all the element, but can't converge with 2 materials. 

      Can you help me to check what happens or give me some tips or advices?

      Here is for 1 material.

      Here is for 2 materials:

      FINISH
      /CLEAR

      *do,fid,1,1

      /PREP7  

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

      TB,HYPE,1,1,5,MOON  
      TBTEMP,0
      TBDATA,,-1.4516,1.8669,1.5083,-4.3864,3.8062,0

      !==== Define material 2
      ET,2,PLANE182
      MP,EX,2,0.6
      MP,NUXY,2,0.3

      /PREP7  

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

      *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,200,1000,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=200*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,100,2000,10  

      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

       

       

      Here are the link of element and node files, it can load by the APDL code directly. The verison is APDL 2021 R1.

      https://drive.google.com/drive/folders/1jy9AVwywknckaawVl_8z1B_ofg_1Lfk-?usp=sharing

    • Yunpeng Wu
      Subscriber

      Here are the link of element and node files, it can load by the APDL code directly. The verison is APDL 2021 R1.

      https://drive.google.com/drive/folders/1jy9AVwywknckaawVl_8z1B_ofg_1Lfk-?usp=sharing

Viewing 1 reply thread
  • The topic ‘Cannot converge during simple 2 mateirals non linear large displacement problem’ is closed to new replies.