-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option for direction-dependent bc's #136
add option for direction-dependent bc's #136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I caught a few mistakes and some possible ones.
@@ -430,7 +432,7 @@ Godunov::ExtrapVelToFacesOnBox ( Box const& bx, int ncomp, | |||
sth += Real(0.5) * l_dt * f(i ,j,k,n); | |||
} | |||
|
|||
HydroBC::SetXEdgeBCs(i, j, k, n, q, stl, sth, bc.lo(0), dlo.x, bc.hi(0), dhi.x, true); | |||
HydroBC::SetXEdgeBCs(i, j, k, n, q, stl, sth, stl, sth, bc.lo(0), dlo.x, bc.hi(0), dhi.x, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these calls a substitute for Godunov_cc_zbc_lo
type calls in A-W? In A-W, those use u_ad/v_ad/w_ad
as the "edge" velocities. Are you sure using stl/sth
is correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, on a second look, to match with A-W, these calls should be passing u_ad/v_ad/w_ad
instead of stl
and sth
as velm
and velp
.
See the Godunov_cc_xbc_lo
type calls in incflo_godunov_predict.cpp
in A-W for reference. Note that these are coded separately from the Godunov_trans_xbc
type functions in A-W. They are mostly similar in implementation though but need to make sure..
Godunov/hydro_godunov_plm.H
Outdated
@@ -88,7 +89,8 @@ void PredictStateOnXFace ( const int i, const int j, const int k, const int n, | |||
} | |||
|
|||
} | |||
else if (i == domain_ihi+1 && (bc.hi(0) == BCType::ext_dir)) | |||
else if (i == domain_ihi+1 && ((bc.hi(0) == BCType::ext_dir) || | |||
(bc.lo(0) == BCType::direction_dependent && umac <= 0.0)) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(bc.lo(0) == BCType::direction_dependent && umac <= 0.0)) ) | |
(bc.hi(0) == BCType::direction_dependent && umac <= 0.0)) ) |
Godunov/hydro_godunov_plm.H
Outdated
@@ -153,7 +156,8 @@ void PredictStateOnYFace ( const int i, const int j, const int k, const int n, | |||
amrex_calc_yslope_extdir(i,j ,k,n,order,S, extdir_or_ho_jlo, extdir_or_ho_jhi, domain_jlo, domain_jhi); | |||
} | |||
} | |||
else if (j == domain_jhi+1 && (bc.hi(1) == BCType::ext_dir)) | |||
else if (j == domain_jhi+1 && ((bc.hi(1) == BCType::ext_dir) || | |||
(bc.lo(1) == BCType::direction_dependent && vmac <= 0.0)) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(bc.lo(1) == BCType::direction_dependent && vmac <= 0.0)) ) | |
(bc.hi(1) == BCType::direction_dependent && vmac <= 0.0)) ) |
Godunov/hydro_godunov_plm.H
Outdated
@@ -218,7 +223,8 @@ void PredictStateOnZFace ( const int i, const int j, const int k, const int n, | |||
amrex_calc_zslope_extdir(i,j,k ,n,order,S, extdir_or_ho_klo, extdir_or_ho_khi, domain_klo, domain_khi); | |||
} | |||
} | |||
else if (k == domain_khi+1 && (bc.hi(2) == BCType::ext_dir)) | |||
else if (k == domain_khi+1 && ((bc.hi(2) == BCType::ext_dir) || | |||
(bc.lo(2) == BCType::direction_dependent && wmac <= 0.0)) ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(bc.lo(2) == BCType::direction_dependent && wmac <= 0.0)) ) | |
(bc.hi(2) == BCType::direction_dependent && wmac <= 0.0)) ) |
@@ -258,7 +259,7 @@ Godunov::ExtrapVelToFacesOnBox (Box const& bx, int ncomp, | |||
} | |||
|
|||
const auto bc = HydroBC::getBC(i, j, k, n, domain, pbc, bc_arr); | |||
HydroBC::SetYEdgeBCs(i, j, k, n, q, lo, hi, bc.lo(1), dlo.y, bc.hi(1), dhi.y, true); | |||
HydroBC::SetYEdgeBCs(i, j, k, n, q, lo, hi, lo, hi, bc.lo(1), dlo.y, bc.hi(1), dhi.y, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be vad here instead of lo/hi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be uad/vad/wad here in this file instead of lo/hi or stl/sth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rplace stl/sth with uad/vad/wad?
Godunov/hydro_godunov_ppm.H
Outdated
@@ -774,7 +788,8 @@ void PredictStateOnYFace ( const int i, const int j, const int k, const int n, | |||
amrex::Real sm, sp; | |||
amrex::Tie(sm,sp) = Limiter::sm_sp(s0,sedge1,sedge2); | |||
|
|||
SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, bc.lo(1), bc.hi(1), domlo, domhi); | |||
SetYBCs<Limiter>(i, j, k, n, sm, sp, sedge1, sedge2, S, vel_edge(i,j,k), vel_edge(i+1,j,k), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vel_edge(i,j+1,k) ?
No description provided.