Commit 39bb6fd2 authored by Elia Daniele's avatar Elia Daniele

introduced aveage grading normal to airfoil to increase quality of blunt...

introduced aveage grading normal to airfoil to increase quality of blunt trailing edge airfoil geometries
parent 113f9e64
......@@ -1988,6 +1988,7 @@ subroutine write_blockMeshDict(project_name, topology, nwake)
double precision, dimension(:,:), allocatable :: x, y, ex, ey
double precision, dimension(:), allocatable :: eg
integer i, j, ni, nj, iunit, counter
double precision :: eg_avg ! average value for the edge grading normal-dir
!
! read p3d mesh airfoil surface
call read_p3d_size(project_name, ni, nj)
......@@ -2009,9 +2010,12 @@ subroutine write_blockMeshDict(project_name, topology, nwake)
! compute edge grading for each block normal to chord, dir-j
! allocate
allocate(eg(ni - 1))
eg_avg = 0.0
do i = 1, ni - 1
eg(i) = SQRT((x(i,nj)-x(i,nj-1))**2+(y(i,nj)-y(i,nj-1))**2.0)/SQRT((x(i,2)-x(i,1))**2+(y(i,2)-y(i,1))**2.0)
eg_avg = eg_avg + eg(i)
end do
eg_avg = eg_avg / DBLE(ni)
! compute edges
! allocate
allocate(ex(ni-1,nj - 2))
......@@ -2095,10 +2099,10 @@ subroutine write_blockMeshDict(project_name, topology, nwake)
" ",(1-1)+(ni-1)+(ni-1)*2, &
" ",(1-1)+(ni-1), &
" ) ( 1 1",nj-1," ) edgeGrading ( 1 1 1 1 1 1 1 1 ", &
eg(i)," ", &
eg(i)," ", &
eg(1)," ", &
eg(1)," ) //",counter
eg_avg," ", &!egc(i)," ", &
eg_avg," ", &!egc(i)," ", &
eg_avg," ", &!egc(1)," ", &
eg_avg," ) //",counter!egc(1)," ) //",counter
else
write(iunit, 23)," hex ( ",(i-1), &
" ",(i-1)+(ni-1)*2, &
......@@ -2109,10 +2113,10 @@ subroutine write_blockMeshDict(project_name, topology, nwake)
" ",1+(i-1)+(ni-1)+(ni-1)*2, &
" ",1+(i-1)+(ni-1), &
" ) ( 1 1",nj-1," ) edgeGrading ( 1 1 1 1 1 1 1 1 ", &
eg(i)," ", &
eg(i)," ", &
eg(i + 1)," ", &
eg(i + 1)," ) //",counter
eg_avg," ", &!egc(i)," ", &
eg_avg," ", &!egc(i)," ", &
eg_avg," ", &!egc(i + 1)," ", &
eg_avg," ) //",counter!egc(i + 1)," ) //",counter
end if
counter = counter + 1
end do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment