In ABAQUS you can easily do that using UMAT (User defined material subroutine). However, in ANSYS, I was not familiar with if you can define user material model, but a simple google search tells me that in ANSYS also you can define the same (http://www.ansys-blog.com/davide-usermat-blog/http://www.ansys-blog.com/davide-usermat-blog/). Hope this helps.