OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
upwind4.F File Reference
#include "implicit_f.inc"
#include "mvsiz_p.inc"
#include "com08_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine upwind4 (rho, vis, vdx, vdy, vdz, r, s, t, gam, nel)

Function/Subroutine Documentation

◆ upwind4()

subroutine upwind4 ( rho,
vis,
vdx,
vdy,
vdz,
r,
s,
t,
gam,
integer, intent(in) nel )

Definition at line 31 of file upwind4.F.

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
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-----------------------------------------------
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
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249