113 namelist / run_parameters /
run_name , verbose_level
118 namelist / phases_parameters / n_gas , n_cry , n_mom
123 namelist / exsolved_gas_parameters / gas_law, pc_g , tc_g , cv_g , gamma_g , &
124 rho0_g , t0_g , bar_e_g , s0_g, visc_2 , lateral_degassing_flag , &
125 alfa2_lat_thr , perm0
126 namelist / dissolved_gas_parameters / rho0_d , c0_d , cv_d , gamma_d , p0_d , &
127 t0_d , bar_e_d , bar_p_d , s0_d , exsol_model , solub , solub_exp
129 namelist / crystals_parameters / rho0_c , c0_c , cv_c , gamma_c , p0_c , &
130 t0_c , bar_e_c , bar_p_c , s0_c , beta0 , beta_max, crystallization_model
132 namelist / melt_parameters / rho0_m , c0_m , cv_m , gamma_m , p0_m , t0_m , &
133 bar_e_m , bar_p_m , s0_m
135 namelist / viscosity_parameters / visc_melt_model , bubbles_model , &
136 theta_model , theta_fixed
138 namelist / temperature_parameters / isothermal , fixed_temp
140 namelist / fragmentation_parameters / explosive , fragmentation_model , &
146 namelist / source_parameters / grav
148 namelist / country_rock_parameters / rho_cr ,
log10_k_cr 153 namelist / bubbles_parameters / bubble_number_density
155 namelist / forchheimer_parameters / log10_bubble_number_density , &
156 tortuosity_factor , throat_bubble_ratio , friction_coefficient , c_d , &
159 namelist / permeability_parameters / xa, xb, xc
181 INTEGER :: n_gas_init
183 INTEGER :: n_cry_init
186 REAL*8 :: rho0_d_init, C0_d_init , cv_d_init , gamma_d_init , p0_d_init , &
187 T0_d_init , bar_e_d_init , bar_p_d_init , s0_d_init , solub_init , &
191 REAL*8 :: rho0_c_init , C0_c_init , cv_c_init , gamma_c_init , p0_c_init ,&
192 T0_c_init , bar_e_c_init , bar_p_c_init , s0_c_init , beta0_init , &
195 REAL*8 :: log10_tau_c_init , log10_tau_d_init
197 REAL*8 :: x_ex_dis_in_init, xa, xb, xc
199 REAL*8 :: Pc_g_init , Tc_g_init , cv_g_init , gamma_g_init , rho0_g_init ,&
200 T0_g_init , bar_e_g_init, s0_g_init
202 CHARACTER*20 :: gas_law_init
204 namelist / phases_parameters_init / n_gas_init , n_cry_init
209 namelist / exsolved_gas_parameters_init / gas_law_init, pc_g_init , &
210 tc_g_init , cv_g_init , gamma_g_init , rho0_g_init , t0_g_init , &
211 bar_e_g_init , s0_g_init, visc_2 , lateral_degassing_flag , &
212 alfa2_lat_thr , perm0
214 namelist / dissolved_gas_parameters_init / rho0_d_init , &
215 c0_d_init , cv_d_init , gamma_d_init , p0_d_init , t0_d_init , &
216 bar_e_d_init , bar_p_d_init , s0_d_init , exsol_model , &
217 solub_init , solub_exp_init
219 namelist / crystals_parameters_init / rho0_c_init , &
220 c0_c_init , cv_c_init , gamma_c_init , p0_c_init , t0_c_init , &
221 bar_e_c_init , bar_p_c_init , s0_c_init , beta0_init , beta_max_init
224 namelist / relaxation_parameters_init / drag_funct_model , &
226 log10_tau_c_init , log10_tau_d_init
249 x_ex_dis_in_init = 5.0d-2
257 pc_g_init = 22064000.d0
260 gamma_g_init = 1.324d0
261 rho0_g_init = 0.52924425d0
265 lateral_degassing_flag = .false.
266 alfa2_lat_thr = 1.1d0
274 n_vars = 5 + 2 * n_gas_init + n_cry_init * n_mom
278 rho0_d_init = 1000.d0
284 exsol_model =
'Henry' 285 solub_init = 4.11d-06
286 solub_exp_init = 0.5d0
289 rho0_c_init = 2600.d0
296 beta_max_init = 0.6d0
297 crystallization_model =
'Vitturi2010' 300 rho0_m = 2300.0000000000000
301 c0_m = 2000.0000000000000
302 cv_m = 1200.0000000000000
304 p0_m = 100000000.00000000
305 s0_m = 0.0000000000000000
308 visc_melt_model =
'Hess_and_Dingwell1996' 309 bubbles_model =
'none' 310 theta_model =
'Fixed_value' 320 fragmentation_model = 1
345 drag_funct_model =
'forchheimer' 347 p_relax_model =
'constant' 349 log10_tau_d_init = -4.0d0
350 log10_tau_c_init = -4.0d0
359 log10_bubble_number_density = 15.0d0
360 bubble_number_density = 10.0d0 ** log10_bubble_number_density
361 tortuosity_factor = 3.5
362 throat_bubble_ratio = 0.1
363 friction_coefficient = 10.d0
376 IF ( .NOT. lexist )
THEN 386 WRITE(
input_unit, steady_boundary_conditions_init )
388 WRITE(
input_unit, exsolved_gas_parameters_init )
390 WRITE(
input_unit, dissolved_gas_parameters_init )
406 IF ( lateral_degassing_flag )
THEN 412 WRITE(
input_unit, relaxation_parameters_init )
414 IF ( drag_funct_model .EQ.
'eval' )
THEN 418 ELSEIF ( ( drag_funct_model .EQ.
'darcy' ) .OR. &
419 drag_funct_model .EQ.
'forchheimer' .OR. &
420 drag_funct_model .EQ.
'forchheimer_wt')
THEN 428 WRITE(*,*)
'Input file not found' 429 WRITE(*,*)
'A new one with default values has been created' 470 CHARACTER(LEN=80) :: card
472 LOGICAL :: check_model
481 READ(
input_unit, run_parameters , iostat = ios )
483 IF ( ios .NE. 0 )
THEN 485 WRITE(*,*)
'IOSTAT=',ios
486 WRITE(*,*)
'ERROR: problem with namelist RUN_PARAMETERS' 487 WRITE(*,*)
'Please check the input file' 496 READ(
input_unit,geometry_parameters , iostat = ios )
498 IF ( ios .NE. 0 )
THEN 500 WRITE(*,*)
'IOSTAT=',ios
501 WRITE(*,*)
'ERROR: problem with namelist GEOMETRY_PARAMETERS' 502 WRITE(*,*)
'Please check the input file' 513 IF (
radius_min .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_min not used' 514 IF (
radius_max .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_max not used' 515 IF (
radius_z .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_z not used' 516 IF (
radius_z_sig .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_z_sig not used' 520 IF (
radius_fixed .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_fixed not used' 521 IF (
radius_z .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_z not used' 522 IF (
radius_z_sig .NE. 0.d0 )
WRITE(*,*)
'WARNING: radius_z_sig not used' 528 READ(
input_unit, phases_parameters , iostat = ios )
530 IF ( ios .NE. 0 )
THEN 532 WRITE(*,*)
'IOSTAT=',ios
533 WRITE(*,*)
'ERROR: problem with namelist PHASES_PARAMETERS' 534 WRITE(*,*)
'Please check the input file' 544 IF ( n_mom .LE. 1 )
THEN 546 WRITE(*,*)
'Solving for crystal volume fraction only' 550 WRITE(*,*)
'Solving for ',n_mom,
' moments for each crystal phase' 554 n_vars = 5 + 2 * n_gas + n_cry * n_mom
560 CALL allocate_phases_parameters
562 READ(
input_unit,steady_boundary_conditions , iostat = ios )
564 IF ( ios .NE. 0 )
THEN 566 WRITE(*,*)
'IOSTAT=',ios
567 WRITE(*,*)
'ERROR: problem with namelist STEADY_BOUNDARY_CONDITIONS' 568 WRITE(*,*)
'Please check the input file' 578 IF ( u1_in .GT. 0.d0 )
THEN 580 IF ( shooting .EQV. .true.)
THEN 581 WRITE(*,*)
'Shooting technique to search for inlet velocity' 583 WRITE(*,*)
'Single run: no shooting' 589 WRITE(*,*)
'Shooting technique to search for inlet velocity' 595 READ(
input_unit, exsolved_gas_parameters , iostat = ios )
597 IF ( ios .NE. 0 )
THEN 599 WRITE(*,*)
'IOSTAT=',ios
600 WRITE(*,*)
'ERROR: problem with namelist EXSOLVED_GAS_PARAMETERS' 601 WRITE(*,*)
'Please check the input file' 611 IF ( gas_law .EQ.
'IDEAL' )
THEN 616 ELSEIF ( gas_law .EQ.
'VDW' )
THEN 618 a_g(1:n_gas) = 27.0 / 64.0 * ( cv_g(1:n_gas)*(gamma_g(1:n_gas) - 1) &
619 * tc_g(1:n_gas))**2.0 / pc_g(1:n_gas)
621 b_g(1:n_gas) = 1.0 / 8.0 * ( cv_g(1:n_gas)*(gamma_g(1:n_gas) - 1) &
622 * tc_g(1:n_gas)) / pc_g(1:n_gas)
627 WRITE(*,*)
'Wrong gas law chosen.' 628 WRITE(*,*)
'Please choose between:' 638 READ(
input_unit, dissolved_gas_parameters , iostat = ios )
640 IF ( ios .NE. 0 )
THEN 642 WRITE(*,*)
'IOSTAT=',ios
643 WRITE(*,*)
'ERROR: problem with namelist DISSOLVED_GAS_PARAMETERS' 644 WRITE(*,*)
'Please check the input file' 654 t0_d(1:n_gas) = c0_d(1:n_gas) **2.d0 / ( cv_d(1:n_gas) * gamma_d(1:n_gas) &
655 * ( gamma_d(1:n_gas) - 1.d0 ) )
657 bar_p_d(1:n_gas) = ( rho0_d(1:n_gas) * c0_d(1:n_gas)**2.d0 - &
658 gamma_d(1:n_gas) * p0_d(1:n_gas) ) / gamma_d(1:n_gas)
662 READ(
input_unit, crystals_parameters , iostat = ios )
664 IF ( ios .NE. 0 )
THEN 666 WRITE(*,*)
'IOSTAT=',ios
667 WRITE(*,*)
'ERROR: problem with namelist CRYSTALS_PARAMETERS' 668 WRITE(*,*)
'Please check the input file' 678 t0_c(1:n_cry) = c0_c(1:n_cry) **2.d0 / ( cv_c(1:n_cry) * gamma_c(1:n_cry) &
679 * ( gamma_c(1:n_cry) - 1.d0 ) )
681 bar_p_c(1:n_cry) = ( rho0_c(1:n_cry) * c0_c(1:n_cry) ** 2.d0 - &
682 gamma_c(1:n_cry) * p0_c(1:n_cry) ) / gamma_c(1:n_cry)
685 IF (.NOT. (crystallization_model .EQ.
'Vitturi2010' ) )
THEN 688 WRITE(*,*)
'Wrong crystallization model chosen.' 689 WRITE(*,*)
'Please choose between:' 691 WRITE(*,*)
'Vitturi2010' 698 IF ( (crystallization_model .EQ.
'Vitturi2010' ) .AND. &
699 (.NOT.(n_cry .EQ. 1 )) )
THEN 702 WRITE(*,*)
'Wrong number of crystal components inserted' 703 WRITE(*,*)
'Using Vitturi2010, n_cry has to be 1' 711 READ(
input_unit, melt_parameters , iostat = ios )
713 IF ( ios .NE. 0 )
THEN 715 WRITE(*,*)
'IOSTAT=',ios
716 WRITE(*,*)
'ERROR: problem with namelist MELT_PARAMETERS' 717 WRITE(*,*)
'Please check the input file' 727 t0_m = c0_m **2.d0 / ( cv_m * gamma_m * ( gamma_m - 1.d0 ) )
728 bar_p_m = ( rho0_m * c0_m ** 2.d0 - gamma_m * p0_m ) / gamma_m
731 READ(
input_unit, viscosity_parameters , iostat = ios )
733 IF ( ios .NE. 0 )
THEN 735 WRITE(*,*)
'IOSTAT=',ios
736 WRITE(*,*)
'ERROR: problem with namelist VISCOSITY_PARAMETERS' 737 WRITE(*,*)
'Please check the input file' 747 check_model = .false.
749 DO i=1,n_visc_melt_models
751 IF ( trim(visc_melt_model) .EQ. trim(available_visc_melt_models(i)) )
THEN 759 IF ( .NOT.check_model )
THEN 761 WRITE(*,*)
'Wrong drag_funct_model chosen.' 762 WRITE(*,*)
'Please choose between:' 764 DO i=1,n_visc_melt_models
766 WRITE(*,*) available_visc_melt_models(i)
775 IF ( visc_melt_model .EQ.
'Giordano_et_al2008' )
THEN 779 WRITE(*,*)
'search melt composition' 785 IF( trim(card) ==
'MELTCOMPOSITION' )
THEN 787 EXIT melt_comp_search
791 END DO melt_comp_search
796 IF ( verbose_level .GE. 1 )
WRITE(*,*) wt_init(1:12)
806 check_model = .false.
808 DO i=1,n_theta_models
810 IF ( trim(theta_model) .EQ. trim(available_theta_models(i)) )
THEN 818 IF ( .NOT.check_model )
THEN 820 WRITE(*,*)
'Wrong theta_model chosen.' 821 WRITE(*,*)
'Please choose between:' 823 DO i=1,n_theta_models
825 WRITE(*,*) available_theta_models(i)
833 IF ( (theta_model .EQ.
'Vona_et_al2013_eq19' ) .OR. &
834 (theta_model .EQ.
'Vona_et_al2013_eq20' ) .OR. &
835 (theta_model .EQ.
'Vona_et_al2013_eq21' ) )
THEN 837 WRITE(*,*)
'WARNING: bubbles_model not used.' 838 WRITE(*,*)
'Effect of bubbles is included by using Vona 2013 equations' 842 check_model = .false.
844 DO i=1,n_bubble_models
846 IF ( trim(bubbles_model) .EQ. trim(available_bubble_models(i)) )
THEN 854 IF ( .NOT.check_model )
THEN 856 WRITE(*,*)
'Wrong bubbles_model chosen.' 857 WRITE(*,*)
'Please choose between:' 859 DO i=1,n_bubble_models
861 WRITE(*,*) available_bubble_models(i)
871 READ(
input_unit, temperature_parameters , iostat = ios )
873 IF ( ios .NE. 0 )
THEN 875 WRITE(*,*)
'IOSTAT=',ios
876 WRITE(*,*)
'ERROR: problem with namelist TEMPERATURE_PARAMETERS' 877 WRITE(*,*)
'Please check the input file' 887 IF ( isothermal )
THEN 894 READ(
input_unit, fragmentation_parameters , iostat = ios )
896 IF ( ios .NE. 0 )
THEN 898 WRITE(*,*)
'IOSTAT=',ios
899 WRITE(*,*)
'ERROR: problem with namelist FRAGMENTATION_PARAMETERS' 900 WRITE(*,*)
'Please check the input file' 910 IF (fragmentation_model .NE. 1 )
THEN 913 WRITE(*,*)
'Wrong fragmentation model chosen.' 914 WRITE(*,*)
'Please choose between:' 916 WRITE(*,*)
'1 (Volume_Fraction)' 924 READ(
input_unit, external_water_parameters , iostat = ios )
926 IF ( ios .NE. 0 )
THEN 928 WRITE(*,*)
'IOSTAT=',ios
929 WRITE(*,*)
'ERROR: problem with namelist EXTERNAL_WATER_PARAMETERS' 930 WRITE(*,*)
'Please check the input file' 946 WRITE(*,*)
'Wrong aquifer type chosen.' 947 WRITE(*,*)
'Please choose between:' 949 WRITE(*,*)
'confined' 950 WRITE(*,*)
'unconfined' 960 READ(
input_unit, source_parameters , iostat = ios )
962 IF ( ios .NE. 0 )
THEN 964 WRITE(*,*)
'IOSTAT=',ios
965 WRITE(*,*)
'ERROR: problem with namelist SOURCE_PARAMETERS' 966 WRITE(*,*)
'Please check the input file' 977 IF ( lateral_degassing_flag )
THEN 979 READ(
input_unit, country_rock_parameters , iostat = ios )
981 IF ( ios .NE. 0 )
THEN 983 WRITE(*,*)
'IOSTAT=',ios
984 WRITE(*,*)
'ERROR: problem with namelist COUNTRY_ROCK_PARAMETERS' 985 WRITE(*,*)
'Please check the input file' 1002 READ(
input_unit, relaxation_parameters , iostat = ios )
1004 IF ( ios .NE. 0 )
THEN 1006 WRITE(*,*)
'IOSTAT=',ios
1007 WRITE(*,*)
'ERROR: problem with namelist RELAXATION_PARAMETERS' 1008 WRITE(*,*)
'Please check the input file' 1024 check_model = .false.
1026 DO i=1,n_drag_models
1028 IF ( trim(drag_funct_model) .EQ. trim(available_drag_models(i)) )
THEN 1030 check_model = .true.
1036 IF ( .NOT.check_model )
THEN 1038 WRITE(*,*)
'Wrong drag_funct_model chosen.' 1039 WRITE(*,*)
'Please choose between:' 1041 DO i=1,n_drag_models
1043 WRITE(*,*) available_drag_models(i)
1051 IF ( ( drag_funct_model .EQ.
'eval' ) .OR. &
1052 ( drag_funct_model .EQ.
'Klug_and_Cashman' ) .OR. &
1053 ( drag_funct_model .EQ.
'drag' ) )
THEN 1055 READ(
input_unit, bubbles_parameters , iostat = ios )
1057 IF ( ios .NE. 0 )
THEN 1059 WRITE(*,*)
'IOSTAT=',ios
1060 WRITE(*,*)
'ERROR: problem with namelist BUBBLES_PARAMETERS' 1061 WRITE(*,*)
'Please check the input file' 1070 ELSEIF ( ( drag_funct_model .EQ.
'darcy' ) .OR. &
1071 ( drag_funct_model .EQ.
'forchheimer') .OR. &
1072 ( drag_funct_model .EQ.
'forchheimer_wt'))
THEN 1074 READ(
input_unit, forchheimer_parameters , iostat = ios )
1076 IF ( ios .NE. 0 )
THEN 1078 WRITE(*,*)
'IOSTAT=',ios
1079 WRITE(*,*)
'ERROR: problem with namelist FORCHHEIMER_PARAMETERS' 1080 WRITE(*,*)
'Please check the input file' 1089 bubble_number_density = 10.0d0 ** log10_bubble_number_density
1091 ELSEIF ( ( drag_funct_model .EQ.
'forchheimer_mod' ) .OR. &
1092 ( drag_funct_model .EQ.
'forchheimer_mod2' ) .OR. &
1093 ( drag_funct_model .EQ.
'forchheimer_mod3' ) )
THEN 1095 READ(
input_unit, permeability_parameters , iostat = ios )
1097 IF ( ios .NE. 0 )
THEN 1099 WRITE(*,*)
'IOSTAT=',ios
1100 WRITE(*,*)
'ERROR: problem with namelist PERMEABILITY_PARAMETERS' 1101 WRITE(*,*)
'Please check the input file' 1144 IF ( lateral_degassing_flag )
THEN 1153 IF ( ( drag_funct_model .EQ.
'eval' ) .OR. &
1154 ( drag_funct_model .EQ.
'Klug_and_Cashman' ) .OR. &
1155 ( drag_funct_model .EQ.
'drag' ) )
THEN 1159 ELSEIF ( ( drag_funct_model .EQ.
'darcy' ) .OR. &
1160 ( drag_funct_model .EQ.
'forchheimer') .OR. &
1161 ( drag_funct_model .EQ.
'forchheimer_wt'))
THEN 1165 ELSEIF ( ( drag_funct_model .EQ.
'forchheimer_mod' ) .OR. &
1166 ( drag_funct_model .EQ.
'forchheimer_mod2' ) .OR. &
1167 ( drag_funct_model .EQ.
'forchheimer_mod3' ) )
THEN 1174 IF ( visc_melt_model .EQ.
'Giordano_et_al2008' )
THEN 1177 WRITE(
backup_unit,*)
'SiO2 TiO2 Al2O3 FeO MnO MgO CaO Na2O K2O P2O5 H2O F2O-1' 1180 107
FORMAT(12(f5.2,1x))
1220 REAL*8,
INTENT(IN) :: zeta
1221 REAL*8 :: qp(n_vars)
1222 REAL*8,
INTENT(IN) :: radius
1224 REAL*8 :: qp2(1+n_cry+n_gas+n_gas+4)
1225 REAL*8 :: mass_flow_rate
1228 REAL*8 :: C_mix, mach, mix_velocity
1230 REAL*8 :: rho1, rho2(n_gas), rho_mix
1232 REAL*8 :: gasTotVolFrac
1238 IF ( zeta .EQ. z0 )
THEN 1259 IF ( abs(qp(i)) .LT. 1d-20 )
THEN 1265 DO i = 1,1+n_cry+n_gas+n_gas+4
1267 IF ( abs(qp2(i)) .LT. 1d-20 )
THEN 1278 1006
FORMAT(4e20.12)
1288 DO i = 1,1+n_cry+n_gas+n_gas+4
1296 1007
FORMAT(1x,e15.8)
1307 gastotvolfrac = gastotvolfrac + qp(j)
1311 rho_mix = (1.0d0 - gastotvolfrac) * rho1
1315 rho_mix = rho_mix + qp(j) * rho2(j)
1319 mix_velocity = (1.0d0 - gastotvolfrac) * rho1 / rho_mix * qp(
idx_u1)
1323 mix_velocity = mix_velocity + qp(j) * rho2(j) / rho_mix * qp(
idx_u2)
1330 OPEN(
dakota_unit,file=
'MAMMA.out',status=
'UNKNOWN')
1332 pi = 4.d0 * atan(1.d0)
1334 WRITE(
dakota_unit,*)
'Total Gas volume fraction', gastotvolfrac
1343 CALL sound_speeds(c_mix,mach)
1344 CALL update_radius(zeta)
1347 WRITE(
dakota_unit,*)
'Exit mixture velocity', mix_velocity
1348 WRITE(
dakota_unit,*)
'Mass flow rate', pi * radius * radius &
1349 * mix_velocity * rho_mix
1356 pi = 4.d0 * atan(1.d0)
1366 WRITE(
dakota_unit2,*) pi * radius * radius * mix_velocity * rho_mix
1375 WRITE(
exit_unit,*)
'Mass_flow_rate',mass_flow_rate
1403 CHARACTER*4 FUNCTION lettera(k)
1405 CHARACTER ones,tens,hund,thou
1409 INTEGER :: iten, ione, ihund, ithou
1412 ihund=int((k-(ithou*1000))/100)
1413 iten=int((k-(ithou*1000)-(ihund*100))/10)
1414 ione=k-ithou*1000-ihund*100-iten*10
1419 lettera=thou//hund//tens//ones
real *8, dimension(:), allocatable bar_p_c
crystals cohesion pressure
real *8, dimension(:), allocatable x_ex_dis_in
real *8, dimension(:), allocatable log10_tau_d
logical isothermal
Flag for isothermal runs: .
character *4 function lettera(k)
Numeric to String conversion.
integer idx_p2
Index of p2 in the qp array.
character(len=30), dimension(20) available_visc_melt_models
real *8 total_water_influx
Total water influx.
real *8, dimension(:), allocatable bar_e_c
crystals formation energy
character(len=50) input_file
Name of the file with the run parameters.
real *8, dimension(:), allocatable gamma_d
dissolved gas adiabatic exponent
real *8, dimension(:), allocatable b_g
parameter for the VDW EOS
real *8, dimension(:), allocatable bar_e_d
dissolved gas formation energy
real *8, dimension(:), allocatable t0_c
crystals gas reference temperature
integer, parameter dakota_unit
Dakota Output unit.
real *8 drag_funct_coeff
coefficient for the drag function for the relative velocity:
real *8 grav
gravitational acceleration
subroutine allocate_phases_parameters
Initialization of relaxation flags.
character(len=50) steady_p_file
Name of the steady output file.
logical ext_water
Flag to activate the injection of external water: .
real *8 bar_p_m
melt cohesion pressure
real *8 theta_fixed
Fixed value for the relative viscosity of the crystals.
real *8, dimension(:), allocatable log10_tau_c
real *8 radius_max
Fixed value of the maximum radius (used in non cylindrical conduits)
real *8, dimension(:), allocatable s0_d
dissolved gas reference entropy
integer, parameter backup_unit
Backup input data unit.
integer idx_u2
Index of u2 in the qp array.
real *8 t0_m
melt reference temperature
real *8 p0_m
melt reference pressure
integer n_gas
Numbeer of crystal phases.
real *8 fixed_temp
Temperature for isothermal runs.
real *8 eps_conv
Residual for the convergence of the shooting method. The solution is accepted if one of these conditi...
real *8, dimension(:), allocatable p0_d
dissolved gas reference pressure
logical explosive
Flag to choose the eruptive style: .
logical shooting
Flag for the shooting technique: .
real *8 gamma_m
melt adiabatic exponent
real *8 visc_2
gas viscosity
character *30 theta_model
Parameter to choose the model for the influence of crystal on the mixture: 'Lejeune_and_Richet1995' '...
integer, parameter output_p_unit
Output data unit.
real *8, dimension(:), allocatable gamma_c
crystals adiabatic exponent
real *8, dimension(:), allocatable rho0_d
dissolved gas reference density
real *8 p_out
Outlet pressure.
integer comp_cells
Number of control volumes in the computational domain.
real *8, dimension(:), allocatable bar_e_g
exsolved gas formation energy
character *30 aquifer_type
Aquifer type: .
real *8, dimension(:), allocatable tc_g
critical gas temperature
real *8 frag_thr
Threshold for the fragmentation.
subroutine update_radius(zeta)
character *20 bubbles_model
Parameter to choose the model for the influence of the bubbles on the mixture: .
character *20 crystallization_model
Model for the equilibrium crystal volume fraction: .
character(len=50) exit_file
Name of the steady output file.
real *8 c0_m
melt sound speed at atmospheric conditions
real *8, dimension(12) wt_init
real *8, dimension(:), allocatable c0_c
crystals sound speed at atm conditions
integer, parameter steady_q_output_unit
Output unit.
integer fragmentation_model
Parameter to choose the fragmentation model: .
subroutine eval_qp2(r_qp, qp2)
Conservative to physical variables.
real *8, dimension(:), allocatable tau_c
crystallization parameter:
real *8 delta_p_in
Inlet pressure difference ( p2-p1 )
integer idx_alfa_first
First index of alfa in the qp array.
real *8 bubble_number_density
bubble number density
logical lateral_degassing_flag
Input flag for lateral degassing: .
integer n_cry
Numbeer of crystal phases.
real *8, dimension(:), allocatable rho0_c
crystals reference density
integer n_visc_melt_models
character *20 gas_law
equation of state for gas
real *8 z0
Left (bottom) of the physical domain.
real *8 s0_m
melt reference entropy
character(len=30), dimension(20) available_drag_models
real *8, dimension(:), allocatable bar_p_d
dissolved gas cohesion pressure
character *20 p_relax_model
pressure relaxation model
real *8 friction_coefficient
real *8, dimension(:), allocatable tau_d
exsolution parameter:
subroutine sound_speeds(C_mix, mach)
Local sound speeds.
real *8, dimension(:), allocatable s0_c
crystals reference entropy
real *8, dimension(:), allocatable c0_d
dissolved gas sound speed at atm conditions
real *8 tortuosity_factor
tortuosity factor
real *8 k_cr
country rock permeability
subroutine read_param
Read the input file.
real *8 radius_fixed
Fixed value of the radius.
integer idx_alfa_last
Last index of alfa in the qp array.
real *8 radius_z_sig
Characteristic sigma for radius model trans1 and trans2.
character(len=50) run_name
Name of the run.
real *8, dimension(:), allocatable beta_max
maximum crystal volume fraction
character *20 exsol_model
String for exsolution model: .
real *8 cv_m
melt specific heat capacity at constant volume
real *8 bar_e_m
melt formation energy
real *8, dimension(:), allocatable rho0_g
exsolved gas reference density
integer, parameter dakota_unit2
Dakota Output unit.
integer idx_beta_first
First index of beta in the qp array.
real *8 zeta_exit
Right (top) of the physical domain.
real *8 t_in
Inlet temperature.
logical inst_vaporization
Flag for instantaneous vaporization: .
real *8 tau_p_coeff
pressure relaxation coefficient:
real *8 u1_in
Inlet first phase velocity.
real *8 frag_eff
index of fragmentation in the interval [0;1]
integer n_mom
Number of moments for each crystal phase.
real *8, dimension(:), allocatable cv_g
exsolved gas heat capacity at constant volume
real *8, dimension(:), allocatable p0_c
crystals reference pressure
integer, parameter exit_unit
Exit Output unit.
real *8 rho0_m
melt reference density
integer idx_p1
Index of p1 in the qp array.
real *8 zn
Right (top) of the physical domain.
integer idx_u1
Index of u1 in the qp array.
character *30 drag_funct_model
drag function model
character *30 radius_model
geometry model
real *8 log10_tau_p_coeff
real *8, dimension(:), allocatable cv_d
dissolved gas heat capacity at constant volume
character *30 visc_melt_model
Parameter to select the melt viscosity (bubbles and crystal-free) model: .
integer idx_beta_last
Last index of beta in the qp array.
real *8, dimension(:), allocatable beta_in
Inlet crystal volume fraction.
real *8 log10_drag_funct_coeff
character(len=50) output_p_file
Name of the output files.
real *8, dimension(:), allocatable cv_c
crystals specific heat capacity at constant volume
character(len=50) steady_q_file
Name of the steady output file.
character(len=30), dimension(20) available_bubble_models
real *8 p1_in
Inlet first phase pressure.
real *8, dimension(:), allocatable a_g
parameter for the VDW EOS
real *8 min_z_influx
Minimum depth of influx.
real *8 log10_bubble_number_density
real *8, dimension(:), allocatable solub
Solubility parameter for the Henry's law.
integer, parameter input_unit
Input data unit.
real *8 rho_cr
contry rock density
real *8, dimension(:), allocatable t0_g
exsolved gas reference temperature
real *8, dimension(:), allocatable pc_g
critical gas pressure
real *8 t_w
Water temperature in the aquifer.
integer n_vars
Number of conservative variables.
real *8 throat_bubble_ratio
throat bubble ratio
real *8 alfa2_lat_thr
Exsolved gas volume fraction threshold for lateral degassing.
integer, parameter output_q_unit
Output data unit.
subroutine init_param
Initialization of the variables read from the input file.
real *8, dimension(:), allocatable gamma_g
exsolved gas adiabatic exponent
real *8 radius_z
Characteristic depth for radius models trans1 and trans2.
real *8, dimension(:), allocatable s0_g
exsolved gas reference entropy
subroutine output_steady(zeta, qp, radius)
Write the steady solution on the output unit.
real *8, dimension(:), allocatable t0_d
dissolved gas reference temperature
character(len=50) bak_name
Name of the backup file for the parameters.
real *8, dimension(:), allocatable xd_md_in
Inlet dissolved gas mass fraction.
character(len=50) output_q_file
Name of the output files.
integer, parameter steady_p_output_unit
Output unit.
character(len=30), dimension(20) available_theta_models
real *8, dimension(:), allocatable solub_exp
integer idx_t
Index of T in the qp array.
integer n_eqns
Number of equations.
real *8, dimension(:), allocatable beta0
chamber (equilibrium) crystal volume fraction
real *8 radius_min
Fixed value of the minimum radius (used in non cylindrical conduits)