This function defines the y-velocity component of the
spinning (= co-rotating) vortex pair
Source: complex velocity potential of both vortices
complex coordinates:
z = x+i*y
Gamma ... circulation
b = r0*exp(i*omega*t)
w(z,t) = Gamma/(2Pi*i)*ln(z^2-b^2)
dw/dz = Gamma/(2Pi*i)*z/(z^2-b^2)
u = Re( dw/dz( z, t=0 )
v = -Im( dw/dz( z, t=0 )
see ic_2dcrvpX_for as a documentation reference. This routine is exactly the same, except for that in the end, instead of evaluating the Re of the potential function, we have to evalute -Im
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ic_2dcrvp_type), | intent(in) | :: | me |
global gauss pulse data |
||
real(kind=rk), | intent(in) | :: | coord(n,3) |
coordinate of an element |
||
integer, | intent(in) | :: | n |
number of return values |
return value which is sent to state variable
function ic_2dcrvpY_for(me, coord, n) result(res)
! ---------------------------------------------------------------------------
!> number of return values
integer, intent(in) :: n
!> global gauss pulse data
type(ic_2dcrvp_type), intent(in) :: me
!> coordinate of an element
real(kind=rk), intent(in) :: coord(n, 3)
!> return value which is sent to state variable
real(kind=rk) :: res(n)
! ---------------------------------------------------------------------------
real(kind=rk) :: r ! radius from center of rotation
real(kind=rk) :: rC, x_max ! core radius
real(kind=rk) :: omega ! angular speed
complex(kind=rk) :: z_coord, b_coord, z_compl, vortex1, vortex2, umax
complex(kind=rk),parameter :: i_complex = (0._rk,1._rk)
integer :: iElem
! ---------------------------------------------------------------------------
do iElem = 1, n
z_coord = ( coord(iElem,1) - me%center(1)) &
& + i_complex*(coord(iElem,2) - me%center(2))
z_compl = ( coord(iElem,1) - me%center(1)) &
& - i_complex*(coord(iElem,2) - me%center(2))
r = abs(z_coord)
rC = me%radius_C
omega = me%circulation/(Pi*me%radius_rot*me%radius_rot*4._rk)
b_coord = me%radius_rot*( cos( omega*me%t ) &
& + i_complex*sin( omega*me%t))
! left vortex. compare potential_single_w_z
vortex1 = me%circulation/(2._rk*PI*i_complex*(z_coord+b_coord))
! right vortex
vortex2 = me%circulation/(2._rk*PI*i_complex*(z_coord-b_coord))
! Get the velocity on the core radius for the core model
x_max = -real(b_coord + rC, kind=rk )
umax = me%circulation/(2._rk*PI*i_complex*(x_max + b_coord))
if( me%rankineModel ) then
! Rankine vortex model, if inside the core radius
! right vortex
if( real(((z_coord) - b_coord)*(z_compl-b_coord), kind=rk) &
& .lt. rC*rC ) then
vortex2 = -(umax*z_compl/rC - umax*b_coord/rC)
elseif( real((z_coord + b_coord)*(z_compl + b_coord), kind=rk) &
& .lt. rC**2 ) then
vortex1 = -(umax*z_compl/rC + umax*b_coord/rC)
endif
endif
res( iElem ) = cutoff_factor(me%cutoff, r) &
& * (-aimag( vortex1 + vortex2))
end do
end function ic_2dcrvpY_for