Skip to content

Commit dce7d11

Browse files
author
Anand
committed
Regression Tests and Checker
1 parent 510b67d commit dce7d11

File tree

9 files changed

+427
-0
lines changed

9 files changed

+427
-0
lines changed

src/simulation/m_cbc.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ contains
944944
else if ((cbc_loc == -1 .and. bc${XYZ}$b == -7) .or. (cbc_loc == 1 .and. bc${XYZ}$e == -7)) then
945945
call s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
946946

947+
!Add GRCBC for Subsonic Inflow
947948
if (bc_${XYZ}$%grcbc_in) then
948949
!$acc loop seq
949950
do i = 2, momxb
@@ -964,8 +965,11 @@ contains
964965
else if ((cbc_loc == -1 .and. bc${XYZ}$b == -8) .or. (cbc_loc == 1 .and. bc${XYZ}$e == -8)) then
965966
call s_compute_nonreflecting_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
966967

968+
!Add GRCBC for Subsonic Outflow (Pressure)
967969
if (bc_${XYZ}$%grcbc_out) then
968970
L(advxe) = c*(1d0 - Ma)*(pres - pres${XYZ}$_out)/Del${XYZ}$_out
971+
972+
!Add GRCBC for Subsonic Outflow (Normal Velocity)
969973
if (bc_${XYZ}$%grcbc_vel_out) then
970974
L(advxe) = L(advxe) + rho*c**2d0*(1d0 - Ma)*(vel(dir_idx(1)) + u${XYZ}$_out*sign(1, cbc_loc))/Del${XYZ}$_out
971975
end if

src/simulation/m_checker.fpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ contains
3838
call s_check_inputs_stiffened_eos_viscosity
3939
call s_check_inputs_body_forces
4040
call s_check_inputs_misc
41+
call s_check_inputs_grcbc
4142

4243
end subroutine s_check_inputs
4344

@@ -108,6 +109,15 @@ contains
108109
@:PROHIBIT(model_eqns == 3 .and. wave_speeds /= 1, "6-equation model (model_eqns = 3) requires wave_speeds = 1")
109110
end subroutine s_check_inputs_model_eqns
110111

112+
!> Checks constraints for GRCBC
113+
subroutine s_check_inputs_grcbc
114+
#:for DIR in ['x', 'y', 'z']
115+
@:PROHIBIT(bc_${DIR}$%grcbc_in .and. (bc_${DIR}$%beg /= -7 .and. bc_${DIR}$%end /= -7), "Subsonic Inflow requires bc = -7")
116+
@:PROHIBIT(bc_${DIR}$%grcbc_out .and. (bc_${DIR}$%beg /= -8 .and. bc_${DIR}$%end /= -8), "Subsonic Outflow requires bc = -8")
117+
@:PROHIBIT(bc_${DIR}$%grcbc_vel_out .and. (bc_${DIR}$%beg /= -8 .and. bc_${DIR}$%end /= -8), "Subsonic Outflow requires bc = -8")
118+
#:endfor
119+
end subroutine s_check_inputs_grcbc
120+
111121
!> Checks constraints on acoustic_source parameters
112122
subroutine s_check_inputs_acoustic_src
113123

tests/872E17A1/golden-metadata.txt

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/872E17A1/golden.txt

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/EBBA071B/golden-metadata.txt

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/EBBA071B/golden.txt

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/F42633C5/golden-metadata.txt

Lines changed: 117 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)