Im writing a UMAT for hyperelastic material model and having some problem on the differentiation of hyperelastic free energy potential (per unit volume) in order to yield the nominal stress-stretch ratio relationship.

Let the boundary condition for a planar deformation be lamda_1=lamdaS, lamda_2=1, and lamda_3=1/lamdaS. Assumption of incompressibility and lamda_i denoted the 3 principal stretch ratios.

Here come to the question of differentiating the strain energy function with respect to lamda.

If I partial differentiate the strain energy function with respect to each of the 3 principal stretch ratio, once substituted with the boundary condition for planar deformation, it produces the nominal stress-stretch ratio relationship where at stretch ratio = 1, nominal stress not equal 0.

If I substitue the boundary condition prior to differentiating the strain energy function, it yield the expected nominal stress-stretch ratio response where at stretch ratio = 1, nominal stress = 0.

However, in a senario where I dont know how an element will deform or dont know what deformation mode will involve, I cant subsitute any boundary condtion prior to differentiating the strain energy function. Should I partial differentiate the strain energy function to produce a relationship for principal nominal stress-stretch ratio in advance and evaluate the stretch ratio (from deformation gradient tensor) to be substitute later?

Anybody have any suggestion? Many thanks.