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