Skip to content

Commit 924f1e4

Browse files
Dimitrios AdamDimitrios Adam
authored andcommitted
hehe2
1 parent 6acd75e commit 924f1e4

5 files changed

Lines changed: 32 additions & 22 deletions

File tree

examples/1D_reactive_shocktube/case.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
"p": 0,
5858
"dt": float(dt),
5959
"t_step_start": 0,
60-
"t_step_stop": NT,
61-
"t_step_save": NS,
62-
"t_step_print": NS,
60+
"t_step_stop": 1,
61+
"t_step_save": 1,
62+
"t_step_print": 1,
6363
"parallel_io": "F" if args.mfc.get("mpi", True) else "F",
6464
# Simulation Algorithm Parameters
6565
"model_eqns": 2,

examples/2D_riemann_test/case.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"n": 499,
2929
"p": 0,
3030
"dt": 4.0e-08,
31-
"t_step_start": 0,
32-
"t_step_stop": 10000,
31+
"t_step_start": 10000,
32+
"t_step_stop": 17000,
3333
"t_step_save": 1000,
3434
# Simulation Algorithm Parameters
3535
"num_patches": 1,

src/common/m_chemistry.fpp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ contains
146146

147147
rho = q_cons_qp(contxe)%sf(x, y, z)
148148
T = q_T_sf%sf(x, y, z)
149+
print *, T
149150

150151
call get_net_production_rates(rho, T, Ys, omega)
151152

@@ -167,11 +168,12 @@ contains
167168

168169
end subroutine s_compute_chemistry_reaction_flux
169170

170-
subroutine s_compute_chemistry_diffusion_flux(idir, q_prim_qp, flux_src_vf, irx, iry, irz)
171+
subroutine s_compute_chemistry_diffusion_flux(idir, q_prim_qp, flux_src_vf, irx, iry, irz, q_T_sf)
171172

172173
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_qp
173174
type(scalar_field), dimension(sys_size), intent(inout) :: flux_src_vf
174175
type(int_bounds_info), intent(in) :: irx, iry, irz
176+
type(scalar_field), intent(in) :: q_T_sf
175177

176178
integer, intent(in) :: idir
177179
#:if not MFC_CASE_OPTIMIZATION and USING_AMD
@@ -248,15 +250,23 @@ contains
248250
rho_L = q_prim_qp(1)%sf(x, y, z)
249251
rho_R = q_prim_qp(1)%sf(x + offsets(1), y + offsets(2), z + offsets(3))
250252

251-
T_L = P_L/rho_L/Rgas_L
252-
T_R = P_R/rho_R/Rgas_R
253+
if ( x .eq. -1 .or. x .eq. 499 .or. y .eq. -1 .or. y .eq. 499) then
254+
T_L = P_L/rho_L/Rgas_L
255+
T_R = P_R/rho_R/Rgas_R
256+
257+
else
258+
T_L =q_T_sf%sf(x, y, z)! P_L/rho_L/Rgas_L
259+
T_R = q_T_sf%sf(x + offsets(1), y + offsets(2), z + offsets(3))! P_R/rho_R/Rgas_R
260+
end if
253261

262+
254263
rho_cell = 0.5_wp*(rho_L + rho_R)
255264
dT_dxi = (T_R - T_L)/grid_spacing
256265

257-
if (x .eq. 200 .and. idir .eq. 2) then
258-
print *, dT_dxi, y , T_L, T_R
259-
end if
266+
! if (x .eq. 200 .and. idir == 2) then
267+
! print *, T_L, T_R, y_cc(y), y
268+
! end if
269+
260270

261271
! Get transport properties
262272
call get_species_mass_diffusivities_mixavg(P_L, T_L, Ys_L, mass_diffusivities_mixavg1)

src/common/m_variables_conversion.fpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -814,19 +814,19 @@ contains
814814
qv_K, rhoYks, pres, T, pres_mag=pres_mag)
815815

816816

817-
if (.not. (t_step == 0 .and. stage == 1)) then
817+
! if (.not. (t_step == 0 .and. stage == 1)) then
818818
! Safety check: Ensure indices are within the allocated domain (0:m, 0:n, 0:p)
819819
! to prevent segfaults if the loop iterates over buffer zones.
820-
if (j >= 0 .and. j <= m .and. k >= 0 .and. k <= n .and. l >= 0 .and. l <= p) then
821-
if (ghost_points_index%sf(j, k, l) == 1) then
822-
pres = pressure_ghost_point%sf(j, k, l)
823-
if (j .eq. 200) then
824-
!print *, pres, k, y_cc(k), T
825-
end if
826-
end if
820+
! if (j >= 0 .and. j <= m .and. k >= 0 .and. k <= n .and. l >= 0 .and. l <= p) then
821+
! if (ghost_points_index%sf(j, k, l) == 1) then
822+
! pres = pressure_ghost_point%sf(j, k, l)
823+
! if (j .eq. 200) then
824+
! !print *, pres, k, y_cc(k), T
825+
! end if
826+
! end if
827827

828-
end if
829-
end if
828+
! end if
829+
! end if
830830

831831
qK_prim_vf(E_idx)%sf(j, k, l) = pres
832832

src/simulation/m_rhs.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ contains
954954
! RHS for diffusion
955955
if (chemistry .and. chem_params%diffusion) then
956956
call nvtxStartRange("RHS-CHEM-DIFFUSION")
957-
call s_compute_chemistry_diffusion_flux(id, q_prim_qp%vf, flux_src_n(id)%vf, irx, iry, irz)
957+
call s_compute_chemistry_diffusion_flux(id, q_prim_qp%vf, flux_src_n(id)%vf, irx, iry, irz,q_T_sf)
958958
call nvtxEndRange
959959
end if
960960

0 commit comments

Comments
 (0)