I cannot see the mistake. if anyone of you know the reason please tell me. Im desperate
ESP: Hola a todos, llevo varios días estrujándome los sesos, pero sigue apareciendo el mismo error en la misma linea. Alguno sabría decirme por que ? estoy desesperado necesito ayuda :(
Here is the code:
Código Python:
Ver original
import numpy as np import matplotlib.pyplot as plt ki=222.2*10**3 km=62.5*10**3 mui=166.67*10**3 mum=28.85*10**3 fi=0.25 J=np.matrix([[1./3.,1./3.,1./3.,0,0,0],[1./3.,1./3.,1./3.,0,0,0],[1./3.,1./3.,1./3.,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0],[0,0,0,0,0,0]]) I=np.identity(6) K=I-J x=1. sigmaeqold=0. mumsec=mum STRESS=[] STRAIN=[] E=1*10**5 for a in range (401): #from 0 to 400 sigma0=np.matrix([[a],[0.],[0.],[0.],[0.],[0.]]) STRESS.append(a)#en Mpa while x< E : k=km+fi*(ki-km)/(1.+(1.-fi)*(ki-km)/((3.*km+4.*mumsec)/3.)) mu=mumsec+fi*(mui-mumsec)/(1.+(1.-fi)*(mui-mumsec)/((5./3.*(3.*km+4*mumsec)/(km*2*mumsec)/2)) Msecm=(1./(3.*km))*J+(1./(2.*mum))*K <--(HERE IS THE SYNTAX ERROR) Msec=(1./(3.*k))*J+(1./(2.*mu))*K Mi=(1./(3.*ki))*J+(1./(2.*ki))*K INV=np.linalg.inv(Msecm-Mi) Bsecm=(1./(1-fi))*(INV-(Msec-Mi)) sigmam=Bsecm*sigma0 matrixnumber=sigmam.T*sigmam number=float(matrixnumber)# just for making a float number from a matrix 1x1 sigmaeq= (3./2.)*(number)**0.5 mu_msec=sigmaeq/((sigmaeq/mum)+3.*(sigmaeq/400.)**(1./0.15)) x=sigmaeq-sigmaeqold sigmaeqold=sigmaeq strain=Msec*sigma0 strainlist=list(strain) ' strainpop=strain.pop(1) strainvalue=float(strainpop) STRAIN.append(strainvalue) plt.plot(STRAIN,STRESS)