@@ -827,7 +827,8 @@ def limit_fluid_state_lv(dcoll, cv, temperature_seed, entropy_min,
827
827
mmax_i = op .elementwise_max (
828
828
dcoll , dd , cv_update_rho .species_mass_fractions [i ])
829
829
mmax = 1.0
830
- cell_avgs = actx .np .where (actx .np .less (cell_avgs , mmax ), cell_avgs , mmax )
830
+ cell_avgs = actx .np .where (actx .np .less (cell_avgs , mmax ),
831
+ cell_avgs , mmax )
831
832
_theta = actx .np .maximum (
832
833
_theta ,
833
834
actx .np .where (actx .np .greater (mmax_i - toler , mmax ),
@@ -839,17 +840,18 @@ def limit_fluid_state_lv(dcoll, cv, temperature_seed, entropy_min,
839
840
1.0 , balance_spec )
840
841
#print(f"species {i}, {_theta=}")
841
842
# apply the limiting to all species equally
842
- spec_lim [i ] = (cv_update_rho .species_mass_fractions [i ] +
843
- theta_spec [i ]* (
844
- cell_avgs - cv_update_rho .species_mass_fractions [i ]))
843
+ spec_lim [i ] = \
844
+ (cv_update_rho .species_mass_fractions [i ]
845
+ + theta_spec [i ]* (cell_avgs
846
+ - cv_update_rho .species_mass_fractions [i ]))
845
847
846
848
if hammer_species :
847
849
# limit the species mass fraction sum to 1.0
848
850
aux = actx .np .zeros_like (cv_update_rho .mass )
849
851
sum_theta_y = actx .np .zeros_like (cv_update_rho .mass )
850
852
zeros_spec = actx .np .zeros_like (cv_update_rho .mass )
851
853
for i in range (nspecies ):
852
- spec_lim [i ] = actx .np .where (actx .np .less (spec_lim [i ], zeros_spec ),
854
+ spec_lim [i ] = actx .np .where (actx .np .less (spec_lim [i ], zeros_spec ),
853
855
zeros_spec , spec_lim [i ])
854
856
855
857
# spec_lim = actx.np.where(spec_lim > 0., spec_lim, zero_spec)
@@ -6575,7 +6577,7 @@ def spec_check(cv):
6575
6577
local_max = actx .np .max (ysum )
6576
6578
local_min = actx .np .min (ysum )
6577
6579
global_min = vol_min (dd_vol_fluid , ysum )
6578
- gloabl_max = vol_max (dd_vol_fluid , ysum )
6580
+ global_max = vol_max (dd_vol_fluid , ysum )
6579
6581
global_min_loc = vol_min_loc (dd_vol_fluid , ysum )
6580
6582
global_max_loc = vol_max_loc (dd_vol_fluid , ysum )
6581
6583
if rank == 0 :
@@ -6589,7 +6591,6 @@ def spec_check(cv):
6589
6591
6590
6592
return health_error
6591
6593
6592
-
6593
6594
def my_health_check (fluid_state , wall_temperature ):
6594
6595
health_error = False
6595
6596
cv = fluid_state .cv
0 commit comments