Télécharger Cast_test_RelaPout.dgibi

Retour à la liste

Numérotation des lignes :

  1. * fichier : cast_test_relapout.dgibi
  2. *
  3. **********************************************************************
  4. ************************************************************************
  5. ************************************************************************
  6. *
  7. * Tranfert of load for beam elements - load known for a solid model
  8. *
  9. *
  10. * D. COMBESCURE
  11. *
  12. * F4E - 6th January 2014
  13. ********************************************************************
  14. OPTI DIME 3 ELEM CUB8;
  15. *
  16. * Modele 1: Forces calculated with another software/here created manually
  17. *
  18. FLAGVISU = FAUX;
  19. *
  20. L1 = 0.1;
  21. L2 = 0.25;
  22. L3 = 3.;
  23. *
  24. fac1 = 1;
  25. n1 = 2*fac1;
  26. n2 = 3*fac1;
  27. n3 = 10*fac1;
  28. *
  29. p0 = (-0.5*L1) (-0.5*L2) 0.;
  30. p1 = (0.5*L1) (-0.5*L2) 0.;
  31. vy = 0. L2 0.;
  32. vz = 0. 0. L3;
  33. p0c = 0. 0. 0.;
  34. p1c = 0. L2 0.;
  35. p0top = p0 plus (vz);
  36. p1top = p1 plus (vz);
  37. *
  38. Lig0 = D n1 p0 p1;
  39. Sur0 = Lig0 tran n2 vy;
  40. Vol0 = Sur0 volu n3 tran vz;
  41. elim 0.001 (vol0 et p0top et p1top et sur0);
  42. *
  43. Mod0 = mode vol0 mecanique elastique CUB8;
  44. Emat0 = 200.D9;
  45. Nmat0 = 0.3;
  46. romat0 = 7800.;
  47. mat0 = MATE mod0 youn Emat0 NU Nmat0 RHO romat0;
  48. *
  49. rig0 = rigi Mod0 mat0;
  50. blvol0 = bloq sur0 depl;
  51. mas0 = mass mod0 mat0;
  52. lum0 = lump Mod0 Mat0;
  53. *
  54. * Loads
  55. *
  56. * Uniform acceleration
  57. *for0 = mas0*accuni;
  58. *
  59. * Triangular acceleration
  60. *for0 = mas0 * acc0;
  61. *
  62. * Lumped force
  63. for0 = FORC FX 1. p0top;
  64. *
  65. SI FLAGVISU;
  66. TRAC VOL0 (VECTEUR for0 FX FY FZ) cach;
  67. FINSI;
  68. *
  69. *
  70. * Modele 2 - Mechanical model - Beam model
  71. *
  72. *
  73. n1b = 3*fac1;
  74. n2b = 4*fac1;
  75. n3b = 15*fac1;
  76. ep1 = 0.00001;
  77. ep0 = (-1.)*ep1;
  78. ep2 = ep1;
  79. ep3 = ep1;
  80. *
  81. p0c = 0. 0. 0.;
  82. vz = 0. 0. L3;
  83. p1c = p0c plus vz;
  84. *
  85. opti elem seg2;
  86. Vol1 = D n3b p0c p1c;
  87. *
  88. *
  89. p0S = (-0.5*L1) (-0.5*L2) 0.;
  90. p1S = (0.5*L1) (-0.5*L2) 0.;
  91. opti elem qua4;
  92. ns1 = 1;
  93. ns2 = 1;
  94. LigS1 = D ns1 p0S p1S;
  95. SurS1 = LigS1 tran ns2 vy;
  96. *
  97. modS1 = mode SurS1 MECANIQUE ELASTIQUE QUAS;
  98. Emat1 = 200.D9;
  99. Nmat1 = 0.3;
  100. romat1 = 7800.;
  101. matS1 = MATE modS1 youn Emat1 NU Nmat1 RHO romat1
  102. ALPY 1. ALPZ 1.;
  103. *
  104. *
  105. Mod1 = mode Vol1 mecanique elastique SECTION timo;
  106. mat1 = mate mod1 MODS modS1 MATS mats1 VECT (1. 0. 0.);
  107. *
  108. rig1 = rigi Mod1 mat1;
  109. mas1 = mass Mod1 Mat1;
  110. *
  111. bl0 = bloq depl vol1;
  112. bl00 = bloq depl rota p0c;
  113. *
  114. rigmod = rig1 et bl00;
  115. *
  116. * Creation of the solid mesh and the constraints
  117. * linking the beam and the solid meshes
  118. *
  119. tab11 = table;
  120. tab11.'RELATION_3D' = VRAI;
  121. vol1_3D = pout2mas mod1 mat1 tab11;
  122. blpout = tab11.'RELATION_3D';
  123. *
  124. SI FLAGVISU;
  125. oeil = 2. 2. 4.;
  126. trac oeil vol1_3D cach;
  127. FINSI;
  128. *
  129. *
  130. Mod1b = mode VOL1_3D mecanique elastique ;
  131. Emat1 = 200.D9;
  132. Nmat1 = 0.3;
  133. romat1 = 7800.;
  134. mat1b = MATE mod1b youn Emat1 NU Nmat1 RHO romat1;
  135. rig1b = rigi Mod1b mat1b;
  136. *
  137. * Displacement field to be transfered from vol1 to vol0
  138. *
  139. * Transfert through the Lagrangian multiplier
  140. *
  141. frdep0 = for0;
  142. *
  143. * Relation maitre-esclave
  144. *
  145. * Vol0 suit Vol1
  146. rel1 = rela vol0 'ACCRO' vol1_3D;
  147. rigtot1 = rig1 et bl00 et rel1 et blpout;
  148. depj1 = reso rigtot1 frdep0;
  149. *
  150. * Calcul des forces nodales a partir des deplacements sur le modele 1
  151. *
  152. frdep1 = (rig1 et bl00) * depj1;
  153. *
  154. SI FLAGVISU;
  155. oeil = 2. 2. 4.;
  156. trac (defo vol1_3D depj1);
  157. TITRE 'Transfer through Lagrangian muliplier';
  158. trac vol1 (vecteur frdep1 FX FY FZ) cach;
  159. FINSI;
  160. *
  161. * Test
  162. *
  163. res0 = maxi (resu frdep0);
  164. res1 = maxi (resu frdep1);
  165. *
  166. ERR = (res0 - res1)/res0;
  167. * *
  168. 'SI' (ERR '>' 1.E-6) ; 'ERRE' 5; 'FINS' ;
  169. *
  170. 'FIN' ;
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales