Closed ruohai0925 closed 5 years ago
Hello!
You are correct, both EBIAMR and incflo aim for incompressible flow with EBs. Nothing has happened to EBIAMR yet, as we (I) decided to start from the incompressible flow algorithm used in MFiX instead. This is what incflo is. It works with EB (including mass redistribution) on single level, and will hopefully work with multilevel soon.
I chose to start with the MFiX algorithm (with particles removed) since there was less legacy code and a simpler convective scheme etc. As it is now, I think it is a relatively straightforward projection solver for incompressible flow, with a 2-stage RK scheme for temporal discretisation. The downside of incflo is that it is based on the AmrCore framework rather than AmrLevel (like IAMR). This means that there aren't as many AMR/Multilevel implementations that come for free, like subcycling in time. Feel free to play around and contribute to the incflo repo, and do ask if there are any other questions.
Hi @knutsvk
Thanks so much. Nice explanation. I will run some cases about the incflo.
In our group, we have an in-house sharp interface immersed boundary code for fluid-structure interaction. That is why I need to learn the EB in the AMReX, hope to embed our IB into the AMReX frame. If I only want to learn some codes fraction about EB/IB part, do you have some suggestions? (Maybe from AMReX tutorials, incflo cases, and so on.)
Jordan
I think the best way to properly understand how EB is done in AMReX is to look at the tutorial in amrex/Tutorials/EB/CNS (Compressible Navier Stokes w/ EB), along with the AMReX documentation. Basically, when necessary, there are separate routines written for cells which are cut by the boundary. Huge amounts of AMReX has built-in EB capabilities. The experts on those implementations are not necessarily paying attention to questions in this repo, which at the moment I am the only person using. Note that the CNS tutorial is based on the AmrLevel framework, not AmrCore, and is therefore slightly different in usage from this code.
Got it! I know that the AmrLevel and AmrCore are inherited from different classes. The former one seems more complicated than the latter one, while the former one has more dedicated structures like subcycling. I will spend some time reading EB papers and play that case. Hope I can help you facilitate the incflo in the future.
Bty, I saw your one of your commits,
"big cleanup after deciding to remove nodal_pressure option. we now always use nodal pressure since it is inherently better than CC"
In my understanding, I guessed you used the NC pressure instead of CC (from your really nice pof paper), why did you say you removed the nodal_pressure option?
From my learning, I knew Dr. Ann used the NC pressure while Dr. DF Martin used the CC pressure. Both of them have advantages and disadvantages. Could you share more views about why NC is inherently better than the CC (maybe only restricted in the incompressible flow solver).
Thanks so much.
Jordan -- here's a thought experiment to explain one of the reasons we prefer the nodal pressure projection.
Picture a 2d volume with u = 1 for x < 0, u = 0 for x > 0, free-slip walls (or periodic) on the top and bottom.
Let's assume there is inflow on the left (u = 1) and outflow on the right.
What is the projected velocity field here a) with the nodal projection, b) with the cell-centered projection?
On Wed, Dec 12, 2018 at 2:33 PM Jordan Zeng notifications@github.com wrote:
Bty, I saw your one of your commits,
"big cleanup after deciding to remove nodal_pressure option. we now always use nodal pressure since it is inherently better than CC"
In my understanding, I guessed you used the NC pressure instead of CC (from your really nice pof paper), why did you say you removed the nodal_pressure option?
From my learning, I knew Dr. Ann used the NC pressure while Dr. DF Martin used the CC pressure. Both of them have advantages and disadvantages. Could you share more views about why NC is inherently better than the CC (maybe only restricted in the incompressible flow solver).
Thanks so much.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/incflo/issues/23#issuecomment-446769750, or mute the thread https://github.com/notifications/unsubscribe-auth/AKJPYnw6YVv6rn_QZlOXbtSAdgDnWWNKks5u4YRNgaJpZM4ZMVFY .
If cc projection is used, the pressure in x<0 and x>1 are all 0, which is not physical. In fact, the jump of velocity will induce a jump of pressure since they are coupled. If nc projection is used, velocities information on both sides of bc is used to calculate div_u. Then the jump of pressure can be reflected after solving the Poisson equation. Make sense.
Thanks for your explanation. Yet for me, I write the cc codes based on the AMReX package. Usually the flow is smooth in the incompressible flow. Also, the interpolation scheme for cc codes might be easier. Some papers also referred that collocated grids are more beneficial to the Embedded boundary method than staggered (or partially staggered) grids. Maybe I have to do some other justifications in the future paper......
Jordan -- in both cases the divergence operator sees the jump in u. Figure out what the values of the divergence are then figure out what the pressure field is that satisfies the Poisson equation with that divergence as the right hand side. It's worth actually figuring this out to understand it.
Having all the components of the velocity co-located at the cell centers is very convenient for advection and diffusion schemes. The downside is that you have to use an approximate projection, either with nodal or cell-centered pressure. (In both of my examples above the velocity is cell centered; it's on the pressure which is either on nodes or centers.)
If you use staggered velocity components you can use an exact projection which is convenient.
Those are the tradeoffs.
On Wed, Dec 12, 2018 at 3:10 PM Jordan Zeng notifications@github.com wrote:
If cc projection is used, the pressure in x<0 and x>1 are all 0, which is not physical. In fact, the jump of velocity will induce a jump of pressure since they are coupled. If nc projection is used, velocities information on both sides of bc is used to calculate div_u. Then the jump of pressure can be reflected after solving the Poisson equation. Make sense.
Thanks for your explanation. Yet for me, I write the cc codes based on the AMReX package. Usually the flow is smooth in the incompressible flow. Also, the interpolation scheme for cc codes might be easier. Some papers also referred that collocated grids are more beneficial to the Embedded boundary method than staggered (or partially staggered) grids. Maybe I have to do some other justifications in the future paper......
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AMReX-Codes/incflo/issues/23#issuecomment-446779378, or mute the thread https://github.com/notifications/unsubscribe-auth/AKJPYm9Ha4jH1pn-Y_4Unc2F-5oCHahMks5u4YzygaJpZM4ZMVFY .
Hi all,
I have some questions about the current status of EBIAMR and incflo repository. It seems that both of these two packages are aimed at adding the IB in the incompressible flow solver. Since I am now reading the AMR + IB/EB papers (listed below), can someone tell me the current progress of these two packages? Are the "reference state" and "redistribution" tricks in paper [2] already embedded in these codes?
I saw a short documentation of AMReX about the embedded boundary, just wonder the completeness of this part.
Thanks so much.
Jordan
References: [1] Pember, Richard B., et al. "An adaptive Cartesian grid method for unsteady compressible flow in irregular regions." Journal of computational Physics 120.2 (1995): 278-304.
[2] Almgren, Ann S., et al. "A Cartesian grid projection method for the incompressible Euler equations in complex geometries." SIAM Journal on Scientific Computing 18.5 (1997): 1289-1309.