|
[Sponsors] |
LES: dynSmagorinsky does not match analytical y+/u+ profile |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Dear Foamers,
I've simulated an LES canal flow and used dynamicSmagorinsky (by Alberto Pasquale) with vanDriest damping function. The dimensionless profiles y+/u+ don't match the analytical log-law. How can I improve these results? The finer mesh gives a worse result. Why? Mesh resolution: Case510: ![]() ![]() ![]() Case511: ![]() ![]() ![]() I expected this resolution to be o.k. for LES. Does dynamicSmagorinsky underestimate ![]() Is it correct to use vanDriest damping in combination with a dynamic SGS model? Best regards, Aylalisa |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 13 ![]() |
Hi,
first: In dynamic Smagorinsky you use Germano procedure to estimate the Smagorinsky constant. With this you get the ył-law of the wall for nuSgs (that is what you want). If you use van Driest with dynamic procedure you get unphyisical behaviour for nuSgs at the wall. So do never use van Driest with dynSmagorinsky second: post your case, then we can help you. Without your case file it is nearly impossible to find the error. kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 13 ![]() |
Hi again,
how do you calculate tau_w??? Do not calculate tau_w with the velocity gradient near the wall, because you use a inner variable that depends on your variable! If you do this, then OF (and any other solver) will underpredict tau_w. A better way is calculating tau_w or u_tau using the pressure gradient (fvOptions). What kind of LES do you solve??? Near wall resolution LES (NWR) or near wall modelling LES (NWM). If you do NWR, then your y+ is to high. kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#4 | ||||
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Florian,
thanks for your answer, sorry for late reply! Quote:
uTau.boundaryField()[patchi] = sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ); Is the inner variable "nuEff"? The other way I'm aware of is to compute tau_w with the Stress Tensor Beff: tau_w = unit_vector & Beff I've expected that both methods should give the same result. How can I use fvOptions file for computation of tau_w? I've assumed that this file allows the definition of source terms (if necessary), to avoid additional coding. I've only added a momentumSource of type pressureGradientExplicitSource in fvOptions to keep up the flow. Quote:
![]() ![]() ![]() ![]() Additionally I've chosen nutUSpaldingWallFunction as wall function. For NWR it should not be necessary but could it cause a problem? Quote:
Quote:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { //default steadyState; //default Euler; default backward; } d2dt2Schemes { } gradSchemes { default Gauss linear; //neu: grad(nuTilda) cellLimited Gauss linear 1; grad(U) cellLimited Gauss linear 1; } divSchemes { default none; //div(phi,U) bounded Gauss upwind; //div(phi,U) bounded Gauss upwind; div(phi,U) Gauss LUST unlimitedGrad(U); //div(phi,k) bounded Gauss upwind; div(phi,k) Gauss limitedLinear 1; div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; div(R) Gauss linear; div((nuEff*dev(T(grad(U))))) Gauss linear; //neu div(phi,nuTilda) Gauss limitedLinear 1; } laplacianSchemes { default Gauss linear limited corrected 0.33; //laplacian(nuEff,U) Gauss linear corrected; //laplacian((1|A(U)),p) Gauss linear corrected; //laplacian(DkEff,k) Gauss linear corrected; //laplacian(DepsilonEff,epsilon) Gauss linear corrected; //laplacian(DREff,R) Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { //default corrected; default limited corrected 0.33; } fluxRequired { default no; p ; } div(phi,epsilon) bounded Gauss upwind; div(phi,R) bounded Gauss upwind; Could that cause additional numerical dissipation in my simulation? Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; tolerance 1e-6; relTol 0.1; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 50;//10; agglomerator faceAreaPair; mergeLevels 1; }; pFinal { solver GAMG; tolerance 1e-6; relTol 0; smoother GaussSeidel; //smoother DICGaussSeidel; nPreSweeps 0; nPostSweeps 2; cacheAgglomeration true; nCellsInCoarsestLevel 50;//10; agglomerator faceAreaPair; mergeLevels 1; }; "(U|k)" { solver PBiCG; preconditioner DILU; //solver smoothSolver; //smoother symGaussSeidel; tolerance 1e-08; relTol 0; }; "(U|k)Final" { $U; tolerance 1e-08; relTol 0; }; B { solver PBiCG; preconditioner DILU; tolerance 1e-07; relTol 0; }; /* nuTilda { solver PBiCG; preconditioner DILU; tolerance 1e-07; relTol 0; }; */ } PISO { nCorrectors 2; nNonOrthogonalCorrectors 1; } PIMPLE { //nOuterCorrectors 1; nCorrectors 2; nNonOrthogonalCorrectors 1; pRefCell 0; pRefValue 0; } relaxationFactors { "U.*" 1; "nuTilda.*" 1; } // ************************************************************************* // Lisa |
|||||
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 13 ![]() |
Hi Lisa,
uTau: The inner variable is the velocity (mean velocity). In your first approach you use U to calculate utau. And then you use utau to scale U. With this you get uncertainties in utau. Not a good way. Another possibility is to calculate utau with the gradientP. You can extract gradP of your logfile "pressure gradient = ..." and take the mean of it. Then for channel-flow you get: utau = sqrt(0.5*h*gradP), where h is the height of your channel. Grid-resolution: your grid should be fine enough. Sorry, I misunderstood your specifications. fvSchemes: I would use Gauss linear, Gauss linear corrected. But this should not change so much. fvSolution: Do you solve B and k???? I don't know the dynSmagorinsky-code of Alberto Pasquale. You should insert a residual control, smth. like this: PIMPLE { nOuterCorrectors 10; nCorrectors 1; nNonOrthogonalCorrectors 3; pRefCell 1001; pRefValue 0; residualControl { U { relTol 0; tolerance 1e-6; } p { relTol 0; tolerance 1e-6; } } } Is your case statistical stationary when you begin your averaging?? Is your avaraging long enough?? Do you have proper reference data to check accuracy?? I have never done a LES for channel, only for pipe (but with my own dynSmagorinsky-code). If you don't get it managed with the dynSmagorinsky-code of Alberto Pasquale I can send you my code. Best regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Florian,
uTau: I will check and see how curves change! Grid-resolution: Especially the fact, that the coarser grid of both simulations gives seemingly the better result, is astonishing. Could this behaviour point to the problem? fvSchemes/fvSolution: I'll change and try out. statistical stationary: I start averaging after 150 flows through time. Averaging is done for 200 flow throughs. Quote:
I'll try out all these changes and start simulations again. It will take some time, but I'll post results! If it does not work it would be great if I can try your code. Thank's! Best regards, Lisa |
||
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 13 ![]() |
Hi Lisa,
averaging time that the flow passes 200 times the domain should be enough for a stable mean value. For the variances pherhaps not. I mean some experimental data of channelflow?? Is there some abnormal behaviour concerning log-law for channelflow as a function of Re?? In pipeflow it is. With proper reference data I mean some experimental data of exactly your problem?? e.g experimental data of u+ vs. y+ . Do you have some result?? kind regards Florian |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Florian,
I was busy at work and completely lag my ToDo list. Tomorrow I can start simulation. It will take some time because I still work on a stand-alone work station. If u ![]() proper reference data: I've been searching the net and found data sources like http://torroja.dmt.upm.es/turbdata/agard/ ()and http://turbulence.ices.utexas.edu/da.../chan590/pdfs/ . I am not yet clear about how to use this data. These sources contain DNS canal data comparable to my case (Re ![]() I've read papers and literature like the work from Jochen Fröhlich who shows y+/u+ for canal flow (Re ![]() To see if the simulation converges a statistical steady state I've plotted the resolved kinetic energy and the turbulent kinetic energy (case511, other is very similar --> attached pic) for start phase and averaging phase. Additionally you see the u ![]() ![]() ![]() u ![]() wallShearStress.C for RANS computes wSS like Code:
wallShearStress.boundaryField()[patchI] = ( -mesh.Sf().boundaryField()[patchI] /mesh.magSf().boundaryField()[patchI] ) & Reff.boundaryField()[patchI]; ![]() ![]() Does B contain the sgs stresses computed by the chosen LES model? Where is the difference between tensor fields B and UPrime2Mean? answer to last question: B -> unresolved stresses (sgs model), UPrime2Mean (var(U)) -> resolved normal stresses ??? Best regards, Lisa Last edited by aylalisa; October 13, 2014 at 04:01. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Hi, if a turbulence model is used, the profile may goes upon the analytical profile. I did a similar case with LES before and got similar results as yours. If no turbulence model is used ,then they are commute.
I have a question about the way to calculate the wallShearStress tau_wall=rho*nu*gradU; while in the wallShearStressLES, it's calculated as unit_wallnormal &Beff In my case of a 90 bend duct, the two results deviates about 30-100 times, what's your opinion about that? |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Dear huangxianbei,
thank's for your hint according to the turbulence model! My function for computing ![]() ![]() Problems: 1) how to compute ![]() ![]() (-Sfp/magSfp) & Beffp should give an vector. I thought, multiplied by the cell face area should give the desired shear stress ![]() 2) how to compute ![]() ![]() Dividing it by ![]() I haven't solved it yet. Best regards, Aylalisa |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Quote:
If the fluid is incompressible, tau_wall should divide rho to get the right value. However, in my case, I compared the results with experiment's, the way that tau_wall=rho*nu*gradU is in the same order as the experiment's, while the wallShearStress didn't. I don't know why ![]() Xianbei |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Xianbei,
sorry that I ask again but I'd like to be sure to understand you correctly. You compute ![]() ![]() u ![]() ![]() The problem is that ![]() ![]() How do you compute ![]() Aylalisa |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Quote:
I use the wallShearStressLES http://www.cfd-online.com/Forums/ope...ulation-2.html You can see from the code that it's computed using unit_wallnormal &Beff similar to the case in RANS with wallShearStress utility Xianbei |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi huangxianbei,
I've computed ![]() ![]() ![]() ![]() ![]() ![]() ![]() I get different results if I compute ![]() Code:
wSS_gradU.boundaryField()[patchi] = nuEff.boundaryField()[patchi] * mag(U.boundaryField()[patchi].snGrad()); Code:
ssp = (-Sfp/magSfp) & Reffp ![]() I don't know how the values develop but these are the values in the beginning of calculation: wSS (snGrad()) = 0.00103336 wSS (devReff()) = 0.000889885 Though I'd like to know why there is a difference, because ![]() Code:
uTauLES uTauLES output: patch bottom u_tau : min = 0.0135431, max = 0.0430144, average = 0.0315161 utau_Beff_LES utau_Beff_LES output: patch bottom u_tau : min = 0.0135416, max = 0.0430147, average = 0.0315165 |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Quote:
Why it seems that Reff can be used to calculate the LES case? As you wrote in the thread, you use Reff. Isn't it a RANS variant instead of LES? The latter 2 results are close enough, is it the same case as the former? Xianbei |
|
![]() |
![]() |
![]() |
![]() |
#17 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Xianbei,
to figure out ![]() I've choosen one of the turbulence models, for example oneEqEddy.C. Check the source code, line 65 --> Function call GenEddyVisc() Then check the file GenEddyVisc.C (in my case for incompressible fluids), line 92: This line seems to be ![]() ![]() ![]() ![]() ![]() Aylalisa |
|
![]() |
![]() |
![]() |
![]() |
#18 | |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Quote:
Thank you for your explaination. I'm a little confused about the Reff and Beff, is there any difference between them? Xianbei |
||
![]() |
![]() |
![]() |
![]() |
#19 | ||
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 14 ![]() |
Hi Xianbei,
Quote:
![]() Quote:
I think: defReff() extracts a shear stress tensor field computed with nuEff, without the isotropic part (I think you could also call it hydrostatic part). Since we want to compute the wallShearStress we neglect the isotropic part of the tensor but need to multiply with nuEff. B() seems to be: ![]() ![]() ![]() The isotropic part is computed from the kinetic energy ( ![]() ![]() Aylalisa |
|||
![]() |
![]() |
![]() |
![]() |
#20 | |
Senior Member
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 303
Rep Power: 14 ![]() |
Quote:
Sorry,that's actually not a LES case, but a case without turbulence model, say "under-resolved DNS" or something else. According to your discription, it may be right to compute wallshearstress using B() instead of defReff. While for incompressible flow, dev_Sij=Sij as dui/dxi=0. So in that case, defReff can be used. Am I right? Xianbei |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unsteady Boundary Profile with data file | Arianna | FLUENT | 34 | July 29, 2019 16:35 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 02:01 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 22:50 |
LES Near-Wall Velocity Profile | Alex May | FLUENT | 2 | June 12, 2008 12:36 |
What's wrong with my RMS profile in LES | Jiang Ning | FLUENT | 0 | March 31, 2005 05:30 |