OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i2forces_2D.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_2d ../engine/source/interfaces/interf/i2forces_2D.F
25!||--- called by ------------------------------------------------------
26!|| i2for3n ../engine/source/interfaces/interf/i2for3.F
27!|| i2for3pn ../engine/source/interfaces/interf/i2for3p.F
28!||--- uses -----------------------------------------------------
29!|| h3d_mod ../engine/share/modules/h3d_mod.F
30!||====================================================================
31 SUBROUTINE i2forces_2d(X ,FS ,FX ,FY ,FZ ,
32 . IRECT ,NIR ,FSAV ,FNCONT ,FNCONTP ,
33 . FTCONTP,WEIGHT ,H3D_DATA,NSL ,H)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE h3d_mod
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER , INTENT(IN) :: NSL,IRECT(4),NIR,WEIGHT(NUMNOD)
44 my_real , INTENT(IN) :: X(3,NUMNOD),H(4)
45 my_real , INTENT(INOUT) :: fsav(6),fncont(3,numnod),fncontp(3,numnod),
46 . ftcontp(3,numnod)
47 my_real , INTENT(IN) :: fs(3),fx(4),fy(4),fz(4)
48 TYPE(h3d_database),INTENT(IN) :: H3D_DATA
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com04_c.inc"
53#include "com08_c.inc"
54#include "scr14_c.inc"
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER N1,N2,N3,N4,J,JJ
59C REAL
60 my_real
61 . xc0,yc0,zc0,xc,yc,zc,x0,x1,x2,y0,y1,y2,
62 . z0,z1,z2,xcdg,ycdg,zcdg,mcdg,
63 . sum,fnorm,vx,vy,vz,dt12m,fn(3),ft(3)
64C=======================================================================
65 IF (tt == zero) THEN
66 dt12m = one/dt2
67 ELSE
68 dt12m = one/dt12
69 ENDIF
70C
71 IF (weight(nsl)==1) THEN
72C
73 n1 = irect(1)
74 n2 = irect(2)
75C
76 x0 = x(1,nsl)
77 y0 = x(2,nsl)
78 z0 = x(3,nsl)
79 x1 = x(1,n1)
80 y1 = x(2,n1)
81 z1 = x(3,n1)
82 x2 = x(1,n2)
83 y2 = x(2,n2)
84 z2 = x(3,n2)
85C------------------------------------------------
86C direction of segment
87 vx = x1 - x2
88 vy = y1 - y2
89 vz = z1 - z2
90C------------------------------------------------
91 sum = one / sqrt(vx*vx + vy*vy + vz*vz)
92 vx = vx * sum
93 vy = vy * sum
94 vz = vz * sum
95C
96C composantes N/T de la forces nodale
97C
98 fnorm = vx*fs(1) + vy*fs(2) + vz*fs(3)
99 ft(1) = vx*fnorm
100 ft(2) = vy*fnorm
101 ft(3) = vz*fnorm
102C
103 fn(1) = fs(1) - ft(1)
104 fn(2) = fs(2) - ft(2)
105 fn(3) = fs(3) - ft(3)
106C
107C-------- print of forces in TH
108C
109 fsav(1) = fsav(1) + fn(1)*dt1
110 fsav(2) = fsav(2) + fn(2)*dt1
111 fsav(3) = fsav(3) + fn(3)*dt1
112 fsav(4) = fsav(4) + ft(1)*dt1
113 fsav(5) = fsav(5) + ft(2)*dt1
114 fsav(6) = fsav(6) + ft(3)*dt1
115C
116C-------- print of forces in ANIM / H3D
117C
118 IF(anim_v(13)+h3d_data%N_VECT_CONT2>0) THEN
119 fncont(1,nsl) = fncont(1,nsl) - fs(1)
120 fncont(2,nsl) = fncont(2,nsl) - fs(2)
121 fncont(3,nsl) = fncont(3,nsl) - fs(3)
122 DO jj=1,nir
123 j=irect(jj)
124 fncont(1,j) = fncont(1,j) + fx(jj)
125 fncont(2,j) = fncont(2,j) + fy(jj)
126 fncont(3,j) = fncont(3,j) + fz(jj)
127 ENDDO
128 ENDIF
129C
130 IF(anim_v(27)+h3d_data%N_VECT_PCONT2>0) THEN ! Normal/Tangential forces output
131 fncontp(1,nsl) = fncontp(1,nsl) - fs(1)
132 fncontp(2,nsl) = fncontp(2,nsl) - fs(2)
133 fncontp(3,nsl) = fncontp(3,nsl) - fs(3)
134 DO jj=1,nir
135 j=irect(jj)
136 fncontp(1,j) = fncontp(1,j) + fx(jj)
137 fncontp(2,j) = fncontp(2,j) + fy(jj)
138 fncontp(3,j) = fncontp(3,j) + fz(jj)
139 ENDDO
140
141 ftcontp(1,nsl) = vx
142 ftcontp(2,nsl) = vy
143 ftcontp(3,nsl) = vz
144 DO jj=1,nir
145 j=irect(jj)
146 ftcontp(1,j) = ftcontp(1,j) - ftcontp(1,nsl)*h(jj)
147 ftcontp(2,j) = ftcontp(2,j) - ftcontp(2,nsl)*h(jj)
148 ftcontp(3,j) = ftcontp(3,j) - ftcontp(3,nsl)*h(jj)
149 ENDDO
150 ENDIF
151C
152 ENDIF
153C---
154 RETURN
155 END
subroutine i2forces_2d(x, fs, fx, fy, fz, irect, nir, fsav, fncont, fncontp, ftcontp, weight, h3d_data, nsl, h)
Definition i2forces_2D.F:34