hexagon logo

Implementing user defined services UFAIL and UPROGFAIL together with multiple failure indices

Hi everyone, I'm working on implementing a user defined failure criteria for a composite progressive failure analysis using both the UFAIL and UPROGFAIL subroutines. As a first step to test things out, I wrote and implemented the failure criteria using the ext_ufail template. I was able to do so successfully, but noted that the required outputs per the user defined service manual are as follows:
 
Required Output:
failc (1) is user-defined failure criteria.
failc (2) is user-defined strength ratio (allowable stress/actual stress).
error_code is returned error code, 0 = success, otherwise fail.
 
In the case of my failure criteria, I have separate fiber and matrix failure modes (similar to the puck and hashin failure criteria implemented in nastran using MATF). However, the required outputs in the UDS manual imply that only a single scalar failure index can be returned from the ext_ufail subroutine. On the other hand the template for ext_uprogfail has an input variable "fi", which is described as an array of current failure indices (of length six).
 
How would one go about returning multiple failure criteria from the ufail subroutine (e.g. fiber and matrix failure) as inputs to the ext_uprogfail subroutine?