|
[Sponsors] |
![]() |
![]() |
#1 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
Dear all,
I'm coming to you because I'm facing a boundary layer problem on a simulation... I'm simulating a body in a flow with an inlet velocity Ux=5m/s. But right from the first iterations, the results close to the body gets strange... This can be seen on the attached pictures. One can see that the velocity is 0 on the wall, but gets much bigger around the first cell, and then decreases again. And because of this my simulation blows up after a few iterations. What I've done :
I'm running out of ideas, so if anyone has any hint it would be very appreciated ! Regards, Daniel |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
Daniel, what do you need, steady-state or unsteady solutions?
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
Hi, thanks for the quick reply.
In the end I need an unsteady simulation with moving mesh (with pimpleDyMFoam), but the error occurs for all cases. I am currently trying with a steady-state simulation to check the mesh convergence (minimum mesh size to have a mesh-independent solution). |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
That means simpleFoam? Then post the log output of that until it becomes ugly...
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
Yes I'm using simpleFoam.
Here a sample of the log : Code:
Time = 319 smoothSolver: Solving for Ux, Initial residual = 0.057221157, Final residual = 3.568287e-06, No Iterations 16 smoothSolver: Solving for Uy, Initial residual = 0.063087545, Final residual = 4.5084555e-06, No Iterations 18 GAMG: Solving for p, Initial residual = 0.0037987384, Final residual = 2.7417897e-07, No Iterations 23 GAMG: Solving for p, Initial residual = 0.00020201867, Final residual = 9.5084443e-08, No Iterations 12 time step continuity errors : sum local = 1.6112304, global = -0.03484718, cumulative = -0.77715832 smoothSolver: Solving for nuTilda, Initial residual = 0.046411558, Final residual = 4.2056708e-06, No Iterations 3 ExecutionTime = 870.68 s ClockTime = 886 s forces forcesPaddle0 output: sum of forces: pressure : (0 0 0) viscous : (2.6813238e+13 5.6435289e+11 -1.4963997) porous : (0 0 0) sum of moments: pressure : (0 0 0) viscous : (-2.8217644e+11 1.3406619e+13 -2.6081707e+13) porous : (0 0 0) forceCoeffs forceCoeffsPaddle0 output: Cm = -5.2163414e+11 Cd = 5.3626477e+11 Cl = 1.1287058e+10 Cl(f) = -5.1599061e+11 Cl(r) = 5.2727767e+11 forceCoeffs forceCoeffsPaddle1 output: Cm = -96904.785 Cd = -66422.036 Cl = 297601.6 Cl(f) = 51896.014 Cl(r) = 245705.58 Time = 320 smoothSolver: Solving for Ux, Initial residual = 0.052995367, Final residual = 4.8433206e-06, No Iterations 15 smoothSolver: Solving for Uy, Initial residual = 0.062183782, Final residual = 5.6252108e-06, No Iterations 17 GAMG: Solving for p, Initial residual = 0.0037642096, Final residual = 3.4332139e-07, No Iterations 21 GAMG: Solving for p, Initial residual = 0.00017745207, Final residual = 5.9287776e-08, No Iterations 12 time step continuity errors : sum local = 1.085192, global = -0.02221701, cumulative = -0.79937533 smoothSolver: Solving for nuTilda, Initial residual = 0.061514173, Final residual = 3.6499883e-06, No Iterations 3 ExecutionTime = 874.44 s ClockTime = 890 s forces forcesPaddle0 output: sum of forces: pressure : (0 0 0) viscous : (3.1377491e+13 6.8424339e+11 -1.8496672) porous : (0 0 0) sum of moments: pressure : (0 0 0) viscous : (-3.421217e+11 1.5688745e+13 -3.0631529e+13) porous : (0 0 0) forceCoeffs forceCoeffsPaddle0 output: Cm = -6.1263058e+11 Cd = 6.2754982e+11 Cl = 1.3684868e+10 Cl(f) = -6.0578814e+11 Cl(r) = 6.1947301e+11 forceCoeffs forceCoeffsPaddle1 output: Cm = -114884.08 Cd = -78823.833 Cl = 351014.44 Cl(f) = 60623.139 Cl(r) = 290391.3 Time = 321 And as I said, this simulation works just fine when the mesh on the BL is finer. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
1) In my experience your linear solvers take too many iterations in each outer (SIMPLE) iteration. Did you set relTol to 1e-4? This is normally not needed in SIMPLE. But fixing this will make your solver only faster... not better
![]() 2) Can you post checkMesh output and fvSchemes? What about your boundary conditions? Are you sure, they are correct? If not, you can post them, too.
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
I'm rather confident about the boundary conditions. After trying many of them, the only one working are those from the motorBike example (with Spalart-Allmaras model).
The problem occurs with different schemes (accurate as well as diffusive schemes). Same with the tolerances. I've tried with maxIter=1000 (tolerance and relTol = 0) just for fun, and it still doesn't work. To sum up, the problem appears as soon as I increase the cells size around the body. I understand this could cause troubles with a turbulent case without using a wall function, but it also causes troubles in laminar... Concerning the wall function, as far as I know I just have to specify the wall function in 0/nut, right ? Are the initial conditions as posted here ok considering I'm using a wall function ? nut Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object nut; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; boundaryField { Inlet { type calculated; value uniform 0; } Outlet { type calculated; value uniform 0; } upperSym { type symmetryPlane; value uniform 0; } lowerSym { type symmetryPlane; value uniform 0; } paddle0 { type nutUSpaldingWallFunction; value uniform 0; } paddle1 { type nutUSpaldingWallFunction; value uniform 0; } AMI_P0S { type cyclicAMI; value $internalField; } AMI_P1S { type cyclicAMI; value $internalField; } AMI_SP0 { type cyclicAMI; value $internalField; } AMI_SP1 { type cyclicAMI; value $internalField; } AMI_SF { type cyclicAMI; value $internalField; } AMI_FS { type cyclicAMI; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object nuTilda; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0.05; //internalField uniform 0.05; boundaryField { Inlet { type fixedValue; value uniform 0.05; } Outlet { type inletOutlet; inletValue uniform 0.05; value uniform 0.05; } upperSym { type symmetryPlane; } lowerSym { type symmetryPlane; } paddle0 { type fixedValue; value uniform 0; } paddle1 { type fixedValue; value uniform 0; } AMI_P0S { type cyclicAMI; value $internalField; } AMI_P1S { type cyclicAMI; value $internalField; } AMI_SP0 { type cyclicAMI; value $internalField; } AMI_SP1 { type cyclicAMI; value $internalField; } AMI_SF { type cyclicAMI; value $internalField; } AMI_FS { type cyclicAMI; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (5 0 0); boundaryField { Inlet { type fixedValue; value uniform (5 0 0); } Outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (5 0 0); } upperSym { type symmetryPlane; } lowerSym { type symmetryPlane; } paddle0 { type fixedValue; value uniform (0 0 0); } paddle1 { type fixedValue; value uniform (0 0 0); } AMI_P0S { type cyclicAMI; value $internalField; } AMI_P1S { type cyclicAMI; value $internalField; } AMI_SP0 { type cyclicAMI; value $internalField; } AMI_SP1 { type cyclicAMI; value $internalField; } AMI_SF { type cyclicAMI; value $internalField; } AMI_FS { type cyclicAMI; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { Inlet { type zeroGradient; } Outlet { type fixedValue; value uniform 0; } upperSym { type symmetryPlane; } lowerSym { type symmetryPlane; } paddle0 { type fixedValue; value uniform 0; } paddle1 { type fixedValue; value uniform 0; } AMI_P0S { type cyclicAMI; value $internalField; } AMI_P1S { type cyclicAMI; value $internalField; } AMI_SP0 { type cyclicAMI; value $internalField; } AMI_SP1 { type cyclicAMI; value $internalField; } AMI_SF { type cyclicAMI; value $internalField; } AMI_FS { type cyclicAMI; value $internalField; } } // ************************************************************************* // |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
paddle0 and paddle1 are walls? If so, why did you set pressure to zero and not zerogradient?
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
Oh my god............
I hadn't noticed, it the same for all simulations I've run......... I guess I'm sometimes being confused with all the files... This could definitely create problems... I change this and I keep you posted. Thank you for seeing this ! |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
And concerning the wall function definition, do you agree on what I've put ?
|
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
I don't use SA-model but the airfoil2d tutorial uses it the same way.
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
Ok, that was the problem... Everything works just fine now !
I would never have thought the error could come from initial conditions... Thanks a lot for this, you saved me many hours of work ! Regards, Daniel |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
Maybe just a typo, but it should be "boundary" not "initial" conditions in your last post.
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Member
daniel fernex
Join Date: Oct 2014
Location: Braunschweig, Germany
Posts: 36
Rep Power: 12 ![]() |
You don't miss anything
![]() It's boundary condition indeed. |
|
![]() |
![]() |
![]() |
![]() |
#15 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 ![]() |
Now you can tune your solver settings to get rid of these horrible iterations. If you need any consecutive help or are not sure just post again.
__________________
The skeleton ran out of shampoo in the shower. |
|
![]() |
![]() |
![]() |
Tags |
boundary layer, diverging, openfoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
[snappyHexMesh] Snappy creates strange cells far away from boundary | vainilreb | OpenFOAM Meshing & Mesh Conversion | 3 | December 16, 2020 05:11 |
[snappyHexMesh] snappyHexMesh Boundary Layer at Corner | panpanzhong | OpenFOAM Meshing & Mesh Conversion | 5 | July 3, 2018 05:53 |
Divide Prismatic Boundary Layer Mesh causes overlapping faces | SilentRunner42 | enGrid | 4 | May 4, 2015 03:37 |
[GAMBIT] 3D boundary layer and meshing problem in GAMBIT 2.4.6 | prashanthreddyh | ANSYS Meshing & Geometry | 1 | December 20, 2011 00:35 |