|
[Sponsors] |
April 10, 2014, 08:49 |
ChannelOodles in OpenFOAM 2.2.2
|
#1 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 |
Dear All,
there are some threads about LES where channelOodles solver is mentioned (and used). I don't find channelOodles in OF2.2.2. Were did it go? Aylalisa |
|
April 10, 2014, 10:03 |
|
#2 |
Senior Member
|
Hi,
I guess now it is called channelFoam and it is a part of The OpenFOAM® Extend project (http://www.extend-project.de). |
|
April 10, 2014, 16:34 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
channelOodles was renamed to channelFoam when OpenFOAM 1.6 was released. This seems to have been because they generalized the "Oodles" modelling - http://openfoamwiki.net/index.php/Oodles - to the generic single-phase incompressible LES modelling we use in OpenFOAM nowadays. Then when they released OpenFOAM 2.2.0, they dropped channelFoam entirely, because pimpleFoam is now generic enough to contemplate what only channelFoam was be able to do in past versions. This is also hinted by the transfer of the tutorial "incompressible/channelFoam/channel395" to "incompressible/pimpleFoam/channel395". I have not tested the two tutorial on each version, namely in OpenFOAM 2.1.x vs 2.2.x, to confirm if the results are similar enough. As for the channelFoam version present in FOAM-Extend 3.0, it's derived from OpenFOAM 1.6.x. According to the Git history in FOAM-Extend 3.0 and the compilation from the official OpenFOAM git repositories (available here: https://github.com/wyldckat/OpenFOAM-combo/), it seems that the solver has not evolved in either versions/variants. Honestly, I suggest that you compare the results from the two tutorials on OpenFOAM 2.2.x or 2.3.x vs the one on OpenFOAM 2.1.x or FOAM-Extend 3.0, to ascertain whether it's worth it or not to use channelFoam. Best regards, Bruno
__________________
|
|
April 11, 2014, 04:23 |
|
#4 |
Senior Member
|
Hi,
wildckat is right, pimpleFoam is more universal as it can handle both LES and RAS turbulence models, and this part of channelFoam: Code:
// Extract the velocity in the flow direction dimensionedScalar magUbarStar = (flowDirection & U)().weightedAverage(mesh.V()); // Calculate the pressure gradient increment needed to // adjust the average flow-rate to the correct value dimensionedScalar gragPplus = (magUbar - magUbarStar)/rUA.weightedAverage(mesh.V()); U += flowDirection*rUA*gragPplus; gradP += gragPplus; Code:
momentumSource { type pressureGradientExplicitSource; active on; //on/off switch selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { fieldNames (U); Ubar ( 0.1335 0 0 ); } } |
|
April 11, 2014, 18:08 |
|
#5 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 |
Hello Alexey, Hello Bruno,
does this first code snipet guarantee the constant mass flow rate (as described in OpenFOAM Wiki - ChannelOodles)? (I still have problems reading the code, partly due to lack of physical understanding and a great deal especially due to the numerous templates and the fact that I am still too much of a beginner. Fight is going on.) Does this mean that, if I set inlet and outlet to cyclic and activate the momentum source, the flow will not die down and finally (depending on the initial flow field) transit to turbulent flow (because of numerical instabilities)? I read that it is possible with postChannel to extract these different values (in case of a transient simulation): txx, txy,tyy, txy, eps, prod, vorticity, enstrophy, helicity I see in the code (calculateFields.H) that txx =sqrt(Txx - (UMeanx*UMeanx)) Is UMean the time-averaged volume field of U? I can't figure out the meanding of Txx Is txx a statistical moment??? If I create some other perturbations source (U + U') as an inlet boundary condition can I then disclaim the cyclic inlet and outlet boundary conditions? Or is that idea unrealistic because of the demanded channel length (and the necessary number of cells)? I hope that I did not write to many different questions in this post . Your answers have already helped really much to improve (at least) my understanding! Thanks a lot! Aylalisa |
|
April 14, 2014, 04:23 |
|
#6 |
Senior Member
|
Hi,
1. About fvOptions. If you compare channelFoam source code with pressureGradientExplicitSource source code: channelFoam.C: Code:
// Correct driving force for a constant mass flow rate // Extract the velocity in the flow direction dimensionedScalar magUbarStar = (flowDirection & U)().weightedAverage(mesh.V()); // Calculate the pressure gradient increment needed to // adjust the average flow-rate to the correct value dimensionedScalar gragPplus = (magUbar - magUbarStar)/rUA.weightedAverage(mesh.V()); U += flowDirection*rUA*gragPplus; gradP += gragPplus; Code:
const scalarField& rAU = invAPtr_().internalField(); // Integrate flow variables over cell set scalar magUbarAve = 0.0; scalar rAUave = 0.0; const scalarField& cv = mesh_.V(); forAll(cells_, i) { label cellI = cells_[i]; scalar volCell = cv[cellI]; magUbarAve += (flowDir_ & U[cellI])*volCell; rAUave += rAU[cellI]*volCell; } // Collect across all processors reduce(magUbarAve, sumOp<scalar>()); reduce(rAUave, sumOp<scalar>()); // Volume averages magUbarAve /= V_; rAUave /= V_; // Calculate the pressure gradient increment needed to adjust the average // flow-rate to the desired value dGradP_ = (mag(Ubar_) - magUbarAve)/rAUave; // Apply correction to velocity field forAll(cells_, i) { label cellI = cells_[i]; U[cellI] += flowDir_*rAU[cellI]*dGradP_; } scalar gradP = gradP0_ + dGradP_; 2. About calculateFields.H. Well, in fact all the code in this header is commented out, so it is not used in the utility. 3. It depends on the method you'll be using to create perturbations. AFAIK people successfully use cyclic BCs for LES simulations. Last edited by alexeym; April 14, 2014 at 15:28. Reason: messed up names |
|
April 15, 2014, 14:44 |
|
#7 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 |
Hi Alexey,
is it necessary for that 'pressure correction' to be done inside the PIMPLE loop? The code in calculateFields.H is commented out, but how can I extract the values txx, tyy etc.? Why is it not active anymore? Do cyclic BCs finally (after enough flows through time) produce turbulence (due to numerical instabilities)with self-similar behaviour? I've found different methods to create self-similar turbulence, based on superimposing the velocity field with a fluctuation field. Does this proceeding speed up the desired turbulent velocity field? Best regards, Aylalisa |
|
April 16, 2014, 05:28 |
|
#8 |
Senior Member
|
Hi,
1. This way it is implemented in pimpleFoam Code:
while (pimple.loop()) { #include "UEqn.H" // --- Pressure corrector loop while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { turbulence->correct(); } } Code:
U = HbyA - rAU*fvc::grad(p); U.correctBoundaryConditions(); fvOptions.correct(U); 2. I don't know why it's not active. Currently with postChannel you can extract graphs of these values: Code:
makeGraph(y, UMeanXvalues, "Uf", path, gFormat); makeGraph(y, urmsValues, "u", path, gFormat); makeGraph(y, vrmsValues, "v", path, gFormat); makeGraph(y, wrmsValues, "w", path, gFormat); makeGraph(y, RxyValues, "uv", path, gFormat); makeGraph(y, kValues, "k", path, gFormat); makeGraph(y, pPrime2MeanValues, "pPrime2Mean", path, gFormat); 3. Yes, it is possible. Sure if you impose right fluctuations (not just white noise), it will speed up generation of the final flow field. |
|
September 15, 2014, 16:20 |
|
#9 |
Member
Ali Shamooni
Join Date: Oct 2010
Posts: 44
Rep Power: 16 |
Hi Brunoand others
I have some questions that couldnt find a clear answer to them after reading almost all the stuffs about channel or pipe simulation 1. In channelFoam tutorial, what are the contents of the 0 file? how are they produced? are they from a long time run of the simulation without any perturbed initial condition? 2. what is Ubar or magUbar in channelFoam source? I read the source and I guess that it is averaged velocity over entire volume. then what does it mean? if it was averaged velocity over a cross area then ok, it makes sense. but why does channelFoam tend to meet such a weird condition? 3. I compared results of a channel395 case solving by the pisoFoam and channelFoam for some different conditions a) channelFoam with initial conditions in 0.org file: no turbulence b) channelFoam without cyclic BC (turbulentInlet velocity replaced) with IC in 0 file (perturbed IC): turbulence decays c) pisoFoam with initial conditions in 0.org file without cyclic BC (turbulentInlet velocity replaced): no turbulence d) pisoFoam without cyclic BC (turbulentInlet velocity replaced) with IC in 0 file (perturbed IC): turbulence decays then I have this question, it seems that these are cyclic BC and perturbed initial condition both that run the turbulence, is it right? if it is right then what can we do if we dont want to use cyclic BC in a case? |
|
October 12, 2014, 15:27 |
|
#10 | ||||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Ali: I've had your post in my to-do list for some time now and I finally managed to look into this today: Quote:
Coincidentally, someone else also named Ali asked a similar question back in 2005 and got this answer: http://www.cfd-online.com/Forums/ope...tml#post187629 post #44 Quote:
has this code: Quote:
Quote:
Just in case the link gets broken in the future, the paper specifics:
As for the tests and questions you made on this point:
Bruno
__________________
|
|||||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFoam 2.3.0 vs 2.2.2 Parallel Running | tomank | OpenFOAM Pre-Processing | 1 | March 21, 2014 18:39 |
OpenFOAM 2.2.2 | Maimouna | OpenFOAM | 1 | October 14, 2013 14:30 |
OpenFOAM Foundation releases OpenFOAM 2.2.2 | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | October 14, 2013 08:18 |
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 | wyldckat | OpenFOAM Announcements from Other Sources | 3 | September 8, 2010 07:25 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |