OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i2forces.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/.
23!||====================================================================
24!|| i2forces ../engine/source/interfaces/interf/i2forces.F
25!||--- called by ------------------------------------------------------
26!|| i2curvf ../engine/source/interfaces/interf/i2curvf.F
27!|| i2curvfp ../engine/source/interfaces/interf/i2curvfp.F
28!|| i2fomo3 ../engine/source/interfaces/interf/i2for3.F
29!|| i2fomo3p ../engine/source/interfaces/interf/i2for3p.F
30!|| i2for25 ../engine/source/interfaces/interf/i2for25.F
31!|| i2for25p ../engine/source/interfaces/interf/i2for25p.F
32!|| i2for27_cin ../engine/source/interfaces/interf/i2for27_cin.F
33!|| i2for27_pen ../engine/source/interfaces/interf/i2for27_pen.F
34!|| i2for27p_cin ../engine/source/interfaces/interf/i2for27p_cin.F
35!|| i2for27p_pen ../engine/source/interfaces/interf/i2for27p_pen.F
36!|| i2for28_cin ../engine/source/interfaces/interf/i2for28_cin.F
37!|| i2for28_pen ../engine/source/interfaces/interf/i2for28_pen.F
38!|| i2for28p_cin ../engine/source/interfaces/interf/i2for28p_cin.F
39!|| i2for28p_pen ../engine/source/interfaces/interf/i2for28p_pen.F
40!|| i2for3 ../engine/source/interfaces/interf/i2for3.F
41!|| i2for3n ../engine/source/interfaces/interf/i2for3.F
42!|| i2for3o ../engine/source/interfaces/interf/i2for3.F
43!|| i2for3p ../engine/source/interfaces/interf/i2for3p.F
44!|| i2for3pn ../engine/source/interfaces/interf/i2for3p.f
45!|| i2for3po ../engine/source/interfaces/interf/i2for3p.F
46!||--- uses -----------------------------------------------------
47!|| h3d_mod ../engine/share/modules/h3d_mod.F
48!||====================================================================
49 SUBROUTINE i2forces(X ,FS ,FX ,FY ,FZ ,
50 . IRECT ,NIR ,FSAV ,FNCONT ,FNCONTP ,
51 . FTCONTP,WEIGHT ,H3D_DATA,NSL ,H)
52C-----------------------------------------------
53C M o d u l e s
54C-----------------------------------------------
55 USE h3d_mod
56C-----------------------------------------------
57#include "implicit_f.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER NSL,IRECT(4),NIR,WEIGHT(*)
62C REAL
64 . x(3,*),h(4),fsav(*),fncont(3,*),fncontp(3,*),ftcontp(3,*)
65 my_real , INTENT(IN) :: fs(3),fx(4),fy(4),fz(4)
66 TYPE (H3D_DATABASE) :: H3D_DATA
67C-----------------------------------------------
68C C o m m o n B l o c k s
69C-----------------------------------------------
70#include "com08_c.inc"
71#include "scr14_c.inc"
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 INTEGER N1,N2,N3,N4,J,JJ
76C REAL
78 . xc0,yc0,zc0,xc,yc,zc,x0,x1,x2,x3,x4,y0,y1,y2,y3,y4,
79 . z0,z1,z2,z3,z4,sx,sy,sz,tx,ty,tz,xcdg,ycdg,zcdg,mcdg,
80 . sum,fnorm,vnx,vny,vnz,vx,vy,vz,dt12m,fn(3),ft(3)
81C=======================================================================
82 IF (tt == zero) THEN
83 dt12m = one/dt2
84 ELSE
85 dt12m = one/dt12
86 ENDIF
87C
88 IF (weight(nsl)==1) THEN
89C
90 n1 = irect(1)
91 n2 = irect(2)
92 n3 = irect(3)
93 n4 = irect(4)
94C
95 x0 = x(1,nsl)
96 y0 = x(2,nsl)
97 z0 = x(3,nsl)
98 x1 = x(1,n1)
99 y1 = x(2,n1)
100 z1 = x(3,n1)
101 x2 = x(1,n2)
102 y2 = x(2,n2)
103 z2 = x(3,n2)
104 x3 = x(1,n3)
105 y3 = x(2,n3)
106 z3 = x(3,n3)
107 x4 = x(1,n4)
108 y4 = x(2,n4)
109 z4 = x(3,n4)
110C------------------------------------------------
111C directions normale/tangente facette main
112 sx = x2 + x3 - x1 - x4
113 sy = y2 + y3 - y1 - y4
114 sz = z2 + z3 - z1 - z4
115 tx = x3 + x4 - x1 - x2
116 ty = y3 + y4 - y1 - y2
117 tz = z3 + z4 - z1 - z2
118C------------------------------------------------
119 vnx = sy * tz - sz * ty
120 vny = sz * tx - sx * tz
121 vnz = sx * ty - sy * tx
122 sum = one / sqrt(vnx*vnx + vny*vny + vnz*vnz)
123 vnx = vnx * sum
124 vny = vny * sum
125 vnz = vnz * sum
126C
127C composantes N/T de la forces nodale
128C
129 fnorm = vnx*fs(1) + vny*fs(2) + vnz*fs(3)
130 fn(1) = vnx*fnorm
131 fn(2) = vny*fnorm
132 fn(3) = vnz*fnorm
133C
134 ft(1) = fs(1) - fn(1)
135 ft(2) = fs(2) - fn(2)
136 ft(3) = fs(3) - fn(3)
137C
138C-------- print of forces in TH
139C
140 fsav(1) = fsav(1) + fn(1)*dt1
141 fsav(2) = fsav(2) + fn(2)*dt1
142 fsav(3) = fsav(3) + fn(3)*dt1
143 fsav(4) = fsav(4) + ft(1)*dt1
144 fsav(5) = fsav(5) + ft(2)*dt1
145 fsav(6) = fsav(6) + ft(3)*dt1
146C
147C-------- print of forces in ANIM / H3D
148C
149 IF(anim_v(13)+h3d_data%N_VECT_CONT2>0) THEN
150 fncont(1,nsl) = fncont(1,nsl) - fs(1)
151 fncont(2,nsl) = fncont(2,nsl) - fs(2)
152 fncont(3,nsl) = fncont(3,nsl) - fs(3)
153 DO jj=1,nir
154 j=irect(jj)
155 fncont(1,j) = fncont(1,j) + fx(jj)
156 fncont(2,j) = fncont(2,j) + fy(jj)
157 fncont(3,j) = fncont(3,j) + fz(jj)
158 ENDDO
159 ENDIF
160C
161 IF(anim_v(27)+h3d_data%N_VECT_PCONT2>0) THEN ! Normal/Tangential forces output
162 fncontp(1,nsl) = fncontp(1,nsl) - fs(1)
163 fncontp(2,nsl) = fncontp(2,nsl) - fs(2)
164 fncontp(3,nsl) = fncontp(3,nsl) - fs(3)
165 DO jj=1,nir
166 j=irect(jj)
167 fncontp(1,j) = fncontp(1,j) + fx(jj)
168 fncontp(2,j) = fncontp(2,j) + fy(jj)
169 fncontp(3,j) = fncontp(3,j) + fz(jj)
170 ENDDO
171
172 ftcontp(1,nsl) = vnx
173 ftcontp(2,nsl) = vny
174 ftcontp(3,nsl) = vnz
175 DO jj=1,nir
176 j=irect(jj)
177 ftcontp(1,j) = ftcontp(1,j) - ftcontp(1,nsl)*h(jj)
178 ftcontp(2,j) = ftcontp(2,j) - ftcontp(2,nsl)*h(jj)
179 ftcontp(3,j) = ftcontp(3,j) - ftcontp(3,nsl)*h(jj)
180 ENDDO
181 ENDIF
182C
183 ENDIF
184C---
185 RETURN
186 END
#define my_real
Definition cppsort.cpp:32
subroutine i2for3p(nsn, nmn, a, crst, msr, nsv, ms, weight, stifn, mmass, fskyi2, iadi2, i0, nir, i2size, irect, x, v, fsav, fncont, irtl, h3d_data, csts_bis, fncontp, ftcontp)
Definition i2for3p.F:295
subroutine i2for3pn(nsn, nmn, a, crst, nsv, ms, weight, stifn, mmass, fskyi2, iadi2, i0, nir, i2size, idel2, smass, irect, x, v, fsav, fncont, irtl, h3d_data, csts_bis, fncontp, ftcontp)
Definition i2for3p.F:40
subroutine i2forces(x, fs, fx, fy, fz, irect, nir, fsav, fncont, fncontp, ftcontp, weight, h3d_data, nsl, h)
Definition i2forces.F:52