CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

mappedPatch with channel flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2014, 05:26
Default
  #41
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Quote:
Originally Posted by adambarfi View Post
dear ArathoN,
I set it 1001.
did you set it to both pRefCell and pRefValue because in the tutorial only the first one is 1001. By the way why is it 1001?


Quote:
Originally Posted by adambarfi View Post
which if we set the setBulk as true, a laminar parabolic profile will be initiated for velocity.
something from my bones tell me "don't use setBulk, just set perturb as true!!!!"
In the thesis of Eugene de Villiers he specify that you can use a parabolic laminar flow with the superimposition of the perturbation (around page 160) at y+ around 20 (in this case the perturbation will not fade out and it will make the flow turbulent). you can find easily the thesis on the nest "The Potential of Large Eddy Simulation for the Modeling of Wall Bounded Flows".


Here my residuals plot, and as you can see the other variables will keep going down except for the pressure.

I've set final time to 20 after defining the characteristic time of the flow as t*=Lx/Ubar (Lx= lenght of the channel in the x-direction) so that the endTime is around 30xt*.

I checked and rechecked my setting and except for the pRefCell & pRefValue I think everything is fine (in post #30 you'll find my setup).

Hope you can help me solve this problem it's week that i'm fighting to figure out the problem.

EDIT: I've just read in your post #33 that your Re_b=13750 with Re_tau=395 are you sure? In the data i found with Re_tau 59 the Re_b=10935. So you Reynolds with respect to Ubar is too high.
ArathoN is offline   Reply With Quote

Old   May 22, 2014, 06:36
Default
  #42
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
did you set it to both pRefCell and pRefValue because in the tutorial only the first one is 1001. By the way why is it 1001?
yeah, I think it's just a reference point for pressure, and it shouldn't affect the final results. for example in pisoFoam solver it has:

Code:
    label pRefCell = 0;
    scalar pRefValue = 0.0;
    setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
which means if I change the pRefCell or pRefValue it hasn't effect of the flow, because the solver set them to zero by default. although if I remove these parameters from solver, i think it makes no difference.

Quote:
EDIT: I've just read in your post #33 that your Re_b=13750 with Re_tau=395 are you sure? In the data i found with Re_tau 59 the Re_b=10935. So you Reynolds with respect to Ubar is too high.
I read Eugene's thesis completely before and in a case he used U_b=0.1335, nu=2e-5, Re_tau=395 and these values lead to a Re_b=13350, but I read in a paper that the corresponding value of Re_b for Re_tua=395 was Re_b=13750 for a channel. but I can't remember in which paper, I just note something from that paper and I remember that it used DNS for solving the problem.

for the solution time, I read in the below threads that they started with a coarse grid and then after 100 flow time, then refined the grids and mapped the results to the new case and after that let it to solve for another 100 flow time.
but I think It take a long time for me to use this procedure because I'm just using 4 core not 32!

http://www.cfd-online.com/Forums/ope...nel-flows.html
http://www.cfd-online.com/Forums/ope...58043-les.html


Regards,
Mostafa
adambarfi is offline   Reply With Quote

Old   May 22, 2014, 07:17
Default
  #43
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 14
huangxianbei is on a distinguished road
Sorry,I forgot to paste the blockdict,you can find it here in my thread
http://www.cfd-online.com/Forums/ope...tml#post493226
huangxianbei is offline   Reply With Quote

Old   May 22, 2014, 08:05
Default
  #44
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Interesting in the dataset I found (posted it here) they have different Re_b.
Wait did you use that heigh of the channel because I have half your value using delta which is the half heigh.
So your advise it to let it go for like 100xt* and see if the flow will converge to the fully developed turbulent condition. In fact seeing the flow with parafoam I can still notice the streaks created by the perturbation. I'll rerun the simulation with the correction on pRefCell and pRefValue (I'll set them as in the channel395 tutorial), hoping the pressure will not go crazy.
ArathoN is offline   Reply With Quote

Old   May 23, 2014, 04:17
Default
  #45
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
again I'm running my case using mapped bc, the results are more similar to the case I want validate with it than cyclic bc.

anyway, I have some problems yet. firstly, I ran a coarse grid case for 124 flow time. the streamwise velocity contour seems that the flow is fully developed but the other components of velocity are changing with time. their changes are like a wave, they fluctuate and this process repeat every 16 flow time!!! Then I mapped the results to another mesh that was refined. and it's being solved for about 40 flow time. I attach the residuals and some pressure probes plots here.
As it's understood, the residuals of x- and y-component of velocity are fluctuating and I think that means that I haven't a fully developed flow yet!!!!

So, what's your opinion, you guys, about my residuals? are these Res correct? should I be patient and let it solve for a long time or it hasn't any profit for me and the solution is wrong?

the two first pic are for coarse mesh and the others are for refined mesh.

