|
[Sponsors] |
October 8, 2014, 05:05 |
|
#21 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
some comments to the paper "Q-DNS...": - a pipe length of L=3.2D is to short. With this you get spatial aliasing!! - The averaging is not long enough. (random error is not given) - I cannot find a proper grid independence study in this paper How to do q-DNS like Ed Komen et al. : 1) Use pimpleFoam. 2) Use fvOptions to set momentumSource (pressureGradientExplicitSource) 3) Grid see paper (but longer domain!!!) 4) boundary conditions: p: inlet: cyclic outlet: cylic pipewall: zeroGradient U: inlet: cyclic outlet: cylic pipewall: fixedValue (0 0 0) 5) initial conditions: - Use boxTurb to generate synthetic turbulent field in a box. - Use mapfields for mapping to pipegeometry - Superpose a fully developed turbulent mean velocity profile 6) Time averaging - Start time averaging when you flow is weakly statistically stationary. e.g. mean velocity and autocorrelation function is invariant under time shift. - You need a very long time for averaging to reduce random error 7) postProcessing - Check first if your results make sense in an engineering point of view! - Use pressure Gradient in log file to calculte utau - Scale your mean flow quantities with utau - Compare your results with the results of Ed Komen et. al. Best regards Florian |
|
October 8, 2014, 05:19 |
|
#22 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
you should use pimpleFoam or pisoFoam. In these solvers fvOption is included. In icoFoam it is not. So use pimpleFoam. If you want to use icoFoam, do it like this: 1) you have to insert at the beginnig of icoFoam.C: #include "fvIOoptionList.H" 2) This is your new momentum equation: fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == fvOptions(U) ); solve(UEqn == -fvc::grad(p)); fvOptions.correct(U); 3) wmake myicoFoam ---------------------------- You can find a examplary fvOptions file at the /tutorials/incompressible/pimpleFoam/system Best regards Florian |
|
October 8, 2014, 06:07 |
|
#23 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
2) Now, I use the icoFoam to transform to my solver, I'll check your methods |
||
October 8, 2014, 09:28 |
|
#24 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 8, 2014, 09:43 |
|
#25 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
fvOptions is available for the first time in version OF2.2.0 That's the reason you can't find it. For your case, I would change the version to OF2.3.0 Released. Is this a possibilty?? Best regards Florian |
|
October 9, 2014, 01:11 |
|
#26 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
added some codes in the icoFoam.C file: the UEqn is like this: fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) == flowDirection*gradP ); if (momentumPredictor) { solve(UEqn == -fvc::grad(p)); } And before the runTime.write(), added the following codes: // 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)/rAU.weightedAverage(mesh.V()); U += flowDirection*rAU*gragPplus; gradP += gragPplus; Info<< "Uncorrected Ubar = " << magUbarStar.value() << tab << "pressure gradient = " << gradP.value() << endl; Of course, we have to add a createGradP.H file, it is in the channelFoam. Can you assess it? best wish! |
||
October 9, 2014, 03:25 |
|
#27 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Because I use OF2.1.1, when I wmake my solver, the error is there is no fvIOopitionList file or directory.
|
|
October 9, 2014, 04:18 |
|
#28 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
In my opinion you should change to OF2.3, and use pimpleFoam. Everything is done in OF2.3. Why do it again in an old version?? There will be more and more problems if you use OF2.1.1 Ok. The code I think the momentum predictor is wrong. There should be some correction term due to the gradientPSource. The rest looks reasonable for me. But it is a very complicated and not applicable way to do this. kind regards Florian |
|
October 9, 2014, 04:49 |
|
#29 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 9, 2014, 05:37 |
|
#30 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
in dnsFoam the random noise is wiener process. It is suitable to get turbulence alive. You need this, if you want to simualte DNS for domains without shearing (no wall). This works very well in my opinion. You could insert autocorrelated noise like an arima process, but no need to this. What do you mean with useless?? What do you want to do with the white noise?? kind regards Florian |
|
October 9, 2014, 05:47 |
|
#31 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 9, 2014, 06:01 |
|
#32 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
but for channel flow, you have walls. Turbulence should keep alive by the walls. If you do white noise on it, your results will be biased with the amount of white noise. You mentioned, that you want to simulate channel flow. In this case, the flow becomes laminar if your initial conditions do not fit and/or your grid is not fine enought (numerical diffusion). Init a case: Use boxTurb or for a first shot you can do it with setFields like this ---------------------------------- -> -> -> -> -> -> -> -> -> <- <- <- <- <- <- <- <- <- ---------------------------------- - channel wall -> velocity vectors here you have shear and after a few iterations your case will become turbulent. kind regards Florian |
|
October 9, 2014, 08:50 |
|
#33 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 9, 2014, 09:13 |
|
#34 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
this is not so difficult. You can find a channel flow simulation in the thesis of Eugen de Villiers "the potential of Large Eddy Simulation for the Modelling of wall bounded flows". This is a good thesis!! I would read it. Here it is done with LES, but from the methodology it is same you want to do. You can do it like this: 1) Use OF2.3.0 2) Solver pimpleFoam 3) fvOptions with pressureGradientExplicitSource as momentum Source 4) Initialize the case with boxTurb or perTurb 5) Averaging with function "fieldAverage" in controlDict That's the way you can do it, and this will work. kind regards Florian |
|
October 9, 2014, 09:51 |
|
#35 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 9, 2014, 09:59 |
|
#36 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
hi,
pimpleFoam has nothing to do with LES. With pimpleFoam you can do: LES, DNS, RANS, URANS, laminar I have done DNS with pimpleFoam and it worked fine best regards Florian Last edited by itchy; October 9, 2014 at 11:05. |
|
October 9, 2014, 22:43 |
|
#37 |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Is the pinpleFoam codes includes a part of white noise ?What's the requirement of DNS you do with pimpleFoam?
|
|
October 10, 2014, 02:33 |
|
#38 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
in pimpleFoam-code there is no white noise. You don't need white noise in a DNS if you have walls. If you have walls (pipewall, channelwall ...), the turbulence keep alive by the shear at the wall. Using white noise in DNS with walls is wrong. You only need white noise if you don't have walls (e.g homogeneous turbulence in a cube -> dnsFoam). I have done some DNS of pipeflow with pimpleFoam. pimpleFoam or pisoFoam are the right solvers for DNS in OpenFoam. If you want to do DNS of channel-flow with OpenFoam, the easiest way is: - OpenFoam 2.3.0 - pimpleFoam or pisoFoam - system/fvOptions -> pressureGradientExplicitSource - constant/turbulenceProperties -> simulationType laminar; (this means DNS) - system/controlDict -> fieldAverage; (you need this for meanflow statistics) - boxTurb or perTurb for init velocityfield kind regards Florian |
|
October 10, 2014, 09:29 |
|
#39 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
|
||
October 11, 2014, 04:29 |
|
#40 | |
Member
Jason Tan
Join Date: Sep 2014
Posts: 47
Rep Power: 12 |
Quote:
1、"constant/turbulenceProperties -> simulationType laminar; [I](this means DNS)", What do you mean "laminar"? Is the flow that we calculating is laminar? 2、Can you offer me the boxTurb or perTurb? I don't know where they are and How to use them. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
finding noise of flow by dns simulation | m2montazari | OpenFOAM Running, Solving & CFD | 0 | October 22, 2010 12:54 |
Boundary Layer Noise Source Model | Andrew | FLUENT | 0 | January 12, 2009 23:47 |
Turbo noise macro | Barri | CFX | 0 | May 21, 2008 10:26 |
what is the meaning of white noise | ztdep | Main CFD Forum | 5 | November 17, 2006 05:14 |
noise and turbulence | aim | Main CFD Forum | 4 | June 6, 2001 06:26 |