Skip to content

Commit

Permalink
corrected filter
Browse files Browse the repository at this point in the history
  • Loading branch information
gdeskos committed Mar 10, 2019
1 parent 542d372 commit 70dbcb0
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
22 changes: 20 additions & 2 deletions filters.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@ subroutine filter(af)
fib1x=3./8.+5.*af/8. ! b1/2
fic1x=-3./8.+3./8.*af ! c1/2
fid1x=1./8.-1./8.*af ! d1/2
!Boundary point 2
!Boundary point 2 (Third order)
fia2x=1./8.+3./4.*af ! a2
fib2x=5./8.+3./4.*af ! b2/2
fic2x=3./8.+af/4. ! c2/2
fid2x=-1./8.+af/4. ! d2/2
!Boundary point 3 (Fifth order)
fia3x= -1./32.+af/16. ! a3
fib3x= 5./32.+11./16.*af ! b3/2
fic3x= 11./16.+5.*af/8. ! c3/2
fid3x= 5./16.+3.*af/8. ! d3/2
fie3x=-5./32.+5.*af/16. ! e3/2
fif3x=1./32.-af/16. ! f3/2
!Boundary point n
afn=0.
fianx=7./8.+af/8. ! a1/2
Expand All @@ -54,6 +61,13 @@ subroutine filter(af)
fibmx=5./8.+3./4.*af ! b2/2
ficmx=3./8.+af/4. ! c2/2
fidmx=-1./8.+af/4. ! d2/2
!Boundary point p=n-2 (Fifth order)
fiapx= -1./32.+af/16. ! a3
fibpx= 5./32.+11./16.*af ! b3/2
ficpx= 11./16.+5.*af/8. ! c3/2
fidpx= 5./16.+3.*af/8. ! d3/2
fiepx=-5./32.+5.*af/16. ! e3/2
fifpx=1./32.-af/16. ! f3/2
! Set the coefficients for the matrix A
! Periodic case
if (nclx.eq.0) then
Expand Down Expand Up @@ -423,14 +437,18 @@ subroutine filx(tx,ux,rx,fisx,fiffx,fifsx,fifwx,nx,ny,nz,npaire)
tx(1,j,k)=ux(1,j,k)
tx(2,j,k)=fia2x*ux(1,j,k)+fib2x*ux(2,j,k)+fic2x*ux(3,j,k)+&
fid2x*ux(4,j,k)
do i=3,nx-2
tx(3,j,k)=fia3x*ux(1,j,k)+fib3x*ux(2,j,k)+fic3x*ux(3,j,k)+&
fid3x*ux(4,j,k)+fie3x*ux(5,j,k)+fif3x*ux(6,j,k)
do i=4,nx-3
tx(i,j,k)=fiaix*ux(i,j,k)+fibix*(ux(i+1,j,k)+ux(i-1,j,k))&
+ficix*(ux(i+2,j,k)+ux(i-2,j,k))&
+fidix*(ux(i+3,j,k)+ux(i-3,j,k))
enddo
tx(nx,j,k)=ux(nx,j,k)
tx(nx-1,j,k)=fiamx*ux(nx,j,k)+fibmx*ux(nx-1,j,k)+ficmx*ux(nx-2,j,k)+&
fidmx*ux(nx-3,j,k)
tx(nx-2,j,k)=fiapx*ux(nx,j,k)+fibpx*ux(nx-1,j,k)+ficpx*ux(nx-2,j,k)+&
fidpx*ux(nx-3,j,k)+fiepx*ux(nx-4,j,k)+fifpx*ux(nx-5,j,k)
do i=2,nx
tx(i,j,k)=tx(i,j,k)-tx(i-1,j,k)*fifsx(i)
enddo
Expand Down
3 changes: 1 addition & 2 deletions navier.f90
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,12 @@ subroutine outflow (ux,uy,uz,phi)
if (ux(nx-1,j,k).lt.uxmin) uxmin=ux(nx-1,j,k)
enddo
enddo

call MPI_ALLREDUCE(uxmax,uxmax1,1,real_type,MPI_MAX,MPI_COMM_WORLD,code)
call MPI_ALLREDUCE(uxmin,uxmin1,1,real_type,MPI_MIN,MPI_COMM_WORLD,code)
vphase=0.5*(uxmax1+uxmin1)

cx=vphase*gdt(itr)*udx


if (itype.ne.9) then
do k=1,xsize(3)
do j=1,xsize(2)
Expand Down
2 changes: 1 addition & 1 deletion testCases/NREL-5MW/NREL-5MW.in
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
ifirst = 1 ! First iteration
ilast = 1000 ! Last iteration
nscheme = 2 ! Temporal scheme (1: ?, 2: RK3, 3:RK4, 4:AB2)
dt = 0.05 ! Time step
dt = 0.02 ! Time step

! Governing equations formulations
iskew = 1 ! (0:urotu, 1:skew, for the convective terms)
Expand Down
6 changes: 3 additions & 3 deletions testCases/NREL-5MW/NREL-5MW.turb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name='NREL-5MW' ! Name of the turbine
origin=63,90.,126 ! Actual location of the turbine
numblades=3 ! number of blades
blade_geom='NRELResources/NRELBlade_N91.al' ! Blade geometry
blade_geom='NRELResources/NRELBlade_N71.al' ! Blade geometry
numfoil=8 ! Number of airfoil from which the interpolation is done
afname='NRELResources/Airfoils/cylinder1.air','NRELResources/Airfoils/cylinder2.air','NRELResources/Airfoils/DU21_A17.air','NRELResources/Airfoils/DU25_A17.air','NRELResources/Airfoils/DU30_A17.air','NRELResources/Airfoils/DU35_A17.air','NRELResources/Airfoils/DU40_A17.air','NRELResources/Airfoils/NACA64_A17.air'
towerFlag=1 ! Tower model ? (0: no, 1: yes)
Expand All @@ -22,7 +22,7 @@ RootCorr=0 ! Root correction model (0: no, 1:
ShenC1=0.125 ! Shen et. al 2005 moedl coefficient (c1)
ShenC2=21 ! Shen et. al 2005 model coefficient (c2)
yaw_angle=0. ! Rotor Yaw angle (in degrees)
shaft_tilt_angle=5. ! Hub tilt angle (in degrees)
shaft_tilt_angle=0. ! Hub tilt angle (in degrees)
blade_cone_angle=2.5 ! Blade cone angle (in degrees)
!=========================================
! Aeroelasticity parameters |
Expand All @@ -44,7 +44,7 @@ CutInGenSpeed=70.16224 ! Cut-in generator speed in rad/sec
RatedLimitGenTorque=15000.0 ! Rated Limit Generator Torque
Region2StartGenSpeed=91.21091 ! Region 2 starting point generator speed
Region2EndGenSpeed=121.6805 ! Region 2 ending point generator speed
Kgen=2. ! Region 2 genrator ceoffici
Kgen=2.33 ! Region 2 genrator ceoffici
RatedPower=5296610.0 ! Rated Power in Watts ! Rated power
MaximumTorque=47402.91 ! Maximum Torque in N*m
/End

0 comments on commit 70dbcb0

Please sign in to comment.