OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i3pen2.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23C
24!||====================================================================
25!|| i3pen2 ../starter/source/interfaces/inter2d1/i3pen2.F
26!||--- called by ------------------------------------------------------
27!|| inint2 ../starter/source/interfaces/inter2d1/inint2.F
28!||--- calls -----------------------------------------------------
29!|| ancmsg ../starter/source/output/message/message.F
30!||--- uses -----------------------------------------------------
31!|| format_mod ../starter/share/modules1/format_mod.F90
32!|| message_mod ../starter/share/message_module/message_mod.F
33!||====================================================================
34 SUBROUTINE i3pen2(X,IRECT,MSR,NSV,ILOC,IRTL,NSN,
35 1 CST,IRTLO,FRIC0,FRIC,GAP,IWPENE,
36 2 ITAB,ID,TITR)
37 USE message_mod
39 USE format_mod , ONLY : fmw_5i_f, fmw_5i
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47#include "units_c.inc"
48#include "scr03_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER NSN,IWPENE
53 my_real FRIC, GAP
54 INTEGER IRECT(4,*), MSR(*), NSV(*), ILOC(*), IRTL(*), IRTLO(*), ITAB(*)
55 my_real x(3,*), cst(2,*), fric0(3,*)
56 INTEGER ID
57 CHARACTER(LEN=NCHARTITLE) :: TITR
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61 INTEGER II, I, J, K, L, M, JJ
62 my_real N2, N3, YS, ZS, T2, T3, XL, PEN, SS, YM1, YM2, ZM1, ZM2
63C-----------------------------------------------
64C S o u r c e L i n e s
65C-----------------------------------------------
66 DO 150 ii=1,nsn
67 i=nsv(ii)
68 j=iloc(ii)
69 k=msr(j)
70 l=irtl(ii)
71 irtlo(ii)=0
72 fric0(1,ii)=zero
73 m=msr(irect(1,l))
74 ym1=x(2,m)
75 zm1=x(3,m)
76 m=msr(irect(2,l))
77 ym2=x(2,m)
78 zm2=x(3,m)
79 ys =x(2,i)
80 zs =x(3,i)
81C-----------------------------
82C PENETRATION
83C-----------------------------
84 t2=ym2-ym1
85 t3=zm2-zm1
86 xl=sqrt(t2**2+t3**2)
87 IF(xl==0.0)THEN
88 CALL ancmsg(msgid=80,msgtype=msgerror,anmode=aninfo,i1=id,c1=titr,i2=l,i3=itab(msr(irect(1,l))),i4=itab(msr(irect(2,l))))
89 ENDIF
90 t2=t2/xl
91 t3=t3/xl
92 n2= t3
93 n3=-t2
94 pen=n2*(ys-ym1)+n3*(zs-zm1)-gap
95 IF(pen>0.0)THEN
96 GOTO 110
97 ENDIF
98 ss=t2*(ys-ym1)+t3*(zs-zm1)
99 ss=ss/xl
100 ss=two*ss-one
101 IF(ss> onep05)GO TO 110
102 IF(ss<-onep05)GO TO 110
103 IF(pen<zero)THEN
104 iwpene=iwpene+1
105 CALL ancmsg(msgid=346,msgtype=msgwarning,anmode=aninfo_blind_2,i1=id,i2=itab(i),c1=titr,r1=pen)
106 ENDIF
107 IF(ipri>=1)THEN
108 WRITE(iout,fmt=fmw_5i_f)itab(i),itab(k),l,itab(msr(irect(1,l))),itab(msr(irect(2,l))),ss
109 ENDIF
110 IF(fric==0.0) GO TO 150
111 irtlo(ii)=l
112 cst(1,ii)=ss
113 GO TO 150
114 110 CONTINUE
115 IF(ipri>=1)THEN
116 WRITE(iout,fmt=fmw_5i)itab(i),itab(k),l,itab(msr(irect(1,l))),itab(msr(irect(2,l)))
117 ENDIF
118 150 CONTINUE
119C
120 RETURN
121 END
subroutine i3pen2(x, irect, msr, nsv, iloc, irtl, nsn, cst, irtlo, fric0, fric, gap, iwpene, itab, id, titr)
Definition i3pen2.F:37
integer, parameter nchartitle
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889