OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
upwind.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!|| upwind ../engine/source/elements/solid/solide/upwind.F
25!||--- called by ------------------------------------------------------
26!|| amomt2 ../engine/source/ale/ale2d/amomt2.F
27!|| emomt2 ../engine/source/ale/euler2d/emomt2.F
28!||--- uses -----------------------------------------------------
29!|| ale_mod ../common_source/modules/ale/ale_mod.F
30!||====================================================================
31 SUBROUTINE upwind(
32 1 RHO, VIS, VDX, VDY,
33 2 VDZ, R, S, T,
34 3 DELTAX, 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 "com01_c.inc"
51#include "com08_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER, INTENT(IN) :: NEL
56 my_real R(3,*),S(3,*),T(3,*),VDX(*),VDY(*),VDZ(*),DELTAX(*),RHO(*),VIS(*),GAM(*)
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 my_real fac,pe,d1,d2,d3,dist,ch1,ch2,dv(mvsiz),v(mvsiz)
61 INTEGER I
62C-----------------------------------------------
63
64 !--------------------------------------------!
65 ! /UPWM/TG !
66 ! Taylor Galerkine !
67 !--------------------------------------------!
68 IF(ale%UPWIND%UPWM==2)THEN
69 fac=ale%UPWIND%CUPWM*half*dt1
70 DO i=1,nel
71 gam(i)=fac
72 END DO
73
74 !--------------------------------------------!
75 ! /UPWM/SUPG !
76 ! Streaminline Upwind Petrov Galerkine !
77 !--------------------------------------------!
78 ELSEIF(ale%UPWIND%UPWM==3)THEN
79 IF(n2d==0)THEN
80 DO i=1,nel
81 v(i)=vdx(i)**2+vdy(i)**2+vdz(i)**2
82 d1=r(1,i)*vdx(i)+r(2,i)*vdy(i)+r(3,i)*vdz(i)
83 d2=s(1,i)*vdx(i)+s(2,i)*vdy(i)+s(3,i)*vdz(i)
84 d3=t(1,i)*vdx(i)+t(2,i)*vdy(i)+t(3,i)*vdz(i)
85 gam(i)=sqrt(d1**2+d2**2+d3**2)
86 ENDDO
87 ELSE
88 DO i=1,nel
89 d2=s(2,i)*vdy(i)+s(3,i)*vdz(i)
90 d3=t(2,i)*vdy(i)+t(3,i)*vdz(i)
91 gam(i)=sqrt(d2**2+d3**2)
92 v(i)=vdy(i)**2+vdz(i)**2
93 ENDDO
94 ENDIF
95 ch2=ale%UPWIND%CUPWM*half
96 ch1=ch2*third
97 DO i=1,nel
98 fac=half*rho(i)/max(em20,vis(i))
99 pe=fac*gam(i)
100 IF(pe<=em3)THEN
101 gam(i)=ch1*fac*deltax(i)**2
102 ELSEIF(pe<three)THEN
103 gam(i)=ch1*fac*gam(i)**2/v(i)
104 ELSE
105 gam(i)=ch2*gam(i)/v(i)
106 ENDIF
107 ENDDO
108 ENDIF
109
110 RETURN
111 END
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249
subroutine upwind(rho, vis, vdx, vdy, vdz, r, s, t, deltax, gam, nel)
Definition upwind.F:35