-
Notifications
You must be signed in to change notification settings - Fork 86
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
Using mass_inflow_outflow
with multiple refinement levels
#1482
Comments
I noticed that eps is set to 1e-6 explicitly on top of the code. First check may be to print the outflux value and check if tolerance has to be made user-specified. The test cases, I ran were initialized and setup differently from yours so my comment on refinement levels working fine may not apply here. |
@mukul1992 and @asalmgren do you have thoughts on this? I think this came from work you did with the inflow/outflow stuff. Any tips to debug would be most welcome. |
I think I have a hunch of what might be wrong. This routine scales the outflow to match the inflow so that the projection is solvable. If there is no outflow, there is nothing to scale, so the above assertion checks for that. But in the above case where the finer level is not touching the boundary at all, it is okay for the outflow to be zero as far as the inflow is zero. So maybe it should be something like this:
I'll ask Ann about this solution, meanwhile feel free to try it out. |
Thanks @hgopalan, @mukul1992! I'm creating a smaller test case which has the same flow properties, but will allow me to test out various fixes faster. I'll give these a try. Lawrence |
FYI the relevant PR for Hydro is up, waiting to be merged and then updated in AMR-Wind via the submodule. |
Update: the PR is now merged into Hydro. |
Fantastic work @mukul1992! PR for updating the submodule is here: #1483. @lawrenceccheung once you confirm that works, I will merge. |
It got merged and closed this issue. So I am reopening it until @lawrenceccheung can confirm the fix is good. |
@mukul1992 @marchdf @hgopalan I'm running with this boundary condition together with cloud data being injected at the inflow boundary. However, I get the same error as Lawrence. The case can be found here: /scratch/sbidadi/oracle/oracle_sims/bc_code/case/cloud_sim_dt_fixed_abl_forcing_corr_init_condition_fine_mesh_ar_1/cloud_dx_10_wenoz_io_bc cc: @mchurchf |
Just to double check, you're running this with the updated submod? |
Hi all, Interestingly, if it's just a little tiny refinement box in the middle of the domain, this problem with However, once you start expanding the box so that some of the blocking factors might expand the refinement zone to be in the same general vicinity of the boundary: Also a side note -- using Lawrence |
Bug description
I am using the
mass_inflow_outflow
boundary condition on a case with multiple levels of refinement, although no refinement levels are touching the boundaries, and the boundary data is captured with level 0 only.Running the case encounters an error on the first step:
This points to a problem in
https://github.com/AMReX-Fluids/AMReX-Hydro/blob/development/Utils/hydro_enforce_inout_solvability.cpp#L322, although it might also be prevented from the AMR-Wind side.
Steps to reproduce
The full case set up details are at
https://github.com/lawrenceccheung/AWAKEN_summit_setup/blob/main/Benchmark1/Phase2/FarmRuns/prod1/BM1Ph2_FarmRunProd1newBC.ipynb
Quick summary:
mass_inflow_outflow
is used on all 4 sides (xlo
,ylo
,xhi
,yhi
) due to highly turbulent eddies going into and out of each face. Predominant flow direction is changing, but generally around 220-240 degrees.Note:
amr.max_level
is set to 0.Steps to reproduce the behavior:
Compiler used
Operating system
Hardware:
Machine details ():
Sandia flight on 7168 ranks.
Input file attachments: See setup notebook above. I am also working on a smaller version of this case for debugging.
Error (paste or attach):
See sbove.
If this is a segfault, a stack trace from a debug build (paste or attach):
See above.
Expected behavior
mass_inflow_outflow
should be usable with multiple refinement levels.AMR-Wind information
The text was updated successfully, but these errors were encountered: