# Boundary Conditions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 August 6, 1999, 06:19 Boundary Conditions #1 Jan Ramboer Guest   Posts: n/a Hello, I am researching the influence of boundary conditions on a turbulent bfs with compressible NS-solver. 1) In the literature I can only find BC for incompressible cases. Can I just take them over for my compressible calculations or do I have to adapt them or can i not use them at all. 2)Boundary conditions used in laminar cases, are they also suited for turbulent cases? What in particular should I be aware of for turbulent cases? 3)Most of the cases I have read about where 2D, can I just extend the BC to 3D? 4)If I go over to LES can I just maintain my BC? Lots of questions as you see. Any answer on one of these questions is more than welcome. Greetings, Jan Ramboer

 August 12, 1999, 10:03 Re: Boundary Conditions #3 Jan Ramboer Guest   Posts: n/a Thank you for writing the long respons. However one more question about it. You write that the way to impose b.c. when wanting to study the fine structures of the flow is to use the characteristic variables. Do you mean hereby the Rieman variables? If so, isn't this only applyable to inviscid flows? Greetings, Jan

 August 12, 1999, 14:32 Re: Boundary Conditions #4 Patrick Godon Guest   Posts: n/a Hi Jan, In one dimension the chracteristics of the flow are the Rieman Invariants. However, in several dimensions one has to make some assumptions. As to the viscous side of the flow, let me explain a bit more of all that. The treatment of the boundary conditions is needed usually at an open or free boundary (not a wall), though it can also be applied (somehow) to the wall problem. Now consider a multidimensional viscous flow with on one side a wall and on the other an open free boundary, and say for simplicity that the other 4 surfaces (in 3D we have a box in cartesian coordinates) are say periodic, or just let say that we do not consider them right now. So what I will do will be concerning only one direction: the one where at one end we have a wall and at the other an open boundary. After that the same can be applied to the other two directions with whatever boundary conditions you want (wall or/and free). I take an example of a wall and an open boundary so that you can see the difference between them, but two walls or two open boundaries would be fine too. At the wall the viscous effects are dominant (because of the shear and friction) and one has to consider the viscous equations of the flow (full Navier-Stokes systems). At the wall one can impose the boundary conditions (BC) directly on the primitive variables without fear of numerical instability, because the viscosity should help to damp it (execpt of course for realy physical instability where the viscosity is the source of the instability). At the open boundary the assumption is that the viscous effects are less important and accordingly one make the following (this is one way of doing it, there are other ways too): - drop all the viscous term and consider only the (compressible) inviscid Euler equations. - Consider the flow only NORMAL to the open boundary, since only the NORMAL velocity (say v, for short) will decide whether the flow will flow inside or outside the boundary. This means that one has to drop all the two other dimensions (directions), this is done by dropping all the derivatives in these 2 other dimensions. Eventually one is therefore left with a one-dimensional problem, inviscid. - The next step is to consider only the homogeneous system, i.e. to drop all the source terms (if any) in the one-dimensional systems of equations obtained above. In each equations so obtained, one is left with a time derivative term and several space derivative terms, all the rest has been dropped. In order to solve the system one usually make a linearization of the equations. In matrix form, the system is then transformed to find the eigenvectors and the eigenvalues of the systems. The eigenvectors are actually the characteristics of the flow and the eigenvalues are the speed of propagation of the characteristics (usually v, c+v and c-v are the three eigenvalues, where c is the sound speed). Then one has to check (according to the values of the eigenvalues - positive or negative and the location of the boundary) which characteristic is outgoing and which one is incoming. On the outgoing characteristics one has to imposed the value from the flow computed inside the domain (or an extrapolation of these values), on the incoming characteristics one has to impose the values prescribed at the boundary (the physical values which are given at the boundary, say p=p0, rho=rho0 and v=v0 or whatever you choose; derivatives are also OK). At this stage what is left is to solve back for the primitive variables using the values imposed on the characteristics of the flow. All this is treated in more details in the postscript paper I refered too in my previous posting. There are other ways of doing that and one of them is to solve directly the characteristics equations numerically (integrating them, not solving them analytically like here). Some of them are just refered to as MOC, method of characterics, they are all the same in principle, but different in the details. In addition for simple flow (e.g. polytropic flow, where the pressure = the density to some power greater than one), one can solve analytically the Rieman invariants (without linearization). See the reference I gave you on Landau and Lifshitz, or again the postscript paper. When you want to study the fine structure of the flow then you use a high order accuracy method or something equivalent, where you have little numerical diffusion, so that you will not smooth out all the little details of the flow. IN this case there will probably not be enough numerical dissipation to smooth out numerical oscillations that originate at the boundary (due to the imposition of the BC on the primitive variables). If this is the case and you get oscillations emanating from the boundary then you want to consider imposing the BC on the characterics. The flow might be just fine untill for example you get a shock in the flow. When the shock is going to reach the boundary it will be reflected inwards into the computational domain, then you know for sure that you need to use the characteristics. By the way, I know that LES means Large Eddy simulations, but does it refer to a specific method or just to any method solving turbulence on the large scales? Are you interested in solving only for the largest Eddies (largest vortices)? Then you would not need to resolve the fine structure of the flow and in this regime the BC on the primitive variables might be enough. Cheers, Patrick

 August 13, 1999, 04:12 Re: Boundary Conditions #5 Jan Ramboer Guest   Posts: n/a Hi Patrick, Thanks alot again for the explanation. It seems that I am learning fast from the discussion on this forum. Concerning your assumptions, another question. You assume that the viscous effects are neglectable at the open boundary. OK so far, lets say my open boundary is y=constant and my wall boundary is x=constand. Than there is in the corner a connection between the open boundary and the wall boundary. Since close to the wall we have a boundary layer, which is viscous, is the inviscid assumption for the open boundary still valid overthere? Or can you neglect the error resulting from that? Large Eddy Simulation is a procedure where you solve the NS-equations for a certain length-scale (by means of filtering), the turbulent energy for the lower scales is modelled. It is something in between DNS and RANS. For certain cases you might be interested in the fine structure of the flow (computational aeroaccoustics for example), for other not.

 August 13, 1999, 09:24 Re: Boundary Conditions #6 Patrick Godon Guest   Posts: n/a Hi Jan, Coner points are always more difficult to treat than the rest and can always be a source of problems. In some cases the corner point will actually be solved twice (e.g. if there are two free boundaries meeting there). Once there is only one free boundary and a wall, then of course you can assume the velocity at the corner to be zero in both directions (that of the wall and perpandicular to it). Then you can impose zero velocity directly on the primitive variable for the direction perpandicular to the wall and zero through the characteristics parallel to the wall. Here you must remember the following, the treatment is first of all an approximation (as is the whole process of solving for the flow) and each problem in particular might need a different approach. Sometimes, one needs to carry out different BC to check what works the best. Another important details: when you impose the BC on the characteristics of the flow, you actually allow for any fluctuation to propagate through the boundary. Therefore, the effect of the viscosity, which are 'felt' in the vicinity of the wall do propagate through the open boundary, and you can obtain there a velocity which is different (in this case smaller) than the velocity given there (since the velocity is imposed through the value taken by the characteristics - again see that postscript paper and the references I gave you). As a specific example, if at the open boundary you decide that the velocity prescribed is say v0, and you impose it through the characteristics, then at this boundary the value actually taken by v will not be v0. It can fluctuate (time dependent problem) and can vary substantially from v0. Only if the flow becomes steady and stable then v can approach v0 (assuming of course that v0 is the steady state solution). If v0 was a 'wrong' guess of the value expected outside, then you might well be left with v different than v0, eventhough you reached steady state (e.g. this would mean that the flow inside the domain is still affecting the flow outside the domain, i.e. the boundary has not been placed far enough, etc..). Bak to LES. I understand that LES is therefore getting rid of the smallest scale (using a filter) and you are left with the large scale. Then of course you the fine structure of the flow is affected (I do not know what are DNS and RANS). Is there any hyperviscosity in these modeling? I am myself just using a spectral method with some (hyper)viscosity and weak spectral filtering to model 2D decaying turbulence in rotating flows. Whether I resolve the small scales or not depends on the resolution and the viscosity (the filer is just for numerical stability to get rid of the aliasing errors). The same is done for example for the modeling of turbulence in planetary atmosphere (Shallow Water Equations), but these are never refered to as LES, RANS neither DNS. So what is the difference between all of these and the method I use? Cheers, Patrick

 August 13, 1999, 10:07 Re: Boundary Conditions #7 Jan Ramboer Guest   Posts: n/a Hi Patrick, I am not really familiear (yet) with spectral methods since I just started my phd. RANS= Reynolds Averaged Navier Stokes, which is used most of the time, no? DNS= Direct Numerical Simulation which means no averaging or modelling, straight calculation. But requires a really fine mesh, thus lots of cpu-time. With LES, if you use a simple modelling you can just use your solver for RANS, only you add a turbulent viscosity which is modeled based on your filter width etc... If you want to know more, let me know than I'll look up some references. Greetings, Jan

 August 13, 1999, 10:26 Re: Boundary Conditions #8 Patrick Godon Guest   Posts: n/a Hi Jan, Thanks for the details. Then I guess what I am doing is DNS. Spectral methods are high order accuracy methods and therefore you need less grid points to get the same accuracy as a low order method (e.g. finite differences). Spectral methods consists in expanding the functions (density, velocities, etc..) as series of polynomials (e.g. Fourier, exp-ikx). Then the spatial derivaties is approximated by differentiating the polynomials (e.g. by multiplying by -ik for the Fourier series, etc..). I have been also modeling flows where the turbulent stress is introduced in the equations (Reynolds stress tensor), in the Boussinesq approximation. There I solve for a flow that looks like laminar, but the viscosity is due to the turbulence that exists in the real flow. So the modeling is done for the averaged flow indeed. I gues this is close to RANS. Cheers, Patrick

 August 13, 1999, 10:54 Re: Boundary Conditions #9 Jan Ramboer Guest   Posts: n/a Hello Patrick, Your method is not really DNS. I think that spectral methods are a class on its own. In DNS you really discretize the NS-equations as they are. Greetings, Jan

 August 13, 1999, 11:24 Re: Boundary Conditions #10 Patrick Godon Guest   Posts: n/a HI Jan, Here it seems I lost you somewhere. With the spectral code I do solve the full Navier-Stokes equations as they are on a grid of points. The spatial derivaties are evaluated using the polynomial expansion and the time using a usual scheme like 4th Runge-Kutta or other. In what would DNS be different from that? What do you mean by discretize? I am working with discrete Fourier transforms, not continue transforms. I am not sure I follow you. WOuld be nice if you could clarify that for me. Thanks. Cheers, Patrick

 August 16, 1999, 05:20 Re: Boundary Conditions #11 Anders Ostman Guest   Posts: n/a I have followed your discusion about BC, and found it interesting, now I can try to contribute to the DNS discusion. It is not the field I'm specialized in but, here is the way I understand it. If you want to solve NS by means of DNS, the grid size has to be smaler than the smallest vortex, or length scale of the turbulence. I.e smaler than the length scale assosiated with the viscous dissipation (the Kolmogorov length scale). And the grid cells has to be of this size in the WHOLE computational domain. The small grid cells lead to small time steps. This type of computations are therefor extreamly CPU demanding. Furthermore, you are intrested in the mean values of the flow, and has therefor to compute for a long time to be able to calculate statistics of the flow. This holds for a computation by means of a finite volume, or finite differance method. I don't know if you can have larger grid sizes if you use specral metods where you approximate series of polynomials. But I guess that you can not resolve smaler wave lengthes than the distance between two neighbouring node points with that metod either. Greetings, Anders

 August 16, 1999, 08:59 Re: Boundary Conditions #12 Patrick Godon Guest   Posts: n/a Hi Anders, Thanks for adding some details. Yes of course if you simulate turbulence you need to be able to resolve two ranges of scales. One which is usually refered to as the inertial range where the direct (in 3D) cascade of energy takes place the and spectrum is Kolmogorov. The other scale is smaller and is where the energy is dissipated due to the viscous effect. There the slope of the spectrum is larger than for the Kolmogorov. This is what I usually do: I check the turbulent spectrum of the kinetic energy of the flow and make sure I have the two slope in the spectrum. Since I am dealing with a two-dimensional flow that is compressible, instead of having a Kolmogorov 'slope' I have a flat slope in the largest scales, while I make sure that the smallest scale are damped by the viscosity (there I have a slope of -3, -4). This was the only way I knew to simulate turbulence and according to what I understood it is the Direc Numerical Simulations (DNS). Spectral method are actually ideal for that since they are extremely accurate and do not affect the slope of the spectrum (little or no numerical diffusion). Now the more grid points you take, the lower the viscosity you can put in your model, and therefore the smallest the scale of the Eddy you can resolve. The viscosity I refer to is the hyperviscosity, i.e. introduced to dissipate the energy in the smallest wavelenght. I am running my code for weeks and even months, on many dynamical timescale, with resolution of up to 256 points (in each direction), which is equivalent to a finite difference of about 1000 points. PG