|
[Sponsors] |
March 24, 2017, 08:29 |
Turbulent Paralell plates Simulation
|
#1 |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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): ux.png Uy (as you can see, uy is not =0 in all cells as it shoud be): uy.png k: k.png 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: error.png 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 |
|
March 24, 2017, 13:09 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
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.
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
March 25, 2017, 10:30 |
|
#3 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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. |
||
March 26, 2017, 06:47 |
|
#4 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
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 |
|
March 27, 2017, 17:12 |
|
#5 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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? |
||
March 27, 2017, 17:32 |
|
#6 |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
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 |
|
March 27, 2017, 18:28 |
|
#7 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
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 |
|
March 27, 2017, 18:53 |
|
#8 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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: power law comparison.png 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) |
||
March 28, 2017, 04:26 |
|
#9 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
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 |
|
March 28, 2017, 04:58 |
|
#10 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
Quote:
|
||
March 28, 2017, 22:16 |
|
#11 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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 case.zip |
||
March 28, 2017, 22:29 |
|
#12 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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? |
||
March 28, 2017, 23:12 |
|
#13 | |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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) |
||
March 30, 2017, 00:58 |
|
#14 |
New Member
Felipe Murad
Join Date: Mar 2017
Posts: 11
Rep Power: 9 |
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): error.png I'm also sending an updated version of my case (NOTE: don't forget to run topoSetDict) case.zip Am I doing something wrong? |
|
March 30, 2017, 06:07 |
|
#15 | |
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15 |
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 |
||
Tags |
fixedgradient, simplefoam, turbulent boundary, zerogradient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulation FPEs - turbulence for transient and steady-state? | DaveR | OpenFOAM Running, Solving & CFD | 5 | March 5, 2017 16:06 |
How to set unsteady turbulent inlet velocity using the result of another simulation? | John-Lee | FLUENT | 2 | December 27, 2016 18:36 |
Natural Convection 2D axisymmetric turbulent simulation | enayath | FLUENT | 4 | June 4, 2014 11:20 |
Natural convection - Inlet boundary condition | max91 | CFX | 1 | July 29, 2008 21:28 |
Laminar Zone in Turbulent Simulation | Demetrios | FLUENT | 6 | June 6, 2007 11:36 |