# ic_2dcrvpPressure_for Function

## public function ic_2dcrvpPressure_for(me, coord, n) result(pressure)

This function defines the density of the spinning (= co-rotating) vortex pair See the matlab file where the pressure is plot in the ase-testcases/ repo in musubi/crvp/matlab/crvp_velPress_plot.m

As a reference, see  R. Fortenbach, 'Mehrskalenmodellierung von aeroakustischen Quellen in schwach kompressiblen Stroemungen,' pp. 1-151, Jul. 2006.

Source: complex velocity potential of both vortices complex coordinates: z = x+i*y Gamma ... circulation

 b = r0*exp(i*omega*t) ... rotation orbit
w(z,t) = Gamma/(2Pi*i)*ln(z^2-b^2) ... potential function
dw/dz = Gamma/(2Pi*i)*z/(z^2-b^2)  ... derivative of potential
u =  Re( dw/dz( z, t=0 )           ... x -velocity
v = -Im( dw/dz( z, t=0 )           ... y -velocity
u0 = Gamma/(4Pi*r0)                ... rotation velocity at center of each
vortice
omega = 2Pi/T0 = u0/r0 = Gamma/(4Pi*ro^2) ... rotation angular frequency
Ma = u0/cs        ... rotation Mach number
rho = rho0 - Ma^2*rho0/cs^2*( Re{ -omega*Gamma/Pi * b^2/(z^2-b^2)}
+ (u^2+v^2)/2 )


Unit of the result is in kg/m^3, as the coordinates are given in physical coordinates and hence all other parameters also have to be physical ones

### Arguments

TypeIntentOptionalAttributesName
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 real(kind=rk)(n)

return value which is sent to state variable

## Variables

TypeVisibilityAttributesNameInitial
complex(kind=rk), private :: z_coord
complex(kind=rk), private :: b_coord
complex(kind=rk), private :: z_compl
complex(kind=rk), private :: b_coordChg
complex(kind=rk), private :: z_Core
real(kind=rk), private :: omega
real(kind=rk), private :: u(1)
real(kind=rk), private :: v(1)
complex(kind=rk), private, parameter:: i_complex =(0._rk, 1._rk)
real(kind=rk), private :: r
real(kind=rk), private :: rC
real(kind=rk), private :: dist2Left
real(kind=rk), private :: dist2Right
real(kind=rk), private :: pMin
real(kind=rk), private :: phiTC
real(kind=rk), private :: uxC
real(kind=rk), private :: uyC
integer, private :: iElem