any hint or tip would be appreciated!

Regards,
Mostafa

P.S. Re_tau=395, Re_b=13350, @flow time=124 --> u_tau=0.008402
Attached Images
File Type: png Res01.png (20.0 KB, 50 views)
File Type: png pProbes01.png (11.6 KB, 36 views)
File Type: png Res02.png (18.6 KB, 42 views)
File Type: png pProbes02.png (26.3 KB, 38 views)
adambarfi is offline   Reply With Quote

Old   May 23, 2014, 14:43
Default
  #46
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
Right now I'm away from PC but I confirm that I'm having the same behaviour with the residuals in the coarse mesh. I have some variable, especially the pressure that will have an oscillating residual and dunno why because with mapped patch the case is easily resolved.

My last guess is that maybe the mesh near the wall isn't defined correctly, and given the presence of the perturbation at around y+ =20 this may cause some problem. On the other hand I kept a R factor close to 10 (or 0.1). I'll try first to change the led model adopted, maybe the damping at the wall by driest WF isn't working well and cause such oscillatory nature. Otherwise I'm out of ideas.

I kept searching for the Re_b and it is always based on half heigh of the channel so be careful when computing the U_bar.
ArathoN is offline   Reply With Quote

Old   May 23, 2014, 15:13
Default
  #47
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by ArathoN View Post
Right now I'm away from PC but I confirm that I'm having the same behaviour with the residuals in the coarse mesh. I have some variable, especially the pressure that will have an oscillating residual and dunno why because with mapped patch the case is easily resolved.

My last guess is that maybe the mesh near the wall isn't defined correctly, and given the presence of the perturbation at around y+ =20 this may cause some problem. On the other hand I kept a R factor close to 10 (or 0.1). I'll try first to change the led model adopted, maybe the damping at the wall by driest WF isn't working well and cause such oscillatory nature. Otherwise I'm out of ideas.

I kept searching for the Re_b and it is always based on half heigh of the channel so be careful when computing the U_bar.
dear ArathoN,

thank you for reminding that point.

A question:
when you are using mappedpatch, did you map the outlet to inlet, or the inlet to outlet or a cross-section within the channel to inlet?
adambarfi is offline   Reply With Quote

Old   May 23, 2014, 15:55
Default
  #48
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I forgot to specify that I didn't still compare the values to the experimental data, but I have a good profile of the residuals where they all converge pretty nicely.
As for the mapping I decided to map the inlet to the outlet, remember to not put the offset at the exact position of the patch but a bit lesser.
ArathoN is offline   Reply With Quote

Old   May 24, 2014, 03:33
Default
  #49
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
I think I have a misunderstanding of mapped boundary condition!
assume the following:
Code:
    inlet
    {
        type mappedPatch;
        offset          ( 0 0 3 );
        sampleMode      nearestCell;
        samplePatch     none;
        faces
        (
            (0 3 2 1)
            (1 2 9 8)
        );
    }
which of these sentences are correct:
1- This condition implies that the fields at z=3 are mapped to the inlet patch
or
2- This condition implies that the fields at inlet patch are mapped to the z=3 plane
?

I let it solve for 400 flow time and still my x- and y- components of velocity are changing and the flow isn't fully developed yet!

any hints or tips?

P.S. and still my u_tau is varying
adambarfi is offline   Reply With Quote

Old   May 26, 2014, 01:23
Default
  #50
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
hi everybody,

After 5000 flow time the residuals didn't converge correctly. I can't understand why?! I attach the residuals.

perhaps it's better to use cyclic bc instead of mapped.
Attached Images
File Type: png Res5000.png (24.9 KB, 50 views)
adambarfi is offline   Reply With Quote

Old   May 27, 2014, 08:57
Default
  #51
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
I am doing the Re_tau = 395 channel flow as well in comparison to DNS Data by Moser.

I have just used oneEqEddy Model so far. On a coarse mesh, i simulate 100 flow throughs which takes about 2800 time steps with deltat = 0.2

Afterwards I simulate another 2800 time steps with calculation Umean and Uprime2mean and pMean and pPrime2mean on a finer grid with deltat = 0.1 to keep Co low.

Then I use postChannel -latestTime to get Uf (which is the velocityprofile u over y as far as I know).
From the results, I calculate dUx/dy and then uTau which is about 0,00752. The resulting ReTau is then just 375, far away from 395, which is actually my main problem.
From the coarse to the fine mesh, I doubled the elements in y-direction, but I just improved ReTau from 370 (coarse) to the mentioned 375 (fine).

I am using the pimpleFoam tutorial and havent done any changes except the grid of the finer mesh. So my ubar is 0.1335.

I am confused about the low ReTau number. How do you guys calculate ReTau? Do you use wallShearStress utility? Dont believe the results differ so much from each other.

My dimensionless velocity profile has a good shape in log law but bad at high y+.

