-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturbChannel.usr
68 lines (56 loc) · 1.81 KB
/
turbChannel.usr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
c-----------------------------------------------------------------------
subroutine userchk
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine usrdat ! This routine to modify element vertices
include 'SIZE' ! _before_ mesh is generated, which
include 'TOTAL' ! guarantees GLL mapping of mesh.
real XLEN, ZLEN, BETAM
COMMON /CASED/ XLEN, ZLEN, BETAM
n = nelv * 2**ldim
xmin = glmin(xc,n)
xmax = glmax(xc,n)
ymin = glmin(yc,n)
ymax = glmax(yc,n)
zmin = glmin(zc,n)
zmax = glmax(zc,n)
xscale = XLEN/(xmax-xmin)
yscale = 1./(ymax-ymin)
zscale = ZLEN/(zmax-zmin)
do i=1,n
xc(i,1) = xscale*xc(i,1)
yc(i,1) = yscale*yc(i,1)
yc(i,1) = tanh(BETAM*(2*yc(i,1)-1))/tanh(BETAM)
zc(i,1) = zscale*zc(i,1)
enddo
return
end
c-----------------------------------------------------------------------
subroutine usrdat2 ! This routine to modify mesh coordinates
include 'SIZE'
include 'TOTAL'
do iel=1,nelt
do ifc=1,2*ndim
if (cbc(ifc,iel,1) .eq. 'W ') boundaryID(ifc,iel) = 1
cbc(ifc,iel,2) = cbc(ifc,iel,1)
enddo
enddo
return
end
c-----------------------------------------------------------------------
subroutine usrdat0
include 'SIZE'
include 'TOTAL'
real XLEN, ZLEN, BETAM
COMMON /CASED/ XLEN, ZLEN, BETAM
COMMON /NRSSCPTR/ nrs_scptr(3)
integer*8 nrs_scptr
nrs_scptr(1) = loc(XLEN)
nrs_scptr(2) = loc(ZLEN)
nrs_scptr(3) = loc(BETAM)
return
end
c-----------------------------------------------------------------------