Problem with basic simulation
Posted: Thu Apr 26, 2012 10:30 am
hello.
I am trying to run a basic simulation of an air flow in a long corridor. This corridor have a inlet, walls and outlet. Until now everything is alright. However, I have trouble when I try to add an second inlet inside the domain. The second inlet, at the center of the corridor is at 5 meters above the ground. I use the usclim.f90 to specify the boundary conditions of the inlet. I want this inlet to have one side as a wall and the other side as an 1m/s inlet. Here is the condition I use:
call getfbr("inlet_hot", nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
iel = ifabor(ifac)
itypfb(ifac) = ientre
if (surfbo(1, ifac) > 0) then
ifac = lstelt(ilelt)
itypfb(ifac) = iparoi
else
rcodcl(ifac, iu, 1) = 0.d0
rcodcl(ifac, iv, 1) = 0.d0
rcodcl(ifac, iw, 1) = 1.d0
endif
uref2 = rcodcl(ifac,iu,1)**2 &
+rcodcl(ifac,iv,1)**2 &
+rcodcl(ifac,iw,1)**2
uref2 = max(uref2,1.d-12)
! Hydraulic diameter
dh = 3.3d0
! Turbulence intensity
xintur = 0.02d0
xkent = epzero
xeent = epzero
call keenin &
!==========
( uref2, xintur, dh, cmu, xkappa, xkent, xeent )
! itytur is a flag equal to iturb/10
if (itytur.eq.2) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iep,1) = xeent
elseif(itytur.eq.3) then
rcodcl(ifac,ir11,1) = d2s3*xkent
rcodcl(ifac,ir22,1) = d2s3*xkent
rcodcl(ifac,ir33,1) = d2s3*xkent
rcodcl(ifac,ir12,1) = 0.d0
rcodcl(ifac,ir13,1) = 0.d0
rcodcl(ifac,ir23,1) = 0.d0
rcodcl(ifac,iep,1) = xeent
elseif(iturb.eq.50) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iep,1) = xeent
rcodcl(ifac,iphi,1) = d2s3
rcodcl(ifac,ifb,1) = 0.d0
elseif(iturb.eq.60) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iomg,1) = xeent/cmu/xkent
elseif(iturb.eq.70) then
rcodcl(ifac,inusa,1) = cmu*xkent**2/xeent
endif
if(nscal.gt.0) then
do ii = 1, nscal
rcodcl(ifac,isca(ii),1) = 30.d0
enddo
endif
enddo
!----
! Formats
!----
!----
! End
!----
This doesn't work properly, on Paraview I can see that the flow seems to go through the inlet. Also, the mass flow obtained is 0.
The second problem is about showing a volume with head losses on Paraview. I can see it when I open the "check mech" file but not in my "result.case".
Thanks,
damien
I am trying to run a basic simulation of an air flow in a long corridor. This corridor have a inlet, walls and outlet. Until now everything is alright. However, I have trouble when I try to add an second inlet inside the domain. The second inlet, at the center of the corridor is at 5 meters above the ground. I use the usclim.f90 to specify the boundary conditions of the inlet. I want this inlet to have one side as a wall and the other side as an 1m/s inlet. Here is the condition I use:
call getfbr("inlet_hot", nlelt, lstelt)
!==========
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
iel = ifabor(ifac)
itypfb(ifac) = ientre
if (surfbo(1, ifac) > 0) then
ifac = lstelt(ilelt)
itypfb(ifac) = iparoi
else
rcodcl(ifac, iu, 1) = 0.d0
rcodcl(ifac, iv, 1) = 0.d0
rcodcl(ifac, iw, 1) = 1.d0
endif
uref2 = rcodcl(ifac,iu,1)**2 &
+rcodcl(ifac,iv,1)**2 &
+rcodcl(ifac,iw,1)**2
uref2 = max(uref2,1.d-12)
! Hydraulic diameter
dh = 3.3d0
! Turbulence intensity
xintur = 0.02d0
xkent = epzero
xeent = epzero
call keenin &
!==========
( uref2, xintur, dh, cmu, xkappa, xkent, xeent )
! itytur is a flag equal to iturb/10
if (itytur.eq.2) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iep,1) = xeent
elseif(itytur.eq.3) then
rcodcl(ifac,ir11,1) = d2s3*xkent
rcodcl(ifac,ir22,1) = d2s3*xkent
rcodcl(ifac,ir33,1) = d2s3*xkent
rcodcl(ifac,ir12,1) = 0.d0
rcodcl(ifac,ir13,1) = 0.d0
rcodcl(ifac,ir23,1) = 0.d0
rcodcl(ifac,iep,1) = xeent
elseif(iturb.eq.50) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iep,1) = xeent
rcodcl(ifac,iphi,1) = d2s3
rcodcl(ifac,ifb,1) = 0.d0
elseif(iturb.eq.60) then
rcodcl(ifac,ik,1) = xkent
rcodcl(ifac,iomg,1) = xeent/cmu/xkent
elseif(iturb.eq.70) then
rcodcl(ifac,inusa,1) = cmu*xkent**2/xeent
endif
if(nscal.gt.0) then
do ii = 1, nscal
rcodcl(ifac,isca(ii),1) = 30.d0
enddo
endif
enddo
!----
! Formats
!----
!----
! End
!----
This doesn't work properly, on Paraview I can see that the flow seems to go through the inlet. Also, the mass flow obtained is 0.
The second problem is about showing a volume with head losses on Paraview. I can see it when I open the "check mech" file but not in my "result.case".
Thanks,
damien