We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

Residual stress and LTB check

    • mohammed.ismail.ul.haq
      Subscriber


      I have an issue with INISTATE command in Ansys Mechanical apdl, where i apply linear varying stress i tried checking through Inistate list command , but the stress dont seem to vary linearly , not sure how to go about, the task is LTB check in angled section non linear.
      i am not sure about the entire code as well am i progressing in right direction , plus the code works in only this specific order other wise ansys crashes , I need any tips on how to progress , BMD for Solid  to get critical moment MCR. IF posssible please let me know how to improve the code as well.

      !!=======Material parameters (steel)==========
      /CLEAR,START
      /FILNAME,L_section,1
      /UNITS,SI
      /COM, Structural
      E_STEEL=2.1e11 !n/m^2
      NU_STEEL=0.3
      DENS_STEEL=7850
      f_y =235000000 !n/m^2

      !!========Modelling=========

      !*clear
      /prep7

      !!======Element Type=======

      ET,1,SOLID186
      !DOF,UX,UY,UZ,ROTX,ROTY,ROTZ

      !!=======Material Properties=======

      mp,ex,1,E_STEEL
      mp,prxy,1,NU_STEEL
      mp,dens,1,DENS_STEEL

      !!========Geometric properties=======

      Total_Length=1 !!!LENGTH 1M
      Length_leg= 0.25 !!!EQUAL ANGLED
      Thickness_leg=0.02 !!!THICKNESS OF LSECTION
      Radius_1=0.018
      Radius_2=0.009


      !!========Define keypoints========

      k,1,0,0,0
      k,2,Thickness_leg,0,0
      k,3,Length_leg,0,0
      k,4,Length_leg,Thickness_leg,0
      k,5,Thickness_leg,Thickness_leg,0
      k,6,Thickness_leg,Length_leg,0
      k,7,0,Length_leg,0
      k,8,0,Thickness_leg,0

      !!========Lines=========

      LSTR, 7, 6
      LSTR, 7, 8
      LSTR, 5, 6
      LSTR, 8, 1
      LSTR, 1, 2
      LSTR, 5, 4
      LSTR, 4, 3
      LSTR, 3, 2

      LFILLT,1,3,Radius_2,0,
      LFILLT,6,7,Radius_2,0,
      LFILLT,3,6,Radius_1,0,
      GPLOT

      !!=========Area=========
      LSEL,S,LINE,,1,11 !!(AL COMMAND NOT WORKING SO USING LSEL TO SELECT ALL LINES AND PLOTING AREA)
      AL,ALL
      ALLS

      !!========Extrude Volume========
      VEXT,1, , ,0,0,Total_Length,,,
      ESYS, 0


      !!=======Meshing========
      ASEL,S,AREA,,1,2,1
      !AESIZE, ALL, LENGTH_LEG/50,
      AESIZE, all, Length_leg/50,
      ALLSEL,ALL

      EXTOPT,VSWE,AUTO,0 !SPECIFY SOURCE AND TARGET SURFACE FOR SWEEP
      EXTOPT,ESIZE,50

      TYPE,1
      MAT,1
      MSHAPE,0,3D
      MSHKEY,1
      ALLSEL,ALL
      Vsweep,ALL,1,2,1

      /SOL
      ! ========Bolts ========
      Bolt1_x = Thickness_leg*4
      Bolt1_z = Thickness_leg*5
      Bolt_dia = Thickness_leg

      !BLOCK, Bolt1_x, Bolt1_x+ Bolt_dia,0,Thickness_leg, Bolt1_z, Bolt1_z+ Bolt_dia
      Nsel,s,loc,x, Bolt1_x, Bolt1_x+Bolt_dia
      Nsel,r,loc,z, Bolt1_z, Bolt1_z+ Bolt_dia
      D,ALL,,,,,,UX,UY,UZ
      ALLSEL,ALL

      Nsel,s,loc,x,(Length_leg-Bolt1_x), (Length_leg-Bolt1_x)+Bolt_dia
      Nsel,r,loc,z, Bolt1_z, Bolt1_z+ Bolt_dia
      D,ALL,,,,,,UX,UY,UZ
      ALLSEL,ALL

      Nsel,s,loc,x, Bolt1_x, Bolt1_x+Bolt_dia
      Nsel,r,loc,z, (Total_Length-Bolt1_z),(Total_Length-Bolt1_z)+ Bolt_dia
      D,ALL,,,,,,UX,UY,UZ
      ALLSEL,ALL

      Nsel,s,loc,x,(Length_leg-Bolt1_x), (Length_leg-Bolt1_x)+Bolt_dia
      Nsel,r,loc,z, (Total_Length-Bolt1_z),(Total_Length-Bolt1_z)+ Bolt_dia
      D,ALL,,,,,,UX,UY,UZ
      ALLSEL,ALL
      !!====CONSTraints AT EDGE LINE

      LSEL,S,LINE,,19,20
      NSLL,S,1
      D,ALL,,,,,,UX,UY ! should not be ux constrained instead of uz?
      ALLSEL,ALL

      !!====CONSTARINT AT EDGE LINE
      LSEL,S,LINE,,5
      LSEL,A,LINE,,8
      CM,LINE_1,LINE
      CMSEL,S,LINE_1,LINE
      NSLL,S,1
      D,ALL,,,,,,UX,UY,UZ
      ALLSEL,ALL
      GPLOT

      NSEL,ALL
      ACEL,0,-9.8,0


      !!====imperfection============
      /SOL
      antype,static
      !PSTRES,1
      Outres,all,all
      allsell,all
      solve
      finish

      /post1
      pldisp,1
      finish

      /sol
      antype,buckle
      bucopt,lanb,2
      mxpand,2,,,yes
      solve
      finsh
      /post1
      set,first
      pldisp,1
      set,next
      pldisp,1
      finish

      /prep7
      upgeom,0.001,1,1,L_section,rst !0.01 is the scale factor which can be varied thus varing geometery

      !!=======Material Properties=======

      !elastic part

      !plastic
      TB,BISO,1,1,2
      TBTEMP,0
      TBDATA,,f_y,0,,,,

      !===residual stress========

      /SOL
      !initial stress for the second part
      NSEL,S,LOC,Y,0,Length_leg/2
      NSEL,R,LOC,X,0,0.1*Thickness_leg
      INISTATE,SET,DATA,FUNC
      INISTATE,SET,DTYP,STRE
      INISTATE,define,ALL,,,,LINY,(-0.22*f_y),((0.92*f_y)/Length_leg)

      !initial stress for the first part
      NSEL,S,LOC,Y,Length_leg/2,Length_leg
      INISTATE,SET,DATA,FUNC
      INISTATE,SET,DTYP,STRE
      INISTATE,define,,,,,LINY,(0.73*f_y),((-0.98*f_y)/Length_leg)


      !initial stress for the third part
      NSEL,S,LOC,X,0,Length_leg/2
      NSEL,R,LOC,Y,0,Thickness_leg
      INISTATE,SET,DATA,FUNC
      INISTATE,SET,DTYP,STRE
      INISTATE,define,,,,,LINX,(-0.22*f_y),((0.92*f_y)/Length_leg)

      !initial stress for the forth part
      NSEL,S,LOC,X,Length_leg/2,Length_leg
      NSEL,R,LOC,Y,0,Thickness_leg
      INISTATE,SET,DATA,FUNC
      INISTATE,SET,DTYP,STRE
      INISTATE,define,,,,,LINX,(0.73*f_y),((-0.98*f_y)/Length_leg)


      !!===LOADING CONDITIONS=====
      force_12 = 5000 ! the value of the load
      NSEL,S,LOC,Z,0,0
      *GET, N_COUNTz, NODE,,COUNT
      load_1=force_12/N_COUNTz
      f,all,fz,load_1
      allsel,all

      NSEL,S,LOC,Z,Total_Length,total_length
      *GET, N_COUNTd, NODE,,COUNT
      load_2=force_12/N_COUNTd
      f,all,fz,-load_2
      allsel,all


      !===nonlinear analysis============


      /sol

      ANTYPE,0,new
      NLGEOM,1
      NSUBST,100,1000,50
      NEQIT,1000
      OUTRES,ERASE
      OUTRES,ALL,ALL
      solve

    • Ashish Khemka
      Forum Moderator

      Hi,

      When you apply an initial condition then can you try to see if the response is linear for a linear model. For example a bar stretched in elastic region initially will try to regain its shape. Does you see a similar behavior if you simplify the model. This may be a simple check for the model setup.

      Regards,

      Ashish Khemka

    • mohammed.ismail.ul.haq
      Subscriber

      Ashish Khemka sir , thank you for your reply will try this 

Viewing 2 reply threads
  • The topic ‘Residual stress and LTB check’ is closed to new replies.