|
[Sponsors] |
August 18, 2023, 05:34 |
mesh refinement
|
#1 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7 |
Hi,
I have simulated flow over cylinder in Re=200 in openfoam, and I have used snappyHexMesh, but it looks there are sharp variations in velocity field in the regions that mesh switches from one level to another. I have attached my mesh and velocity contour for your consideration. Thanks in advance. Last edited by saeed jamshidi; August 19, 2023 at 02:00. |
|
August 18, 2023, 06:00 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,085
Rep Power: 26 |
Hello Saeed,
In paraView, try visualizing cell values rather than point values, to see if there is really an issue with the simulation. (see screenshot) Yann |
|
August 18, 2023, 07:30 |
|
#3 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7 |
Dear Yann, thank you for your response.
As you can see nothing has changed by visualizing cell values! |
|
August 18, 2023, 07:39 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,085
Rep Power: 26 |
OK then maybe you can have a look at your numerical setup in fvSolution and fvSchemes files.
|
|
August 18, 2023, 07:45 |
|
#5 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7 |
Everything looks good!
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default Gauss linear; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } fluxRequired { default no; p ; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2112 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { p { solver GAMG; smoother DICGaussSeidel; tolerance 1e-6; relTol 0.01; } pFinal { $p; relTol 0; } U { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-05; relTol 0.1; } UFinal { $U; relTol 0; } } PIMPLE { nNonOrthogonalCorrectors 0; nCorrectors 2; } // ************************************************************************* // |
|
August 21, 2023, 11:11 |
|
#6 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7 |
Hi,
I'm still looking for your opinion about the mentioned problem. thank you. |
|
August 21, 2023, 11:27 |
|
#7 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,085
Rep Power: 26 |
Hello Saeed,
Since the issues are located around the cell refinement transitions, I would tend to think you get this effect due to your numerical schemes setup. Your current setup is based on a tutorial using structured mesh (made with blockMesh) while you have now an unstructured mesh. I don't have a full setup to advise at the moment, but you can have a look to the tutorials and try other setup to see if it solves your issue. Let us know if you still get the same issue or if it helps changing schemes. Yann |
|
August 21, 2023, 11:37 |
|
#8 |
Senior Member
Saeed Jamshidi
Join Date: Aug 2019
Posts: 214
Rep Power: 7 |
Dear Yann, thank you for your response.
Yes, it is obvious that the problem is because of snappyHexMesh feature. when i tried blockMesh i didn't see such problem. Do you mean I should use simplefoam or pisoFoam tutorials? |
|
August 21, 2023, 12:02 |
|
#9 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,085
Rep Power: 26 |
I don't remember which solver you use, but you can check numerical schemes from the same solver you are using or other solvers too, if you pay attention to the differences between solvers.
For instance on divSchemes, we usually see common setup for div(phi,U) like Gauss upwind (1st Order) or Gauss linearUpwind (2nd order). There are some resources in the documentation. For instance on the divScheme example: https://doc.openfoam.com/2306/tools/...ence/example/# More generally: https://doc.openfoam.com/2306/quicks...discretisation This should lead you to plenty of examples for each operator. OpenFOAM offers tons of options for numerical setup, so playing around with it can be really time consuming, and this is why I was recommending to check some tutorials to have some examples to base your tests on. Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh sticking point | natty_king | OpenFOAM Meshing & Mesh Conversion | 11 | February 20, 2024 09:12 |
[snappyHexMesh] Celllevel does not satisfy 2:1 constraint | zippy | OpenFOAM Meshing & Mesh Conversion | 0 | January 3, 2023 12:47 |
[snappyHexMesh] Sphere tutorial - refined mesh fails | nikosb | OpenFOAM Meshing & Mesh Conversion | 0 | March 17, 2022 15:49 |
[snappyHexMesh] Edge Refinement | fracasce | OpenFOAM Meshing & Mesh Conversion | 3 | December 2, 2017 13:30 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 08:54 |