Re: [Metil-lmtpp] comportement orthotrope
Status: Pre-Alpha
Brought to you by:
hugo_lec
From: Martin G. <mar...@lm...> - 2007-09-27 12:23:43
|
En fait, il faut aussi vérifier la fonction def mat_sym_to_vec_col dans le fichier LMT/include/codegen/__init__.py. Du coup ça serait pas mal qu'on prenne tous les mêmes conventions. Ca c'est bon: > def mat_sym_to_vec_col(m): > res = [] > if m.nb_rows()==2: > res=[ m[0,0], m[1,1], m[1,0] ] > elif m.nb_rows()==3: > res=[ m[0,0], m[1,1], m[2,2], m[0,1], m[0,2], m[1,2] ] # as abaqus > return vector(res) Ca non: > def mat_sym_to_vec_col(m): > for d in range(m.nb_rows()): > for e in range(m.nb_rows()-d): > res.append( m[e,d+e] ) > return vector(res) Donc pour reprendre le mail d'hier, ça c'est bon: >>> Hloc = matrix([ >>> [1./E1, -nu12/E1, -nu13/E1, 0, 0, 0], >>> [-nu12/E1, 1./E2, -nu23/E2, 0, 0, 0], >>> [-nu13/E1, -nu23/E2, 1./E3, 0, 0, 0], >>> [0, 0, 0, 1./(2.*G12), 0, 0], >>> [0, 0, 0, 0, 1./(2.*G13), 0], >>> [0, 0, 0, 0, 0, 1./(2.*G23)], >>> ]) >> >> et >> >>> P = matrix([ >>> [a1*a1, a2*a2, a3*a3, 2*a1*a2, 2*a1*a3, 2*a2*a3], >>> [b1*b1, b2*b2, b3*b3, 2*b1*b2, 2*b1*b3, 2*b2*b3], >>> [c1*c1, c2*c2, c3*c3, 2*c1*c2, 2*c1*c3, 2*c2*c3], >>> [b1*a1, b2*a2, b3*a3, b1*a2+b2*a1, b1*a3+b3*a1, b2*a3+b3*a2], >>> [c1*a1, c2*a2, c3*a3, c1*a2+c2*a1, c1*a3+c3*a1, c2*a3+c3*a2], >>> [b1*c1, b2*c2, b3*c3, b1*c2+b2*c1, b1*c3+b3*c1, b2*c3+b3*c2], >>> ]) >>> Pinv = matrix([ >>> [a1*a1, b1*b1, c1*c1, 2*a1*b1, 2*a1*c1, 2*b1*c1], >>> [a2*a2, b2*b2, c2*c2, 2*a2*b2, 2*a2*c2, 2*b2*c2], >>> [a3*a3, b3*b3, c3*c3, 2*a3*b3, 2*a3*c3, 2*b3*c3], >>> [a2*a1, b2*b1, c2*c1, b1*a2+b2*a1, a2*c1+c2*a1, b2*c1+c2*b1], >>> [a1*a3, b3*b1, c3*c1, b1*a3+b3*a1, a3*c1+c3*a1, b3*c1+c3*b1], >>> [a2*a3, b3*b2, c2*c3, b3*a2+b2*a3, a2*c3+c2*a3, b2*c3+c2*b3], >>> ]) Ca non: >>> Hloc = matrix([ >>> [1./E1, -nu12/E1, -nu13/E1, 0, 0, 0], >>> [-nu12/E1, 1./E2, -nu23/E2, 0, 0, 0], >>> [-nu13/E1, -nu23/E2, 1./E3, 0, 0, 0], >>> [0, 0, 0, 1./(2.*G12), 0, 0], >>> [0, 0, 0, 0, 1./(2.*G23), 0], >>> [0, 0, 0, 0, 0, 1./(2.*G13)], >>> ]) >> >> et >> >>> P=matrix([ >>> [a1*a1, a2*a2, a3*a3, 2*a1*a2, 2*a2*a3, 2*a1*a3], >>> [b1*b1, b2*b2, b3*b3, 2*b1*b2, 2*b2*b3, 2*b1*b3], >>> [c1*c1, c2*c2, c3*c3, 2*c1*c2, 2*c2*c3, 2*c1*c3], >>> [b1*a1, b2*a2, b3*a3, b1*a2+b2*a1, b2*a3+b3*a2, b1*a3+b3*a1], >>> [b1*c1, b2*c2, b3*c3, b1*c2+b2*c1, b2*c3+b3*c2, b1*c3+b3*c1], >>> [c1*a1, c2*a2, c3*a3, c1*a2+c2*a1, c2*a3+c3*a2, c1*a3+c3*a1], >>> ]) >>> Pinv = matrix([ >>> [a1*a1, b1*b1, c1*c1, 2*a1*b1, 2*a1*c1, 2*b1*c1], >>> [a2*a2, b2*b2, c2*c2, 2*a2*b2, 2*b2*c2, 2*a2*c2], >>> [a3*a3, b3*b3, c3*c3, 2*a3*b3, 2*b3*c3, 2*a3*c3], >>> [a2*a1, b2*b1, c2*c1, b1*a2+b2*a1, b2*c1+c2*b1, a2*c1+c2*a1], >>> [a2*a3, b3*b2, c2*c3, b3*a2+b2*a3, b2*c3+c2*b3, a2*c3+c2*a3], >>> [a1*a3, b3*b1, c3*c1, b1*a3+b3*a1, b3*c1+c3*b1, a3*c1+c3*a1], >>> ]) D'une manière général, afin que le travail de chacun soit vraiment pérennisé au sein de LMTpp, il faut absolument qu'il soit codé dans la version actuelle du code: il faut donc mettre à jour régulièrement nos sources grâce à git. Une page a été crée dans l'intranet à ce sujet: > http://intranet/mediawiki/index.php/GIT Moi je n'y connais rien donc j'ai mis que les bases, mais n'hésitez pas à y ajouter des trucs intéressants! Bon courage. Martin. Martin Genet a écrit : > Pour que les choses soient claires et justes pour tout le monde, ca vaut > peut etre le coup que chacun verifie son fichier material_help.py. > > En effet, il peut arriver que les procedures def matrice_passage et def > hooke_orthotrope_th_3d ne soient pas compatibles au niveau des indices > des vecteurs chapeaux. > >> Hloc = matrix([ >> [1./E1, -nu12/E1, -nu13/E1, 0, 0, 0], >> [-nu12/E1, 1./E2, -nu23/E2, 0, 0, 0], >> [-nu13/E1, -nu23/E2, 1./E3, 0, 0, 0], >> [0, 0, 0, 1./(2.*G12), 0, 0], >> [0, 0, 0, 0, 1./(2.*G23), 0], >> [0, 0, 0, 0, 0, 1./(2.*G13)], >> ]) > > et > >> P=matrix([ >> [a1*a1, a2*a2, a3*a3, 2*a1*a2, 2*a2*a3, 2*a1*a3], >> [b1*b1, b2*b2, b3*b3, 2*b1*b2, 2*b2*b3, 2*b1*b3], >> [c1*c1, c2*c2, c3*c3, 2*c1*c2, 2*c2*c3, 2*c1*c3], >> [b1*a1, b2*a2, b3*a3, b1*a2+b2*a1, b2*a3+b3*a2, b1*a3+b3*a1], >> [b1*c1, b2*c2, b3*c3, b1*c2+b2*c1, b2*c3+b3*c2, b1*c3+b3*c1], >> [c1*a1, c2*a2, c3*a3, c1*a2+c2*a1, c2*a3+c3*a2, c1*a3+c3*a1], >> ]) >> Pinv = matrix([ >> [a1*a1, b1*b1, c1*c1, 2*a1*b1, 2*a1*c1, 2*b1*c1], >> [a2*a2, b2*b2, c2*c2, 2*a2*b2, 2*b2*c2, 2*a2*c2], >> [a3*a3, b3*b3, c3*c3, 2*a3*b3, 2*b3*c3, 2*a3*c3], >> [a2*a1, b2*b1, c2*c1, b1*a2+b2*a1, b2*c1+c2*b1, a2*c1+c2*a1], >> [a2*a3, b3*b2, c2*c3, b3*a2+b2*a3, b2*c3+c2*b3, a2*c3+c2*a3], >> [a1*a3, b3*b1, c3*c1, b1*a3+b3*a1, b3*c1+c3*b1, a3*c1+c3*a1], >> ]) > > sont compatiblesm ainsi que > >> Hloc = matrix([ >> [1./E1, -nu12/E1, -nu13/E1, 0, 0, 0], >> [-nu12/E1, 1./E2, -nu23/E2, 0, 0, 0], >> [-nu13/E1, -nu23/E2, 1./E3, 0, 0, 0], >> [0, 0, 0, 1./(2.*G12), 0, 0], >> [0, 0, 0, 0, 1./(2.*G13), 0], >> [0, 0, 0, 0, 0, 1./(2.*G23)], >> ]) > > et > >> P = matrix([ >> [a1*a1, a2*a2, a3*a3, 2*a1*a2, 2*a1*a3, 2*a2*a3], >> [b1*b1, b2*b2, b3*b3, 2*b1*b2, 2*b1*b3, 2*b2*b3], >> [c1*c1, c2*c2, c3*c3, 2*c1*c2, 2*c1*c3, 2*c2*c3], >> [b1*a1, b2*a2, b3*a3, b1*a2+b2*a1, b1*a3+b3*a1, b2*a3+b3*a2], >> [c1*a1, c2*a2, c3*a3, c1*a2+c2*a1, c1*a3+c3*a1, c2*a3+c3*a2], >> [b1*c1, b2*c2, b3*c3, b1*c2+b2*c1, b1*c3+b3*c1, b2*c3+b3*c2], >> ]) >> Pinv = matrix([ >> [a1*a1, b1*b1, c1*c1, 2*a1*b1, 2*a1*c1, 2*b1*c1], >> [a2*a2, b2*b2, c2*c2, 2*a2*b2, 2*a2*c2, 2*b2*c2], >> [a3*a3, b3*b3, c3*c3, 2*a3*b3, 2*a3*c3, 2*b3*c3], >> [a2*a1, b2*b1, c2*c1, b1*a2+b2*a1, a2*c1+c2*a1, b2*c1+c2*b1], >> [a1*a3, b3*b1, c3*c1, b1*a3+b3*a1, a3*c1+c3*a1, b3*c1+c3*b1], >> [a2*a3, b3*b2, c2*c3, b3*a2+b2*a3, a2*c3+c2*a3, b2*c3+c2*b3], >> ]) > > mais pas des combinaisons de ces trucs la. > > Vous pouvez mettre a jour vos fichiers a partir de la source mise a > jours par Hugo en tapant > >> git pull > > dans votre dossier LMT. Pas d'inquietude pour vos modifications > personnelles: git vous signale tout doublon et n'ecrase rien. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Metil-lmtpp mailing list > Met...@li... > https://lists.sourceforge.net/lists/listinfo/metil-lmtpp > From - Wed |