Télécharger coller2.procedur

Retour à la liste

Numérotation des lignes :

  1. * COLLER2 PROCEDUR FANDEUR 22/01/19 21:15:04 11256
  2. *
  3. ************************************************************************
  4. *
  5. * COLLER2 : CONNECT SHELL TO SOLID ELEMENTS FOR A GIVEN SET OF NODES
  6. * OF THE SHELL
  7. *
  8. * INPUTS :
  9. * mod_sh = SHELL MODEL
  10. * mat_sh = SHELL MATERIAL
  11. * mod_so = SOLID MODEL
  12. * node_sh = MESH (MAILLAGE or POINT TYPE) TO LINK
  13. * (cons_lo = NAME OF THE LOWER CONSTITUANT)
  14. * (cons_up = NAME OF THE UPPER CONSTITUANT)
  15. *
  16. * CREATION : BP, 2017-03-23
  17. *
  18. ************************************************************************
  19.  
  20. DEBP COLLER2 mod_sh*'MMODEL' mat_sh*'MCHAML'
  21. mod_so*'MMODEL' ;
  22.  
  23.  
  24. ************************************************************************
  25. * I. VERIFICATION AND TREATMENT OF INPUTS
  26. ************************************************************************
  27.  
  28. * POINTS (OR MESH) OF THE SHELL TO GLUE
  29. mesh_sh = EXTR mod_sh 'MAILLAGE';
  30. mesh_so = EXTR mod_so 'MAILLAGE';
  31. ARGU node_sh/'MAILLAGE';
  32. SI (EXIS node_sh);
  33. node_sh = node_sh CHAN 'POI1';
  34. SINON;
  35. ARGU node_sh*'POINT';
  36. node_sh = MANU 'POI1' node_sh;
  37. FINSI;
  38.  
  39. * CONSITUTANTS'NAME
  40. * (= LAYER NAME GIVEN IN THE MODEL FOR MULTILAYER SHELL)
  41. ARGU cons_lo/'MOT' cons_up/'MOT';
  42.  
  43. * MATERIAL COMPONENTS
  44. mat_comp = EXTR mat_sh 'COMP';
  45.  
  46. * COMPONENTS
  47. IDIM = VALE 'DIME';
  48. IFOUR = VALE 'MODE';
  49. FLAXI = (EGA IFOUR 'FOUR') ou (EGA IFOUR 'AXIS');
  50. FL2D = EGA IDIM 2;
  51. SI FL2D;
  52. SI FLAXI;
  53. moV = MOTS 'VR' 'VZ';
  54. moU = MOTS 'UR' 'UZ';
  55. R3 = MOT 'RT'; U3 = MOT 'UT';
  56. SINON;
  57. moV = MOTS 'VX' 'VY';
  58. moU = MOTS 'UX' 'UY';
  59. R3 = MOT 'RZ';
  60. FINSI;
  61. U1 = EXTR moU 1; U2 = EXTR moU 2;
  62. SINON;
  63. moV = MOTS 'VX' 'VY' 'VZ';
  64. moU = MOTS 'UX' 'UY' 'UZ';
  65. moR = MOTS 'RX' 'RY' 'RZ';
  66. U1 = EXTR moU 1; U2 = EXTR moU 2; U3 = EXTR moU 3;
  67. R1 = EXTR moR 1; R2 = EXTR moR 2; R3 = EXTR moR 3;
  68. FINSI;
  69.  
  70.  
  71. ************************************************************************
  72. * II. GENEREATION OF NODES ON UPPER AND LOWER SURFACES
  73. ************************************************************************
  74.  
  75. * MODEL ASSOCIATED WITH UPPER AND LOWER SURFACES
  76. SI (EXIS cons_lo); mod_lo = EXTR mod_sh 'CONS' cons_lo;
  77. SINON; mod_lo = mod_sh;
  78. FINSI;
  79. SI (EXIS cons_up); mod_up = EXTR mod_sh 'CONS' cons_up;
  80. SINON; mod_up = mod_sh;
  81. FINSI;
  82. mat_lo = REDU mat_sh mod_lo;
  83. mat_up = REDU mat_sh mod_up;
  84.  
  85. * NORMAL TO THE SHELL
  86. n_sh = CHAN (VSUR mod_lo 'NORM') 'CHPO' mod_lo;
  87. n_sh = REDU n_sh node_sh;
  88. n_sh = EXCO n_sh moV moU ;
  89.  
  90. * SHELL EXCENTRATION AND HALF-THICKNESS
  91. th_lo = 0.5 * (CHAN (EXCO mat_lo 'EPAI' 'SCAL') 'CHPO' mod_lo);
  92. th_up = 0.5 * (CHAN (EXCO mat_up 'EPAI' 'SCAL') 'CHPO' mod_up);
  93. SI (EXIS mat_comp 'EXCE' );
  94. ex_lo = CHAN (EXCO mat_lo 'EXCE' 'SCAL') 'CHPO' mod_lo;
  95. ex_up = CHAN (EXCO mat_up 'EXCE' 'SCAL') 'CHPO' mod_up;
  96. SINON;
  97. ex_lo = 0.;
  98. ex_up = 0.;
  99. FINSI;
  100. lo_sh = ex_lo - th_lo;
  101. up_sh = ex_up + th_up;
  102.  
  103. * NEW NODES (ON UPPER AND LOWER SURFACES)
  104. n_up = up_sh * n_sh;
  105. n_lo = lo_sh * n_sh;
  106. x_up = node_sh PLUS n_up;
  107. x_lo = node_sh PLUS n_lo;
  108. x_peau = x_up et x_lo;
  109.  
  110. * opti trac X;
  111. * * TRAC (mesh_sh et x_peau);
  112. * TRAC (mesh_so et mesh_sh et (x_peau COUL 'ROSE'));
  113.  
  114.  
  115. ************************************************************************
  116. * III. LINKING UPPER AND LOWER NODES TO THE SOLID
  117. ************************************************************************
  118.  
  119. * LINKING POINTS TO THE SOLID
  120. KREL1 = RELA x_peau 'ACCRO' mesh_so;
  121.  
  122. * GET THE NODES OF x_up AND x_lo ACTUALLY CONSTRAINED TO THE SOLID
  123. ELREL1 = CHAN (EXTR KREL1 'MAILLAGE' 'NOMU') 'POI1';
  124.  
  125.  
  126. ************************************************************************
  127. * IV. LINKING UPPER AND LOWER NODES TO THE SHELL
  128. ************************************************************************
  129.  
  130. n_upX = EXCO n_up U1 'SCAL';
  131. n_upY = EXCO n_up U2 'SCAL';
  132. n_loX = EXCO n_lo U1 'SCAL';
  133. n_loY = EXCO n_lo U2 'SCAL';
  134. SI (NON FL2D);
  135. n_upZ = EXCO n_up U3 'SCAL';
  136. n_loZ = EXCO n_lo U3 'SCAL';
  137. FINSI;
  138. KREL = VIDE 'RIGIDITE'/'RIGIDITE' ;
  139. nnode = NBEL node_sh;
  140.  
  141. * LOOP OVER SHELL NODES -----------------
  142. REPE Bnode nnode;
  143.  
  144. * node of the shell
  145. node_i = POIN node_sh 1 &Bnode;
  146.  
  147. * node of the upper plan of the shell + its relative position
  148. x_up_i = POIN x_up 1 &Bnode;
  149. SI (x_up_i DANS ELREL1);
  150. n_upXi = EXTR n_upX node_i 'SCAL';
  151. n_upYi = EXTR n_upY node_i 'SCAL';
  152. SI FL2D;
  153. * UX - hY(sup)*RZ = UX(sup)
  154. KupX = RELA U1 node_i - n_upYi R3 node_i - U1 x_up_i;
  155. * UY + hX(sup)*RZ = UY(sup)
  156. KupY = RELA U2 node_i + n_upXi R3 node_i - U2 x_up_i;
  157. KREL = KREL et KupX et KupY;
  158. SI FLAXI; KREL = KREL et (RELA U3 node_i - U3 x_up_i); FINSI;
  159. SINON;
  160. n_upZi = EXTR n_upZ node_i 'SCAL';
  161. * UX + hZ(sup)*RY - hY(sup)*RZ = UX(sup)
  162. KupX = RELA U1 node_i + n_upZi R2 node_i - n_upYi R3 node_i
  163. - U1 x_up_i;
  164. * UY + hX(sup)*RZ - hZ(sup)*RX = UY(sup)
  165. KupY = RELA U2 node_i + n_upXi R3 node_i - n_upZi R1 node_i
  166. - U2 x_up_i;
  167. * UZ + hy(sup)*RX - hX(sup)*RY = UZ(sup)
  168. KupZ = RELA U3 node_i + n_upYi R1 node_i - n_upXi R2 node_i
  169. - U3 x_up_i;
  170. KREL = KREL et KupX et KupY et KupZ;
  171. FINSI;
  172. FINSI;
  173.  
  174. * node of the lower plan of the shell + its relative position
  175. x_lo_i = POIN x_lo 1 &Bnode;
  176. SI (x_lo_i DANS ELREL1);
  177. n_loXi = EXTR n_loX node_i 'SCAL';
  178. n_loYi = EXTR n_loY node_i 'SCAL';
  179. SI FL2D;
  180. * UX - hY(inf)*RZ = UX(inf)
  181. KloX = RELA U1 node_i - n_loYi R3 node_i - U1 x_lo_i;
  182. * UY + hX(inf)*RZ = UY(inf)
  183. KloY = RELA U2 node_i + n_loXi R3 node_i - U2 x_lo_i;
  184. KREL = KREL et KloX et KloY;
  185. SI FLAXI; KREL = KREL et (RELA U3 node_i - U3 x_lo_i); FINSI;
  186. SINON;
  187. n_loZi = EXTR n_loZ node_i 'SCAL';
  188. * UX + hZ(inf)*RY - hY(inf)*RZ = UX(inf)
  189. KloX = RELA U1 node_i + n_loZi R2 node_i - n_loYi R3 node_i
  190. - U1 x_lo_i;
  191. * UY + hX(inf)*RZ - hZ(inf)*RX = UY(inf)
  192. KloY = RELA U2 node_i + n_loXi R3 node_i - n_loZi R1 node_i
  193. - U2 x_lo_i;
  194. * UZ + hy(inf)*RX - hX(inf)*RY = UZ(inf)
  195. KloZ = RELA U3 node_i + n_loYi R1 node_i - n_loXi R2 node_i
  196. - U3 x_lo_i;
  197. KREL = KREL et KloX et KloY et KloZ;
  198. FINSI;
  199. FINSI;
  200.  
  201. FIN Bnode;
  202. * END OF LOOP OVER SHELL NODES -----------------
  203.  
  204. KREL2 = KREL ET KREL1;
  205.  
  206. FINP KREL2 ;
  207.  

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