Turbulent Paralell plates Simulation
4 Attachment(s)
Dear all,
I recently start using openfoam. I am simulating an incompressiblefully developed turbulent flow in a simple 2D parallel plates geometry using simpleFoam as the solver. The thing is that the uy velocity, which should be 0 in all elements, is not 0. my boundary conditions are the following: inlet: U: fixed gradient ; gradient uniform (0 0 0) p: fixed value; value 0.2 k: zerogradient epsilon: zero gradient outlet: inlet: U: fixed gradient ; gradient uniform (0 0 0) p: fixed value; value 0 k: zerogradient epsilon: zero gradient walls: U: fixed value; value uniform (0 0 0) p: zerogradient k: kqRWallFunction epsilon: epsilonWallFunction I'm sending three pictures of my results for the Ux (along a fixed x coordinate), Uy (on the inlet) velocity and k just to be clear on what's going on: Ux (as you can see, Ux is not constant as it should be for a fully developed flow): Attachment 54884 Uy (as you can see, uy is not =0 in all cells as it shoud be): Attachment 54883 k: Attachment 54885 What I've tried to do: One of the things that I've tried is seting k and epsilon gradient equal 0 in all directions (not only in the normal direction as the zerogradient BC does). But when I do : type fixedGradient; gradient uniform (0 0 0); for the k and epsilon fields, the following error appears: Attachment 54886 I've also tried to set my BCs as cyclic but unfortunatelly my pressure BC is not periodic so I can't do that. Does anyone knows a way to improve these results? Best Regards Felipe |
You have fixed "to much " boundary conditions.
If you give two pressures you may only give one velocity. If you give two velocities (which should different from each other for any need to simulate the result) give only one pressure bc. If you get a Reynold number which is rather high you have vortices in the flow and therewith a y component of the velocity. |
Quote:
The purpose of the two velocity BC (which are zero gradient) is to impose a fully developed flow state in the inlet and outlet (as long as everywhere along the flow, which is clearly not happening in the results) If you get a Reynold number which is rather high you have vortices in the flow and therewith a y component of the velocity That's right! But for a fully developed case, I should have as the result something that resembles the power law everywhere along the geometry, right? Power law: u/U=(y/R)^(1/n) Also, I've redone the simulation with low Reynolds number and I'm geting the same Uy profile (and something like Uymax=~0.01 Uxmax) I've forgotten to mention: I'm using the k-epsilon model in this case. |
I don't understand which archetype flow are you trying to get. Turbulent Wall bounded channel flow, perhaps?
Sent from my GT-I8190L using CFD Online Forum mobile app |
Quote:
I should have a velocity profile such as the power law velocity profile reference (page 8): http://www.itcmp.pwr.wroc.pl/~znmp/d..._Modelling.pdf and my simulation results agree with that profile for the fully developed region of my geometry (when Uy=~0). (that's good :) ) My doubt is: why am I getting a Uy different than 0 in the inlet zone if I'm using periodic boundary conditios (except for pressure) for the inlet and outlet faces? |
Three things: (1) your turbulent velocity profiles do not fit *at all* to what it should be, the Ux profile is definitely not a logarithmic profile, and it should be statistically symmetric at mid height if the two horizontal boundaries are walls; (2) it is not clear to me how you are driving the flow, are you imposing a velocity profile? (3) your bc for kappa is not physically consistent, kappa is the turbulent kinetic energy of the flow, the energy contained ib the fluctuations, is it feasable in your case to have a solid boundary producing vorticity?
Sent from my GT-I8190L using CFD Online Forum mobile app |
Hi Felipe,
Your case setup seems correct, but something went wrong. Which version of OpenFOAM you are using? Can you post the complete case? Best regards, Paulo |
1 Attachment(s)
Quote:
The pictures that I posted in my first topic were the Ux velocity along the x direction (y=0.8) (just for you to see that it is not constat, which is wrong for a fully developed flow), The Uy velocity along the inlet face (x=0), The turbulent energy (kappa) along the x direction. (Sorry, maybe those pictures weren't clear enough). I haven't posted yet the Ux velocity varyng with y yet, so here it goes: Attachment 54957 1-The picture shows the Ux velocity along y for x=5 (this corresponds to the middle section of my geomety). At this region, Uy=~0 and the flow is fully devloped. 2-The height of my geometry is 1 (Here, I've ploted Ux untill the middle of the section because, as you said, Ux is statistically symmetric at mid height) 3-As you can see, the simulated Ux profile agrees with the power law profile (error bellow 1%). (2) it is not clear to me how you are driving the flow, are you imposing a velocity profile? No, I'm imposing a pressure difference beetween the inlet and outlet boundaries. inlet (left face): U: fixed gradient ; gradient uniform (0 0 0) p: fixed value; value 0.2 k: zerogradient epsilon: zero gradient outlet (right face): U: fixed gradient ; gradient uniform (0 0 0) p: fixed value; value 0 k: zerogradient epsilon: zero gradient (3) your bc for kappa is not physically consistent, kappa is the turbulent kinetic energy of the flow, the energy contained ib the fluctuations, is it feasable in your case to have a solid boundary producing vorticity? I've tried the zerogradient kappa on the inlet and outlet boundaies. I've imagined that this should be the best BC to simulate a fully developed flow (any ideas of a better BC are welcome :) ) For the up and bottom faces (walls) this variable were calculated using kqRWallFunction BCs (which is basically a wall law that impose a zero gradient condition too) |
Hi,
if you want to have the developed solution, why don't you use a cyclic BC between inlet and outlet? Then you fix your pressure gradient inside fvOptions |
Quote:
|
1 Attachment(s)
Quote:
Which version of OpenFOAM you are using? I'm using v1606 (I think that it's the last version avaiable for windows). I've just intalled openfoam a coupple of months ago, so it should be up to date Can you post the complete case? Not a problem, I've just attached it to this messege Attachment 54978 |
Quote:
That should be a good idea (I've tried already to set cyclic BCs but I couldn't get it done becase of the pressure). I'm quite new to openFoam, thats why I've never used "fvOptions" before. I read a little about it after you sent your messege and found out that what I should use is probably the "directionalPressureGradientExplicitSource " function, which has the following description in http://www.openfoam.com/documentatio...e.html#details Creates an explicit pressure gradient source in such a way to deflect the flow towards an specific direction (flowDir). Alternatively add an extra pressure drop in the flowDir direction using a model. Ok, now I know that this functions add a pressure gradient to the flow equation and it is based on a model, but I didn't understand what "explicit" means in this case. Could you explain it in more detail? |
Quote:
Thanks for the advice I'll try to do that Second reason is that TKE (or kappa) is produced by the stretching of vortex streaks close to the walls, and then convected along the channel so there is no easy way to determine an "inlet" value for kappa specially in RANS Yes, I've figured that out when I tried to come with a BC for kappa. I only set these BC because before I started simulating this case, Ive done another simulation for the laminar flow in this ame geometry and I wanted to keep the same BCs for pressure and velocity. But thinking about it, I really should have imposed the velocity value on the faces (not the pressure). That way I could easily have BCs for kappa and apsilon ( such as http://www.esi-cfd.com/esi-users/turb_parameters/ ). Anyway, seting the two BDs as cyclic and using fvOptions seems to be a good idea too. Last thing, why you think spanwise/vertical velocities must be zero at all times? There would be no production of TKE if V=0, although in the mean they should be zero. Thinking about it now, maybe the V can really be different than 0 at some times but what I must have as a result is something that agrees with the power law velocity profile at every section of my geometry (that's the result that I'm trying to achieve as I'm trying to simulate a developed flow). Unfortunately, that's not what is happening at the inlet zone. Now, for the wall functions you're using you'll have to refer to the source code and see what exactly is being done there, and see if it is physically consistent with your problem at hand. Couldnt find any problem with the law of wall that I'm using. The developed zone of my results is alright so I don't think that this law of wall is unrealistic in my case. (just to be sure I've double checked it and it seemes to be working fine) |
2 Attachment(s)
Dear all,
I've followed your advice and started considereing my inlet and outlet BCs as cyclic and started to use fvOptions to set the pressure gradient. At the momment that I've done this, openfoam started to crash (the following error was shown): Attachment 55012 I'm also sending an updated version of my case (NOTE: don't forget to run topoSetDict) Attachment 55013 Am I doing something wrong? |
Quote:
Sorry, but I don't use your version of OF, in fact I use foam-extend so your configuration is not compatible with mine. To see what the error is, please try one thing at a time: (1) using the bodyforce without the cyclic boundaries (set zeroGradient); (2) then test the cyclic BCs. Most probably the error is from the cyclic BCs. You have to be careful on how you set them up. Cheers |
All times are GMT -4. The time now is 15:37. |