Re: Invalid pointer when using umat

These

FloatArray stress = ms->giveStressVector();
FloatArray strain = ms->giveStrainVector();

are both the last converged values for the stress and strain. The values in the material status (ms) are overwritten by the temporary values at the end of a time-step.

The value passed to the OOFEM function

void AbaqusUserMaterial :: giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp,
                                                   const FloatArray &reducedStrain, TimeStep *tStep)

reducedStrain, is the current guess, which might end up being the converged value after the residual is checked and the time-step is finalized in OOFEM.

Re: Invalid pointer when using umat

johnnyontheweb wrote:

In my UMATs, that seems to perfectly works in Abaqus, the array STRAN contains the newest strains, and DSTRAN the current increment. I never added the DSTRAN to the strains to obtain the current strain. Abaqus manual confirms that and I'm pretty sure about that.

Yeah I can confirm that. In ABAQUS one can directly work with the STRAN variable.

johnnyontheweb wrote:

On the contrary, STRESS needs to be updated by the user, and the value passed into the routine in my experience is not always the previous converged stress; it's a good thing to keep the last converged stress in your STATEV.

That's interesting. I never had problems using the STRESS variable. Unfortunately the manual is a bit ambiguous.

ABAQUS Manual wrote:

This array is passed in as the stress tensor at the beginning of the increment and must be updated in this routine to be the stress tensor at the end of the increment.

This can either be the converged STRESS of the last load/time-increment or what I always assumed till today: The solution of the newest/last newton increment, which is not the converged solution. 
This is what I assumed for the STRAINS too, and therefore I was a bit confused in the beginning with the discussion with Mikael.

So my guess for compatibility with ABAQUS is the pass the newest strain (basically STRAN+DSTRAN at the moment) to the UMAT. I am not 100% sure about the stresses, but I will take a deeper look at it this week. And find out if it's the converged stress or the newest stress.

By the way: Thanks Mikael for the UMAT interface (and of course all the developers for this nice project). It's a really good idea, especially for teaching. So we can teach the students something demanded by companys, but also show them the power of open source. Bonus for us: We don't need so many (expensive) ABAQUS licenses. Bonus for them: They can do the simulations on their own computers at home....

Re: Invalid pointer when using umat

I'm handing in my dissertation to the printers today, so.. in a few days I might have time to correct these things in the repository.
I don't know why i never sent the newest strain before. I probably just missed it. Still, I wanted to make sure what the correct behavior was before changing any more.


There are still a few things missing from umat support in OOFEM.
In abaqus I think you have access to helper functions for computing eigenvalues or something like that. We need to add those symbols in OOFEM as well.
Help with those are appreciated.

Re: Invalid pointer when using umat

SLiebenstein, what do you mean exactly when you say "newest stress"?
I'll do some tests too.

I want me too to thank Mikael for the umat interface, in my opinion is one of the most interesting features of oofem and allow to migrate from Abaqus smmothly.

Re: Invalid pointer when using umat

johnnyontheweb wrote:

SLiebenstein, what do you mean exactly when you say "newest stress"?
I'll do some tests too.

I mean the Stresses from the last newton increment.  After each converged timestep we start our non-linear iteration again. I thought that Abaqus saves the value of the previous newton increment, not the values of the previous converged load-step.
Of course in the beginning of each load-step STRESS is the converged value (if this sentence confused more than helps: ignore it smile )

Mikael Öhmann wrote:

There are still a few things missing from umat support in OOFEM.
In abaqus I think you have access to helper functions for computing eigenvalues or something like that. We need to add those symbols in OOFEM as well.
Help with those are appreciated.

I'm willing to support you a bit. OOFEM is not the main program I'm working with, but I really like it for teaching though.
I have a working ABAQUS copy so I can definitely double check everything with ABAQUS. Just contact me if you need something (PM for e-mail if you want).

Re: Invalid pointer when using umat

Hello,
   I downloaded the case and ran it, but there was something wrong. As follows:

$ ./oofem -f UMAT_isotrop-elast.in

____________________________________________________
           OOFEM - Finite Element Solver
        Copyright (C) 1994-2017 Borek Patzak
____________________________________________________
_______________________________________________________
Error: (/home/zhanglei/oofem/oofem.git/src/sm/Materials/abaqususermaterial.C:82)
Input error on line 20: "Bad format", field keyword "properties"
In function AbaqusUserMaterial::initializeFrom
Record:"abaqususermaterial 1 d 1. numstate 1  properties 0.1 umat umat.so   "
_______________________________________________________
stack trace:
Total 1 error(s) and 0 warning(s) reported
oofem exit code 1

  Maybe I didn't link the umat library "umat.so"correctly. In fact, I'm not familiar with cmake and not clear how umat is using. I list what I understand about introduing new material behavior by umat subroutine. Comments and correction are welcomed.
1.Initially, write umat subroutine and name material.f.
2.Run fortran -fPIC -shared -Wl,-soname,umat.so -o umat.so material.f
3.Link the umat.so. Should I modify the CmakeLists.txt and recompile oofem?
4.Creat a .in file. But where's the abaqususermaterial's recored format?
5.Run .in file.

  Thank you in advance for any help you can offer.

32 (edited by nitramkaroh 22-07-2019 20:38:40)

Re: Invalid pointer when using umat

Hi,

There is a problem with the input format of properties. The first number should be the length of the array. What should the properties of the model be? Can you upload the input file?