OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
aeturb.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!|| aeturb ../engine/source/ale/turbulence/aeturb.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 aeturb(
41 1 IPARG ,ELBUF_TAB ,FLUX ,VAL2 ,XE ,
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(*), XE(*), 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 RE, R, 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
85C ALE ON / OFF
86 IF (iparg(76, ng) == 1) cycle ! --> OFF
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 gbuf => elbuf_tab(ng)%GBUF
98c
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 re=gbuf%RE(i)
105 r =gbuf%RHO(i)
106 xe(j)=re/r
107 val2(j)=val2(j)*pm(85,mt)/pm(86,mt)
108 enddo!next I
109 ELSE
110 DO i=lft,llt
111 j=i+nft
112 mt=ixq(1,j)
113 re=gbuf%RE(i)
114 r =gbuf%RHO(i)
115 xe(j)=re/r
116 val2(j)=val2(j)*pm(85,mt)/pm(86,mt)
117 enddo!next I
118 ENDIF
119 ELSE
120 DO i=lft,llt
121 j=i+nft
122 xe(j)=zero
123 enddo!next I
124 ENDIF
125 IF(jpor == 2)THEN
126C POROSITY, OPTION:IMPOSED TURBULENCY AND NO DIFFUSIVE FLUXES
127 DO i=lft,llt
128 j=i+nft
129 val2(j)=zero
130 enddo!next I
131 ENDIF
132 ENDDO
133C
134 CALL my_barrier
135C-----------------------------
136C SPMD EXCHANGE : XE, VAL2
137C-----------------------------
138 IF (nspmd > 1) THEN
139!$OMP SINGLE
140 CALL spmd_evois(xe,val2,nercvois,nesdvois,lercvois,lesdvois,lencom)
141!$OMP END SINGLE
142
143 END IF
144C-----------------------------
145 DO ng=itask+1,ngroup,nthread
146C ALE ON / OFF
147 IF (iparg(76, ng) == 1) cycle ! --> OFF
148 CALL initbuf(iparg ,ng ,
149 2 mtn ,llt ,nft ,iad ,ity ,
150 3 npt ,jale ,ismstr ,jeul ,jtur ,
151 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
152 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
153 6 irep ,iint ,igtyp ,israt ,isrot ,
154 7 icsen ,isorth ,isorthg ,ifailure,jsms )
155 IF(jale+jeul==0) cycle
156 IF(jtur/=1) cycle
157 IF(mtn==11) cycle
158 IF(mtn==17) cycle
159 IF(iparg(8,ng)==1) cycle
160c
161 gbuf => elbuf_tab(ng)%GBUF
162 lft=1
163 nel=iparg(2,ng)
164 mid=iparg(18,ng)
165 rhocp = pm(69,mid)
166 if(rhocp == zero)then
167 rhocp = pm(89,mid)*matparam(mid)%eos%cp
168 end if
169 IF(n2d==0)THEN
170 CALL adiff3(gbuf%RE,xe,flux(6*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
171 ELSE
172 CALL adiff2(gbuf%RE,xe,flux(4*nft+1),val2,ale_connect,gbuf%VOL,gbuf%TEMP,rhocp,nel)
173 ENDIF
174 ENDDO
175C-----------
176 CALL my_barrier
177C-----------------------------------------------
178 RETURN
179 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 aeturb(iparg, elbuf_tab, flux, val2, xe, ale_connect, ixs, ixq, pm, itask, nercvois, nesdvois, lercvois, lesdvois, lencom, matparam)
Definition aeturb.F:45
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