5 use size_m
, only : lx1, ly1, lz1, lelt, nx1, ny1, nz1, nfield, nid
7 use input, only : ifmodel, ifkeps, ifaxis, ifaziv, iftran, iftmsh, ifprint
8 use geom, only : bintm1, binvm1
9 use soln, only : t, bq, tmask, tmult
10 use tstep, only : nelfld, ifield, nmxnl, imesh, tolht, nmxh
14 integer,
intent(in) :: igeom
18 real(DP),
allocatable :: TA(:,:,:,:), TB(:,:,:,:)
19 real(DP),
allocatable :: H1(:,:,:,:), H2(:,:,:,:)
26 integer :: nel, ntot, nfldt, if1, isd, iter, intype
29 ntot = nx1*ny1*nz1*nel
37 IF (ifmodel .AND. ifkeps)
THEN
39 IF (ifield == nfldt .AND. nid == 0)
THEN
40 WRITE (6,*)
' Turbulence Model - k/epsilon solution'
43 IF (ifield == 2 .AND. nid == 0)
THEN
44 WRITE (6,*)
' Temperature/Passive scalar solution'
51 if(ifield == 2)
write(name4,
'(A4)')
'TEMP'
57 if (ifaxis .AND. ifaziv .AND. ifield == 2) isd = 2
61 allocate(ta(lx1,ly1,lz1,lelt), tb(lx1,ly1,lz1,lelt))
62 allocate(h1(lx1,ly1,lz1,lelt), h2(lx1,ly1,lz1,lelt))
66 IF (iftran) intype = -1
70 CALL
bcdirsc(t(1,1,1,1,ifield-1))
72 CALL
axhelm(ta,t(1,1,1,1,ifield-1),h1,h2,imesh,isd)
74 tb = bq(:,:,:,:,ifield-1) - ta
84 if(iftmsh(ifield))
then
85 call
hsolve(name4,ta,tb,h1,h2 &
86 ,tmask(1,1,1,1,ifield-1) &
87 ,tmult(1,1,1,1,ifield-1) &
88 ,imesh,tolht(ifield),nmxh,1 &
91 call
hsolve(name4,ta,tb,h1,h2 &
92 ,tmask(1,1,1,1,ifield-1) &
93 ,tmult(1,1,1,1,ifield-1) &
94 ,imesh,tolht(ifield),nmxh,1 &
99 t(:,:,:,:,ifield-1) = t(:,:,:,:,ifield-1) + ta
102 if (ifconv) goto 2000
105 t(:,:,:,:,ifield-1) = t(:,:,:,:,ifield-1) - 0.5_dp*ta
111 bq(:,:,:,:,ifield-1) = bq(:,:,:,:,ifield-1) + ta
124 use size_m
, only : nx1, ny1, nz1
127 use tstep, only : time, dt, ifield, nelfld
132 ntot = nx1*ny1*nz1*nelfld(ifield)
136 bq(:,:,:,:,ifield-1) = 0._dp
137 call
setqvol( bq(1,1,1,1,ifield-1) )
138 bq(:,:,:,:,ifield-1) = bq(:,:,:,:,ifield-1) * bm1
149 use size_m
, only : lx1, ly1, lz1, lelt, nx1, ny1, nz1
150 use input, only : igroup, matype, cpgrp
151 use tstep, only : ifield, nelfld
154 real(DP) :: bql(lx1*ly1*lz1,lelt)
156 integer :: nel, nxyz1, ntot1, iel, igrp
165 if (matype(igrp,ifield) == 1)
then
166 cqvol = cpgrp(igrp,ifield,3)
188 use size_m
, only : lx1, ly1, lz1, lelt, nx1, ny1, nz1
193 real(DP) :: bql(lx1,ly1,lz1,lelt)
196 integer :: ielg, k, j, i
204 call userq(i,j,k,ielg)
205 bql(i,j,k,iel) = qvol
219 use size_m
, only : nx1, ny1, nz1, lx1, ly1, lz1, lelt
221 use soln, only : t, vtrans, bq
222 use tstep, only : ifield, nelfld
225 real(DP),
allocatable :: TA (:,:,:,:)
226 integer :: nel, ntot1
228 allocate(ta(lx1,ly1,lz1,lelt))
231 ntot1 = nx1*ny1*nz1*nel
232 CALL
convop(ta,t(1,1,1,1,ifield-1))
233 bq(:,:,:,:,ifield-1) = bq(:,:,:,:,ifield-1) - bm1*ta *vtrans(:,:,:,:,ifield)
242 use size_m
, only : nx1, ny1, nz1, lx1, ly1, lz1, lelt
243 use soln, only : vgradt1, vgradt2, bq
244 use tstep, only : ab, ifield, nelfld
247 real(DP),
allocatable :: TA (:,:,:,:)
248 real(DP) :: ab0, ab1, ab2
249 integer :: nel, ntot1
251 allocate(ta(lx1,ly1,lz1,lelt))
257 ntot1 = nx1*ny1*nz1*nel
259 ta = ab1*vgradt1(:,:,:,:,ifield-1) + ab2*vgradt2(:,:,:,:,ifield-1)
260 vgradt2(:,:,:,:,ifield-1) = vgradt1(:,:,:,:,ifield-1)
261 vgradt1(:,:,:,:,ifield-1) = bq(:,:,:,:,ifield-1)
262 bq(:,:,:,:,ifield-1) = ab0*bq(:,:,:,:,ifield-1) + ta
272 use size_m
, only : lx1, ly1, lz1, lelt
273 use size_m
, only : nx1, ny1, nz1
274 use geom, only : ifgeom
275 use geom, only : bm1, bm1lag
276 use soln, only : vtrans, t, tlag, bq
277 use tstep, only : ifield, nelfld, dt, bd, nbd
280 real(DP),
allocatable :: TB(:,:,:,:)
282 integer :: nel, ntot1, ilag
284 allocate(tb(lx1,ly1,lz1,lelt))
287 ntot1 = nx1*ny1*nz1*nel
289 tb = bd(2) * bm1 * t(:,:,:,:,ifield-1)
293 tb = tb + bd(ilag+1) * bm1lag(:,:,:,:,ilag-1) * tlag(:,:,:,:,ilag-1, ifield-1)
295 tb = tb + bd(ilag+1) * bm1 * tlag(:,:,:,:,ilag-1,ifield-1)
299 tb = (1./dt) * tb * vtrans(:,:,:,:,ifield)
300 bq(:,:,:,:,ifield-1) = bq(:,:,:,:,ifield-1) + tb
309 use size_m
, only : nx1, ny1, nz1
310 use soln, only : t, tlag
311 use tstep, only : ifield, nelfld, nbdinp
314 integer :: ntot1, ilag
315 ntot1 = nx1*ny1*nz1*nelfld(ifield)
317 DO 100 ilag=nbdinp-1,2,-1
318 CALL
copy(tlag(1,1,1,1,ilag ,ifield-1), &
319 tlag(1,1,1,1,ilag-1,ifield-1),ntot1)
322 CALL
copy(tlag(1,1,1,1,1,ifield-1),t(1,1,1,1,ifield-1),ntot1)
subroutine bcneusc(S, ITYPE)
Apply Neumann boundary conditions to surface of scalar, S. Use IFIELD as a guide to which boundary co...
Type to hold the approximation space. Should not be modified outside this module, so more of a handle...
subroutine makeq()
Generate forcing function for the solution of a passive scalar. !! NOTE: Do not change the content of...
subroutine sethlm(h1, h2, intloc)
Set the variable property arrays H1 and H2 in the Helmholtz equation. (associated with variable IFIEL...
subroutine axhelm(au, u, helm1, helm2, imesh, isd)
Compute the (Helmholtz) matrix-vector product, AU = helm1*[A]u + helm2*[B]u, for NEL elements...
subroutine, public hsolve(name, u, r, h1, h2, vmk, vml, imsh, tol, maxit, isd, apx, bi)
Either std. Helmholtz solve, or a projection + Helmholtz solve.
subroutine makeuq
Fill up user defined forcing function and collocate will the mass matrix on the Gauss-Lobatto mesh...
real(dp) function dnekclock()
subroutine makeabq
Sum up contributions to 3rd order Adams-Bashforth scheme.
integer function lglel(iel)
subroutine bcdirsc(S)
Apply Dirichlet boundary conditions to surface of scalar, S. Use IFIELD as a guide to which boundary ...
subroutine cvgnlps(ifconv)
Check convergence for non-linear passisve scalar solver. Relevant for solving heat transport problems...
subroutine makebdq()
Add contributions to F from lagged BD terms.
subroutine nekasgn(IX, IY, IZ, IEL)
Assign NEKTON variables for definition (by user) of boundary conditions at collocation point (IX...
subroutine lagscal
Keep old passive scalar field(s)
subroutine nekuq(bql, iel)
Generate user-specified volumetric source term (temp./p.s.)
subroutine setqvol(bql)
Set user specified volumetric forcing function (e.g. heat source).
subroutine convab()
Eulerian scheme, add convection term to forcing function at current time step.
subroutine convop(conv, fi)
Compute the convective term CONV for a passive scalar field FI.
subroutine cdscal(igeom)
Solve the convection-diffusion equation for passive scalar IPSCAL.