70 REAL(wp),
INTENT(IN) :: r_qj(n_vars)
71 REAL(wp),
INTENT(OUT) :: r_h
72 REAL(wp),
INTENT(OUT) :: r_u
73 REAL(wp),
INTENT(OUT) :: r_v
80 r_u = r_qj(2) / r_qj(1)
81 r_v = r_qj(3) / r_qj(1)
85 r_u = sqrt(2.0_wp) * r_qj(1) * r_qj(2) / sqrt( r_qj(1)**4 +
eps_sing**4 )
86 r_v = sqrt(2.0_wp) * r_qj(1) * r_qj(3) / sqrt( r_qj(1)**4 +
eps_sing**4 )
116 COMPLEX(wp),
INTENT(IN) :: c_qj(n_vars)
117 COMPLEX(wp),
INTENT(OUT) :: h
118 COMPLEX(wp),
INTENT(OUT) :: u
119 COMPLEX(wp),
INTENT(OUT) :: v
121 COMPLEX(wp) :: inv_cqj1
123 IF (
REAL(c_qj(1)) .GT. eps_sing ) then
125 inv_cqj1 = 1.0_wp / c_qj(1)
129 inv_cqj1 = cmplx(0.0_wp,0.0_wp,
wp)
136 IF (
REAL( c_qj(1) ) .GT. eps_sing ) then
138 u = c_qj(2) * inv_cqj1
139 v = c_qj(3) * inv_cqj1
143 u = sqrt(2.0_wp) * c_qj(1) * c_qj(2) / sqrt( c_qj(1)**4 + eps_sing**4 )
144 v = sqrt(2.0_wp) * c_qj(1) * c_qj(3) / sqrt( c_qj(1)**4 + eps_sing**4 )
170 REAL(wp),
INTENT(IN) :: qpj(
n_vars+2)
177 IF ( qpj(1) .LE. 0.0_wp )
THEN 220 REAL(wp),
INTENT(IN) :: qc(
n_vars)
221 REAL(wp),
INTENT(OUT) :: qp(
n_vars+2)
265 REAL(wp),
INTENT(IN) :: qp(
n_vars+2)
266 REAL(wp),
INTENT(OUT) :: qc(
n_vars)
276 IF ( r_h .GT. 0.0_wp )
THEN 322 REAL(wp),
INTENT(IN) :: qpj(
n_vars)
323 REAL(wp),
INTENT(OUT) :: qp2j(3)
327 IF ( qpj(1) .LE. 0.0_wp )
THEN 334 qp2j(2) = qpj(2)/qpj(1)
335 qp2j(3) = qpj(3)/qpj(1)
360 REAL(wp),
INTENT(IN) :: qpj(
n_vars+2)
362 REAL(wp),
INTENT(OUT) :: vel_min(
n_vars) , vel_max(
n_vars)
370 vel_min(1:
n_eqns) = r_u - 0.5_wp *
n * r_h
371 vel_max(1:
n_eqns) = r_u + 0.5_wp *
n * r_h
394 REAL(wp),
INTENT(IN) :: qpj(
n_vars+2)
395 REAL(wp),
INTENT(OUT) :: vel_min(
n_vars) , vel_max(
n_vars)
403 vel_min(1:
n_eqns) = r_v - 0.5_wp *
n * r_h
404 vel_max(1:
n_eqns) = r_v + 0.5_wp *
n * r_h
430 REAL(wp),
INTENT(IN) :: qcj(
n_vars)
431 REAL(wp),
INTENT(IN) :: qpj(
n_vars+2)
432 INTEGER,
INTENT(IN) :: dir
434 REAL(wp),
INTENT(OUT) :: flux(
n_eqns)
440 pos_thick:
IF ( qcj(1) .GT. 0.0_wp )
THEN 446 IF ( dir .EQ. 1 )
THEN 449 flux(1) = r_u * qcj(1)
452 flux(2) = r_u * qcj(2) +
n**2 * r_h**3 / 12.0_wp
455 flux(3) = r_u * qcj(3)
457 ELSEIF ( dir .EQ. 2 )
THEN 460 flux(1) = r_v * qcj(1)
463 flux(2) = r_v * qcj(2)
466 flux(3) = r_v * qcj(3) +
n**2 * r_h**3 / 12.0_wp
499 c_qj , c_nh_term_impl , r_qj , r_nh_term_impl )
507 COMPLEX(wp),
INTENT(IN),
OPTIONAL :: c_qj(n_vars)
508 COMPLEX(wp),
INTENT(OUT),
OPTIONAL :: c_nh_term_impl(n_eqns)
509 REAL(wp),
INTENT(IN),
OPTIONAL :: r_qj(n_vars)
510 REAL(wp),
INTENT(OUT),
OPTIONAL :: r_nh_term_impl(n_eqns)
512 REAL(wp),
INTENT(IN) :: cell_fract_jk
513 REAL(wp),
INTENT(IN) :: dx_rel_jk
514 REAL(wp),
INTENT(IN) :: dy_rel_jk
520 COMPLEX(wp) :: qj(n_vars)
521 COMPLEX(wp) :: forces_term(n_eqns)
523 COMPLEX(wp) :: mod_vel , delta_u , delta_v
531 pi_g = 4.0_wp *
atan(1.0_wp)
533 IF (
present(c_qj) .AND.
present(c_nh_term_impl) )
THEN 537 ELSEIF (
present(r_qj) .AND.
present(r_nh_term_impl) )
THEN 541 qj(i) = cmplx( r_qj(i),0.0_wp,
wp )
547 WRITE(*,*)
'Constitutive, eval_fluxes: problem with arguments' 553 forces_term(1:n_eqns) = cmplx(0.0_wp,0.0_wp,
wp)
560 mod_vel = sqrt( delta_u**2 + delta_v**2 )
562 forces_term(2) = forces_term(2) - c_d * delta_u * mod_vel
564 forces_term(3) = forces_term(3) - c_d * delta_v * mod_vel
568 forces_term(1) = h_dot
570 forces_term(2) = forces_term(2) + (
u_source + dx_rel_jk * h_dot ) * h_dot
572 forces_term(3) = forces_term(3) + (
v_source + dy_rel_jk * h_dot ) * h_dot
574 IF (
present(c_qj) .AND.
present(c_nh_term_impl) )
THEN 576 c_nh_term_impl = forces_term
578 ELSEIF (
present(r_qj) .AND.
present(r_nh_term_impl) )
THEN 580 r_nh_term_impl =
REAL( forces_term )
612 REAL(wp),
INTENT(IN) :: time
613 REAL(wp),
INTENT(IN) :: vect_x
614 REAL(wp),
INTENT(IN) :: vect_y
615 REAL(wp),
INTENT(OUT) :: source_bdry(n_vars)
624 source_bdry(1) = 0.0_wp
625 source_bdry(2) = 0.0_wp
626 source_bdry(3) = 0.0_wp
627 source_bdry(n_vars+1) = 0.0_wp
628 source_bdry(n_vars+2) = 0.0_wp
636 pi_g = 4.0_wp * atan(1.0_wp)
642 IF ( t_rem .LE.
time_param(2) ) t_coeff = 1.0_wp
648 t_coeff = 0.5_wp * ( 1.0_wp - cos( pi_g * t_rem /
time_param(3) ) )
656 t_coeff = 0.5_wp * ( 1.0_wp + cos( pi_g * ( ( t_rem -
time_param(2) ) &
667 source_bdry(n_vars+1) = t_coeff**0.5_wp *
vel_source * vect_x
668 source_bdry(n_vars+2) = t_coeff**0.5_wp *
vel_source * vect_y
subroutine eval_local_speeds_x(qpj, vel_min, vel_max)
Local Characteristic speeds x direction.
subroutine qp_to_qp2(qpj, qp2j)
Additional Physical variables.
integer n_vars
Number of conservative variables.
subroutine eval_fluxes(qcj, qpj, dir, flux)
Hyperbolic Fluxes.
logical, dimension(:), allocatable implicit_flag
flag used for size of implicit non linear-system
subroutine eval_source_bdry(time, vect_x, vect_y, source_bdry)
Internal boundary source fluxes.
subroutine eval_local_speeds_y(qpj, vel_min, vel_max)
Local Characteristic speeds y direction.
subroutine c_phys_var(c_qj, h, u, v)
Physical variables.
subroutine init_problem_param
Initialization of relaxation flags.
subroutine qc_to_qp(qc, qp)
Conservative to physical variables.
subroutine mixt_var(qpj)
Physical variables.
subroutine eval_nonhyperbolic_terms(cell_fract_jk, dx_rel_jk, dy_rel_jk, c_qj, c_nh_term_impl, r_qj, r_nh_term_impl)
Non-Hyperbolic terms.
integer, parameter wp
working precision
subroutine r_phys_var(r_qj, r_h, r_u, r_v)
Physical variables.
integer n_eqns
Number of equations.
real(wp), dimension(4) time_param
subroutine qp_to_qc(qp, qc)
Physical to conservative variables.
real(wp) eps_sing
parameter for desingularization
integer n_nh
Number of non-hyperbolic terms.