Ansys Learning Forum › Forums › Discuss Simulation › General Mechanical › UPFs – How to call the user-defined failure criteria subroutine in APDL? › Reply To: UPFs – How to call the user-defined failure criteria subroutine in APDL?
July 27, 2021 at 4:34 pm
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
#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