hyperbolic divergence cleaning on the reference cubic face.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rk), | intent(in) | :: | left(8) |
Left state vector (as conservative variables). The order of this vector has to be \f$ (D_x, D_y, D_z, B_1, B_2, B_3, phi, psi) \f$ where E and B denoted electric field vetor and magnetic field (also called magnetic induction) vector. |
||
real(kind=rk), | intent(in) | :: | right(8) |
Right state vector (as conservative variables). The order of this vector has to be (D_x, D_y, D_z, B_1, B_2, B_3, phi, psi) where E and B denoted the electric field vetor and magnetic field (also called magnetic induction) vector. |
||
real(kind=rk), | intent(in) | :: | mat_left(4) |
Material for the left face |
||
real(kind=rk), | intent(in) | :: | mat_right(4) |
Material for the right face !> The magnetic permeability of the left element. real(kind=rk), intent(in) :: left_mu !> The electric permitivity of the left element. real(kind=rk), intent(in) :: left_epsi !> Parameter for the magnetic correction on the left element. real(kind=rk), intent(in) :: left_gam !> Parameter for the electric correction on the left element. real(kind=rk), intent(in) :: left_chi !> The magnetic permeability of the right element. real(kind=rk), intent(in) :: right_mu !> The electric permitivity of the right element. real(kind=rk), intent(in) :: right_epsi !> Parameter for the magnetic correction on the right element. real(kind=rk), intent(in) :: right_gam !> Parameter for the electric correction on the right element. real(kind=rk), intent(in) :: right_chi |
||
real(kind=rk), | intent(out) | :: | flux(8) |
The flux between left and right cell. The order of this vector is the same as the input arguments. JZ: Old implementation of the flux. There must be an error somewhere. I have to check my solution for the Riemann problem agian. So, I replaced the flux by a simple Lax-Friedrich type flux. real(kind=rk) :: left_speedOfLight, right_speedOfLight real(kind=rk) :: inv_denom_mu, inv_denom_epsi ! -------------------------------------------------------------------------- ! The speed of light in the left and right element left_speedOfLight = 1.0_rk / sqrt( left_mu * left_epsi ) right_speedOfLight = 1.0_rk / sqrt( right_mu * right_epsi ) ! The inverse of the denominators inv_denom_mu = 1.0_rk / ((-1.0_rk)left_speedOfLightleft_mu - right_speedOfLightright_mu) inv_denom_epsi = 1.0_rk / (left_speedOfLightleft_epsi + right_speedOfLight*right_epsi) ! D_x flux(1) = inv_denom_mu * ( & & (-1.0_rk)left_chileft(1)/left_epsi & & - (-1.0_rk)right_chiright(1)/right_epsi & & ) & & + ( & & left_chileft_chileft(7) & & + right_chiright_chiright(7) & & ) / ( left_epsileft_mu + right_epsiright_mu ) ! B_x flux(4) = inv_denom_epsi * ( & & (-1.0_rk)left_gamleft(4)/left_mu & & - (-1.0_rk)right_gamright(4)/right_mu) & & + ( & & left_gamleft_gamleft(8) & & + right_gamright_gamright(8) & & ) / ( left_epsileft_mu + right_epsiright_mu ) ! the flux for phi (electric correction) flux(7) = ( & & left_speedOfLightleft(1) & & + right_speedOfLightright(1) & & + left_speedOfLightleft_chileft(7) & & - right_speedOfLightright_chiright(7) & & ) / (left_speedOfLight + right_speedOfLight) ! the flux for psi (magnetic correction) flux(8) = ( & & left_speedOfLightleft(4) & & + right_speedOfLightright(4) & & + left_speedOfLightleft_gamleft(8) & & - right_speedOfLightright_gamright(8) & & ) / (left_speedOfLight + right_speedOfLight) ! the flux for D_y flux(2) = ( & & ( (-1.0_rkleft(2) / left_epsi) & & - (-1.0_rkright(2) / right_epsi) ) & & - ( left_speedOfLight * left(6) & & + right_speedOfLight * right(6) )) ! the flux for B_z flux(6) = ( & & ( left_speedOfLight * left(2) & & + right_speedOfLight * right(2) ) & & + ( ( left(6) / left_mu ) & & - ( right(6) / right_mu ) )) ! the flux for D_z flux(3) = ( & & ( ( -1.0_rk * left(3) / left_epsi ) & & - ( -1.0_rk * right(3) / right_epsi ) ) & & + ( left_speedOfLight * left(5) & & + right_speedOfLight * right(5) ) & & ) ! the flux for B_y flux(5) = ( & & ( -1.0_rk * left_speedOfLight * left(3) & & - right_speedOfLight * right(3) ) & & + ( ( left(5) / left_mu ) & & - ( right(5) / right_mu) ) & & )
|