1c----------------------------------------------------------------------- 2 subroutine BCprofileScaleKW(PresBase,VelBase,BC,yold) 3 4 use pvsQbi 5 include "common.h" 6 real*8 PresBase, VelBase 7 real*8 BC(nshg,ndofBC), yold(nshg,ndof) 8 real*8 PresSin, PresAmp, PresFreq 9 real*8 Alpha, AlphaAmp, AlphaFreq 10 integer tsBase, BCdtKW 11 12c PresFreq=1000 ! frequency in Hz of pressure disturbance 13c PresAmp=100 ! Amplitude of pressure disturbance 14c tsBase=100 15 PresSin=PresAmp*sin(two*pi*PresFreq*((lstep-tsBase)+1)*Delt(1)) ! pressure disturbance 16c AlphaFreq=1000 ! frequency in Hz of changhe in angle of attack 17c AlphaAmp=1 ! Max angle of attack in degrees 18 Alpha=AlphaAmp*sin(two*pi*AlphaFreq*((lstep-tsBase)+1)*Delt(1)) ! pressure disturbance 19 20 if(BCdtKW.eq.1) then 21 do kk=1,nshg 22 if(ndsurf(kk).eq.801) then ! this means inflow plane of inlet 23 24c BC(kk,1)=PresBase+PresSin 25 BC(kk,1)=11597+PresSin 26 27 endif 28 enddo 29 else 30 do kk=1,nshg 31 if(ndsurf(kk).eq.801) then ! this means inflow plane of inlet 32 33 BC(kk,3)=VelBase*cos((pi/180)*Alpha) 34 BC(kk,4)=VelBase*sin((pi/180)*Alpha) 35 36 endif 37 enddo 38 endif 39 40 return 41 end 42 43c-------------------------------------------------------------- 44 subroutine BCprofileInitKW(PresBase,VelBase,BC) 45 46 use pvsQbi 47 include "common.h" 48 real*8 PresBase, VelBase 49 real*8 PresAmp, PresFreq 50 real*8 AlphaAmp, AlphaFreq 51 real*8 BC(nshg,ndofBC) 52 integer iflagKW 53 integer tsBase, BCdtKW 54 55c open(unit=789, file='bcprofile.dat',status='unknown') 56c tsBase=lstep 57 iflagKW=1 58 do kk=1,nshg 59 if(iflagKW.eq.1) then 60 if(ndsurf(kk).eq.801) then 61 62 PresBase=BC(kk,1) 63 VelBase=BC(kk,3) 64 iflagKW=0 65 66 endif 67 endif 68 enddo 69c close(789) 70c 987 format(i6,3(2x,e14.7)) 71 72 return 73 end 74