|
[Sponsors] |
Using LEMOS turbulence inflowGenerator in 2 perpendicular inlets |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 16, 2020, 04:06 |
Using LEMOS turbulence inflowGenerator in 2 perpendicular inlets
|
#1 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 9 |
Hi everyone,
I've been succesfuly working with the synthetic eddy method bourndary condition to generate a realistic boundary condition in LES simulation from the LEMOS group at Rostock Uni. If someone is not aware of it, it is called decayingTurbulenceInflowGenerator and works really well for generating turbulent inlets for LES (you can find it here: https://github.com/LEMOS-Rostock/LEMOS-2.4.x). So the thing is, it works like a charm if you only have one inlet. The boundary condition is hard coded to generate turbulence only in the +x or -x direction, so you have to rotate your mesh in such a way that the turbulent inlet you want to use is in that direction. However, I am now simulating a case with two perdendicular inlets (one in the x-direction an the other in the y-direction, something similar like the image attached). So, currently I can only choose to have one of the inlets turbulent while the other has to remain laminar. This is quite bad and I would need to fix it so that both inlets are turbulent. Can anyone provide me with some guidance as to how to do this? I tried compiling a modified version of the LEMOS condition but hard-coding the y direction instead but I was not able to do so. Thank you! |
|
September 18, 2020, 08:55 |
|
#2 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
I use this B.C. quite often, I would think that modifying it is not easy, there are many details one has to pay attention to. For example, the Lund transformation may need to be changed accordingly. The math can be hard due to all the tensor manipulations.
Have you considered other B.C.s? I think there are other types of synthetic boundary conditions. Also, Eugene's thesis might be helpful ("The Pothential of Large Eddy Simulation for the Modeling of Wall Bounded Flows"). His way of generating disturbances in the flow may be something to explore. Additionally, what about the default turbulentInlet? Your flow is internal, where the turbulence is generated mainly due to walls. If the mesh is fine enough maybe turbulentInlet works well. If you download OF from openfoam.com, it comes with a turbulentDFSEMInlet B.C., and I don't think it has a direction limitation. I've never used it so I can't provide more details. By the way, when using LEMOS, what is the length scale you use? I normally put 7% or 10% of the piple diameter there. And what about the Reynolds stress? Ruiyan Last edited by cryabroad; September 18, 2020 at 09:00. Reason: More info |
|
September 18, 2020, 13:47 |
|
#3 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 9 |
Indeed, I tried to modify the BC and it was too hard for me, so I dropped that route.
The image was not quite my setup just something I found with a quick search online to illustrate my point. I've upload a real representation of my geometry. Bottom line: two inlets, one against the other. One is bigger than the other and the smaller one is coming from a bent pipe. So indeed, the turbulence in the smaller inlet will mainly come from the instability in the bend. Therefore, I could maybe get away with turbulentInlet. Regarding the thesis you mentioned, it could be useful but I can't justify the time it would take to implement a turbulent BC from scratch. turbulentDFSEMInlet could be an option, or even the new digital filter but I need a precursor RANS simulation of a long pipe to have developed turbulence in order to get the U, R and L data with a matching mesh for each inlet. It also looks like too much work and I haven't done precursor sims before. Regarding LEMOS settings, indeed 10% of the characteristic length scale (i.e. pipe diameter) and R usually has to be higher than I would like to in order to preserve good rms values downstream. Something like 50% is not unlikely but it really depends on the case, the mesh and so on. The best way I've found is to have some validation rms values downstream of the inlet from experimental or DNS and use trial and error to get close. This is a pain as it requires several runs with converged mean values but I haven't found a better way. You? |
|
September 19, 2020, 10:28 |
|
#4 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
I think Eugene developed a tool for generating the disturbances, search in the forum and you may find it.
As for the LEMOS settings, especially the R field, I used to assume a certain amount of turbulence intensity (e.g., I = 5%) and istropic turbulence, so my R field is uniform and looks like (Rxx, 0, 0, Ryy, 0, Rzz), with Rxx = Ryy = Rzz = 3/2*(Uref*I)^2. This applies when Uref is uniform at the inlet. I know this is not right for sure, but may be a good approximation. Now what I normally use is a velocity profile (from experiments if there are any, otherwise a 1/7 profile) with a R profile (from experiments, if no experiments then I use the method I mentioned above). I have to say though, different R field seems to give similar results (I test this using a circular pipe). I used to run precursor simulations as well but like you said, they take too much time. Another way I see some people have done is to add a tube before the inlet, they claim that this allows the turbulence to develop and by the time the flow reaches the actual inlet, you will have a more natural velocity and R field. But then it comes with additional questions, e.g. how long should this pipe be? 5D? 10D? I kind of don't like this idea but it seems to resolve the problem in certain cases. |
|
September 21, 2020, 10:00 |
|
#5 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 9 |
I found Eugene's perturbU files but unfortunately it is used to initialize turbulent fields, no to generate turbulent inlets. It's nice to reduce the time it takes a simulation to develop turbulence fully inside a domain but I do not believe this will sustain the turbulence generation as it can only be used previous to the simulation running (i.e. it's not a BC).
I use the same method for R. How do you define the 1/7 velocity profile, with swak4foam? I do it this way. I have done the "pre-inlet" solution sometimes and I have found it to be the best way to have a natural turbulent field. I agree that the pre-inlet pipe length is a bit arbitrary but above a rather small value (i.e. ~2D) it there is little difference. So just take the smallest possible length that makes it work. A bit of trial and error is required which is not optimal. Anyway, I went with the stock turbulentInlet with 3% intensity on the pipe bend and LEMOS with also 3% in the bigger inlet. The Re is small so I think it's a good approximation. Let's see how that goes. By the way, any suggestion for U schemes when just linear gives you troubles? I somethimes use filteredLinear3V with a value os arround 0.1 but just wanted to know what you tipically use. |
|
September 22, 2020, 09:38 |
|
#6 | |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 9 |
Quote:
The turbulence intensity is defined as: and: where is the turbulence kinetic energy (TKE). If we substitute the later into the former and re-arrange: The TKE is also defined as half of the trace of the Reynolds stress tensor: If we assume isotropic turbulence, then : Substituting back this result in the third equation: So the RField in the LEMOS decayingTurbulenceInflowGenerator boundary condition should be: Code:
RField uniform ((U*I)^2 0 0 (U*I)^2 0 (U*I)^2); |
||
September 23, 2020, 02:40 |
|
#7 |
Senior Member
Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10 |
Seems like you are right! It should be just (U*I)^2 without 3/2, but like I mentioned, I found the R field to be not that important. I have used different levels of I (at least 2%) and found just minor difference in the RMS values, mean values are almost not affected.
I use Matlab to impose the velocity profile. To do this I first use writeCellCentres to obtain the cell centroids at the inlet, then calculate the corresponding velocities for each cell, then put it back into OpenFOAM. This way I have full control of the velocity vector. I generally use a "pre-inlet" with ~5D to ~10D, but sometimes without it. I've seen people suggesting linear schemes for U, which is suppose to minimize the numerical viscosity, but I also found it unstable in some cases. Now I tend to use vanLeer, and Gamma scheme as well. I'd say both of them are quite good. |
|
June 18, 2021, 22:33 |
|
#8 |
Member
Join Date: Jan 2017
Posts: 71
Rep Power: 9 |
Hi,
From your discussion I came to know how I can set Rfield. Can you please tell me about Lfield and points/value ? I am trying to use it but I do not know how to obtain these. |
|
June 19, 2021, 06:08 |
|
#9 |
Member
Marc
Join Date: May 2017
Posts: 42
Rep Power: 9 |
Sure sadsid!
The authors of the boundary condition made a small and not very descriptive PDF, which you can see here. LField is the integral length scale, in a way the size of the largest eddies that the boundary condition will generate. A simple rule of thumb is 10% of the characteristic length (i.e. pipe diameter in a pipe flow). There is more information about estimates of this quantities in different situations here. Finally, values is the actual value of the velocity field you want to input through this boundary. You have to just introduce it as a vector in the same way done in the typical fixedValue boundary condition. An example can be seen in the inlet boundary field, here. Hope this helps! |
|
June 19, 2021, 12:02 |
|
#10 | |
Member
Join Date: Jan 2017
Posts: 71
Rep Power: 9 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set URANS turbulence model in unsteady flow simulation | TimLiu | OpenFOAM Pre-Processing | 0 | April 25, 2017 09:52 |
Discussion: Reason of Turbulence!! | Wen Long | Main CFD Forum | 3 | May 15, 2009 10:52 |
Turbulence boundary values | lego | Main CFD Forum | 0 | October 24, 2002 14:47 |
Is turbulence disripable by chaos? | Matthias | Main CFD Forum | 9 | March 27, 2001 14:04 |
turbulence modeling questions | llowen | Main CFD Forum | 3 | September 11, 1998 05:24 |