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