@@ -72,58 +72,72 @@ contains
7272 ! Simulation Algorithm Parameters ==================================
7373 if (all (model_eqns /= (/ 1 , 2 , 3 , 4 / ))) then
7474 call s_mpi_abort(' Unsupported value of model_eqns. Exiting ...' )
75- elseif (model_eqns == 2 .and. bubbles .and. bubble_model == 1 ) then
76- call s_mpi_abort(' The 5-equation bubbly flow model requires bubble_model = 2 (Keller--Miksis)' )
77- elseif (bubbles .and. nb < 1 ) then
78- call s_mpi_abort(' The Ensemble-Averaged Bubble Model requires nb >= 1' )
79- elseif (bubbles .and. bubble_model == 3 .and. (polytropic .neqv. .true. )) then
80- call s_mpi_abort(' RP bubbles require polytropic compression' )
81- elseif (cyl_coord .and. bubbles) then
82- call s_mpi_abort(' Bubble models untested in cylindrical coordinates' )
83- elseif (model_eqns == 3 .and. bubbles) then
84- call s_mpi_abort(' Bubble models untested with 6-equation model' )
85- elseif (model_eqns == 1 .and. bubbles) then
86- call s_mpi_abort(' Bubble models untested with pi-gamma model' )
87- elseif (model_eqns == 4 .and. num_fluids /= 1 ) then
88- call s_mpi_abort(' The 4-equation model implementation is not a multi-component and requires num_fluids = 1' )
89- elseif (bubbles .and. weno_vars /= 2 ) then
90- call s_mpi_abort(' Bubble modeling requires weno_vars = 2' )
75+ end if
76+
77+ if (bubbles) then
78+ if (model_eqns == 2 .and. bubble_model == 1 ) then
79+ call s_mpi_abort(' The 5-equation bubbly flow model requires bubble_model = 2 (Keller--Miksis)' )
80+ elseif (nb < 1 ) then
81+ call s_mpi_abort(' The Ensemble-Averaged Bubble Model requires nb >= 1' )
82+ elseif (bubble_model == 3 .and. (polytropic .neqv. .true. )) then
83+ call s_mpi_abort(' RP bubbles require polytropic compression' )
84+ elseif (cyl_coord) then
85+ call s_mpi_abort(' Bubble models untested in cylindrical coordinates' )
86+ elseif (model_eqns == 3 ) then
87+ call s_mpi_abort(' Bubble models untested with 6-equation model' )
88+ elseif (model_eqns == 1 ) then
89+ call s_mpi_abort(' Bubble models untested with pi-gamma model' )
90+ elseif (weno_vars /= 2 ) then
91+ call s_mpi_abort(' Bubble modeling requires weno_vars = 2' )
9192 !TODO: Comment this out when testing riemann with hll
92- elseif (bubbles .and. riemann_solver /= 2 ) then
93- call s_mpi_abort(' Bubble modeling requires riemann_solver = 2' )
94- elseif ((bubbles .neqv. .true. ) .and. polydisperse) then
93+ elseif (riemann_solver /= 2 ) then
94+ call s_mpi_abort(' Bubble modeling requires riemann_solver = 2' )
95+ elseif (avg_state == 1 ) then
96+ call s_mpi_abort(' Unsupported combination of values of ' // &
97+ ' bubbles and Roe average (please use avg_state = 2). ' // &
98+ ' Exiting ...' )
99+ end if
100+ end if
101+
102+ if (model_eqns == 4 .and. num_fluids /= 1 ) then
103+ call s_mpi_abort(' The 4-equation model implementation is not a multi-component and requires num_fluids = 1' )
104+ end if
105+
106+ if ((bubbles .neqv. .true. ) .and. polydisperse) then
95107 call s_mpi_abort(' Polydisperse bubble modeling requires the bubble switch to be activated' )
96108 elseif (polydisperse .and. (poly_sigma == dflt_real)) then
97109 call s_mpi_abort(' Polydisperse bubble modeling requires poly_sigma > 0' )
98110 elseif (qbmm .and. (bubbles .neqv. .true. )) then
99111 call s_mpi_abort(' QBMM requires bubbles' )
100112 elseif (qbmm .and. (nnode /= 4 )) then
101113 call s_mpi_abort(' nnode not supported' )
102- elseif (model_eqns == 3 .and. riemann_solver /= 2 ) then
103- call s_mpi_abort(' Unsupported combination of values of ' // &
104- ' model_eqns (6-eq) and riemann_solver (please use riemann_solver = 2). ' // &
105- ' Exiting ...' )
106- elseif (model_eqns == 3 .and. alt_soundspeed) then
107- call s_mpi_abort(' Unsupported combination of values of ' // &
108- ' model_eqns (6-eq) and alt_soundspeed. ' // &
109- ' Exiting ...' )
110- elseif (model_eqns == 3 .and. avg_state == 1 ) then
111- call s_mpi_abort(' Unsupported combination of values of ' // &
112- ' model_eqns (6-eq) and Roe average (please use avg_state = 2). ' // &
113- ' Exiting ...' )
114- elseif (bubbles .and. avg_state == 1 ) then
115- call s_mpi_abort(' Unsupported combination of values of ' // &
116- ' bubbles and Roe average (please use avg_state = 2). ' // &
117- ' Exiting ...' )
118- elseif (model_eqns == 3 .and. wave_speeds == 2 ) then
119- call s_mpi_abort(' Unsupported combination of values of ' // &
120- ' model_eqns (6-eq) and wave_speeds (please use wave_speeds = 1). ' // &
121- ' Exiting ...' )
122- elseif (model_eqns == 3 .and. (cyl_coord .and. p /= 0 )) then
123- call s_mpi_abort(' Unsupported combination of values of ' // &
124- ' model_eqns (6-eq) and cylindrical coordinates. ' // &
125- ' Exiting ...' )
126- elseif (num_fluids /= dflt_int &
114+ end if
115+
116+ if (model_eqns ==3 ) then
117+ if (riemann_solver /= 2 ) then
118+ call s_mpi_abort(' Unsupported combination of values of ' // &
119+ ' model_eqns (6-eq) and riemann_solver (please use riemann_solver = 2). ' // &
120+ ' Exiting ...' )
121+ elseif (alt_soundspeed) then
122+ call s_mpi_abort(' Unsupported combination of values of ' // &
123+ ' model_eqns (6-eq) and alt_soundspeed. ' // &
124+ ' Exiting ...' )
125+ elseif (avg_state == 1 ) then
126+ call s_mpi_abort(' Unsupported combination of values of ' // &
127+ ' model_eqns (6-eq) and Roe average (please use avg_state = 2). ' // &
128+ ' Exiting ...' )
129+ elseif (wave_speeds == 2 ) then
130+ call s_mpi_abort(' Unsupported combination of values of ' // &
131+ ' model_eqns (6-eq) and wave_speeds (please use wave_speeds = 1). ' // &
132+ ' Exiting ...' )
133+ elseif (cyl_coord .and. p /= 0 ) then
134+ call s_mpi_abort(' Unsupported combination of values of ' // &
135+ ' model_eqns (6-eq) and cylindrical coordinates. ' // &
136+ ' Exiting ...' )
137+ end if
138+ end if
139+
140+ if (num_fluids /= dflt_int &
127141 .and. &
128142 (num_fluids < 1 .or. num_fluids > num_fluids)) then
129143 call s_mpi_abort(' Unsupported value of num_fluids. Exiting ...' )
0 commit comments