Introduction Castem
-
Upload
hicham-farid -
Category
Documents
-
view
398 -
download
0
Transcript of Introduction Castem
Presentation Cast3MAndrei Constantinescu Arnaud Delaplace
[email protected] [email protected]
http://www-cast3m.cea.frProgram lements finis Cration ~ 1980 CEA Tierry Charras, Alain Millard, Pierre Verpeaux + ...
open source
langage orient objet ESOPEcompil GIBIANEinterpt ... donc trs souple
gratuit recherche / perso
Cast3M - Philosophieopti paramtres ; objet = oprateur objet objet ... ; paramtres: dimension space, messages, ... objet:gometrie: maillage, point, ligne, surface, volume nombres: flottant, entier, ... listes logiques: vrai, faux champs: par lment: par noeud:
, u
operateur:
....
algbriques, trigonomtriques: +,,exp,log,tan mcaniques: bloq,rigi,pasapas,vibration,flambage,.... maillage: droite,volume,surface,syme,.... contrle: si,sinon,finsi;repeter,....
Cast3M Exemple chauffage Jouleproblme lctrique = problem thermique stationnaireMod_el = bar mode thermique isotrope QUA4; Mat_el = matr Mod_el 'K' K_el; K_rig = rigi Mod_el Mat_el; U_pot = reso (K_rig et cdlu_bas et cdlu_hau) u_bas; gradU = grad Mod_el U_pot; J = (nomc Q (changer chpo Mod_el (exco 'T,X' gradU)**2) ); J = J + (nomc Q (changer chpo Mod_el (exco 'T,Y' gradU)**2) ); J = J + (nomc Q (changer chpo Mod_el (exco 'T,Z' gradU)**2) ); F_J = source mod_bar J;
problme thermique avec source F_J problme mcanique ...
Cast3M - Algorithme lastodynamiqueK = rigi mod mat; M = mass mod mat; KM1 = M/(dt*dt) et (K/4.0); KM2 = M/(dt*dt) et (K/-4.0) * 2.0; F1 = press mass mod (lmoins et lplus) 0.08; U0 = manu chpo S 2 UX 0.0 UY 0.0; Fn = table; Un = table; n = 0; U1 = U0;
repeter boucle nb_temps; Fn.n = F1; Q = Fn.n + (KM2*U1) - (KM1*U0); V = reso KM1 Q; Un.n = redu V bord; U0 = U1; U1 = V; n = n + 1; fin boucle;
Cast3M ProgrammationProcedure = fonction, subroutinedebproc devi sig*mchaml; sxx sxy syy szz = = = = exco exco exco exco smxx smxy smyy smzz sig sig sig sig scal; scal; scal; scal;
trac = (1/3.) * (sxx + syy + szz); sxx syy szz = = = exco scal (sxx - trac) smxx; exco scal (syy - trac) smyy; exco scal (szz - trac) smzz;
dev = sxx et syy et szz et sxy; finproc dev;
Cast3M Other commandsSwitching from file reading to shell
opti donn 5; ... opti donn 3; ...
Save and recover data
opti sauv[er] 'my_file.dat'; sauv[er] object1 object2; opti rest[ituer] 'my_file.dat'; rest[ituer];
Save and recover mesh data (nodal coordinates and connectivities) -> see pdf document
Cast3M Pratique
www-cast3m.cea.fr documents, notices, examples local repertoire d'installation
installations et documentations:... doc ... dgibi example.dgibi pdf ps html
Cast3M Pratique
lancement sur machines Linux
commandes en ligne (shell)
% castem -m XL ..... $ fin; %
commandes en fichier (editeur normal)
% castem -m XL mon_fichier.dgibi ..... $ fin; % les fichiers cres: UTILPROC, UTILNOTI: contient info procdures fort.98: contient commandes exectues
Cast3M Pratique
syntaxe
72 charactres sur ligne maximum 7 ligne conscutives chaque commande finit avec ; pas de diffrence entre majuscules ABCD... = minuscules abcd ... sauf en MOTS: 'TOTO' =!= 'toto'
* en premire caractre = commentaire pas des charactres spciaux TAB, ...
Cast3M Pratique
syntaxe algbre
pas de priorit des oprations algbriques
a + b * c = ( a + b ) * cen non
a + ( b * c )
mettez des paranthses !!!
Elasticity Example Tensile Test
Cast3M Exemple traction
simple
Deplacement impose
Deplacements bloqus par symtrie
Cast3M Exemple tractionp 4 p 3
simple
opti dime 2 echo 1 elem myelem; ldom = 1.; r = 0.1; p1 p2 p3 p4 = = = = 0. 0.; ldom 0.; ldom ldom; 0. ldom;
p1
p 2
a2 = r 0.; a4 = 0. r; a3 = (r/1.4142) (r/1.4142);
Cast3M Exemple tractionnelem = 10;
simple
nel_bis = -20;
p 4
p 3
d12 = droite nel_bis a2 p2 dini 0.002 dfin 0.15 ; d23 = droite nelem p2 p3; d34 = droite nelem p3 p4; d41 = droite nel_bis p4 a4 dini 0.15 dfin 0.002 ; bis = droite nel_bis a3 p3 dini 0.003 dfin 0.22 ; arc23 = cerc nelem a2 p1 a3; arc34 = cerc nelem a3 p1 a4;
p1
p 2
dom1 = dall d12 d23 (inve bis) (inve arc23); dom2 = dall (inve d41) (inve d34) (inve bis) arc34; dom = dom1 et dom2; trace dom;
Cast3M Exemple tractionmod
simple
= dom mode mecanique elastique isotrope; = mod mate 'YOUN' 2.e11 'NU' 0.3;
p 4
p 3
mat
rig = rigi mod mat; cd12 = bloq uy d12; cd41 = bloq ux d41; cd34 = bloq uy d34; f34 = depi cd34 0.1; u = reso (rig et cd12 et cd41 et cd34) f34;
p1
p 2
trace (((contour dom) coul vert) et (dom plus u));
Cast3M Exemple tractionp 4 p 3
simple
ux = exco ux u scal; uy = exco uy u scal; trace ux dom; trace (((ux*ux) + (uy*uy))**0.5) dom; eps = epsi mod u; sig = sigma mod mat u; trace mod sig;
p1
p 2
Cast3M Exercices ISame geometry
change boundary conditions: applied forces forc[e] pressure pres[sion]: constant, varying
pass the compute the nodal values corresponding to the stress field using chan[ger] and plot using dess[iner] the evol[ution] on the hole boundary
start from the contour and mesh the plate using surf[ace] complete the plate through symetries: syme[trie] and turns (rotation): tour[ner] eliminate double nodes: elim[iner] apply boundary conditions, extract boundary nodes using poin[t] passage to 3D and shell elements opti dime 3;
Cast3M Exercices IIOther geometries Tube under pressure
circular pipe 2D / 3D shell / 3D Tube under temperature difference
circular pipe 2D / 3D shell / 3D
Spatially varying material constants create an inclusion using coor[dinate] fields and masq[uer], transform the field from nodes to Gauss points using chan[ger]
Plasticity Example Tensile Test
Cast3M Example simple tensile testImposed Displacement
Encastrated Displacements
Cast3M Example simple tensile testmyelem = TRI3; opti dime 2 echo 1 elem myelem; ldom = 1.; r = 0.1; p1 p2 p3 p4 = = = = 0. 0.; ldom 0.; ldom ldom; 0. ldom;
a2 = r 0.; a4 = 0. r; a3 = (r/1.4142) (r/1.4142);
Cast3M Example simple tensile testnelem = 10; nel_bis = -20; d12 = droite nel_bis a2 p2 dini 0.002 dfin 0.15 ; d23 = droite nelem p2 p3; d34 = droite nelem p3 p4; d41 = droite nel_bis p4 a4 dini 0.15 dfin 0.002 ; bis = droite nel_bis a3 p3 dini 0.003 dfin 0.22 ; arc23 = cerc nelem a2 p1 a3; arc34 = cerc nelem a3 p1 a4; dom1 = dall d12 d23 (inve bis) (inve arc23); dom2 = dall (inve d41) (inve d34) (inve bis) arc34; dom = dom1 et dom2; trace dom;
Cast3M Example simple tensile test
mod_pmat_p
= mode dom mecanique elastique isotrope plastique cinematique; = mate mod_p 'YOUN' 2.e11 'NU' 0.3 'SIGY' 200.e6 'H' 2.e9;
tt = prog 0. pas 5. 20.; a_ud34 = prog 0. 1. 0. -1. 0.; ev_ud34 = evol manu 'TEMPS' tt 'DIMP' a_ud34; dess ev_ud34; ch_ud34 = char 'DIMP' ud34 ev_ud34;
Cast3M Example simple tensile test
tabexp = table;tabexp . 'MODELE' = mod_p; tabexp . 'CARACTERISTIQUES' = mat_p;
tabexp . 'BLOCAGES_MECANIQUES' = AA; tabexp . 'TEMPS_CALCULES' tabexp . 'CHARGEMENT' pasapas tabexp; = prog 0. pas 1. 20.; = ch_ud34;
Cast3M Example simple tensile testlist tabexp; list tabexp . deplacements ; list tabexp . contraintes ; trace trace trace
tabexp . contraintes . 15 mod; tabexp . variables_internes . 15 mod; tabexp . deformations_inelastiques . 15 mod
opti donn 5;
deplacement = displacement contraintes = stress deformation = strain variable internes = internal variables deformation inelastiques = anelastic strain (example plastic)
Cast3M ExercicesSame geometry change hardening type (fr. ecrouissage), then constitive law mode[le], mate[riaux]
plot using the time stress curve, strain stress curve using evol[ution] extracting values at nodes or gauss points extr[aire] constructiong the lists with prog[rammer] and repe[ter]
create a subroutine (fr. procedure) using debp[rocedure] and finp[rocedure] to encapsulate the preceding commands