Skip to main content

why does not my subroutine work?

Submitted by hunanyangdong on

Hello, Everyone!

     This is the first time that I come here to ask for help,so I wish that I can get the answer!

     I'm modeling with ABAQUS, My problem is how to use a subroutine which contains two external functions ?I need your help, Thank you!

       SUBROUTINE UTRACLOAD(ALPHA,T_USER,KSTEP,KINC,TIME,NOEL,NPT,

     1 COORDS,DIRCOS,JLTYP,SNAME)

C

      INCLUDE 'ABA_PARAM.INC'

C

      CHARACTER*80 SNAME

      DIMENSION T_USER(3), TIME(2), COORDS(3), DIRCOS(3,3)

     

      pi=2.*ASIN(1.0)

      ALPHA=200*pulse(TIME(1))+10*pulse_u(TIME(1))

      T_USER(1)=1

      T_USER(2)=0

      T_USER(3)=0 

           

      RETURN

      end

     

      function pulse(t)

      pulse=0.0

      if(t.ge.0.and.t.le.0.50)then

      pulse=4*pi*cos(4*pi*t)-4*pi*cos(8*pi*t)

      else

      pulse=0.0

      endif

      end function

     

      function pulse_u(t)

      pulse_u=0

      if(t.ge.0.and.t.le.0.50)then

      pulse_u=sin(4*pi*t)-0.5*sin(8*pi*t)

      else

      pulse_u=0.0

      endif

      end function

     

Can you be more specific about the problem. At a first glance your code seems to be ok. Also,if it was the question, you can place any number of subroutines in .f file which you 'give' to ABAQUS. Functions with predefined names (like UMAT,UTRACLOAD ... ) are linked to ABAQUS and used in the analysis providing corresponding options are set in the model. Other functions are also linked to project and are used only if called from mentioned predefined functions.

Fri, 04/15/2011 - 05:04 Permalink