Any hints?

PS: can u share ur script for plotting the residuals? Then I can have a look in my log file and tell you if I have any strange behaviour.
HanSolo123 is offline   Reply With Quote

Old   May 27, 2014, 10:15
Default
  #52
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by HanSolo123 View Post
I am doing the Re_tau = 395 channel flow as well in comparison to DNS Data by Moser.

I have just used oneEqEddy Model so far. On a coarse mesh, i simulate 100 flow throughs which takes about 2800 time steps with deltat = 0.2

Afterwards I simulate another 2800 time steps with calculation Umean and Uprime2mean and pMean and pPrime2mean on a finer grid with deltat = 0.1 to keep Co low.

Then I use postChannel -latestTime to get Uf (which is the velocityprofile u over y as far as I know).
From the results, I calculate dUx/dy and then uTau which is about 0,00752. The resulting ReTau is then just 375, far away from 395, which is actually my main problem.
From the coarse to the fine mesh, I doubled the elements in y-direction, but I just improved ReTau from 370 (coarse) to the mentioned 375 (fine).

I am using the pimpleFoam tutorial and havent done any changes except the grid of the finer mesh. So my ubar is 0.1335.

I am confused about the low ReTau number. How do you guys calculate ReTau? Do you use wallShearStress utility? Dont believe the results differ so much from each other.

My dimensionless velocity profile has a good shape in log law but bad at high y+.

Any hints?

PS: can u share ur script for plotting the residuals? Then I can have a look in my log file and tell you if I have any strange behaviour.
Dear HanSolo,
first of all, how could you found out that you reached a fully developed flow? did you see the results using paraView, for example? does the flow pattern reasonable?

second, how about the p or U probes in your solution? do they reach a constant value after second 2800 time steps?

third, here you are the code for plotting the residuals using gnuplot:
Code:
set logscale y
set title "Residuals"
set ylabel 'Residual'
set xlabel 'Iteration'
plot "< cat log.pimpleFoam | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\
     "< cat log.pimpleFoam | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\
     "< cat log.pimpleFoam | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\
     "< cat log.pimpleFoam | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" title 'k' with lines,\
     "< cat log.pimpleFoam | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with lines
pause 1
reread
copy them into an empty file in your case and then run
Code:
gnuplot filename
fourth, you can calculate the u_tau, pressure drop, yPlus, and Re_tau using the attached utility. just copy it to applications/utilities/postProcessing/wall case and then wmake it.

fifth, can u share your residuals here? we have some problems in convergence for this case.

Regards,
Mostafa
Attached Files
File Type: gz incompressibleyPlusLES.tar.gz (2.5 KB, 23 views)
adambarfi is offline   Reply With Quote

Old   May 27, 2014, 11:36
Default
  #53
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Hi, here are my residuals.

I am not sure why you just plot the Initial Residual and not the final residuals.
The pic above is just the 2nd part with calculation of the means. So the whole simulation has doubled iterations.

For test purpose I just had a look at the mean velocity profile development from 2800 to 5600 in paraView. Also the residuals in the pic seem to not change anymore.

Ive read in the forum that it is a common way to let the fluid pass the channel 100 times and then another 100 times with building the means.

With 5000 flow times do you mean the distance of the flow or the Iterations?

Why do you do probes for U? Or do you mean the time averaged U?

In your residual plots there is kinetic energy k, so you are doing oneEddyEq too?

At the moment I am running the case with Smagorinsky. I have a thesis in which Smagorinsky shows excellent results. Hope I get the same. Simulation should be finished tomorrow.

Unfortunately I cant install your utility because I have no root rights, i am working as student at university.



P.S.: I do not use the standard yPlusLES utility because I get completely wrong values, with max(yPlus) at first node off the wall and 0 inside the channel. Therefore I started calculation of uTau and ReTau with the postChannel given values.
HanSolo123 is offline   Reply With Quote

Old   June 10, 2014, 12:56
Default
  #54
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I still can't get acceptable results, did any of you found the error or resolved the problem?
ArathoN is offline   Reply With Quote

Old   June 10, 2014, 13:39
Default
  #55
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
I gave up attempting to solve my case using the mappedpatch boundary condition and now I'm working with cyclic bc and using perturbU for initial condition. It presents better results for my case.

I did a simulation with a coarse grid and compared it with Moser DNS results. they were neither good nor bad, but they were promising. unfortunately, I fell asleep and the Courant number came high about 1 for about 1000s and I missed the results to present here!!!

Now, I'm running it again with a finer grid and whenever it reaches a fully developed turbulence state, I'll present the results here.

ArathoN, I suggest you to try your problem using cyclic boundary condition.

Regards,
Mostafa
adambarfi is offline   Reply With Quote

