00001 #include <math.h> 00002 #include "lemaitre.h" 00003 #include "global.h" 00004 #include "matrix.h" 00005 #include "vector.h" 00006 #include "intpoints.h" 00007 00008 00009 00010 lemaitre::lemaitre (void) 00011 { 00012 eta=0.0; m = 0.0; n = 0.0; 00013 } 00014 00015 lemaitre::~lemaitre (void) 00016 { 00017 00018 } 00019 00020 void lemaitre::read (XFILE *in) 00021 { 00022 xfscanf (in,"%lf %lf %lf",&eta,&m,&n); 00023 } 00024 00025 double lemaitre::gfun (double f,double cs) 00026 // ramp function 00027 // f - yield function 00028 // cs - cumulative irreversible strain 00029 // 28.10.2001 00030 { 00031 double g; 00032 00033 if (f>0.0){ 00034 if (cs<Mp->zero) g=eta*pow(f,n); 00035 else g=eta*pow(cs,m)*pow(f,n); 00036 } 00037 else{ 00038 g=0.0; 00039 } 00040 00041 return g; 00042 } 00043 00044 /* 00045 void lemaitre::nlstresses (long ipp,long ido) 00046 // 29.10.2001 00047 { 00048 long i,ncomp=Mm->ip[ipp].ncompstr,ncomph=1; 00049 double dt; 00050 vector sig(ncomp),q(ncomph),epsn(ncomp),epso(ncomp),epsp(ncomp); 00051 matrix d(ncomp,ncomp); 00052 00053 if (Mp->phase==1){ 00054 // ********************************* 00055 // right hand side computation // 00056 // ********************************* 00057 // stress component 00058 for (i=0;i<ncomp;i++){ 00059 sig[i]=Mm->ip[ipp].other[ido+i]; 00060 } 00061 // internal variable 00062 q[0]=Mm->ip[ipp].other[ido+3*ncomp+1]; 00063 00064 //dt=Mp->incrvs; 00065 //dt=Mp->timefun.getval(Mp->time); 00066 dt=Mp->timecon.actualforwtimeincr (); 00067 Mm->stiff_deps_vispl (ipp,0,0,sig,q,dt); 00068 } 00069 00070 00071 if (Mp->phase==2){ 00072 for (i=0;i<ncomp;i++){ 00073 // new total strain 00074 epsn[i] = Mm->ip[ipp].strain[i]; 00075 // previous total strain 00076 epso[i] = Mm->ip[ipp].other[ido+i+ncomp*2]; 00077 // irreversible increment of strain 00078 epsp[i] = Mm->ip[ipp].other[ido+i+ncomp]; 00079 } 00080 00081 // internal variable 00082 //q[0] = Mm->ip[ipp].other[ido+3]; 00083 00084 // elastic strain 00085 subv (epsn,epso,epso); 00086 subv (epso,epsp,epsp); 00087 // stiffness matrix of material 00088 Mm->matstiff(d,ipp); 00089 // stress components 00090 mxv (d,epsp,sig); 00091 00092 // new data storage 00093 for (i=0;i<ncomp;i++){ 00094 Mm->ip[ipp].other[ido+i] += sig[i]; 00095 Mm->ip[ipp].other[ido+i+ncomp*2] = epsn[i]; 00096 } 00097 } 00098 00099 } 00100 */ 00101 00102 /** 00103 function returns tangent stiffness matrix of material 00104 00105 @param ipp - integration point pointer 00106 @param d - elastic stiffness matrix 00107 00108 12.8.2001 00109 */ 00110 /* 00111 void lemaitre::matstiff (matrix &d,long ipp,long ido) 00112 { 00113 Mm->elmatstiff (d,ipp); 00114 } 00115 00116 */