xref: /phasta/phSolver/common/BCprofile2.f (revision cc72a73fd2b79f4dd0a850fa4af718cd73554811)
1c..............................................................................
2
3        subroutine SetUniOutPres(BC)
4
5        include "common.h"
6        include "mpif.h"
7        include "auxmpi.h"
8
9        integer BCfaceNode(nshg)
10        integer nBCfaceNode
11        integer isfID
12        real*8 BC(nshg,ndofBC)
13
14        if(myrank.eq.0)write(*,*)'Outlet pressure:',outPres1
15        isfID=isetOutPres
16        call sfID2np(isfID,nBCfaceNode,BCfaceNode)
17        if(nBCfaceNode .gt. 0)then
18           do i=1,nBCfaceNode
19             nn=BCfaceNode(i)
20             BC(nn,1)=outPres1
21           enddo
22        endif
23
24        return
25        end
26
27c..............................................................................
28        subroutine setInlet_Duct(x,BC,iTurbWall)
29
30        include "common.h"
31        include "mpif.h"
32        include "auxmpi.h"
33
34        real*8 BC(nshg,ndofBC)
35        real*8 x(nshg,nsd)
36        integer i,nn
37        real*8 xcoor,ycoor,zcoor
38        real ry,rz
39        real*8 Temp,xVel
40        integer BCfaceNode(nshg)
41        integer nBCfaceNode
42        integer isfID
43        integer iTurbWall(nshg)
44
45        if(myrank.eq.0)write(*,*)'Inlet surf:',isetInlet_Duct
46
47        isfID=isetInlet_Duct
48        call sfID2np(isfID,nBCfaceNode,BCfaceNode)
49        if(nBCfaceNode .gt. 0)then
50          do i=1,nBCfaceNode
51            nn=BCfaceNode(i)
52            if(iTurbWall(nn).eq.0)then
53
54              xcoor=x(nn,1)
55              ycoor=x(nn,2)
56              zcoor=x(nn,3)
57c...........................
58
59c Contraction Square Length is 46.25 inch, 0.587375 = 46.25/2*0.0254
60c Inlet Vel is computed based on throat Mach 0.43
61c Inlet Temp is 330K, wall temp is 317K
62
63              if(ycoor<(-0.587375+1.0e-4))then
64               ry=(ycoor+0.587375)/1.0e-4
65              elseif(ycoor>(0.587375-1.0e-4))then
66               ry=(0.587375-ycoor)/1.0e-4
67              else
68               ry=1.0
69              endif
70
71              if(zcoor<(-0.587375+1.0e-4))then
72               rz=(zcoor+0.587375)/1.0e-4
73              elseif(zcoor>(0.587375-1.0e-4))then
74               rz=(0.587375-zcoor)/1.0e-4
75              else
76               rz=1.0
77              endif
78
79              ry=max(0.0,ry)
80              rz=max(0.0,rz)
81
82              xVel = 1.513158*ry*rz
83c              xVel = 0.1*ry*rz
84              Temp = 317.0+13.0*ry*rz
85c..........................................
86              BC(nn,2) = Temp   !Temp
87              BC(nn,3) = xVel   ! set and scale x velocity
88              BC(nn,4) = 0
89              BC(nn,5) = 0
90            endif
91          enddo
92         endif
93
94        return
95        end
96
97