-
Notifications
You must be signed in to change notification settings - Fork 88
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
inflow-outflow boundary condition and unphysical flow #1532
Comments
Tagging @asalmgren and @mukul1992 on this issue |
@lawrenceccheung -- is it easy to run this case with inflow on some faces or outflow on others, or is the flow actually inflowing and outflowing on the same face? That would be another data point -- if it only happens with both refinement and this particular bc type. The inflow/outflow option shouldn't be having any effect in the middle of the domain but given that it only appears with refinement, I'd suspect that somehow we're labeling the coarse/fine boundaries as inflow/outflow by mistake? I think that labeling is happening internal to AMR-Wind, not in AMReX-Hydro ....? Mukul is heading off for a new position and I'm on foreign travel right now, so I'm wondering if there's an AMR-WInd developer who could look into this right now? @marchdf -- could you take a look? |
Hi @asalmgren, Yes, for this problem we can switch out the Lawrence |
Hi Lawrence, thanks for running those checks. While you are doing that, would it be possible to share the boundary planes and the restart chk file? |
@marchdf The checkpoint, boundary files, and the MMC tendency files are now at Kestrel at Also, confirming what @hgopalan mentioned earlier -- this version of AMR-Wind and AMReX works fine with cases that use |
I think the issue that Lawrence is having has to do with the bug revealed here: AMReX-Fluids/AMReX-Hydro#164 As it is in the code now, it checks the higher levels to see if they line up with the domain boundary of lev = 0. Because Lawrence's refinement zones are near the middle of the domain, their indices could possibly line up with the domain boundary of level = 0. (indices on lev = 1 are 2 times the indices on lev = 0 due to refinement, which means that halfway through the domain, (2*nx)/2 = nx, which would be the outflow boundary indices on lev = 0.) These would also be erroneously "corrected" by the routine, likely leading to unphysical flow. Furthermore, the nature of the boundary index check changed between the two implementations discussed here, possibly introducing the bug. However, I have no proof yet that this AMReX-Hydro bug (which definitely exists) is causing the problem we see in this AMR-Wind issue. |
Amazing work, @mbkuhn! |
@lawrenceccheung Now that #1554 is merged with the bug fixed in AMReX-Hydro, could you try to rerun this case and see if the bad behavior is gone? |
Bug description
We might have to take a look at the fix that was discussed in #1496 and the AMReX PR AMReX-Fluids/AMReX-Hydro#162.
To be clear, using the new AMReX library does allow the nodal projections to converge as expected, but it introduces regions of nonphysical flow that are not connected to the inflow/outflow boundaries. In this case, inflow/outflow boundaries are applied to the
xlo
/xhi
/ylo
/yhi
faces, but after a few seconds of running, there is a region of flow in the middle of the domain which develops with really high vertical velocity, and it looks like a big rift has been developed in the flow with smaller than necessary velocities:(Block dots correspond to turbine locations). Notice that this region of flow does not necessarily correspond to boundaries of where the mesh refinements are:
If you set
max_level=0
or you use an older amr-wind, then the flow behaves as normal, although the nodal_projections do slow down the calculation. This is the expected flow behavior at the same time:Steps to reproduce
Steps to reproduce the behavior:
Input file available at https://gist.github.com/lawrenceccheung/4784364af6c1d0125fba00bec51e029f
No errors, but AMR-Wind will eventually blow up due to excessive CFL/flow velocities developing.
N/A
Expected behavior
See images above from level 0 only simulation.
AMR-Wind information
The AMR-Wind/AMReX version which has problems is
The version which does work (but is slower due to the nodal_projections) is
The text was updated successfully, but these errors were encountered: