General Mechanical

General Mechanical

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

UPFs – How to call the user-defined failure criteria subroutine in APDL?

    • AMFCB
      Subscriber

      My question is regarding user-defined failure criteria in Ansys. To test this feature, I modified the file "userfc.F" to the maximum stress criteria. I then linked this subroutine with ANSYS and created a custom ANSYS.exe file. Now when I run this custom .exe from the APDL launcher, how do I call this user subroutine? For instance, if I were to call the maximum stress criteria directly, I would use:

      TB,DMGI,mat#,,4,FCRT

      TBDATA,1,2,2,2,2

      where, 2 is the maximum stress criteria, and this works well. According to Ansys APDL Material reference, 11-19 are user-defined criteria #1 to user defined criteria #9, but it does not work when I use 11 instead of 2 (see command below):

      TBDATA,1,11,11,11,11

      What am I missing?

    • John Doyle
      Ansys Employee
      With regards to using " TBDATA,1,11,11,11,11", you report that "...it does not work"
      What exactly is not working? Are you getting an error message? If so, what is the message?

    • AMFCB
      Subscriber
      I am not getting an error message, but the results are not right. There is no property degradation and the results are similar to a linear elastic analysis. The stress distribution, if it were coreect, would have been similar to using "TBDATA,1,2,2,2,2". For reference, here is what I modified in the file userfc.F:
      #include "impcom.inc"
      c
      external vmax, vzero
      integerelem,matlay,iott, nfcOut, iloc
      double precision
      xeps(6),sig(6), fc(9),tem,elim(*),slim(*), vmax,vect(9)
      c
      c
      c- nfcOut must be set to 1 or greater if the user subroutine is to be used (see example below)
      cnfcOut = 0
      c
      c
      cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      c **** dummy code to avoid analyzer messages. Should be removed by programmer: commented out
      cfc(1) = tem*elim(1)*eps(1)*sig(1)*slim(1)*elem*iott*matlay
      ccall vzero (vect(1), 9)
      c fc(1) =vmax (vect(1),9,iloc)
      c
      cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
      c**** Example to demonstrate user failure criterion coding ****
      c******* maximum stress criterion*******
      nfcOut = 1
      vect(1) = sig(1)/slim(1)
      vect(2) = sig(1)/slim(2)
      vect(3) = sig(2)/slim(3)
      vect(4) = sig(2)/slim(4)
      vect(5) = sig(3)/slim(5)
      vect(6) = sig(3)/slim(6)
      vect(7) = (abs (sig(4)))/slim(7)
      vect(8) = (abs (sig(5)))/slim(8)
      vect(9) = (abs (sig(6)))/slim(9)
      fc(1) = vmax (vect(1),9,iloc)
      cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
Viewing 2 reply threads
  • The topic ‘UPFs – How to call the user-defined failure criteria subroutine in APDL?’ is closed to new replies.