2nd order boundary conditions for 2nd order discretization?
Hi,
I am now using 2nd order time and space discretization for my NS eqns, using fractional step. For the boundary conditions, e.g. at the north side, I'm using: du/dy = 0. v=0. If I just use a 1st order discretization of the above for my problem, it will be: u(i,j) = u(i,j1) will it affect the overall order of my problem? Will it become overall 1st order? Thanks 
AFAIK, using a 1st order BC in an otherwise 2nd order scheme will pollute the solution and renders it 1st order accurate. Sorry... Try to implement a 2nd order BC as well.

Yes, I agree with Rami. The overall solution will fall back to the lowest order in your domain, i.e. the boundary contribution. The becomes even more pronounced for high order schemes (>>2), where a low order boundary discretization can totally screw up your solution.

Ok thanks for the answers. I'll ensure my BC are 2nd order too.

So if I understand this correctly, because BC is 1st order it does not make any difference if everywhere else is Second or higher order. The solution from first order scheme and second order schemes will be same??
I would say 1st order BC may affect that solution but it would NOT make the solution 1st order everywhere. 
I agree with previous poster. It is problem dependent as well. For steady, incompressible, pipe flow the order of the outlet boundary condition should play little role.
1st order: u_b = u_b1 2nd order: u_b = (4*u_b1  u_b2)/3 If steady and incompressible then u_b1 = u_b2 (otherwise continuity is violated), and hence we see that the 2nd order boundary approximation is the same as the 1st order approximation. For other cases (e.g. liddriven cavity flow) the order of the boundary conditions is very important. 
Quote:
The effect at the BC will perpetuate itself into the domain, so while not all cells will become first order accurate, the "bad cells" will drag your overall convergence down. This may or may not be a problem, depending on your requirements, but a single cell of lower order will destroy your theoretical order of convergence  if this matters in your case or not is something for you to decide. If you are using codes with first or second order accuracy, the effects will not be as harmfull as if you are using high order schemes. Then, high order boundary approximation is crucial, for first and second oder you will get away with a lot more "approximation crimes"! 
Quote:
Or am i misunderstanding your example? Cheers, cfd newbie 
2nd order BC
In unstructured mesh How do we implement second order BC du/dn = 0

Quote:

Quote:
in that case, I'm wondering if the discussion about the order of the outflow bc is valid, since outflow bcs (the supersonic type) have no effect on the solution inside the domain, so yes, for such bcd, I guess order is not important. I was thinking more about wall / inflow bcs in a fluxbased scheme, where it has been shown e.g. by Bassi and Rebay that the effect of a low order bc (with a high order scheme) can be devastating. Thanks for the nice discussion! Are you from the FD community? 
Quote:
As for the original post I think it is best to try both 1st and 2nd order boundaries and then compare the results. By FD, do you mean Fluid Dynamics? In that case, I would say not really. I do research in Metallurgy, using CFD (well these days it is mostly supervision) and I do some basic FD teaching to third year students. I do dabble in writing cfd codes in my spare time. ;) 
Quote:
am i wrong? 
Guys nobody is doubting that the order of scheme on boundary can affect the solution or quality of it.
But my comment was related to these two comments before mine: Quote:
Quote:
You see, these two things are wrong. While order of BC might affect the solution or might not affect the solution, over all order of solution will NOT fall back to 1st order. Saying categorically that it will fall to 1st order is plainly wrong. Quote:

