137 IF ( solid_transport_flag )
THEN 169 REAL*8,
INTENT(IN),
OPTIONAL :: r_qj(n_vars)
170 COMPLEX*16,
INTENT(IN),
OPTIONAL :: c_qj(n_vars)
172 COMPLEX*16 :: qj(n_vars)
174 IF (
present(c_qj) )
THEN 186 IF ( solid_transport_flag )
THEN 188 IF ( dble(
h ) .GT. 1.d-25 )
THEN 192 IF ( temperature_flag )
t = qj(5) /
h 198 IF ( temperature_flag )
THEN 200 t = dsqrt(2.d0) *
h * qj(5) / cdsqrt(
h**4 +
eps_sing )
210 IF ( temperature_flag )
THEN 212 IF ( dble(
h ) .GT. 1.d-25 )
THEN 218 t = dsqrt(2.d0) *
h * qj(4) / cdsqrt(
h**4 +
eps_sing )
224 alphas = dcmplx(0.d0,0.d0)
225 rho_m = dcmplx(1.d0,0.d0)
229 IF ( dble(
h ) .GT.
eps_sing ** 0.25d0 )
THEN 265 REAL*8,
INTENT(IN) :: qj(n_vars)
267 REAL*8,
INTENT(OUT) :: vel_min(n_vars) , vel_max(n_vars)
271 vel_min(1:n_eqns) = dble(
u) - dsqrt(
grav * dble(
h) )
272 vel_max(1:n_eqns) = dble(
u) + dsqrt(
grav * dble(
h) )
294 REAL*8,
INTENT(IN) :: qj(n_vars)
295 REAL*8,
INTENT(OUT) :: vel_min(n_vars) , vel_max(n_vars)
299 vel_min(1:n_eqns) = dble(
v) - dsqrt(
grav * dble(
h) )
300 vel_max(1:n_eqns) = dble(
v) + dsqrt(
grav * dble(
h) )
326 REAL*8,
INTENT(IN) :: qc(n_vars)
327 REAL*8,
INTENT(IN) :: B
328 REAL*8,
INTENT(OUT) :: qp(n_vars)
340 IF ( solid_transport_flag )
THEN 344 IF ( temperature_flag ) qp(5) = dble(
t)
348 IF ( temperature_flag ) qp(4) = dble(
t)
376 REAL*8,
INTENT(IN) :: qp(n_vars)
377 REAL*8,
INTENT(IN) :: B
378 REAL*8,
INTENT(OUT) :: qc(n_vars)
394 IF ( solid_transport_flag )
THEN 397 qc(4) = r_h * r_alphas
399 IF ( temperature_flag )
THEN 409 r_rho_m = r_alphas *
rho_s + ( 1.d0 - r_alphas ) *
rho_w 413 IF ( temperature_flag )
THEN 425 qc(2) = r_h * r_rho_m * r_u
426 qc(3) = r_h * r_rho_m * r_v
454 REAL*8,
INTENT(IN) :: qc(n_vars)
455 REAL*8,
INTENT(IN) :: B
456 REAL*8,
INTENT(OUT) :: qc2(n_vars)
459 qc2(2:n_vars) = qc(2:n_vars)
483 REAL*8,
INTENT(IN) :: qc2(n_vars)
484 REAL*8,
INTENT(IN) :: B
485 REAL*8,
INTENT(OUT) :: qc(n_vars)
487 REAL*8 :: qc_temp(n_vars)
496 qc_temp(1) = qc2(1) - b
497 qc_temp(2:n_vars) = qc2(2:n_vars)
510 IF ( solid_transport_flag )
THEN 512 r_rho_m = dble(
rho_m)
521 qc(2) = r_h * r_rho_m * r_u
522 qc(3) = r_h * r_rho_m * r_v
524 IF ( solid_transport_flag )
THEN 526 qc(4) = r_h * r_alphas
528 IF ( temperature_flag )
THEN 537 IF ( temperature_flag )
THEN 562 SUBROUTINE eval_fluxes(c_qj,r_qj,c_flux,r_flux,dir)
567 COMPLEX*16,
INTENT(IN),
OPTIONAL :: c_qj(n_vars)
568 COMPLEX*16,
INTENT(OUT),
OPTIONAL :: c_flux(n_eqns)
569 REAL*8,
INTENT(IN),
OPTIONAL :: r_qj(n_vars)
570 REAL*8,
INTENT(OUT),
OPTIONAL :: r_flux(n_eqns)
571 INTEGER,
INTENT(IN) :: dir
573 COMPLEX*16 :: qj(n_vars)
574 COMPLEX*16 :: flux(n_eqns)
575 COMPLEX*16 :: h_temp , u_temp , v_temp
576 COMPLEX*16 :: alphas_temp , rho_m_temp
580 IF (
present(c_qj) .AND.
present(c_flux) )
THEN 584 ELSEIF (
present(r_qj) .AND.
present(r_flux) )
THEN 588 qj(i) = dcmplx( r_qj(i) )
594 WRITE(*,*)
'Constitutive, eval_fluxes: problem with arguments' 601 pos_thick:
IF ( dble(h_temp) .NE. 0.d0 )
THEN 603 IF ( solid_transport_flag )
THEN 605 alphas_temp = qj(4) / h_temp
610 rho_m_temp = alphas_temp *
rho_s + ( dcmplx(1.d0,0.d0) &
611 - alphas_temp ) *
rho_w 615 alphas_temp = dcmplx( 0.d0 , 0.d0 )
616 rho_m_temp = dcmplx(1.d0,0.d0)
620 IF ( dir .EQ. 1 )
THEN 623 u_temp = qj(2) / ( h_temp * rho_m_temp )
626 flux(1) = qj(2) / rho_m_temp
629 flux(2) = rho_m_temp * h_temp * u_temp**2 + &
630 0.5d0 * rho_m_temp *
grav * h_temp**2
633 flux(3) = u_temp * qj(3)
635 IF ( solid_transport_flag )
THEN 638 flux(4) = u_temp * qj(4)
641 IF ( flux(4) / flux(1) .GT. 1.d0 ) flux(4) = flux(1)
644 IF ( temperature_flag ) flux(5) = u_temp * qj(5)
649 IF ( temperature_flag ) flux(4) = u_temp * qj(4)
653 ELSEIF ( dir .EQ. 2 )
THEN 657 v_temp = qj(3) / ( h_temp * rho_m_temp )
659 flux(1) = qj(3) / rho_m_temp
661 flux(2) = v_temp * qj(2)
663 flux(3) = rho_m_temp * h_temp * v_temp**2 + &
664 0.5d0 * rho_m_temp *
grav * h_temp**2
666 IF ( solid_transport_flag )
THEN 668 flux(4) = v_temp * qj(4)
671 IF ( flux(4) / flux(1) .GT. 1.d0 ) flux(4) = flux(1)
674 IF ( temperature_flag ) flux(5) = v_temp * qj(5)
679 IF ( temperature_flag ) flux(4) = v_temp * qj(4)
687 flux(1:n_eqns) = 0.d0
697 IF (
present(c_qj) .AND.
present(c_flux) )
THEN 701 ELSEIF (
present(r_qj) .AND.
present(r_flux) )
THEN 703 r_flux = dble( flux )
730 COMPLEX*16,
INTENT(IN),
OPTIONAL :: c_qj(n_vars)
732 COMPLEX*16,
INTENT(OUT),
OPTIONAL :: c_nh_term_impl(n_eqns)
733 REAL*8,
INTENT(IN),
OPTIONAL :: r_qj(n_vars)
734 REAL*8,
INTENT(OUT),
OPTIONAL :: r_nh_term_impl(n_eqns)
736 COMPLEX*16 :: qj(n_vars)
738 COMPLEX*16 :: nh_term(n_eqns)
740 COMPLEX*16 :: relaxation_term(n_eqns)
742 COMPLEX*16 :: forces_term(n_eqns)
746 COMPLEX*16 :: mod_vel
750 REAL*8 :: radiative_coeff
752 COMPLEX*16 :: radiative_term
754 REAL*8 :: convective_coeff
756 COMPLEX*16 :: convective_term
758 COMPLEX*16 :: conductive_coeff , conductive_term
760 REAL*8 :: thermal_diffusivity
762 REAL*8 :: h_threshold
767 COMPLEX*8 :: fluid_visc
779 IF ( temperature_flag )
THEN 794 IF (
present(c_qj) .AND.
present(c_nh_term_impl) )
THEN 798 ELSEIF (
present(r_qj) .AND.
present(r_nh_term_impl) )
THEN 802 qj(i) = dcmplx( r_qj(i) )
808 WRITE(*,*)
'Constitutive, eval_fluxes: problem with arguments' 814 relaxation_term(1:n_eqns) = dcmplx(0.d0,0.d0)
817 forces_term(1:n_eqns) = dcmplx(0.d0,0.d0)
819 IF (rheology_flag)
THEN 823 mod_vel = cdsqrt(
u**2 +
v**2 )
826 IF ( rheology_model .EQ. 1 )
THEN 828 IF ( dble(mod_vel) .NE. 0.d0 )
THEN 831 forces_term(2) = forces_term(2) -
rho_m * (
u / mod_vel ) * &
832 (
grav /
xi ) * mod_vel ** 2
834 forces_term(3) = forces_term(3) -
rho_m * (
v / mod_vel ) * &
835 (
grav /
xi ) * mod_vel ** 2
840 ELSEIF ( rheology_model .EQ. 2 )
THEN 842 IF ( dble(mod_vel) .NE. 0.d0 )
THEN 844 forces_term(2) = forces_term(2) -
rho_m *
tau * (
u/mod_vel)
846 forces_term(3) = forces_term(3) -
rho_m *
tau * (
v/mod_vel)
851 ELSEIF ( rheology_model .EQ. 3 )
THEN 853 IF ( dble(
h) .GT. h_threshold )
THEN 866 IF ( dble(mod_vel) .NE. 0.d0 )
THEN 869 forces_term(2) = forces_term(2) -
rho_m * gamma *
u 872 forces_term(3) = forces_term(3) -
rho_m * gamma *
v 877 ELSEIF ( rheology_model .EQ. 4 )
THEN 889 IF (
h .GT. h_threshold )
THEN 892 s_v =
kappa * fluid_visc * mod_vel / ( 8.d0 *
h**2 )
895 s_td =
rho_m *
n_td**2 * mod_vel**2 / (
h**(4.d0/3.d0) )
900 s_v =
kappa * fluid_visc * mod_vel / ( 8.d0 * h_threshold**2 )
903 s_td =
rho_m *
n_td**2 * (mod_vel**2) / ( h_threshold**(4.d0/3.d0) )
910 IF ( mod_vel .GT. 0.d0 )
THEN 912 forces_term(2) = forces_term(2) -
grav *
h * (
u / mod_vel ) * s_f
914 forces_term(3) = forces_term(3) -
grav *
h * (
v / mod_vel ) * s_f
918 ELSEIF ( rheology_model .EQ. 5 )
THEN 920 tau = 1.d-3 / ( 1.d0 + 10.d0 *
h ) * mod_vel
922 IF ( dble(mod_vel) .NE. 0.d0 )
THEN 924 forces_term(2) = forces_term(2) -
rho_m *
tau * (
u / mod_vel )
925 forces_term(3) = forces_term(3) -
rho_m *
tau * (
v / mod_vel )
933 IF ( temperature_flag )
THEN 937 IF ( dble(
h) .GT. 0.d0 )
THEN 944 radiative_coeff = 0.d0
948 IF ( dble(
t) .GT.
t_env )
THEN 951 radiative_term = - radiative_coeff * (
t**4 -
t_env**4 )
955 radiative_term = dcmplx(0.d0,0.d0)
959 IF ( dble(
h) .GT. 0.d0 )
THEN 967 convective_coeff = 0.d0
971 IF ( dble(
t) .GT.
t_env )
THEN 974 convective_term = - convective_coeff * (
t -
t_env )
978 convective_term = dcmplx(0.d0,0.d0)
982 IF ( dble(
h) .GT. h_threshold )
THEN 987 conductive_coeff =
enne * thermal_diffusivity /
h 991 conductive_coeff = dcmplx(0.d0,0.d0)
992 conductive_coeff =
enne * thermal_diffusivity / dcmplx(h_threshold,0.d0)
999 conductive_term = - conductive_coeff * (
t -
t_ground )
1003 conductive_term = dcmplx(0.d0,0.d0)
1007 IF ( solid_transport_flag )
THEN 1009 relaxation_term(5) = radiative_term + convective_term + conductive_term
1013 relaxation_term(4) = radiative_term + convective_term + conductive_term
1019 nh_term = relaxation_term + forces_term
1021 IF (
present(c_qj) .AND.
present(c_nh_term_impl) )
THEN 1023 c_nh_term_impl = nh_term
1025 ELSEIF (
present(r_qj) .AND.
present(r_nh_term_impl) )
THEN 1027 r_nh_term_impl = dble( nh_term )
1047 r_qj , r_nh_semi_impl_term )
1054 REAL*8,
INTENT(IN) :: grav3_surf
1056 COMPLEX*16,
INTENT(IN),
OPTIONAL :: c_qj(n_vars)
1057 COMPLEX*16,
INTENT(OUT),
OPTIONAL :: c_nh_semi_impl_term(n_eqns)
1058 REAL*8,
INTENT(IN),
OPTIONAL :: r_qj(n_vars)
1059 REAL*8,
INTENT(OUT),
OPTIONAL :: r_nh_semi_impl_term(n_eqns)
1061 COMPLEX*16 :: qj(n_vars)
1063 COMPLEX*16 :: forces_term(n_eqns)
1067 COMPLEX*16 :: mod_vel
1069 REAL*8 :: h_threshold
1080 IF (
present(c_qj) .AND.
present(c_nh_semi_impl_term) )
THEN 1084 ELSEIF (
present(r_qj) .AND.
present(r_nh_semi_impl_term) )
THEN 1088 qj(i) = dcmplx( r_qj(i) )
1094 WRITE(*,*)
'Constitutive, eval_fluxes: problem with arguments' 1100 forces_term(1:n_eqns) = dcmplx(0.d0,0.d0)
1102 IF (rheology_flag)
THEN 1106 mod_vel = cdsqrt(
u**2 +
v**2 )
1109 IF ( rheology_model .EQ. 1 )
THEN 1111 IF ( mod_vel .GT. 0.d0 )
THEN 1113 forces_term(2) = forces_term(2) -
rho_m * (
u / mod_vel ) * &
1114 mu *
h * ( -
grav * grav3_surf )
1116 forces_term(3) = forces_term(3) -
rho_m * (
v / mod_vel ) * &
1117 mu *
h * ( -
grav * grav3_surf )
1122 ELSEIF ( rheology_model .EQ. 2 )
THEN 1126 ELSEIF ( rheology_model .EQ. 3 )
THEN 1130 ELSEIF ( rheology_model .EQ. 4 )
THEN 1132 h_threshold = 1.d-20
1141 IF (
h .GT. h_threshold )
THEN 1149 s_y = tau_y / h_threshold
1153 IF ( mod_vel .GT. 0.d0 )
THEN 1155 forces_term(2) = forces_term(2) -
grav *
h * (
u / mod_vel ) * s_y
1157 forces_term(3) = forces_term(3) -
grav *
h * (
v / mod_vel ) * s_y
1161 ELSEIF ( rheology_model .EQ. 5 )
THEN 1168 IF ( temperature_flag )
THEN 1174 IF (
present(c_qj) .AND.
present(c_nh_semi_impl_term) )
THEN 1176 c_nh_semi_impl_term = forces_term
1178 ELSEIF (
present(r_qj) .AND.
present(r_nh_semi_impl_term) )
THEN 1180 r_nh_semi_impl_term = dble( forces_term )
1198 SUBROUTINE eval_expl_terms( Bprimej_x , Bprimej_y , source_xy , qj , &
1205 REAL*8,
INTENT(IN) :: Bprimej_x
1206 REAL*8,
INTENT(IN) :: Bprimej_y
1207 REAL*8,
INTENT(IN) :: source_xy
1209 REAL*8,
INTENT(IN) :: qj(n_eqns)
1210 REAL*8,
INTENT(OUT) :: expl_term(n_eqns)
1212 REAL*8 :: visc_heat_coeff
1214 expl_term(1:n_eqns) = 0.d0
1220 expl_term(2) =
grav * dble(
rho_m) * dble(
h) * bprimej_x
1222 expl_term(3) =
grav * dble(
rho_m) * dble(
h) * bprimej_y
1226 IF ( solid_transport_flag )
THEN 1236 IF ( rheology_model .EQ. 3 )
THEN 1238 IF ( dble(
h) .GT. 0.d0 )
THEN 1245 visc_heat_coeff = 0.d0
1249 IF ( solid_transport_flag )
THEN 1253 expl_term(5) = expl_term(5) - visc_heat_coeff * ( dble(
u)**2 &
1260 expl_term(4) = expl_term(4) - visc_heat_coeff * ( dble(
u)**2 &
1286 REAL*8,
INTENT(IN) :: qj(n_eqns)
1288 REAL*8,
INTENT(OUT) :: erosion_term
1289 REAL*8,
INTENT(OUT) :: deposition_term
1318 deposition_term = 0.d0
1333 mod_vel = dsqrt( dble(
u)**2 + dble(
v)**2 )
1335 IF ( dble(
h) .GT. 1.d-2)
THEN 1340 erosion_term =
erosion_coeff * mod_vel * dble(
h) * ( 1.d0 - r_alphas )
1369 SUBROUTINE eval_topo_term( qj , deposition_avg_term , erosion_avg_term , &
1370 eqns_term, topo_term )
1374 REAL*8,
INTENT(IN) :: qj(n_eqns)
1375 REAL*8,
INTENT(IN) :: deposition_avg_term
1376 REAL*8,
INTENT(IN) :: erosion_avg_term
1378 REAL*8,
INTENT(OUT):: eqns_term(n_eqns)
1379 REAL*8,
INTENT(OUT):: topo_term
1384 eqns_term(1:n_eqns) = 0.d0
1387 eqns_term(1) = erosion_avg_term - deposition_avg_term
1390 eqns_term(2) = - dble(
u) *
rho_s * deposition_avg_term
1393 eqns_term(3) = - dble(
v) *
rho_s * deposition_avg_term
1396 eqns_term(4) = erosion_avg_term - deposition_avg_term
1399 topo_term = - erosion_avg_term + deposition_avg_term
real *8 emissivity
emissivity (eps in Costa & Macedonio, 2005)
real *8 rho_s
Specific weight of sediments.
subroutine qc_to_qp(qc, B, qp)
Conservative to physical variables.
real *8 nu_ref
reference kinematic viscosity [m2/s]
real *8 t_ground
temperature of lava-ground interface
real *8 beta2
2nd parameter for yield strenght empirical relationship (O'Brian et al, 1993)
real *8, parameter sbconst
Stephan-Boltzmann constant [W m-2 K-4].
subroutine phys_var(r_qj, c_qj)
Physical variables.
logical temperature_flag
Flag to choose if we model temperature transport.
logical rheology_flag
Flag to choose if we add the rheology.
subroutine eval_expl_terms(Bprimej_x, Bprimej_y, source_xy, qj, expl_term)
Explicit Forces term.
real *8 rad_coeff
radiative coefficient
real *8 c_p
specific heat [J kg-1 K-1]
subroutine eval_erosion_dep_term(qj, erosion_term, deposition_term)
Deposition term.
integer rheology_model
choice of the rheology model
subroutine eval_nh_semi_impl_terms(grav3_surf, c_qj, c_nh_semi_impl_term, r_qj, r_nh_semi_impl_term)
Non-Hyperbolic semi-implicit terms.
real *8 rho_w
Specific weight of water.
real *8 thermal_conductivity
thermal conductivity [W m-1 K-1] (k in Costa & Macedonio, 2005)
real *8 beta1
2nd parameter for fluid viscosity empirical relationship (O'Brian et al, 1993)
integer n_vars
Number of conservative variables.
complex *16 v
velocity (y direction)
real *8 enne
thermal boundary layer fraction of total thickness
logical source_flag
Flag to choose if there is a source of mass within the domain.
real *8 rho
fluid density [kg/m3]
real *8 grav
gravitational acceleration
real *8 mu
drag coefficients (Voellmy-Salm model)
real *8 visc_par
viscosity parameter [K-1] (b in Table 1 Costa & Macedonio, 2005)
logical, dimension(:), allocatable implicit_flag
character(len=20) phase1_name
real *8 n_td
Mannings roughness coefficient ( units: T L^(-1/3) )
subroutine init_problem_param
Initialization of relaxation flags.
real *8 t_env
evironment temperature [K]
real *8 alpha2
1st parameter for yield strenght empirical relationship (O'Brian et al, 1993)
real *8 erosion_coeff
erosion model coefficient
real *8 atm_heat_transf_coeff
atmospheric heat trasnfer coefficient [W m-2 K-1] (lambda in C&M, 2005)
real *8 settling_vel
hindered settling
real *8 alpha1
1st parameter for fluid viscosity empirical relationship (O'Brian et al, 1993)
real *8 t_ref
reference temperature [K]
subroutine qc2_to_qc(qc2, B, qc)
Reconstructed to conservative variables.
subroutine qc_to_qc2(qc, B, qc2)
Conservative to alternative conservative variables.
subroutine eval_local_speeds_y(qj, vel_min, vel_max)
Local Characteristic speeds y direction.
real *8 exp_area_fract
fractional area of the exposed inner core (f in C&M, 2005)
integer n_eqns
Number of equations.
subroutine qp_to_qc(qp, B, qc)
Physical to conservative variables.
subroutine eval_nonhyperbolic_terms(c_qj, c_nh_term_impl, r_qj, r_nh_term_impl)
Non-Hyperbolic terms.
subroutine eval_fluxes(c_qj, r_qj, c_flux, r_flux, dir)
Hyperbolic Fluxes.
subroutine eval_topo_term(qj, deposition_avg_term, erosion_avg_term, eqns_term, topo_term)
Topography modification related term.
real *8 emme
velocity boundary layer fraction of total thickness
real *8 eps_sing
parameter for desingularization
real *8 tau
drag coefficients (plastic model)
complex *16 alphas
sediment volume fraction
complex *16 u
velocity (x direction)
real *8 frict_coeff
friction coefficient
real *8 kappa
Empirical resistance parameter.
logical solid_transport_flag
Flag to choose if we model solid phase transport.
complex *16 rho_m
mixture density
subroutine eval_local_speeds_x(qj, vel_min, vel_max)
Local Characteristic speeds x direction.
integer n_nh
Number of non-hyperbolic terms.
character(len=20) phase2_name