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' if (ifield.eq.1) then utrans = param(1) udiff = param(2) else utrans = param(7) ! thermal properties udiff = param(8) if (ieg .gt. nelgv) then ! properties in the solid udiff = 0.1*param(8) ! conductivity utrans = 1.0 endif endif return end c----------------------------------------------------------------------- subroutine userf (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' ffx = 0.0 ffy = 0.0 ffz = 0.0 return end c----------------------------------------------------------------------- subroutine userq (ix,iy,iz,ieg) include 'SIZE' include 'TOTAL' include 'NEKUSE' qvol = 0.0 c if (ieg.gt.nelgv) qvol = 1.0 return end c----------------------------------------------------------------------- subroutine userchk include 'SIZE' include 'TOTAL' parameter (lt=lx1*ly1*lz1*lelt) common /mystuff/ dtdx(lt),dtdy(lt),dtdz(lt) common /myvort/ v1(lt),v2(lt),v3(lt) nv = nx1*ny1*nz1*nelv nt = nx1*ny1*nz1*nelt if (mod(istep,10).eq.0) then tmax = glmax(t ,nt) umax = glmax(vx,nt) if (nid.eq.0) write(6,1) istep,time,umax,tmax 1 format(i9,1p3e12.5,' tmax') endif !-----Temperature gradient if ((mod(istep,iostep).eq.0).and.(istep.ge.iostep)) then call gradm1(dtdx,dtdy,dtdz,t) call comp_vort3(v1,v2,v3,dtdx,dtdy,dtdz) call outpost(dtdx,dtdy,dtdz,pr,t,'gdt') ! write to gdtblah.f000... call outpost(v1,v2,v3,pr,t,'cgdt') ! write to gdtblah.f000... endif 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' ux = 4.0*(y-0.5)*(1.5 - y) uy = 0.0 uz = 0.0 if (if3d) then temp = 1-z elseif (ifaxis) then ! domain is on interval x in [-1,0] temp = 1.+x else ! 2D: domain is on interval y in [0,1] temp = 100.+y*100. endif return end c----------------------------------------------------------------------- subroutine useric (ix,iy,iz,ieg) C Set initial conditions include 'SIZE' include 'TOTAL' include 'NEKUSE' ux = 4.0*y*(1. - y) uy = 0.0 uz = 0.0 temp = 0.0 return end c----------------------------------------------------------------------- subroutine usrdat return end c----------------------------------------------------------------------- subroutine usrdat2 include 'SIZE' include 'TOTAL' c param(66) = 4 c param(67) = 4 return end c----------------------------------------------------------------------- subroutine usrdat3 return end c-----------------------------------------------------------------------