boundary conditions
I am trying to modify a 5 point finite difference scheme, since it is a 5 point scheme it requires additional boundary conditions to be specified, so called ghost boundary conditions. Could you please help me for the specification of my ghost boundaries? or at least recommend me a reference documentation covering boundary condition implemantation for high order accurate schemes?

Re: boundary conditions
Hi, I see that your message has been posted for a few days, and has been read almost a 150 times and still no answer. So I will try to help. Assume your boundary to be located at the point (say) J, then your ghost points are J+1 and J+2. You need the ghost points to compute the derivatives of the variables at J (you need the 5 points J2, J1, J, J+1, J+2) and at J1 (j3, J2, J1, J, J+1). Usually people will assume some conditions at the boundaries from which they can get the variables defined at J+1, and J=2. For example you can assume that the velocities are given there, or you can assume that the first or/and second derivatives are given. Consider a specific example where you want dv/dx=0 (where v is the velocity and x is the dimension perpandicular to the boundary). Then you write dv/dx using your 3rd order method (i.e. 5 points approximation) to actually solve dv/dx=0 at J and at J1. Another specific example that I have encountered is just 'propagating' the values of the variables through the boundary by just putting v(J)=v(J1) and the same for J+1, J+2. You can also propagate the derivatives in that way. This is quite common but it is not very accurate and not very stable.
If you really want to implement your code and the boundary conditions then you might want to try to either solve the characteristics of the flow at the boundaries, or to implement the boundary conditions on the characteristics of the flow rather than on the primitive variables (the primitive variables are the quantities for which you are solving, i.e. the density, the velocities and the energy). This is a much more difficult task but you will avoid numerical oscillations at the boundaries, and the boundaries will be transmitive rather than reflective (i.e. that if you have a wave propagating towards an open boundary it will not be reflected back into the computational domain). I am not quite sure what you know about the characteristics of the flow and how much time you want to invest in improving your existing code. So it might be a good idea to first try just by giving some values to the ghost points (as I suggested first) and if this is not satisfactory then you might want to try and consider implementing boundary conditions using the charateristics of the flow. Since I am myself using the flow characteristics in my codes I can give you references only to that. I have no references on the ghost points. 
a simple explicit example
For the simple case of implementing the boundary conditions on the ghost points J+1 and J+2: assume you want a BC of the type dv/dx=0, then you just let:
v(J+1)=v(J1) v(J+2)=v(J1) and then you solve your equations for v(j), j=1,2,..J1,J. You can assume symmetry boundary conditions, antisymmetry or even periodic in the same manner, but as I said the best is to use the characteristics of the flow (in 1D these are called the RIemann Invariants). PG. 
Re: a simple explicit example
(1).I came across a book in the library yesterday. It covers numerical solution of partial differential equations, secondorder and 4th order as well. There are also many clearly labeled finitedifference molecules. The ghost nodal point outside the computational domain is also discussed.(2). The name of the book is " Numerical Methods in Engineering" by Mario G. Salvadori and M. Baron of Columbia University, published by PrenticeHall.Inc in 1961,second edition.

Re:a simple explicit example: correction
Sorry I missprinted what I wanted to write for the example:
v(J+1)=v(J1) v(J+2)=v(J2) (a 2 instead of a 1) PG 
Re: a simple explicit example
Dear Mr. Patrick Godon,
I would like to thank you for your interest to my question firstly. Your answer to my question is very well stated, thank you very much. However, I have still some doubts about using the first alternative that you have mentioned to be the simpler alternative. Firstly, while imposing this bc to the ghost point adjacent to symmetry axis the value of the conservative variable velocity perpendicular to the symmetry axis should verify the following V(J+1)= V(j1) instead of V(j+1)=V(j1) when j= refers to the node at the symmetry axis am i wrong to think so? (if we think the direction of the streamlines (or flow), it would be the reverse on the upper half of symmetric geometry, is not it?) Secondly, you have written that this could be implemented to even periodic bcs, besides symmetric or antisymmetric boundary conditions. What about solid wall boundary conditions, and subsonic inlet and outlet boundary conditions? Please make a comment on above questions of mine. Thank you very much for your sharing your knowledge and ideas with me. sincerely, Ezgi 
Re: a simple explicit example
Dear Mr. John C. Chien,
Thank you very much for your interest to my problem and informing me a reference book name. I do not have this book at the moment but I will try to reach it asap, thanks. sincerely, Ezgi 
Again: Boundary Conditions.
Dear Ezgi, Yes you are right concerning the sign of the velocity accross the boundary, I was mainly thinking about the pressure when I wrote it, which of course does not change sign accross the boundary. For a solid boundary v=0 and dp/dx=0 would be imposed at the boundary and when solving for J1, you would need the values of the variables at J+1 only (you don't need to solve at J). So you can add one relation to solve for the ghost points at J+1. For the pressure you could use the symmetry relation, while for the velocity v=0 could also be used at J+1, but symmetry condition for J+1 could also be used (or antisymmetry). Here what you are really trying to do is to find a good extrapolation for the value of the flow outside the boundaries, since physically there is no flow there. So mainly you have to assume something concerning the behaviour of the functions at the boundary which can be used as such. The only relations which are left are assumptions on the derivatives (fist and/or second derivatives can be set to a constant value, or to zero, or to their value at the last computed point dv/dx(J)=dv/dx(J1), etc..). For subsonic inflow/outflow just specifying the velocity v=constant at J+2,J+1 and J should be OK too, since these are really the physical boundary conditions. Concerning the numerical stability of such boundary conditions, one can make sure that such conditions are stable only by testing them. And this is involves trying different BC each time.
As I mentioned, for free (inflow/outflow) boundaries, the best is to use the characteristics method. For a wall (v=0) one expects waves to be reflected, so that both methods should give the same results, but maybe not the same stability. As I said, I have much more experience with BC on the charactiristics rather than with ghost points, and I personnally prefer using the characteristics. To implement BC on the characteristics you can (1) either solve for the characteristics of the flow at the boundary (see e.g. the Review of Dan Givoli: Givoli, D., 1991, J. Comput. PHys., vol. 94, page 1); (2) or impose the boundary conditions on the characteristics using exact physical values given at the boundary (physical boundary conditions) for the inflowing characteristics and extrapolated (computed) values for outgoing characteristics (see e.g. the treatment and the references in Abarbanel et al. 1991, J. Fluid Mech., vol. 225, page 557). Cheers, PG. 
All times are GMT 4. The time now is 09:00. 