As far as I understood from the manuals, AOPT basically defines the local material coordinate system at the start of the simulation. This coordinate system (I suppose) is being updated during the course of the simulation. I am not sure yet on how this is being updated in LS-Dyna, at least in Abaqus they use the Hughes-Winget algorithm which computes a rotation increment tensor from the non-symmetric part of velocity gradient.
If you use the Ortho option, the deformation gradient is provided with respect to the above said material coordinate system and cauchy stress has to be returned with respect to the material coordinate system. So you have to be careful here with the transformation and definition of material coordinate system.
Back to your question, I will try to rephrase it, just to make sure I understood what you are looking for. You have 4 vectors m0, n0, a0 and b0, which are used in your energy function. Wherein, a0 and b0 can be computed from m0 and n0 using angle Phi.
Do vectors m0 and n0, and phi change due to deformation, i.e. do the vectors rotate once the element deforms?
I suggest that you provide the coefficients of these vectors wrt global coordinate system as material parameters (P1, P2,P3...) in the material card.
If they rotate and the value of phi changes during simulation, you should store the coefficient defined as material parameters in to history variables (hsv) at the start of the simulation. This could be easily done using an if loop.
If (tt .EQ. zero .or. ncycle .le. 3) then
hsv(x) = cm(x)
end if
tt is the total step time and ncycle the number of cycles. This is provided by dyna as default in subroutine.
When you change the number of history variables in your material card, the position of deformation gradient in the array changes. This is explained in Appendix A, subsection 'Deformation Gradient' in Keyword user manual. Make sure you take this in to consideration.
Hi @bhattarai, I have never worked with user-defined materials in LS-Dyna so I'm not sure how much I would be able to help. This is pretty high-level stuff you are dealing with here so it won't be a simple "here's your material model" type scenario. I have to ask: is there no available material that you could use instead?
@hem28 provided a great explanation for how to address your problem (more eloquently than I ever could).