I want to use user subroutine hooklw to calculate materials with different material properties between tension and compression.
Perhaps I think whether it will be branched by the if statement by judging whether pulling or compression is caused by the distortion value in the iterative calculation, but it does not work.
Hooklw cannot define material property for compression and tension. You may try hypoelastic NLELAST model which uses stress-strain curve for compression and tension. Attached please find an example.