HiFiLES / HiFiLES-solver

High Fidelity Large Eddy Simulation Solver
Other
173 stars 131 forks source link

Help for the boundary condition #50

Closed yilvqingyan closed 9 years ago

yilvqingyan commented 9 years ago

could anyone help me?I have a question that I can not understand.in the cylinder testcase,The boundary conditions are "Sup_In "and"Sup_In ",why not "Sup_In "and"Sup_Out"? And what is the differerence between"Sub_In_Simp"and"Sub_In_Char" Sincerely chen

bizhishui commented 9 years ago

I think you should have a look at the code in the method "set_inv*" (in bdy_inters.cpp) Maxime

mlopez14 commented 9 years ago

You bring a good point, the boundary conditions in this case are not consistent with the appropriate boundary conditions. Sup_In imposes some values at the boundaries. Sup_out copies the flux values from the boundary cell to the outflow boundary fluxes.

Sub_In_Simp calculates the input boundary fluxes based on the data from the boundary cells. Sub_In_Char uses the method of characteristics to do do this calculation.

We used Sup_In in both inflow and outflow because in some cases the other boundary conditions were leading to unstable solutions. However, the boundaries are so far away from the region of interest that this inconsistency does not lead to major inaccuracies.

jewatkins commented 9 years ago

Hi Chen,

Thanks for your question. I just wanted to add to Manuel's reponse.

The boundary conditions "Sup_in" and "Sup_Out" stand for supersonic inflow and supersonic outflow. For supersonic inflow, the density, velocity vector and pressure is specified on the boundary based on what's given in the input file. For supersonic outflow, all these quantities are extrapolated to the boundary from the solution. "Sup_In" is used for the farfield in the cylinder testcase because the farfield is assumed to be far enough away such that the density, velocity vector and pressure can simply be specified from uniform flow conditions in the input file.

If you want to use a more sophisticated boundary condition for this testcase, I suggest using "Char" which stands for characteristic. For a subsonic flow, information can travel in all directions and that information may propagate until it hits the farfield boundary. By using "Sup_In", all this information is assumed to have dissipated by the time it reaches the boundaries and that's why the variables are specified. If this information does not dissipate, it will actually reflect off of the boundaries. The "Char" boundary condition will attempt to capture this information and eliminate it by computing Riemann invariants.

"Sub_In_Simp" or subsonic inflow simple specifies the density and velocity vector at the boundary and extrapolates the pressure from the solution to the boundary. "Sub_In_Char" or subsonic inflow characteristic is for an inlet of an internal flow where the total pressure, total temperature and a velocity normal is specified and an outgoing Riemann invariant is computed.

As Maxime pointed out, the implementation of the boundary conditions are shown in bdy_inters.cpp, under bdy_inters::set_inv_boundary_conditions(), line 391 (Note: this may change in the future). Here's a quick link: https://github.com/HiFiLES/HiFiLES-solver/blob/master/src/bdy_inters.cpp

I hope this helps.

-Jerry

yilvqingyan commented 9 years ago

Hi Thanks for your help,Jerry,Manuel and Maxime.I understand and tried this way. Best regards! Chen