Quote:
let's debate this :) The concept of an "order of a scheme" comes from the Taylor series expansion and is ONLY valid for h > 0, i.e. in the limit of grid spacing going to zero. So even the most established scheme will only reach its design order of accuracy for "small" h, where h depends on the smoothness of the problem itself (and on the question whether the solution is indeed smooth or not!). so let's agree that the term "order" only makes sense for h>0, right? let's take a look at a flow field, where the solution is wellbehaved and your second order scheme can treat it in a wellresolved manner, so let's assume the errors goes as h squared to zero. Let's further assume that you have ONE bad cell, where your order reduces to one, so your error goes as h (no squared here). What's going to happen as h>0 ? Your one bad cell will dominate, and your order will gradually fall back to 1. ( This can be proven with mathematical consideration of convergence rates and series, but I think my example is sufficient. ) One great example of this is that at a shockwave (which can be interpreted as a first order phenomenon), all schemes either add an insane amount of viscosity or fall back to first order, no matter what. Another example everbody who has ever done convergence testing can relate to is to prescribe an priori solution to the flow by the manufactured solution method (call it an elaborate convergence test if you will). One single "bad" cell in your domain will screw up your convergence rate, and you will NOT reach your design order of convergence. And lastly, even if your "bad" cell might not drastically alter your computations visually, it might as well ruin things like cd / cl / cw, when you are not looking closely. I encourage you to read Bassi and Rebays paper, which demonstrates the necessity of high order boundary discretizations quite dramatically! http://web.mit.edu/ehliu/Public/Proj...M_2D_Euler.pdf So, I'm looking forward to a lively discussion! Let's keep it coming! Cheers! :o:o 
Second order BC is required for better accuracy at boundaries with gradients (eg. wall). With zero gradient second order and first order works alike. Practically, first order BC is sufficient enough for Euler solver but not for NS.
Quote:
Accuracy of an solution can be improved by two ways one increase the mesh size (hmethod) (there is a limitation due to round off error, resource...) and next is to increase the order of equation (p method). This is well proven, you can experiment yourself. Solve a problem with second order accuracy with a coarse mesh and then solve same problem with first order accuracy with (atleast) 34 times refined mesh you may end up with same solution. Order of scheme is from the truncation of Taylor's series and not on the h>0 assumption. What ever may be the value of h, if you only take the constant term it became first order and by including linear term it becomes second order. Quote:
Quote:
Whatever you said is an excellent example to prove first order in few cells will not make the entire domain first order. TVD schemes works this way, whenever it encounters shocks it locally makes the scheme to be first order to avoid spurious oscillations around the shock. Any scheme as such will not fall back to first order at discontinuities but limiter makes it to behave that way. 
Quote:

Quote:
I beg to differ. A first order cylinder BC will produce spurious entropy at each kink, thereby generating a entropy wake behind the object, and destroy e.g. symmetry. NS on the other hand usually dampens this effect, and is it less pronounced. Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
All I'm saying is that the overall behavior of your solution is governed by the lowestorder phenomenon  it doesn't matter if that comes from physics or numerics. Quote:
(BTW, the reason some schemes have to resort to first order is because they wouldn't be stable otherwise. They just dump viscosity on the shock, until it can be resolved by low order methods) Thanks for your input! Cheers! 
Quote:
Quote:
To tell you the truth, in unstructured grid solvers like starccm+ and fluent schemes at BC are almost always first order. Now search for their presentations where they have investigated the flow comparison between first order and second order schemes. Why do you think their results differ?? May be the order BC did not play as important role as you making it to be. I am not the only one to tell you this, there are others also who are saying the exact same thing to you in this thread. Quote:
Further, the example with shockwave proves that just because locally first order scheme was used solution over all solution does not become first order. Rest of the place it would be second or higher order accurate. Quote:
One poor cell can disturb convergence because it can screw up the condition number of matrix. In starCCM+ you can switch off such cell and still run simulation with 2nd order schemes in flow region. Quote:
We are not discussing whether second order schemes are needed or not. We are discussing this: Quote:

Quote:
Quote:
Quote:
And regarding your example: If you are introducing an error of O(1) at your inflow bc, you will be sure to see the result in your eddies, unless you are doing some purely supersonic simulations. Quote:
Why don't you send me the presentations, I will take a look and you will read up the paper I proposed, and we talk some more? I must admit I tend to trust papers in peerreviewed journal a tiny bit more than colorful marketing brochures...don't you as well :) Quote:
Quote:
But you didn't understand my example. A shock wave is a natural "first order BC", because the solution loses its smoothness there, and you will see the same behavior in the convergence as for a faulty first order bc. Sorry to confuse you, I shouldn't have brought it up! Quote:
Quote:
Quote:
Quote:
I'm very very very confused now. Are you talking about the convergence of your matrix inverter for implicit time stepping?? If that's the case, that would explain a lot of the confusion going on here, friend :) Cheers a lot! 
All times are GMT 4. The time now is 02:50. 