OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
aconv3.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!|| aconv3 ../engine/source/ale/ale3d/aconv3.F
25!||--- called by ------------------------------------------------------
26!|| aconve ../engine/source/ale/aconve.F
27!||--- calls -----------------------------------------------------
28!|| my_barrier ../engine/source/system/machine.F
29!||--- uses -----------------------------------------------------
30!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
31!|| alefvm_mod ../common_source/modules/ale/alefvm_mod.F
32!|| element_mod ../common_source/modules/elements/element_mod.F90
33!|| i22tri_mod ../common_source/modules/interfaces/cut-cell-search_mod.F
34!||====================================================================
35 SUBROUTINE aconv3(VTOT ,PHI,FLUX,FLU1,IXS,
36 . ALE_CONNECT,IOFF,QMV,IFLG,
37 . TAG22,NVAR,ITASK)
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE i22tri_mod ! , use only : ibug22_convec
42 USE alefvm_mod
44 use element_mod , only : nixs
45C-----------------------------------------------
46C I m p l i c i t T y p e s
47C-----------------------------------------------
48#include "implicit_f.inc"
49#include "mvsiz_p.inc"
50#include "comlock.inc"
51#include "inter22.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER IOFF, IFLG,IXS(NIXS,NUMELS),NVAR,ITASK
56 my_real VTOT(*), PHI(*), FLUX(6,*), FLU1(*), QMV(12,*), TAG22(MVSIZ)
57 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
58C-----------------------------------------------
59C C o m m o n B l o c k s
60C-----------------------------------------------
61#include "com01_c.inc"
62#include "com04_c.inc"
63#include "com08_c.inc"
64#include "vect01_c.inc"
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER :: I, IE, IV,J,IAD2,LGTH
69 my_real :: VALVOIS(6,MVSIZ),VALEL(MVSIZ),VL(6,MVSIZ), DELTA(MVSIZ)
70 LOGICAL debug_outp
71C-----------------------------------------------
72C S o u r c e L i n e s
73C-----------------------------------------------
74
75 !---------------------------------------------------------!
76 ! CONVECTION !
77 !---------------------------------------------------------!
78 DO i=lft,llt
79 ie = nft+i
80 valel(i) = phi(ie)
81 ENDDO
82 DO i=lft,llt
83 ie = nft+i
84 iad2 = ale_connect%ee_connect%iad_connect(ie)
85 lgth = ale_connect%ee_connect%iad_connect(ie+1) - iad2
86 DO j=1,lgth
87
88 iv = ale_connect%ee_connect%connected(iad2 + j - 1)
89 IF(iv > 0)THEN
90 valvois(j,i) = phi(iv)
91 ELSEIF(iv == 0)THEN
92 valvois(j,i) = phi(ie)
93 ELSE
94 !-IV is segment ID
95 ! ebcs PHI(NUMEL + 1:NSEGFLU) is filled in aconve.F using SEGVAR (filled in ebcs[0-9][0-9].F)
96 valvois(j,i) = phi(-iv+ioff)
97 ENDIF
98 ENDDO
99 ENDDO
100
101 DO i=lft,llt
102 vl(1,i) = valvois(1,i)*flux(1,i)
103 vl(2,i) = valvois(2,i)*flux(2,i)
104 vl(3,i) = valvois(3,i)*flux(3,i)
105 vl(4,i) = valvois(4,i)*flux(4,i)
106 vl(5,i) = valvois(5,i)*flux(5,i)
107 vl(6,i) = valvois(6,i)*flux(6,i)
108 delta(i) = half * dt1 *(-valel(i)*flu1(i) - vl(1,i)-vl(2,i)-vl(3,i)-vl(4,i)-vl(5,i)-vl(6,i))
109 ENDDO
110
111 IF(alefvm_param%IEnabled/=0)THEN
112 IF(nvar==2)THEN
113 DO i=lft,llt
114 delta(i) = delta(i) + (alefvm_param%IWFEXT)*dt1*alefvm_buffer%WFEXT_CELL(i+nft)
115 ENDDO
116 ENDIF
117 ENDIF
118
119 IF(int22==0)THEN
120 DO i=lft,llt
121 vtot(i) = vtot(i) + delta(i)
122 ENDDO
123 ELSE
124 DO i=lft,llt
125 IF(tag22(i)==zero) vtot(i) = vtot(i) + delta(i) !can be optimized later (conditional test is currently within the loop)
126 ENDDO
127 ENDIF
128
129 IF(trimat > 0.AND.iflg == 1)THEN
130 DO i=lft,llt
131 qmv(1,i) = qmv(1,i) - vl(1,i) - valel(i)*qmv(07,i)
132 qmv(2,i) = qmv(2,i) - vl(2,i) - valel(i)*qmv(08,i)
133 qmv(3,i) = qmv(3,i) - vl(3,i) - valel(i)*qmv(09,i)
134 qmv(4,i) = qmv(4,i) - vl(4,i) - valel(i)*qmv(10,i)
135 qmv(5,i) = qmv(5,i) - vl(5,i) - valel(i)*qmv(11,i)
136 qmv(6,i) = qmv(6,i) - vl(6,i) - valel(i)*qmv(12,i)
137 ENDDO
138 ENDIF
139C-----------
140
141
142 !INTERFACE 22 ONLY / OUTPUT---------------!(OBSOLETE)
143 !---------------------------------------------------------!
144 ! DEBUG OUTPUT !
145 !---------------------------------------------------------!
146 !INTERFACE 22 ONLY - OUTPUT---------------!
147 debug_outp = .false.
148 if(int22>0)then
149 debug_outp=.false.
150 if(ibug22_convec /= 0 .AND. ibug22_nvar==nvar)then
151 debug_outp=.true.
152 endif
153
154 if(debug_outp .AND. ibug22_nvar==nvar)then
155
156 call my_barrier
157
158 if(itask==0)then
159 if(ibug22_nvar==nvar)then
160 do i=lft,llt
161 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
162 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
163 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
164 if(delta(i) == zero)cycle
165 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
166 print *, " brique=", ixs(11,nft+i)
167 print *, " nvar=", nvar
168 print *, " dval=", delta(i)
169 print *, " was:", vtot(i)-delta(i)
170 print *, " is:", vtot(i)
171 print *, " ------------------------"
172 endif
173 endif
174 enddo
175 endif!(IBUG22_NVAR==NVAR)
176 endif !itask
177
178 call my_barrier
179
180 if(itask==1)then
181 if(ibug22_nvar==nvar)then
182 do i=lft,llt
183 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
184 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
185 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
186 if(delta(i) == zero)cycle
187 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
188 print *, " brique=", ixs(11,nft+i)
189 print *, " nvar=", nvar
190 print *, " dval=", delta(i)
191 print *, " was:", vtot(i)-delta(i)
192 print *, " is:", vtot(i)
193 print *, " ------------------------"
194 endif
195 endif
196 enddo
197 endif!(IBUG22_NVAR==NVAR)
198 endif !itask
199
200 call my_barrier
201
202 if(itask==2)then
203 if(ibug22_nvar==nvar)then
204 do i=lft,llt
205 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
206 if(ibug22_convec == ixs(11,i+nft) .OR. ibug22_convec == -1)then
207 if((ibug22_convec==ixs(11,nft+i).OR.ibug22_convec==-1) .AND. nvar==1)then
208 if(delta(i) == zero)cycle
209 !if(int22>0)then;if (tag22(i)==zero)then;print *," UNCUT";endif;endif
210 print *, " brique=", ixs(11,nft+i)
211 print *, " nvar=", NVAR
212 print *, " dval=", delta(i)
213 print *, " was:", vtot(i)-delta(i)
214 print *, " is:", vtot(i)
215 print *, " ------------------------"
216 endif
217 endif
218 enddo
219 endif!(IBUG22_NVAR==NVAR)
220 endif !itask
221
222 call my_barrier
223
224 if(itask==3)then
225 if(IBUG22_NVAR==NVAR)then
226 do i=lft,llt
227 if(int22>0)then;if (tag22(i)/=zero)then;cycle ;endif;endif
228.OR. if(ibug22_convec == ixs(11,i+nft) ibug22_convec == -1)then
229.OR..AND. if((ibug22_convec==ixs(11,nft+i)ibug22_convec==-1) nvar==1)then
230 if(delta(i) == zero)cycle
231 !if(int22>0)then;if (tag22(i)==zero)then;print *," uncut";endif;endif
232 print *, " brique=", ixs(11,nft+i)
233 print *, " nvar=", NVAR
234 print *, " dval=", delta(i)
235 print *, " was:", vtot(i)-delta(i)
236 print *, " is:", vtot(i)
237 print *, " ------------------------"
238 endif
239 endif
240 enddo
241 endif!(IBUG22_NVAR==NVAR)
242 endif !itask
243
244 endif!(debug_outp==.true.)
245 endif!(int22>0)
246 !-----------------------------------------!
247
248C-----------------------------------------------
249 RETURN
250 END
251C
subroutine aconv3(vtot, phi, flux, flu1, ixs, ale_connect, ioff, qmv, iflg, tag22, nvar, itask)
Definition aconv3.F:38
type(alefvm_buffer_), target alefvm_buffer
Definition alefvm_mod.F:120
type(alefvm_param_), target alefvm_param
Definition alefvm_mod.F:121
subroutine my_barrier
Definition machine.F:31