unsteady LES pisoFoam questions
Hi everyone! I am a graduate in CFD with little experience...
I use pisoFoam to do a DES(LES). It's certainly an unsteady three dimension case. I try to use simpleFoam to get a initial state of the flow and then change the simulation to a LES one. When running LES, I find the Initial residual of Ux and Uz is quite small and it didn't iterate at all, I don't think that's right, but the p still interate. does that mean I get a steady flow? Or is that because the grid I use is too coarse? My deltaT=1e-6, Uref=8m/s, and Re=2e5. One more question.. how do people usually do to check if the grid is good enough for LES? I paste some detail of my scheme blow, maybe someone can tell me whether the scheme I'm using is to dissipate for LES. and I also put what the monitor show... ddtSchemes { default backward; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss filteredLinear; div(phi,B) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; div(B) Gauss linear; div(R) Gauss linear; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; laplacian(nuEff,U) Gauss linear corrected; laplacian((1|A(U)),p) Gauss linear corrected; laplacian(DBEff,B) Gauss linear corrected; laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } Time = 0.030544 Courant Number mean: 0.000694429 max: 1.20379 DILUPBiCG: Solving for Ux, Initial residual = 2.18816e-07, Final residual = 2.18816e-07, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 1.07832e-06, Final residual = 1.05828e-11, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 7.56565e-07, Final residual = 7.56565e-07, No Iterations 0 GAMGPCG: Solving for p, Initial residual = 0.000125884, Final residual = 5.7209e-06, No Iterations 3 time step continuity errors : sum local = 7.56596e-15, global = -2.91722e-16, cumulative = -5.83468e-13 GAMGPCG: Solving for p, Initial residual = 3.95052e-05, Final residual = 2.33747e-06, No Iterations 1 time step continuity errors : sum local = 3.09128e-15, global = -3.06279e-18, cumulative = -5.83471e-13 smoothSolver: Solving for nuTilda, Initial residual = 5.36636e-07, Final residual = 1.36181e-08, No Iterations 1 ExecutionTime = 15477.9 s ClockTime = 15525 s Calculating averages forceCoeffs output: Cd = 0.0651411 Cl = 0.488558 Cm = -0.382946 Thanks in advance. Best Regards Garrison |
Quote:
Quote:
The numerics looks fine. Best, |
Thank you Alberto!
Quote:
and if I start with a steady-state solution, you mean the LES/DES will take an extremely long time to develop the structures? Best Regards |
Hi Garrison,
there are various approaches in the literature to generate a perturbed flow field that can be used as initial condition. Unfortunately these apply to relatively simple flows. If you have a complex geometry, the easy way is to initialize the velocity field with a random field based on your mean velocity and fluctuations (which change locally). Hopefully this will help the flow develop quickly. A more sophisticated alternative is to use synthetic turbulence at inlet BC's, if you have time to implement it into your code. About your second question: yes, generating a fully developed turbulent flow with LES can be very time consuming. That's why it is advisable to start from a flow already containing turbulent structures (you can use the flow field obtained from previous simulations). Best, |
Once again thank you Alberto.
So can I use the turbulentInlet as the inlet B.C., can it function as the synthetic turbulence B.C.? In turbulentInlet B.C., One can give the velocity a fluctuation I think, type turbulentInlet; fluctuationScale (0.01 0.01 0); referenceField uniform (8 0 0); value uniform (8 0 0); Best Regards |
Unfortunately turbulentInlet only adds noise to the mean value. It might help (in other words, try), but it is not a true synthetic turbulence generator, where the procedure aims at reproducing at least some of the features of the turbulent flow.
To my knowledge, there is no synthetic turbulent BC available in OpenFOAM, however some user on this forum implemented some of them. Maybe a search will give you more information. Best, |
Thank you Alberto, you really helped me lot.
I'll search more. |
Albeto plz help me
Hi,Alberto. I'm working with openFoam 2.0.1,and have a problem with solver (interPhaseChangeFoam) in multiphase solvers. my friends tell me, you can help me. I have add (turbulence kinetic Energy or k ) in a part of this solver. first: added: -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ in option. and then: added //.................................................. .....changed // Construct incompressible turbulence model autoPtr<incompressible::RASModel> turbulence ( incompressible::RASModel::New(U, phi, twoPhaseProperties()) ); //.................................................. .....changed in creatField. and then: added #include "RASModel.H" and: //.................................................. ............. volScalarField turbKinEnergy = turbulence().k(); //turbKinEnergy = turbulence().k(); volScalarField turbDisEnergy = turbulence().epsilon(); in this and turbkinEnergy=k //.................................................. ............. in myinterPhaseChangeFoam.c and wmake is ok!!! but I want in this solver in directory: /run/myinterPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.c I added #include "RASModel.H" in it and: Foam::tmp<Foam::volScalarField> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff ( const volScalarField& p ) const { volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); volScalarField rho ( limitedAlpha1*rho1() + (scalar(1) - limitedAlpha1)*rho2() ); return //......I want to change it( <<k>> turbulence multiple in it): (3*rho1()*rho2())*sqrt(2/(3*rho1()))*k() *rRb(limitedAlpha1)/(rho*sqrt(mag(p - pSat()) + 0.01*pSat())); //.................................................. ...... } dont successful wmake, and seen(was not declared ): I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/SchnerrSauer.o phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C: In member function â€کFoam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff(const Foam::volScalarField&) const’: phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:113: error: k() was not declared in this scope make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1 please help me alberto. |
The interphaseChangeFoam solver has generic turbulent implementation by itself in OpenFOAM 2.1.x. Use the latest version.
P.S. Please do not send personal emails to ask technical questions you already posted on the forum. |
plz give me your interPhaseChangeFoam file
hi alberto.Thanks for your answer.
I dont have good internet,please give me interPhaseChangeFoam file from your openFoam 2.1.x to me. Thanks a lot |
You need the whole OpenFOAM 2.1.x to be able to use the solver. Probably the best way for you to get it is to use the git repository.
|
Plz help me!!
Hi Dear Alberto.
I used openFoam 2.1.x for solver interPhaseChangeFoam but my problem is not ok!!! my prob is: I have add (turbulence kinetic Energy or k ) in a part of this solver. I want in this solver in directory: /run/myinterPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.c I added #include "RASModel.H" in it and: Foam::tmp<Foam::volScalarField> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff ( const volScalarField& p ) const { volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); volScalarField rho ( limitedAlpha1*rho1() + (scalar(1) - limitedAlpha1)*rho2() ); return //......I want to change it( <<k>> turbulence multiple in it): (3*rho1()*rho2())*sqrt(2/(3*rho1()))*k() *rRb(limitedAlpha1)/(rho*sqrt(mag(p - pSat()) + 0.01*pSat())); //.................................................. ...... } dont successful wmake, and seen(was not declared ): I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/SchnerrSauer.o phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C: In member function â€کFoam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff(const Foam::volScalarField&) const’: phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:113: error: k() was not declared in this scope make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1 please help me alberto. |
Quote:
Note that #include "turbulenceModel.H" is already in the code :-) Best, |
Hi all!! I see you have a solid background in OpenFOAM and turbulent cases, so I hope you coulp hand me on. The point is I'm stucked with a flow past a bluff body (ahmed model) but I don't get an unsteady wake using pisoFoam. I have a structured mesh with a finer region in the near wake zone, CFL<0.5, keRNG model, etc... I'm running pisoFoam from a simpleFoam solution, is this the problem? What's the way to introduce a pertubartion to break the symmetry or something like that? I attach my fvSchemes...
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default backward;//CrankNicholson 0.5;//steadyState; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; // grad(U) cellLimited Gauss linear 1; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 1;//vanLeerV;//linearUpwindV Gauss linear; div(phi,k) Gauss limitedLinear 1;//upwind; div(phi,epsilon) Gauss limitedLinear 1;//upwind; div((nuEff*dev(grad(U).T()))) Gauss linear; } laplacianSchemes { default none; 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(DnuTildaEff) Gauss linear corrected; laplacian(1,p) Gauss linear corrected; // default Gauss linear corrected; // default Gauss linear limited 0.5; // default Gauss linear limited 0.333; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; } Thanks!! Best, |
All times are GMT -4. The time now is 15:29. |