Topic: error in assembly - AbaqusUserElement for OOFEM

Dear all,
I tried to implement an interface in OOFEM for User Element written for Abaqus. I developed the class abaqususerelement.C and it seems to work fine (array dimensions and passed variables are ok).
Now I'm testing the code, but I'm not able to start a simple linear static analysis. I'm using the following input deck:

spring2.out
test for abaqus user element interface
LinearStatic nsteps 1
domain 3dShell
OutputManager tstep_all dofman_all element_all
ndofman 2 nelem 1 ncrosssect  1 nmat 1 nbc 3 nic 0 nltf 1
node 1 coords 3 0.  0.  0. bc 6 0 0 0 0 0 0 load 1 3 
node 2 coords 3 1.  0.  0. bc 6 0 0 0 0 0 0
#
abaqususerelement 1 nodes 2 1 2 coords 3 dofs 3 3 2 1 numsvars 52 properties 44 1.7846   23.7743   0.2283   27.7141   -0.2283   3.1666   0.75833   0.925   64   0.3   0.6   1   0   0.000253   -0.01833   0.56666   1.0666   1   0   10.0   10.0   0.3   19.268   23.7743   2.6995   19.268   0.40133   23.4716   -0.40133   2.1666   0.75   0.90833   24   0   0.8   -1000000   8   0.85   1   -0.30833   1   0   0.000253   1.5 type 3002 uel U1126F.dll
#
SimpleCS 1 area 0.1575 Iy 0.002657812 Iz 0.001607812 Ik 0.003606447115384616 beamShearCoeff 1.e30
IsoLE 1 d 1. E 25.e6 n 0.15 tAlpha 1.2e-5
BoundaryCondition  1 loadTimeFunction 1 prescribedvalue 0.0
ConstantEdgeLoad 2 loadTimeFunction 1 Components 6 0.0 0.0 3.0 0.0 0.0 0.0 loadType 3 ndofs 6
NodalLoad 3 loadTimeFunction 1 Components 6 0.0 0.0 15.0  0. 0. 0.
PeakFunction 1 t 1.0 f(t) 1.

and I get the following error:

____________________________________________________
           OOFEM - Finite Element Solver
        Copyright (C) 1994-2014 Borek Patzak
____________________________________________________
Total number of solution steps     1
***ELEMENTO        1 INIZIALIZZATO
_______________________________________________________
Error: (skyline.C:220)
In Skylineoofem::Skyline::assemble:
dimension of 'mat' and 'loc' mismatch
_______________________________________________________
No backtrace available
Total 1 error(s) and 0 warning(s) reported
oofem exit code 1

which seems to be a general error during assembly of the stiffness matrix; I tried to solve it but without success, I cannot understand the error. In attachment you can find the code for abaqususerelement, the DLL (it has been compiled on windows) with the UEL routine and the input deck.
Please help me

I wish to contribute to oofem development by including the attached abaqususerelement code in the GIT repository, accordingly to the oofem license, once the reported issue will be solved.

Post's attachments

abaqusUserElement.zip 401.92 kb, 2 downloads since 2014-05-13 

You don't have the permssions to download the attachments of this post.

Re: error in assembly - AbaqusUserElement for OOFEM

The problem is that the matrix you want to assemble doesn't have the same size as the location vector.
The location array vector is automatically computed from the dofidmask-functionality that  the element supplies (giveDofManDofIDMask)

I don't have time to check your code right now, but I can guess that you meant to do from

nodes 2 1 2 coords 3 dofs 3 3 2 1

So, "loc" should then become the equation numbers [3, 2, 1, 6, 5, 4]
and "mat" should be a 6 by 6 matrix.
Since this is linearstatic, the only matrix that should be assembled is the elastic tangent, so, just before skyline.C:220 i would simply add a

loc.printYourself(); 
mat.printYourself();

to see what is going on.

Re: error in assembly - AbaqusUserElement for OOFEM

Thanks, I added to my code the following:

    void AbaqusUserElement::giveDofManDofIDMask(int inode, EquationID ut, IntArray &answer) const
    {
        answer.resize(nCoords);
        int dofID = 0;
        for (int i = 0; i < nCoords; i++)
        {
            int curDof = this->dofs(i);
            switch (curDof)
            {
            case 1: dofID = D_u; break;
            case 2: dofID = D_v; break;
            case 3: dofID = D_w; break;
            case 4: dofID = R_u; break;
            case 5: dofID = R_v; break;
            case 6: dofID = R_w; break;
            }
            answer(i) = dofID;
        }
    }

I'll start debugging...

Re: error in assembly - AbaqusUserElement for OOFEM

It seems like you are just doing:

    answer = dofs;

are you not?

Re: error in assembly - AbaqusUserElement for OOFEM

Yes, you're right, I've noticed right now that, in the results I get, the reactions are 10 times the displacement. Then I'm misanderstanding something...
The loc array is now [3, 2, 1, 9, 8, 7] and mat is 6x6. The element connects 2 nodes with 6 dofs, then mat should be assembled in a 12x12 matrix. The input file I posted is wrong, the lines have to be corrected like this:

