35 . X,SENSORS,BUFMAT,PM,GEO,
36 . IDDLEVEL,KNOD2ELC,NOD2ELC,IXC,IGEO,
48#include "implicit_f.inc"
56#include "tabsiz_c.inc"
60 INTEGER IDDLEVEL,(NIXR,*),ITAB(*),KNOD2EL1D(*),NOD2EL1D(*),IPM(NPROPMI,*),
61 . KNOD2ELC(*),NOD2ELC(*),IXC(NIXC,*)
62 INTEGER,
INTENT(INOUT) :: IGEO(NPROPGI,NUMGEO),ISKN(SISKWN)
63 my_real x(3,*),bufmat(*),pm(npropm,*),geo(npropg,*)
64 TYPE (SENSORS_) ,
INTENT(IN) :: SENSORS
65 INTEGER ,
INTENT(IN) :: NPC(SNPC)
70 INTEGER I,J,K,L,JJ,NOD_START,SEATBELT_ID,COMPT,ELEM_CUR,
71 . FLAG,NNOD,MTYP,MID,NDIR,
72 . I1,I2,IADBUF,TAG_PRINT,ISENS_LOC(2),IPID,OFFC,OFFR,NB_ELEM,NODE,
73 . nb_2d_seatbelt,compt_belt_end,compt_fram,next_node,node_cur,compt_2d,mid_2d,node_longi,
74 . func1,func2,isk,n1,n2,seatbelt_elem_found,imov,iecrou,nb_elem_1d,nb_branch,
75 . branch_cpt,nb_elem_2d,j1,npt,npt2,stat,warnfunc,same_func,mid2,mtyp2,flag_shell
76 my_real dist2,lmin,rho,xk,xc,
area,longi_direction(3),edge_direction(3),scal,e11,e22,g12,det,
77 . n12,n21,nu,fscale1,fscale2,a11,a22,a12,c1,ssp,rho0,fscalet,kmax,a1c,a2c
78 my_real x1,x2,y1,y2,shift,deri,min_slope,min_slope_abs,deri_p
80 INTEGER ,
DIMENSION(:),
ALLOCATABLE:: TAG_RES,TAG_SHELL,TAG_NOD,CC_ELEM,CPT_MAT,TAG_MAT_2D,
81 . tag_nod_shell,tag_nod_spring,fram_tab,tag_fram_seatbelt,
82 . nnod_fram_seatbelt,belt_end_nfram,belt_end_addr,tag_prop_2d,
83 . branch_tab,tag_spring_2d,tag_nod_spri2d,tag_comn_1d_2d
84 my_real ,
DIMENSION(:),
ALLOCATABLE:: av_len_mat,av_area_mat,elemsize_mat,belt_end_section,
94 IF (iddlevel == 0)
THEN
99 DO k=1,sensors%NSENSOR
100 IF(
slipring(i)%SENSID == sensors%SENSOR_TAB(k)%SENS_ID) isens_loc(1) = k
102 IF(isens_loc(1) == 0)
THEN
105 . anmode=aninfo_blind_1,
119 DO k=1,sensors%NSENSOR
120 IF(
retractor(i)%ISENS(j) == sensors%SENSOR_TAB(k)%SENS_ID) isens_loc(j) = k
122 IF(isens_loc(j) == 0)
THEN
125 . anmode=aninfo_blind_1,
140 ELSEIF (npt == npt2)
THEN
145 y1 = tf(npc(
retractor(i)%IFUNC(1)) + j1 + 1)
147 y2 = tf(npc(
retractor(i)%IFUNC(2)) + j1 + 1)
148 IF ((x1 /= x2).OR.(y1 /= y2)) same_func = 0
159 ALLOCATE (
retractor(i)%TABLE(j)%X(1),stat=stat)
160 ALLOCATE (
retractor(i)%TABLE(j)%X(1)%VALUES(npt),stat=stat)
161 ALLOCATE (
retractor(i)%TABLE(j)%Y,stat=stat)
162 ALLOCATE (
retractor(i)%TABLE(j)%Y%VALUES(npt),stat=stat)
170 y1 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 1)
171 x2 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 2)
172 y2 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 3)
173 deri = (y2-y1)/(x2-x1)
174 IF (abs(deri) > em20)
THEN
175 min_slope =
min(min_slope,deri)
176 min_slope_abs =
min(min_slope_abs,abs(deri))
182 IF(warnfunc == 1)
THEN
184 . msgtype=msgwarning,
185 . anmode=aninfo_blind_1,
187 . i2=npc(nfunct+
retractor(i)%IFUNC(j)+1),
188 . r1=em05*min_slope_abs)
192 IF ((same_func == 0).and.((j==2).and.(min_slope<zero)))
THEN
194 . msgtype=msgwarning,
195 . anmode=aninfo_blind_1,
197 . i2=npc(nfunct+
retractor(i)%IFUNC(j)+1))
201 . .or.(
retractor(i)%TENS_TYP==3)).and.(min_slope<zero))
THEN
204 . anmode=aninfo_blind_1,
206 . i2=npc(nfunct+
retractor(i)%IFUNC(j)+1))
216 y1 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 1) + shift
217 x2 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 2)
218 y2 = tf(npc(
retractor(i)%IFUNC(j)) + j1 + 3)
219 deri = (y2-y1)/(x2-x1)
220 IF (abs(deri) < em05*min_slope_abs)
THEN
221 shift = shift+em05*sign(min_slope_abs*(x2-x1),deri_p)
227 retractor(i)%TABLE(j)%X(1)%VALUES(k) = x2
228 retractor(i)%TABLE(j)%Y%VALUES(k) = y2 + shift
244 CALL my_alloc(tag_nod_shell,numnod)
245 CALL my_alloc(tag_prop_2d,numgeo)
246 tag_nod_shell(1:numnod) = 0
247 tag_prop_2d(1:numgeo) = 0
253 IF (mtyp == 119)
THEN
254 nb_elem_2d = nb_elem_2d + 1
256 tag_nod_shell(ixc(j,i)) = tag_nod_shell(ixc(j,i)) + 1
259 IF (tag_prop_2d(ipid)==0) tag_prop_2d(ipid) = 1
260 IF (tag_prop_2d(ipid)==-1) tag_prop_2d(ipid) = -2
261 ELSEIF (igeo(11,ipid)==9)
THEN
263 IF (tag_prop_2d(ipid)==0) tag_prop_2d(ipid) = -1
264 IF (tag_prop_2d(ipid)==1) tag_prop_2d(ipid) = -2
270 CALL my_alloc(tag_nod_spring,numnod)
271 CALL my_alloc(tag_nod_spri2d,numnod)
272 CALL my_alloc(tag_spring_2d,numelr)
273 tag_nod_spring(1:numnod) = 0
274 tag_nod_spri2d(1:numnod) = 0
275 tag_spring_2d(1:numelr) = 0
280 IF (mtyp == 114)
THEN
281 nb_elem_1d = nb_elem_1d + 1
283 tag_nod_spring(ixr(j,i)) = tag_nod_spring(ixr(j,i)) + 1
288 DO k=knod2elc(n1)+1,knod2elc(n1+1)
289 elem_cur = nod2elc(k)
290 mid2 = ixc(1,elem_cur)
294 IF (ixc(j,elem_cur)==n2) tag_spring_2d(i) = 1
299 tag_nod_spri2d(ixr(j,i)) = tag_nod_spri2d(ixr(j,i)) + tag_spring_2d(i)
301 IF (((tag_nod_spri2d(ixr(j,i)))==1).AND.(tag_nod_spring
308 IF ((nb_elem_1d > 0).or.(nb_elem_2d > 0))
THEN
316 IF (igeo(14,i) /= 24)
THEN
317 IF (tag_prop_2d(i) == 1)
THEN
320 . msgtype=msgwarning,
321 . anmode=aninfo_blind_1,
326 imov = iskn(liskn*(isk-1)+5)
330 . anmode=aninfo_blind_1,
334 ELSEIF (tag_prop_2d(i) == -2)
THEN
337 . anmode=aninfo_blind_1,
342 IF (tag_prop_2d(i)==1)
THEN
345 imov = iskn(liskn*(isk-1)+5)
347 n1 = iskn(liskn*(isk-1)+1)
348 n2 = iskn(liskn*(isk-1)+2)
349 seatbelt_elem_found = 0
350 DO k=knod2elc(n1)+1,knod2elc(n1+1)
352 mid = ixc(1,elem_cur)
356 IF (ixc(j,elem_cur)==n2) seatbelt_elem_found = 1
360 IF (seatbelt_elem_found == 0)
THEN
363 . anmode=aninfo_blind_1,
364 . i1=igeo(1,i),i2=iskn(liskn*(isk-1)+4))
371 DEALLOCATE(tag_prop_2d)
384 CALL my_alloc(tag_comn_1d_2d,numnod)
386 tag_comn_1d_2d(1:numnod) = 0
389 IF (((tag_nod_spri2d(i))==1).AND.(tag_nod_spring(i)==2))
THEN
392 tag_comn_1d_2d(i) = 1
395 DEALLOCATE(tag_nod_spri2d)
397 CALL my_alloc(tag_nod,numnod)
398 tag_nod(1:numnod) = 0
402 IF (((tag_nod_shell(i) < 2).AND.(tag_nod_spring(i)==1).AND.(tag_nod(i)==0)).OR.
403 . (tag_comn_1d_2d(i) == 1))
THEN
404 compt_belt_end = compt_belt_end + 1
405 compt_fram = compt_fram + 1
407 IF (tag_nod_shell(i) == 1)
THEN
409 DO WHILE(next_node > 0)
412 DO k=knod2elc(node_cur)+1,knod2elc(node_cur+1)
413 elem_cur = nod2elc(k)
414 mid = ixc(1,elem_cur)
418 IF (((tag_nod_spring(ixc(j,elem_cur))==1).OR.(tag_comn_1d_2d(ixc(j,elem_cur))==1))
419 . .AND.(tag_nod(ixc(j,elem_cur))==0))
THEN
421 next_node = ixc(j,elem_cur)
422 tag_nod(next_node) = 1
423 compt_fram = compt_fram + 1
430 IF (tag_comn_1d_2d(i) == 1) tag_nod(i) = 0
434 tag_nod(1:numnod) = 0
435 CALL my_alloc(belt_end_nfram,compt_belt_end)
436 CALL my_alloc(belt_end_addr,compt_belt_end)
437 CALL my_alloc(fram_tab,compt_fram)
438 CALL my_alloc(belt_end_section,compt_belt_end)
439 belt_end_nfram(1:compt_belt_end) = 0
440 belt_end_addr(1:compt_belt_end) = 0
441 belt_end_section(1:compt_belt_end) = zero
442 fram_tab(1:compt_fram) = 0
445 node_longi = -huge(node_longi)
447 IF (((tag_nod_shell(i) < 2).AND.(tag_nod_spring(i)==1).AND.(tag_nod(i)==0)).OR.
448 . (tag_comn_1d_2d(i) == 1))
THEN
449 compt_belt_end = compt_belt_end + 1
450 compt_fram = compt_fram + 1
452 belt_end_nfram(compt_belt_end) = 1
453 belt_end_addr(compt_belt_end) = compt_fram
454 fram_tab(compt_fram) = i
455 IF (tag_nod_shell(i) == 1)
THEN
458 DO k=knod2el1d(i)+1,knod2el1d
459 IF (nod2el1d(k) > numelt+numelp)
THEN
460 elem_cur = nod2el1d(k)-numelt-numelp
461 mid = ixr(5,elem_cur)
464 IF ((mtyp == 114).AND.(ixr(2,elem_cur)/= i))
THEN
465 node_longi = ixr(2,elem_cur)
466 ELSEIF (mtyp == 114)
THEN
467 node_longi = ixr(3,elem_cur)
472 dist2 = (x(1,i)-x(1,node_longi))**2+(x(2,i)-x(2,node_longi))**2+(x(3,i)-x(3,node_longi))**2
473 longi_direction(1) = (x(1,i)-x(1,node_longi))/sqrt(
max(em20,dist2))
474 longi_direction(2) = (x(2,i)-x(2,node_longi))/sqrt(
max(em20,dist2))
475 longi_direction(3) = (x(3,i)-x(3,node_longi))/sqrt(
max(em20,dist2))
478 DO WHILE(next_node > 0)
481 DO k=knod2elc(node_cur)+1,knod2elc(node_cur+1)
482 elem_cur = nod2elc(k)
483 mid = ixc(1,elem_cur)
487 IF (((tag_nod_spring(ixc(j,elem_cur))==1).OR.(tag_comn_1d_2d(ixc(j,elem_cur))==1))
488 . .AND.(tag_nod(ixc(j,elem_cur))==0))
THEN
490 next_node = ixc(j,elem_cur)
491 tag_nod(next_node) = 1
492 compt_fram = compt_fram + 1
493 fram_tab(compt_fram) = next_node
498 IF (next_node > 0)
THEN
500 dist2 = (x(1,node_cur)-x(1,next_node))**2+(x(2,node_cur)-x(2,next_node))**2
501 . +(x(3,node_cur)-x(3,next_node))**2
502 edge_direction(1) = (x(1,node_cur)-x(1,next_node))/sqrt(
max(em20,dist2))
503 edge_direction(2) = (x(2,node_cur)-x(2,next_node))/sqrt(
max(em20,dist2))
504 edge_direction(3) = (x(3,node_cur)-x(3,next_node))/sqrt(
max(em20,dist2))
505 scal = longi_direction(1)*edge_direction(1)+longi_direction(2)*edge_direction(2)
506 . +longi_direction(3)*edge_direction(3)
507 dist2 = dist2*(one-scal*scal)
508 ipid = ixc(6,elem_cur)
509 belt_end_section(compt_belt_end) = belt_end_section
512 belt_end_nfram(compt_belt_end) = compt_fram - belt_end_addr(compt_belt_end) + 1
514 IF (tag_comn_1d_2d(i) == 1) tag_nod(i) = 0
525 DEALLOCATE(tag_nod_spring,tag_nod_shell,tag_comn_1d_2d)
527 CALL my_alloc(tag_res,numelr)
528 CALL my_alloc(tag_fram_seatbelt,compt_belt_end)
529 CALL my_alloc(nnod_fram_seatbelt,compt_belt_end)
530 tag_nod(1:numnod) = 0
531 tag_res(1:numelr) = 0
535 tag_fram_seatbelt(1:compt_belt_end) = 0
536 nnod_fram_seatbelt(1:compt_belt_end) = 0
542 IF (compt_belt_end == 0)
THEN
545 . anmode=aninfo_blind_1)
548 CALL my_alloc(branch_tab,2*nb_elem_1d)
550 DO i=1,compt_belt_end
554 IF (tag_nod(fram_tab(belt_end_addr(i)))==0)
THEN
555 seatbelt_id = seatbelt_id + 1
558 IF (belt_end_nfram(i) > 1) nb_2d_seatbelt = nb_2d_seatbelt + 1
560 DO j=1,belt_end_nfram(i)
563 nod_start = fram_tab(belt_end_addr(i)+j-1)
566 DO k=knod2el1d(nod_start)+1,knod2el1d(nod_start+1)
567 IF (nod2el1d(k) > numelt+numelp)
THEN
568 elem_cur = nod2el1d(k)-numelt-numelp
569 mid = ixr(5,elem_cur)
572 IF (mtyp == 114)
THEN
574 IF (((belt_end_nfram(i)==1).and.(tag_spring_2d(elem_cur)==0)).OR.
575 . ((belt_end_nfram(i) >1).and.(tag_spring_2d(elem_cur)==1)))
THEN
579 CALL new_seatbelt(ixr,itab,knod2el1d,nod2el1d,nod_start,
580 . elem_cur,tag_res,tag_nod,seatbelt_id,flag,
581 . nnod,ipm,nb_elem_1d,nb_branch,branch_tab,
585 DO WHILE(nb_branch > 0)
586 nod_start = branch_tab(2*(branch_cpt-nb_branch)+1)
587 elem_cur = branch_tab(2*(branch_cpt-nb_branch)+2)
588 nb_branch = nb_branch -1
589 CALL new_seatbelt(ixr,itab,knod2el1d,nod2el1d,nod_start,
590 . elem_cur,tag_res,tag_nod,seatbelt_id,flag,
591 . nnod,ipm,nb_elem_1d,nb_branch,branch_tab,
603 tag_fram_seatbelt(i) = seatbelt_id
604 nnod_fram_seatbelt(i) = nnod
606 ELSEIF(belt_end_nfram(i) > 1)
THEN
609 DO j=1,belt_end_nfram(i)
610 IF (tag_nod(fram_tab(belt_end_addr(i))) /= 0) compt = compt + 1
612 IF (compt /= belt_end_nfram(i))
THEN
615 . anmode=aninfo_blind_1,
623 DEALLOCATE(branch_tab,tag_spring_2d)
629 n_seatbelt = seatbelt_id
631 CALL my_alloc(tag_mat_2d,nummat)
632 tag_mat_2d(1:nummat) = 0
633 IF (nb_2d_seatbelt > 0)
THEN
634 CALL my_alloc(tag_shell,numelc)
635 CALL my_alloc(section_mat,nummat)
637 section_mat(1:nummat) = zero
646 DO j=1,compt_belt_end
647 IF (tag_fram_seatbelt(j)==i)
THEN
654 IF (tag_res(j) == i)
THEN
658 IF (tag_mat_2d(mid)==0) tag_mat_2d(mid) = -mid
662 DO l=knod2elc(node)+1,knod2elc(node+1)
663 elem_cur = nod2elc(l)
664 mid_2d = ixc(1,elem_cur)
668 IF (ixc(jj,elem_cur)==n2) flag_shell = 1
671 IF ((mtyp==119).AND.(flag_shell==1))
THEN
672 IF (tag_shell(elem_cur)==0)
THEN
673 tag_shell(elem_cur) = i
674 compt_2d = compt_2d + 1
675 tag_mat_2d(mid) = mid_2d
676 IF (section_mat(mid_2d) == zero)
THEN
678 ELSEIF (abs(
seatbelt_tab(i)%SECTION-section_mat(mid_2d)) > em05)
THEN
681 . anmode=aninfo_blind_1,
691 IF (iddlevel == 0)
CALL my_alloc(
seatbelt_tab(i)%SPRING,compt)
694 IF (tag_res(j) == i)
THEN
701 DEALLOCATE(belt_end_nfram,belt_end_section,belt_end_addr,fram_tab,tag_res,tag_fram_seatbelt,nnod_fram_seatbelt)
708 seatbelt_id = tag_nod(
retractor(i)%NODE(1))
718 CALL my_alloc(cpt_mat,nummat)
719 CALL my_alloc(av_len_mat,nummat)
720 CALL my_alloc(av_area_mat,nummat)
721 CALL my_alloc(elemsize_mat,nummat)
723 cpt_mat(1:nummat) = 0
724 av_len_mat(1:nummat) = zero
725 av_area_mat(1:nummat) = zero
726 elemsize_mat(1:nummat) = zero
731 ipid = ixr(1,elem_cur)
736 dist2 = (x(1,i1)-x(1,i2))**2+(x(2,i1)-x(2,i2))**2+(x(3,i1)-x(3,i2))**2
737 IF (dist2 > zero)
THEN
738 av_len_mat(mid) = av_len_mat(mid) + sqrt(dist2)
739 av_area_mat(mid) = av_area_mat(mid) + geo(1,ipid)
740 cpt_mat(mid) = cpt_mat(mid) + 1
748 IF (cpt_mat(mid) > 0)
THEN
749 lmin = bufmat(iadbuf+119-1)
750 IF (lmin == zero)
THEN
752 bufmat(iadbuf+119-1) = em02 * (av_len_mat(mid
753 IF (tag_print == 0)
WRITE(iout,1000)
755 WRITE(iout,
'(5X,I10,8X,G16.9)'
758 bufmat(iadbuf+126-1) = elemsize_mat(mid)
765 IF (cpt_mat(mid) > 0)
THEN
766 xc = bufmat(iadbuf+70)
767 xk = bufmat(iadbuf+64)
768 iecrou = int(bufmat(iadbuf
772 area = av_area_mat(mid) / cpt_mat(mid)
773 xc = zep3 * sqrt(rho*
area*xk) * (av_len_mat(mid) / cpt_mat(mid))
774 bufmat(iadbuf+70) = xc
775 IF (tag_print == 0)
WRITE(iout,1100)
777 WRITE(iout,
'(5X,I10,8X,G16.9)') ipm(1,abs(tag_mat_2d(mid))),bufmat(iadbuf+70)
779 bufmat(iadbuf+71) = 0.1*xc
780 bufmat(iadbuf+72) = 0.1*xc
782 IF ((tag_mat_2d(mid) > 0).AND.(iddlevel==0))
THEN
783 bufmat(iadbuf+127-1) = one
784 bufmat(iadbuf+128-1) = 0.9*pm(1,mid)
786 bufmat(iadbuf+71) = 0.3*xc
787 bufmat(iadbuf+72) = 0.3*xc
791 bufmat(iadbuf+76) = iecrou + em01
797 DEALLOCATE(cpt_mat,av_len_mat,av_area_mat,elemsize_mat,tag_mat_2d)
803 IF ((nb_2d_seatbelt > 0).AND.(iddlevel==0))
THEN
808 IF (mtyp == 119)
THEN
812 rho0=pm(1,mid)/section_mat(mid)
814 e11 = bufmat(iadbuf)/section_mat(mid)
815 e22 = bufmat(iadbuf+1)
816 fscalet = bufmat(iadbuf+12)
817 IF (e22 == em20) e22 = fscalet*e11
818 n12 = bufmat(iadbuf+2)
824 kmax =
max(one,fscalet)*bufmat(iadbuf+21)/section_mat(mid)
827 g12 = bufmat(iadbuf+5)
828 IF (g12 == em20) g12 = e11/(two*(one + n12))
829 det = one / (one - n12*n21)
835 a1c = bufmat(iadbuf+13)
836 a2c = bufmat(iadbuf+14)
837 c1 =
max(a11,a22,a1c)
844 . c1=
'SEATBELT MATERIAL')
846 fscale1 = bufmat(iadbuf+10)/section_mat(mid)
847 fscale2 = bufmat(iadbuf+11)/section_mat(mid)
850 bufmat(iadbuf+1) = e22
851 bufmat(iadbuf+3) = n21
852 bufmat(iadbuf+4) = nu
853 bufmat(iadbuf+5) = g12
854 bufmat(iadbuf+6) = a11
855 bufmat(iadbuf+7) = a22
856 bufmat(iadbuf+8) = a12
857 bufmat(iadbuf+10) = fscale1
858 bufmat(iadbuf+11) = fscale2
859 bufmat(iadbuf+16) = ssp
863 pm(20,mid) = kmax/(one - nu**2)
865 pm(22,mid) = half*kmax/(one + nu)
866 pm(24,mid) = kmax/(one - nu**2)
878 IF (tag_print == 0)
WRITE(iout,1200)
880 WRITE(iout,
'(5X,I10,8X,G16.9,G16.9,G16.9,G16.9)') ipm(1,mid),section_mat(mid),
886 IF (nb_2d_seatbelt > 0)
DEALLOCATE(section_mat)
894 offc = numels + numelq
895 offr = numels + numelq + numelc + numelp + numelt
913 CALL my_alloc(cc_elem,nb_elem)
914 cc_elem(1:nb_elem) = 0
921 IF (tag_shell(j) == i)
THEN
923 cc_elem(compt) = offc + j
938 IF (nb_2d_seatbelt > 0)
DEALLOCATE(tag_shell)
941 IF ((nb_elem_1d==0).and.(nb_elem_2d == 0))
THEN
942 DEALLOCATE(tag_nod_shell,tag_nod_spring,tag_nod_spri2d)
943 DEALLOCATE(tag_prop_2d,tag_spring_2d)
949 .
' SEATBELTS DEFAULT LMIN COMPUTATION '/
950 .
' ---------------------------------- '/
951 .
' MAT ID DEFAULT LMIN '/)
954 .
' SEATBELTS DEFAULT DAMPING COMPUTATION '/
955 .
' ---------------------------------- '/
956 .
' MAT ID DEFAULT DAMPING '/)
959 .
' 2D SEATBELTS SECTION COMPUTATION '/
960 .
' ---------------------------------- '/
961 .
' MAT ID SEATBELT SECTION E11 E22 G12'/)