Calculation of SMAX (maximal principal stress) in ABAQUS without using subroutine

Dear Abaqus users,

here is the problem I am solving. I have a 2 step static simulation - step 1 is mounting (bolt loads, additional loads representing mounting etc.) and step 2 is pressurization of the system (there are more parts in contact, but it is not very relevant). Now what I want to extract is the maximal principal stress as a field output that is generated by step 2.
Obviously, I created new field output where I can get SMAX_difA = SMAX_step2 - SMAX_step1. So I am getting the SMAX_difA as a difference between the SMAX in step 2 minus SMAX in step 1 and that is supposed to be what I want.

But! In general the SMAX stress is calculated from stress tensor (S11, S12, ..., S33) containing 6 independent scalar values. Principal stresses are basically eigenvalues of stress tensor. The computation of eigenvalues leads to need of solving the characteristic 3rd order equation.

Now another way of how to compute SMAX that should represent difference between the step 1 and step 2 arises, because in my opinion, the correct approach to calculate what I want is to extract S11_step2 - S11_step1 (and similarly for the remaining scalar components of stress tensor) and then out of these values calculate the SMAX_difB. Because I think that this SMAX_difB should be different (and also correct) from SMAX_difA.

Based on the above thoughts I would like to get SMAX_difB as a field output. What I did so far was that I got roots of the characteristic equation using stress invariants symbols (I1, I2, I3) in Python, so I have the expressions I can convert into S_ii expression. So I have 3 roots for SMIN_difB, SMID_difB and SMAX_difB. So I could say that for each element the root number 3 will be SMAX_difB, but obviously that's not the case, because in general the real value of max principal stress can be root number 2 or root number 1 (they are not sorted). And I can't do operations like IF, LT, GT, MAX in Create Field Output dialog. It seems very odd that Abaqus wouldn't handle such an operation, I mean in the past I was working in Ansys and it was possible to create new user defined result and do this trick.

Is there any elegant way how to get field output the way I wanted without using subroutines? Did anyone have similar problem? Are my thoughts correct and if not, where am I wrong?

Best regards,

Vaclav Homola