OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
reactions.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!|| reaction_forces_check_for_requested_output ../engine/source/output/reactions.f
25!||--- called by ------------------------------------------------------
26!|| resol ../engine/source/engine/resol.F
27!||--- uses -----------------------------------------------------
28!|| h3d_mod ../engine/share/modules/h3d_mod.F
29!||====================================================================
30 SUBROUTINE reaction_forces_check_for_requested_output(NPBY,H3D_DATA,COMPTREAC)
31C-----------------------------------------------
32C D e s c r i p t i o n
33C-----------------------------------------------
34C This subroutine is setting COMPTREAC to 1 if FREAC & MREAC output are requested
35C
36C CRITERA WHICH SET COMPTREAC TO 1 :
37C - RBODY IS SWITCHED OFF DUE TO CRITERION ON REACTION FORCES (Ifail=NPBY(18)=1)
38C - /ANIM/VECT/FREAC is requested (ANIM_V(17) = 1)
39C - /ANIM/VECT/MREAC is requested (ANIM_V(18) = 1)
40C - /H3D/NODA/FREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
41C - /H3D/NODA/MREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
42C - /TH/NODE/REAC is requested (IREAC=1)
43C
44C SEQUENCE IN SOLVER LOOP :
45C - REACTION_FORCES_CHECK_FOR_REQUESTED_OUTPUT : check if output is requested
46C - REACTION_FORCES_1 : add FEXT+FINT
47C --> FREAC = FEXT+FINT
48C - REACTION_FORCES_2 : add additional contribution Fgrav,Fbcs_cyclic,Fcentrif ...
49C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
50C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif)
51C - REACTION_FORCES_2 : add additional contribution Fdamping ...
52C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
53C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif) + (Fdamping)
54C - REACTION_FORCES_3 : Finally get what we need
55C --> FREAC = FTOT - (FEXT+FINT) - (Fgrav,Fbcs_cyclic,Fcentrif) - (Fdamping)
56C-----------------------------------------------
57C M o d u l e s
58C-----------------------------------------------
59 USE h3d_mod
60C-----------------------------------------------
61C I m p l i c i t T y p e s
62C-----------------------------------------------
63#include "implicit_f.inc"
64C-----------------------------------------------
65C C o m m o n B l o c k s
66C-----------------------------------------------
67#include "com01_c.inc"
68#include "com04_c.inc"
69#include "param_c.inc"
70#include "scr14_c.inc"
71C-----------------------------------------------
72C D u m m y A r g u m e n t s
73C-----------------------------------------------
74 INTEGER,INTENT(IN) :: NPBY(NNPBY,*)
75 INTEGER,INTENT(INOUT) :: COMPTREAC
76 TYPE(h3d_database),INTENT(IN) :: H3D_DATA
77C-----------------------------------------------
78C L o c a l V a r i a b l e s
79C-----------------------------------------------
80 INTEGER N, IFAIL
81C-----------------------------------------------
82C S o u r c e L i n e s
83C-----------------------------------------------
84
85 !---------------------------------------!
86 ! CRITERION FOR RBODY WITH 'Ifail' FLAG !
87 !---------------------------------------!
88 nrbfail = 0
89 DO n=1,nrbykin
90 ifail = npby(18,n)
91 IF(ifail /= 0) THEN
92 nrbfail = nrbfail + 1
93 END IF
94 ENDDO
95 IF(nrbfail /= 0) THEN
96 comptreac = 1
97 ENDIF
98
99 !-----------------------------------------------------!
100 ! CRITERION BASED ON OUTPUT REQUEST (ANIM, OUTP, H3D) !
101 !-----------------------------------------------------!
102 IF (anim_v(17) == 1 .OR. h3d_data%N_VECT_FREAC == 1 .OR. anim_v(18) == 1 .OR. h3d_data%N_VECT_MREAC == 1 ) THEN
103 comptreac = 1
104 END IF
105
106 !-----------------------------------------------------!
107 ! CRITERION BASED ON OUTPUT REQUEST (TH) !
108 !-----------------------------------------------------!
109 IF(ireac /= 0) THEN
110 comptreac=1
111 ENDIF
112
113C-----------------------------------------------
114 RETURN
115 END
116
117!||====================================================================
118!|| reaction_forces_1 ../engine/source/output/reactions.F
119!||--- called by ------------------------------------------------------
120!|| resol ../engine/source/engine/resol.F
121!||====================================================================
122 SUBROUTINE reaction_forces_1(NODFT ,NODLT ,A ,AR ,FREAC)
123C-----------------------------------------------
124C D e s c r i p t i o n
125C-----------------------------------------------
126C This subroutine is STEP 1 on 3 to OBTAIN FREAC array for output.
127C Output is calculated if COMPTREAC=1
128C
129C CRITERA WHICH SET COMPTREAC TO 1 :
130C - RBODY IS SWITCHED OFF DUE TO CRITERION ON REACTION FORCES (Ifail=NPBY(18)=1)
131C - /ANIM/VECT/FREAC is requested (ANIM_V(17) = 1)
132C - /ANIM/VECT/MREAC is requested (ANIM_V(18) = 1)
133C - /H3D/NODA/FREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
134C - /H3D/NODA/MREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
135C - /TH/NODE/REAC is requested (IREAC=1)
136C
137C SEQUENCE IN SOLVER LOOP :
138C - REACTION_FORCES_CHECK_FOR_REQUESTED_OUTPUT : check if output is requested
139C - REACTION_FORCES_1 : add FEXT+FINT
140C --> FREAC = FEXT+FINT
141C - REACTION_FORCES_2 : add additional contribution Fgrav,Fbcs_cyclic,Fcentrif ...
142C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
143C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif)
144C - REACTION_FORCES_2 : add additional contribution Fdamping ...
145C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
146C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif) + (Fdamping)
147C - REACTION_FORCES_3 : Finally get what we need
148C --> FREAC = FTOT - (FEXT+FINT) - (Fgrav,Fbcs_cyclic,Fcentrif) - (Fdamping)
149C-----------------------------------------------
150C I m p l i c i t T y p e s
151C-----------------------------------------------
152#include "implicit_f.inc"
153C-----------------------------------------------
154C C o m m o n B l o c k s
155C-----------------------------------------------
156#include "com01_c.inc"
157#include "com04_c.inc"
158C-----------------------------------------------
159C D u m m y A r g u m e n t s
160C-----------------------------------------------
161 INTEGER,INTENT(IN) :: NODFT, NODLT
162 my_real,INTENT(IN) :: a(3,numnod) , ar(3,numnod)
163 my_real,INTENT(INOUT) :: freac(6,numnod)
164C-----------------------------------------------
165C L o c a l V a r i a b l e s
166C-----------------------------------------------
167 INTEGER N
168C-----------------------------------------------
169C S o u r c e L i n e s
170C-----------------------------------------------
171
172 !------------------------------------------------!
173 ! SAVING FORCES (FEXT+FINT+FCONT) !
174 !------------------------------------------------!
175 DO n=nodft,nodlt
176 freac(1,n) = a(1,n)
177 freac(2,n) = a(2,n)
178 freac(3,n) = a(3,n)
179 ENDDO
180
181 IF (iroddl/=0) THEN
182 DO n=nodft,nodlt
183 freac(4,n) = ar(1,n)
184 freac(5,n) = ar(2,n)
185 freac(6,n) = ar(3,n)
186 ENDDO
187 END IF
188
189C-----------------------------------------------
190 RETURN
191 END SUBROUTINE reaction_forces_1
192
193!||====================================================================
194!|| reaction_forces_2 ../engine/source/output/reactions.F
195!||--- called by ------------------------------------------------------
196!|| resol ../engine/source/engine/resol.F
197!||====================================================================
198 SUBROUTINE reaction_forces_2(NODFT,NODLT,A,AR,MS,IN,FREAC,IFLAG )
199C-----------------------------------------------
200C D e s c r i p t i o n
201C-----------------------------------------------
202C This subroutine is STEP 2 on 3 to OBTAIN FREAC array for output.
203C Output is calculated if COMPTREAC=1
204C
205C CRITERA WHICH SET COMPTREAC TO 1 :
206C - RBODY IS SWITCHED OFF DUE TO CRITERION ON REACTION FORCES (Ifail=NPBY(18)=1)
207C - /ANIM/VECT/FREAC is requested (ANIM_V(17) = 1)
208C - /ANIM/VECT/MREAC is requested (ANIM_V(18) = 1)
209C - /H3D/NODA/FREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
210C - /H3D/NODA/MREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
211C - /TH/NODE/REAC is requested (IREAC=1)
212C
213C SEQUENCE IN SOLVER LOOP :
214C - REACTION_FORCES_CHECK_FOR_REQUESTED_OUTPUT : check if output is requested
215C - REACTION_FORCES_1 : add FEXT+FINT
216C --> FREAC = FEXT+FINT
217C - REACTION_FORCES_2 : add additional contribution Fgrav,Fbcs_cyclic,Fcentrif ...
218C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
219C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif)
220C - REACTION_FORCES_2 : add additional contribution Fdamping ...
221C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
222C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif) + (Fdamping)
223C - REACTION_FORCES_3 : Finally get what we need
224C --> FREAC = FTOT - (FEXT+FINT) - (Fgrav,Fbcs_cyclic,Fcentrif) - (Fdamping)
225C-----------------------------------------------
226C I m p l i c i t T y p e s
227C-----------------------------------------------
228#include "implicit_f.inc"
229C-----------------------------------------------
230C C o m m o n B l o c k s
231C-----------------------------------------------
232#include "com01_c.inc"
233#include "com04_c.inc"
234C-----------------------------------------------
235C D u m m y A r g u m e n t s
236C-----------------------------------------------
237 INTEGER,INTENT(IN) :: NODFT, NODLT, IFLAG
238 my_real,INTENT(IN) :: a(3,numnod) , ar(3,numnod), ms(numnod), in(iroddl*numnod)
239 my_real,INTENT(INOUT) :: freac(6,numnod)
240C-----------------------------------------------
241C L o c a l V a r i a b l e s
242C-----------------------------------------------
243 INTEGER N
244C-----------------------------------------------
245C S o u r c e L i n e s
246C-----------------------------------------------
247
248 !-----------------------------------------------------------!
249 ! COMPUTE REACTION FORCES (ADDITIONAL CONTRIBUTION) !
250 !-----------------------------------------------------------!
251 DO n=nodft,nodlt
252 freac(1,n) = freac(1,n) + iflag * ms(n)*a(1,n)
253 freac(2,n) = freac(2,n) + iflag * ms(n)*a(2,n)
254 freac(3,n) = freac(3,n) + iflag * ms(n)*a(3,n)
255 ENDDO
256
257 IF (iroddl/=0) THEN
258 DO n=nodft,nodlt
259 freac(4,n) = freac(4,n) + iflag * in(n)*ar(1,n)
260 freac(5,n) = freac(5,n) + iflag * in(n)*ar(2,n)
261 freac(6,n) = freac(6,n) + iflag * in(n)*ar(3,n)
262 ENDDO
263 END IF
264
265C-----------------------------------------------
266 RETURN
267 END SUBROUTINE reaction_forces_2
268
269!||====================================================================
270!|| reaction_forces_3 ../engine/source/output/reactions.F
271!||--- called by ------------------------------------------------------
272!|| resol ../engine/source/engine/resol.F
273!||====================================================================
274 SUBROUTINE reaction_forces_3(NODFT,NODLT,A,AR,MS,IN,FREAC)
275C-----------------------------------------------
276C D e s c r i p t i o n
277C-----------------------------------------------
278C This subroutine is STEP 3 on 3 to OBTAIN FREAC array for output.
279C Output is calculated if COMPTREAC=1
280C
281C CRITERA WHICH SET COMPTREAC TO 1 :
282C - RBODY IS SWITCHED OFF DUE TO CRITERION ON REACTION FORCES (Ifail=NPBY(18)=1)
283C - /ANIM/VECT/FREAC is requested (ANIM_V(17) = 1)
284C - /ANIM/VECT/MREAC is requested (ANIM_V(18) = 1)
285C - /H3D/NODA/FREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
286C - /H3D/NODA/MREAC is requested (H3D_DATA%N_VECT_FREAC = 1)
287C - /TH/NODE/REAC is requested (IREAC=1)
288C
289C SEQUENCE IN SOLVER LOOP :
290C - REACTION_FORCES_CHECK_FOR_REQUESTED_OUTPUT : check if output is requested
291C - REACTION_FORCES_1 : add FEXT+FINT
292C --> FREAC = FEXT+FINT
293C - REACTION_FORCES_2 : add additional contribution Fgrav,Fbcs_cyclic,Fcentrif ...
294C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
295C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif)
296C - REACTION_FORCES_2 : add additional contribution Fdamping ...
297C first time with IFLAG=-1, then followed with IFLAG = 1 : Fadd=m(A-A~)
298C --> FREAC = (FEXT+FINT) + (Fgrav,Fbcs_cyclic,Fcentrif) + (Fdamping)
299C - REACTION_FORCES_3 : Finally get what we need
300C --> FREAC = FTOT - (FEXT+FINT) - (Fgrav,Fbcs_cyclic,Fcentrif) - (Fdamping)
301C-----------------------------------------------
302C I m p l i c i t T y p e s
303C-----------------------------------------------
304#include "implicit_f.inc"
305C-----------------------------------------------
306C C o m m o n B l o c k s
307C-----------------------------------------------
308#include "com01_c.inc"
309#include "com04_c.inc"
310C-----------------------------------------------
311C D u m m y A r g u m e n t s
312C-----------------------------------------------
313 INTEGER,INTENT(IN) :: NODFT, NODLT
314 my_real,INTENT(IN) :: a(3,numnod) , ar(3,numnod), ms(numnod), in(iroddl*numnod)
315 my_real,INTENT(INOUT) :: freac(6,numnod)
316C-----------------------------------------------
317C L o c a l V a r i a b l e s
318C-----------------------------------------------
319 INTEGER N
320C-----------------------------------------------
321C S o u r c e L i n e s
322C-----------------------------------------------
323
324 !------------------------------------------------!
325 ! COMPUTE REACTION FORCES (FINALIZATION) !
326 !------------------------------------------------!
327 DO n=nodft,nodlt
328 freac(1,n) = ms(n)*a(1,n) - freac(1,n)
329 freac(2,n) = ms(n)*a(2,n) - freac(2,n)
330 freac(3,n) = ms(n)*a(3,n) - freac(3,n)
331 ENDDO
332
333 IF (iroddl/=0) THEN
334 DO n=nodft,nodlt
335 freac(4,n) = in(n)*ar(1,n) - freac(4,n)
336 freac(5,n) = in(n)*ar(2,n) - freac(5,n)
337 freac(6,n) = in(n)*ar(3,n) - freac(6,n)
338 ENDDO
339 END IF
340
341C-----------------------------------------------
342 RETURN
343 END SUBROUTINE reaction_forces_3
#define my_real
Definition cppsort.cpp:32
subroutine reaction_forces_check_for_requested_output(npby, h3d_data, comptreac)
Definition reactions.F:31
subroutine reaction_forces_1(nodft, nodlt, a, ar, freac)
Definition reactions.F:123
subroutine reaction_forces_3(nodft, nodlt, a, ar, ms, in, freac)
Definition reactions.F:275
subroutine reaction_forces_2(nodft, nodlt, a, ar, ms, in, freac, iflag)
Definition reactions.F:199