Skip to content

Commit

Permalink
Reorder initial conditions for consistency. (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-costa authored Jan 15, 2025
1 parent a39b687 commit ceae6b5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/initflow.f90
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ subroutine initflow(inivel,bcvel,ng,lo,l,dl,zc,zf,dzc,dzf,visc, &
end do
end do
end do
case('tgw')
do k=1,n(3)
do j=1,n(2)
yc = (j+lo(2)-1-.5)*dl(2)
yf = (j+lo(2)-1-.0)*dl(2)
do i=1,n(1)
xc = (i+lo(1)-1-.5)*dl(1)
xf = (i+lo(1)-1-.0)*dl(1)
u(i,j,k) = cos(xf)*sin(yc)*uref
v(i,j,k) = -sin(xc)*cos(yf)*uref
w(i,j,k) = 0.
p(i,j,k) = -(cos(2.*xc)+cos(2.*yc))/4.*uref**2
end do
end do
end do
case('ant')
!
! see M. Antuono, JFM 890, A23 (2020)
Expand All @@ -137,21 +152,6 @@ subroutine initflow(inivel,bcvel,ng,lo,l,dl,zc,zf,dzc,dzf,visc, &
end do
end do
end do
case('tgw')
do k=1,n(3)
do j=1,n(2)
yc = (j+lo(2)-1-.5)*dl(2)
yf = (j+lo(2)-1-.0)*dl(2)
do i=1,n(1)
xc = (i+lo(1)-1-.5)*dl(1)
xf = (i+lo(1)-1-.0)*dl(1)
u(i,j,k) = cos(xf)*sin(yc)*uref
v(i,j,k) = -sin(xc)*cos(yf)*uref
w(i,j,k) = 0.
p(i,j,k) = -(cos(2.*xc)+cos(2.*yc))/4.*uref**2
end do
end do
end do
case('pdc','hdc')
lref = l(3)/2.
if(trim(inivel) /= 'pdc') lref = 2.*lref
Expand Down

0 comments on commit ceae6b5

Please sign in to comment.