spring2.out
test for abaqus user element interface
LinearStatic nsteps 1
domain 3dShell
OutputManager tstep_all dofman_all element_all
ndofman 2 nelem 1 ncrosssect 1 nmat 1 nbc 2 nic 0 nltf 1
node 1 coords 3 0.  0.  0. bc 6 0 0 0 1 1 1 load 1 2
node 2 coords 3 1.  0.  0. bc 6 1 1 1 1 1 1
#
abaqususerelement 1 nodes 2 1 2 coords 3 dofs 3 3 2 1 numsvars 52 properties 44 1.7846   23.7743   0.2283   27.7141   -0.2283   3.1666   0.75833   0.925   64   0.3   0.6   1   0   0.000253   -0.01833   0.56666   1.0666   1   0   10.0   10.0   0.3   19.268   23.7743   2.6995   19.268   0.40133   23.4716   -0.40133   2.1666   0.75   0.90833   24   0   0.8   -1000000   8   0.85   1   -0.30833   1   0   0.000253   1.5 type 3002 uel U1126F.dll
#
SimpleCS 1 area 0.1575 Iy 0.002657812 Iz 0.001607812 Ik 0.003606447115384616 beamShearCoeff 1.e30
IsoLE 1 d 1. E 25.e6 n 0.15 tAlpha 1.2e-5
BoundaryCondition  1 loadTimeFunction 1 prescribedvalue 0.0
# ConstantEdgeLoad 2 loadTimeFunction 1 Components 6 0.0 0.0 0.0 0.0 0.0 0.0 loadType 3 ndofs 6
NodalLoad 2 loadTimeFunction 1 Components 6 1.0 1.0 1.0  0. 0. 0.
PeakFunction 1 t 1.0 f(t) 1.

Re: error in assembly - AbaqusUserElement for OOFEM

In the case you have now described you should get;
[3,2,1,0,0,0]
since the rest are prescribed.

The element doesn't will normally not care which other DOF might exist in nodes. In OOFEM, you can for example connect a beam to the same node as a solid, and they will share the displacement dofs, and nothing else.
Edit: Forgot to mention: The element is connected to 3 dofs in each node. "mat" should be 6x6. The final assembled skyline-matrix should be 3x3 since the rest are prescribed.

----------


I'm not sure why you are adding the rotation dofs, then just prescribing them?

I would recommend

spring2.out
test for abaqus user element interface
LinearStatic nsteps 1
# If you use sets to specify b.c. then the domain type will be ignored, just like it should be.
domain 3d
OutputManager tstep_all dofman_all element_all
ndofman 2 nelem 1 ncrosssect 1 nmat 1 nbc 2 nic 0 nltf 1 nset 2
node 1 coords 3 0.  0.  0.
node 2 coords 3 1.  0.  0.
#
abaqususerelement 1 nodes 2 1 2 coords 3 dofs 3 3 2 1 numsvars 52 properties 44 1.7846   23.7743   0.2283   27.7141   -0.2283   3.1666   0.75833   0.925   64   0.3   0.6   1   0   0.000253   -0.01833   0.56666   1.0666   1   0   10.0   10.0   0.3   19.268   23.7743   2.6995   19.268   0.40133   23.4716   -0.40133   2.1666   0.75   0.90833   24   0   0.8   -1000000   8   0.85   1   -0.30833   1   0   0.000253   1.5 type 3002 uel U1126F.dll
#
SimpleCS 1 area 0.1575 Iy 0.002657812 Iz 0.001607812 Ik 0.003606447115384616 beamShearCoeff 1.e30
IsoLE 1 d 1. E 25.e6 n 0.15 tAlpha 1.2e-5
BoundaryCondition 1 loadTimeFunction 1 dofs 3 1 2 3 values 3 0. 0. 0. set 2
NodalLoad 2 loadTimeFunction 1 Components 6 1.0 1.0 1.0  0. 0. 0. set 1
PeakFunction 1 t 1.0 f(t) 1.
Set 1 nodes 1 1
Set 2 nodes 1 2

where the domain type is just a dummy value for now (the "domain" line will be removed complete in future versions of OOFEM)

DOFs are determined by asking the elements, or by manually adding them to nodes if necessary (for example, rigid arm nodes might have no elements connected)

7 (edited by johnnyontheweb 19-05-2014 20:41:46)

Re: error in assembly - AbaqusUserElement for OOFEM

Thanks for the reply. Now it seems to be all fine, we added the code to store and re-read the state variables SVARS.

First problem: we need to use the line:

NonLinearStatic nsteps 10 deltat 0.1 rtolv 1.e-6 stiffMode 1 controlmode 1 refloadmode 1 maxiter 10

with the flag "refloadmode 1", to use the total reaction out from the routine... is it right? Did I misunderstand something? I supposed the code to work without it ...

Another problemar static analysis: oofem does not apply the prescribed load with its full value: oofem needs 11 step complete. In attachment the out file for 10 steps. Why does the first step is counted into the total step number?
Maybe a strange question, but abaqus behaves differently.

Thanks

Post's attachments

spring3.out 14.5 kb, 2 downloads since 2014-05-19 

You don't have the permssions to download the attachments of this post.

Re: error in assembly - AbaqusUserElement for OOFEM

Short answer: Yes, you should probably always have "refloadmode 1".
Elements should (preferably) respect the ValueMode that's passed to some functions, which might be VM_Total and VM_Incremental (such as the function that computes the external forces).
However, it is of course possible to write code that ignores this argument, and always treats it as if it was VM_Total that is passed. In those cases, you get very strange results.
I'm of the position that we should remove the need for the incremental load vector and handle reference loads / indirect load control in a different way, because it is in the way of supporting remeshing and other vital things for advanced analysis.



Then we have time-stepping, which is (can be) unique to every engineering model.
Some engineering models have the first time-step target the time +deltaT, while others have the first step target time zero  (meaning the initial conditions where applied at time "-deltaT")
I guess it's up for debate which is better, but that probably explains why you needed the extra step.
It's quite unfortunate that this is inconsistent (LinearStatic and Nonlinearstatic doesn't do the same thing here if I recall correctly).