Télécharger Cast_test_RelaPout.dgibi

Retour à la liste

Numérotation des lignes :

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

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