Old   June 10, 2014, 13:50
Default
  #56
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Quote:
Originally Posted by HanSolo123 View Post
With 5000 flow times do you mean the distance of the flow or the Iterations?
It's flow time not the iterations.

Quote:
Originally Posted by HanSolo123 View Post
Why do you do probes for U? Or do you mean the time averaged U?
I set probes for U, Umean, and p to have a better observations on flow and the changes!

Quote:
Originally Posted by HanSolo123 View Post
In your residual plots there is kinetic energy k, so you are doing oneEddyEq too
for that case, yes, I did. but now I'm using Smagorinsky model. I read that the Smagorinsky will lead to more accurate results.

what about your results? is it finished? If yes, can u share your results with us!

Regards,
Mostafa
adambarfi is offline   Reply With Quote

Old   June 11, 2014, 02:13
Default
  #57
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
hi again,

about 6000s flow time I let the solver keep solving with a coarse mesh and then I mapped the results to a refined mesh and it's about 2500s flow time that it's still solving, but there isn't any sign of fully developed in my case!!!!

the second mesh is not very dense near the wall and I'm solving just half of channel using symmetry condition.

I attached the probes of U, UMean, and UPrime2Mean for three points here. anybody knows why my flow didn't reach a fully developed state?!?!?

I also attach the Courant number plot for the second run.

Also, the comparison graphs are attached for my results and Moser's. my results are coming close to Moser data.

Do you think I should keep being patient and let it solve my case for a long time?!?!?

Regards,
Mostafa
Attached Images
File Type: png U_valid.png (4.5 KB, 40 views)
File Type: png uv_valid.png (6.1 KB, 39 views)
File Type: png urms_valid.png (5.4 KB, 40 views)
Attached Files
File Type: gz probes.tar.gz (46.1 KB, 3 views)
File Type: gz run04t2.tar.gz (12.5 KB, 8 views)
adambarfi is offline   Reply With Quote

Old   June 16, 2014, 05:23
Default
  #58
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 16
ArathoN is on a distinguished road
I tried a lot of settings but in my case the problem is the pressure residual, it doesn't go down but until now I've done max 100 flow time (it needs a lot of time to converge). I don't know what to do to make it work. Here my case files and btw the Retau=590, nu=1.5e-5 and Ubar=1.3122, you?

EDIT: i tried a coarser mesh but i have the same behavior the pressure,Uy and Uz residuals are all around 0.1 and they don't seem to go down (the mesh is 60x50x30 with the y-ratio as 10 and 0.1). How much did you wait and do you have a residual plot? so i can confront it with what i have.

EDIT2: Plotting the bounded variables i noticed that K_max will greatly oscillate 0.02-0.06. and i don't know why? ok it is a turbulent flow but the characteristic turbulent energy of the large scales shouldn't vary so much.

Quote:
Originally Posted by adambarfi View Post
hi again,
the second mesh is not very dense near the wall and I'm solving just half of channel using symmetry condition.
Did you get good results only after changing that condition or not? because i read in some topics that LES models don't like symmetry conditions.

Quote:
Originally Posted by adambarfi View Post
Do you think I should keep being patient and let it solve my case for a long time?!?!?
Try changing the schemes the default ones on channelt395 for divschemes are gauss limitedlinear which have diffusive term so try gauss linear, probably you'll notice better final results (this is a general advice that i've foung in almost all less thread here). Hope it will help you.


EDIT3: I still have the residual in the range of 0.1-0.01 (higher end for the pressure and lower end for Ux and k). Now the kmax is oscillating less 0.025-0.035.and i'm at about 300 flow time, i'll continue to simulate until 1000 and i hope the residuals will go down at least to e-3. Moreover in the parafoam plot the streaks created by the perturbation are still there, it's like the perturbation doesn't diffuse, and don't know why. I'll keep updating with every noticeable change.

EDIT4: Now it is at around 550 flow time the residual are as before but seeing the flow with parafoam i noticed that it is now turbolent and the perturbation streaks imposed are being diffused. So now I'll map the data to a finer mesh, maybe the problem related to the residuals are dependent of the mesh size. here some images

bounded variables plot
residual plot
front-section flow
stream-wise section flow

Last edited by ArathoN; June 17, 2014 at 03:37.
ArathoN is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
rhoCentralFoam for channel flow fportela OpenFOAM Running, Solving & CFD 22 June 10, 2014 21:14
Question on the boundary condition for open channel flow, please help! ripperjack OpenFOAM Running, Solving & CFD 0 September 13, 2013 12:44
Gravitational water flow in closed channel. Szymon85 CFX 7 September 3, 2013 17:28
[ICEM] Flow channel meshing problems StefanG ANSYS Meshing & Geometry 19 May 15, 2012 07:44
references for how to maintain a constant flow rate in turbulent channel flow amirrstg Main CFD Forum 0 October 25, 2011 04:17


All times are GMT -4. The time now is 18:59.