OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
akturb.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!|| akturb ../engine/source/ale/turbulence/akturb.F
25!||--- called by ------------------------------------------------------
26!|| alethe ../engine/source/ale/alethe.F
27!||--- calls -----------------------------------------------------
28!|| adiff2 ../engine/source/ale/ale2d/adiff2.F
29!|| adiff3 ../engine/source/ale/ale3d/adiff3.F
30!|| initbuf ../engine/share/resol/initbuf.F
31!|| my_barrier ../engine/source/system/machine.F
32!|| spmd_evois ../engine/source/mpi/fluid/spmd_cfd.F
33!||--- uses -----------------------------------------------------
34!|| ale_connectivity_mod ../common_source/modules/ale/ale_connectivity_mod.F
35!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
36!|| element_mod ../common_source/modules/elements/element_mod.F90
37!|| initbuf_mod ../engine/share/resol/initbuf.F
38!|| matparam_def_mod ../common_source/modules/mat_elem/matparam_def_mod.F90
39!||====================================================================
40 SUBROUTINE akturb(
41 1 IPARG ,ELBUF_TAB ,FLUX ,VAL2 ,XK ,
42 2 ALE_CONNECT ,IXS ,IXQ ,PM ,ITASK ,
43 3 NERCVOIS ,NESDVOIS ,LERCVOIS ,LESDVOIS ,LENCOM ,
44 4 MATPARAM)
45C-----------------------------------------------
46C M o d u l e s
47C-----------------------------------------------
48 USE initbuf_mod
49 USE elbufdef_mod
51 USE matparam_def_mod, ONLY : matparam_struct_
52 use element_mod , only : nixs
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C C o m m o n B l o c k s
59C-----------------------------------------------
60#include "com01_c.inc"
61#include "com04_c.inc"
62#include "vect01_c.inc"
63#include "param_c.inc"
64#include "task_c.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 INTEGER IPARG(NPARG,NGROUP), IXS(NIXS,NUMELS), IXQ(7,NUMELQ),
69 . NERCVOIS(*),NESDVOIS(*),LERCVOIS(*),LESDVOIS(*),
70 . LENCOM
71 my_real FLUX(*), VAL2(*), XK(*), PM(NPROPM,NUMMAT)
72 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
73 TYPE(t_ale_connectivity), INTENT(IN) :: ALE_CONNECT
74 TYPE(MATPARAM_STRUCT_),DIMENSION(NUMMAT),INTENT(IN) :: MATPARAM !< material buffer
75C-----------------------------------------------
76C L o c a l V a r i a b l e s
77C-----------------------------------------------
78 INTEGER NG, I, J, MT, ITASK, NEL, MID
79 my_real RK, RE, R, XMT, rhocp
80 TYPE(G_BUFEL_) ,POINTER :: GBUF
81C-----------------------------------------------
82C S o u r c e L i n e s
83C-----------------------------------------------
84 DO ng=itask+1,ngroup,nthread
85 !ALE ON / OFF
86 IF (iparg(76, ng) == 1) cycle ! --> OFF
87 gbuf => elbuf_tab(ng)%GBUF
88c
89 CALL initbuf(iparg ,ng ,
90 2 mtn ,llt ,nft ,iad ,ity ,
91 3 npt ,jale ,ismstr ,jeul ,jtur ,
92 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
93 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
94 6 irep ,iint ,igtyp ,israt ,isrot ,
95 7 icsen ,isorth ,isorthg ,ifailure,jsms )
96 IF(jale+jeul == 0) cycle
97 IF(iparg(8,ng) == 1) cycle
98 lft=1
99 IF(jtur == 1)THEN
100 IF(n2d == 0)THEN
101 DO i=lft,llt
102 j=i+nft
103 mt=ixs(1,j)
104 rk=gbuf%RK(i)
105 re=gbuf%RE(i)
106 r =gbuf%RHO(i)
107 xk(j)=rk/r
108 xmt=pm(81,mt)*rk*rk / max(em15,re)
109 val2(j)=xmt/pm(85,mt)
110 enddo!next I
111 ELSE
112 DO i=lft,llt
113 j=i+nft
114 mt=ixq(1,j)
115 rk=gbuf%RK(i)
116 re=gbuf%RE(i)
117 r =gbuf%RHO(i)
118 xk(j)=rk/r
119 xmt=pm(81,mt)*rk*rk / max(em15,re)
120 val2(j)=xmt/pm(85,mt)
121 enddo!next I
122 ENDIF
123 ELSE
124 DO i=lft,llt
125 j=i+nft
126 xk(j)=zero
127 enddo!next I
128 ENDIF
129 IF(jpor == 2)THEN
130 ! POROSITY, IMPOSED TURBULENCY & NO DIFFUSIVE FLUX
131 DO i=lft,llt
132 j=i+nft
133 val2(j)=zero
134 enddo!next I
135 ENDIF
136 ENDDO
137C
138 CALL my_barrier
139C
140C-----------------------------
141C SPMD EXCHANGE : XK, VAL2 WITHIN ADJACENT ELEMENTS
142C-----------------------------
143 IF (nspmd > 1) THEN
144!$OMP SINGLE
145 CALL spmd_evois(xk,val2,nercvois,nesdvois,lercvois,lesdvois,lencom)
146!$OMP END SINGLE
147
148 END IF
149C-----------------------------
150 DO ng=itask+1,ngroup,nthread
151C ALE ON / OFF
152 IF (iparg(76, ng) == 1) cycle ! --> OFF
153 gbuf => elbuf_tab(ng)%GBUF
154c
155 CALL initbuf(iparg ,ng ,
156 2 mtn ,llt ,nft ,iad ,ity ,
157 3 npt ,jale ,ismstr ,jeul ,jtur ,
158 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
159 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
160 6 irep ,iint ,igtyp ,israt ,isrot ,
161 7 icsen ,isorth ,isorthg ,ifailure,jsms )
162 IF (jale+jeul == 0) cycle
163 IF (jtur /= 1) cycle
164 IF (mtn == 11) cycle
165 IF (mtn == 17) cycle
166 IF (iparg(8,ng) == 1) cycle
167 lft=1
168 nel=iparg(2,ng)
169 mid=iparg(18,ng)
170 rhocp = pm(69,mid)
171 if(rhocp == zero)then
172 rhocp = pm(89,mid)*matparam(mid)%eos%cp
173 end if
174 IF(n2d == 0)THEN
175 CALL adiff3(gbuf%RK,xk,flux(6*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
176 ELSE
177 CALL adiff2(gbuf%RK,xk,flux(4*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
178 ENDIF
179 ENDDO
180C
181 CALL my_barrier
182C-----------
183 RETURN
184 END
subroutine adiff2(phin, phi, grad, alpha, ale_connect, vol, temp, rhocp, nel)
Definition adiff2.F:33
subroutine adiff3(phin, phi, grad, alpha, ale_connect, vol, temp, rhocp, nel)
Definition adiff3.F:33
subroutine akturb(iparg, elbuf_tab, flux, val2, xk, ale_connect, ixs, ixq, pm, itask, nercvois, nesdvois, lercvois, lesdvois, lencom, matparam)
Definition akturb.F:45
#define max(a, b)
Definition macros.h:21
subroutine initbuf(iparg, ng, mtn, llt, nft, iad, ity, npt, jale, ismstr, jeul, jtur, jthe, jlag, jmult, jhbe, jivf, mid, jpor, jcvt, jclose, jpla, irep, iint, igtyp, israt, isrot, icsen, isorth, isorthg, ifailure, jsms)
Definition initbuf.F:261
subroutine spmd_evois(t, val2, nercvois, nesdvois, lercvois, lesdvois, lencom)
Definition spmd_cfd.F:261
subroutine my_barrier
Definition machine.F:31