OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
upwind4.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!|| upwind4 ../engine/source/elements/solid/solide4/upwind4.F
25!||--- called by ------------------------------------------------------
26!|| a4momt3 ../engine/source/elements/solid/solide4/a4momt3.F
27!|| a4momtn3 ../engine/source/elements/solid/solide4/a4momtn3.F
28!||--- uses -----------------------------------------------------
29!|| ale_mod ../common_source/modules/ale/ale_mod.F
30!||====================================================================
31 SUBROUTINE upwind4(
32 1 RHO, VIS, VDX, VDY,
33 2 VDZ, R, S, T,
34 3 GAM, NEL)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE ale_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C G l o b a l P a r a m e t e r s
45C-----------------------------------------------
46#include "mvsiz_p.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "com08_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER, INTENT(IN) :: NEL
55 my_real
56 . R(MVSIZ,3),S(MVSIZ,3),T(MVSIZ,3),
57 . vdx(*),vdy(*),vdz(*),rho(*),vis(*),gam(*)
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61 my_real
62 . fac,pe,d1,d2,d3,dist,ch1,ch2,
63 . dv(mvsiz),v(mvsiz)
64 INTEGER I
65C-----------------------------------------------
66C S o u r c e C o d e
67C-----------------------------------------------
68
69 !-------------!
70 ! /UPWM/TG !
71 !-------------!
72 IF(ale%UPWIND%UPWM==2)THEN
73 fac=ale%UPWIND%CUPWM*half*dt1
74 DO i=1,nel
75 gam(i)=fac
76 END DO
77
78 !-------------!
79 ! /UPWM/SUPG !
80 !-------------!
81 ELSEIF(ale%UPWIND%UPWM==3)THEN
82 DO i=1,nel
83 v(i)=vdx(i)**2+vdy(i)**2+vdz(i)**2
84 d1=abs(r(i,1)*vdx(i)+r(i,2)*vdy(i)+r(i,3)*vdz(i))
85 d2=abs(s(i,1)*vdx(i)+s(i,2)*vdy(i)+s(i,3)*vdz(i))
86 d3=abs(t(i,1)*vdx(i)+t(i,2)*vdy(i)+t(i,3)*vdz(i))
87 gam(i)=max(d1,d2,d3) !dominant direction
88 ENDDO
89
90 ch2=ale%UPWIND%CUPWM*half
91 ch1=ch2*third
92
93 !SU/PG weighting function for current node.
94 !SUPG is a Finite Element Method !
95 DO i=1,nel
96 fac=half*rho(i)/max(em20,vis(i))
97 pe=fac*gam(i)
98 IF(pe<=em3)THEN
99 gam(i)=zero
100 ELSEIF(pe<three)THEN
101 gam(i)=ch1*fac*gam(i)**2/v(i)
102 ELSE
103 gam(i)=ch2*gam(i)/v(i)
104 ENDIF
105 ENDDO
106 ENDIF
107
108 RETURN
109 END
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249
subroutine upwind4(rho, vis, vdx, vdy, vdz, r, s, t, gam, nel)
Definition upwind4.F:35