Add velocity boundary condition for all coordinate directions
Like the inlet velocity boundary condition of @haochey and/or @anshgupta1234 , we should make it possible to set the boundary condition to have a velocity that isn't just into the domain, but also transverse to it. So setting the velocity to be a constant upwards, or u_y = constant for a boundary condition on the left or right boundary. This is related to issue #185 .
I'm going to add this to my PR #189. It'll make testing the walls I added easier.
Also, I'm not sure the this energy assignment makes sense. https://github.com/anshgupta1234/MFC/blob/767edf23607659008df76604e5d86a1b026d78bc/src/simulation/m_rhs.fpp#L1967-L1988 As velocity flows into the domain, the energy in the buffer region continues to increase every time the boundary condition is applied since the kinetic energy in the interior cell is most likely increasing at each time step. Would it make more sense to compute the internal energy using the EOS and the state in the buffer region and then add the kinetic energy due to the velocity source?
Also, I'm not sure the this energy assignment makes sense. https://github.com/anshgupta1234/MFC/blob/767edf23607659008df76604e5d86a1b026d78bc/src/simulation/m_rhs.fpp#L1967-L1988 As velocity flows into the domain, the energy in the buffer region continues to increase every time the boundary condition is applied since the kinetic energy in the interior cell is most likely increasing at each time step. Would it make more sense to compute the internal energy using the EOS and the state in the buffer region and then add the kinetic energy due to the velocity source?
Hi @wilfonba, this could be fixed by subtracting the kinetic energy of the interior cells ((0.5q_cons_qp%vf(contxb)%sf(0,k,l)(v**2))) from its total energy and add the remaining to the kinetic energy assigned by the boundary condition.
@haochey I think that's an easier fix. Thanks.
I've added these to a lid-driven cavity PR that I'll be making eventually. Will merge after further testing.
To do:
- [x] Validate 2D lid-driven cavity
- [ ] Validate viscous channel flow in 2D
- [ ] Validate viscous channel flow in 3D
- [x] Add input file checks
Thanks for keeping this up to date @wilfonba
@wilfonba can you modify this issue to make clear what is/is not remaining?
@sbryngelson This can be closed unless the additional boundary layer validation cases are necessary.
Can you add an example boundary layer/channel flow case to examples/ in 2D and 3D?
Yes
@wilfonba is this issue closed?
This was closed by #279.
Closed by #279