-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdd.usr
190 lines (166 loc) · 5.14 KB
/
dd.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
c-----------------------------------------------------------------------
c
c This is a small 2D example of conjugate heat transfer in Nek5000.
c
c The domain consists of two plates of finite thickness (h=0.5)
c with plane Poiseiulle flow moving between the plates from left
c to right (x=0 to 8).
c
c The gap height is 1.0 (y=0 to 1).
c
c The flow inlet temperature is T=0 and the plates are heated
c with volumetric heat source, qvol = 1.
c
c Insulated boundary conditions are applied on the solid
c surfaces that are not interior to the computational domain,
c so heat leaves only through advection at the flow outlet.
c
c-----------------------------------------------------------------------
subroutine uservp (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
c if (ifield.eq.1) then
c utrans = param(1)
c udiff = param(2)
c
c else
c utrans = param(7) ! thermal properties
c udiff = param(8)
c if (ieg .gt. nelgv) then ! properties in the solid
c udiff = 0.1*param(8) ! conductivity
c utrans = 1.0
c endif
c endif
utrans = 0.0
udiff = 0.0
return
end
c-----------------------------------------------------------------------
subroutine userf (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
ffx = 0.0
ffy = 6.25*(temp-ps(1))
ffz = 0.0
return
end
c-----------------------------------------------------------------------
subroutine userq (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
c qvol = 0.0
c if (ieg.gt.nelgv) qvol = 1.0
if (ifield.eq.2) then
qvol = -uy
elseif (ifield.eq.3) then
qvol = -uy/1.8
elseif (ifield.eq.4) then
qvol = 0.0
endif
return
end
c-----------------------------------------------------------------------
subroutine userchk
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine userbc (ix,iy,iz,iside,ieg)
c NOTE ::: This subroutine MAY NOT be called by every process
C Set boundary conditions
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
c ux = 4.0*y*(1. - y)
c uy = 0.0
c uz = 0.0
c temp = 0.0
return
end
c-----------------------------------------------------------------------
subroutine useric (ix,iy,iz,ieg)
C Set initial conditions
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
ux = 0.0
uy = 0.0
uz = 0.0
eps = 1e-4
beta = 13.*2.*pi/500.
alpha = 23.*2.*pi/300.
a = 1.0
b = 1.0
val_1 = 0.0
val_2 = 0.0
ymax = 500.0
c temp = -0.001*z
if (ifield.eq.2) then
c temp=-0.0002*y
temp = eps*sin(alpha*x)*cos(beta*y)
elseif (ifield.eq.3) then
c temp = -(0.0002/3.)*y
temp = eps*sin(alpha*x)*cos(beta*y)
elseif (ifield.eq.4) then
if (y>=0 .AND. y<=80) then
val_1 = (sin(y*pi/500.))**1.2
val_2 = val_1/1.5
temp = a*val_2 + b
elseif (y>80 .AND. y<420) then
val_1 = (sin(y*pi/500.))**0.2
val_2 = val_1/2.9
temp = a*val_2 + b
elseif (y>=420 .AND. y<=500) then
val_1 = (sin(y*pi/500.))**1.2
val_2 = val_1/1.5
temp = a*val_2 + b
endif
endif
c if (ifield.eq.2) then
c if (y>=400) then
c temp=-0.125*tanh(2.0*(y-0.5*(500.-400.))/6.)
c elseif (y>=300 .AND. y<400) then
c temp=-0.125*tanh(2.0*(y-0.5*(400.-300.))/6.)
c elseif (y>=200 .AND. y<300) then
c temp=-0.125*tanh(2.0*(y-0.5*(300.-200.))/6.)
c elseif (y>=100 .AND. y<200) then
c temp=-0.125*tanh(2.0*(y-0.5*(200.-100.))/6.)
c elseif (y<100) then
c temp=-0.125*tanh(2.0*(y-0.5*(100.))/6.)
c endif
c elseif (ifield.eq.3) then
c if (y>=400) then
c temp=-(0.125/3.)*tanh(2.0*(y-0.5*(500.-400.))/9.)
c elseif (y>=300 .AND. y<400) then
c temp=-(0.125/3.)*tanh(2.0*(y-0.5*(400.-300.))/9.)
c elseif (y>=200 .AND. y<300) then
c temp=-(0.125/3.)*tanh(2.0*(y-0.5*(300.-200.))/9.)
c elseif (y>=100 .AND. y<200) then
c temp=-(0.125/3.)*tanh(2.0*(y-0.5*(200.-100.))/9.)
c elseif (y<100) then
c temp=-(0.125/3.)*tanh(2.0*(y-0.5*(100.))/9.)
c endif
c endif
return
end
c-----------------------------------------------------------------------
subroutine usrdat
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine usrdat2
include 'SIZE'
include 'TOTAL'
return
end
c-----------------------------------------------------------------------
subroutine usrdat3
return
end
c-----------------------------------------------------------------------