How to run a UMAT writtten in c++ for a job using Abaqus?

  abaqus, c++

I have written a simple Linear elastic UMAT. But i couldnt find anything on how to run this for a job in ABAQUS.For example if i have a job called jobUser and the name of the UMAT is Umat.cpp what is the command for running these two together.Is it something like "abaqus job=jobUser user=Umat.cpp"

#include <aba_for_c.h>

extern "C" void umat_(double *stress, double *statev, double *ddsdde, double *sse, double *spd,
    double *scd, double *rpl, double *ddsddt, double *drplde, double *drpldt,
    double *stran, double *dstran, double *time, double *dtime, double *temp,
    double *dtemp, double *predef, double *dpred, char *cmname, int *ndi,
    int *nshr, int *ntens, int *nstatv, double *props, int *nprops, 
    double *coords, double *drot, double *pnewdt, double *celent, double *dfgrd0, 
    double *dfgrd1, int *noel, int *npt, int *layer, int *kspt, 
    int *jstep, int *kinc)
 {  

double E = props[0]; //210000
double NU = props[1]; //0.3
double G = E/2.0/(1.0 + NU); //80769,23
double LAMBDA = 2.0*G*NU/(1.0 - 2.0*NU);//121153,85
double eps [6];
double eps_trace;

// Update strain
    for (int i = 0; i < 6; i++)
{
    eps[i] = stran[i] + dstran[i];  
}

eps_trace = eps[0] + eps[1] + eps[2];

 //Calculation of the stress
for(int i = 0; i < 3; i++)
{
    stress[i] = LAMBDA*eps_trace + 2.0*G*eps[i];
    stress[i+3] = G*eps[i+3];
}
}

Could anyone say is there anything wrong in the above code.
or Should we create a object file for the umat.cpp if so how to create it?

Source: Windows Questions C++

LEAVE A COMMENT