|
[Sponsors] |
November 27, 2014, 06:25 |
simpleFoam + cyclic pipe = unstable?
|
#1 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hi all,
I usually use profile for U,k,epsilon,omega from cyclic pipe simulations as input for my actual case. Unfortunately, I don't get them converged in openFOAM. So the setup is a short pipe that I mesh with ICEM: grid.png After loading the mesh to openFoam (fluent3dMeshtoFoam), I change the constant/polyMesh/boundary file to: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 3 ( PER_PIPE_INLET { type cyclic; nFaces 3060; startFace 170068; neighbourPatch PER_PIPE_OUTLET; } PER_PIPE_OUTLET { type cyclic; nFaces 3060; startFace 173128; neighbourPatch PER_PIPE_INLET; } PER_PIPE_WALL { type wall; inGroups 1(wall); nFaces 2584; startFace 176188; } ) // ************************************************************************* // Code:
PER_PIPE_INLET { type cyclic; } PER_PIPE_OUTLET { type cyclic; } 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 fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // momentumSource { type pressureGradientExplicitSource; active on; //on/off switch selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { fieldNames (U); Ubar ( 70 0 0 ); } } // ************************************************************************* // This is how a typical residual plot looks like: pressure.jpeg So I get these crazy jumps in residuals and no smooth convergence at all. However, profiles of the solution look reasonable (here "U"): U.png What I already tried:
Now: Can anyone please help me?
__________________
The skeleton ran out of shampoo in the shower. |
|
November 27, 2014, 11:06 |
|
#2 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
With the mappedPatch boundary I get pretty nice convergence, just as I expected:
pressure.jpeg
__________________
The skeleton ran out of shampoo in the shower. |
|
November 27, 2014, 13:05 |
|
#3 |
Senior Member
|
Hi,
maybe I my guess on dimensions of the tube is not quite correct. Here's the case (attached to the message) with cyclic inlet/outlet and it seems to be converging (though rather slow). I've stopped simulation around 900th iteration (decided to reduce relTol of linear solvers and it seems to increase convergence rate), residuals evolution plot is also attached to the message. As usual, mesh is in GEO format, so you need Gmsh to run the case. |
|
November 27, 2014, 16:26 |
|
#4 |
Senior Member
|
Though it seems, simulation got stuck at pressure residuals of order 1e-2.
|
|
November 28, 2014, 07:13 |
|
#5 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Right, it's always like "Yeahaaa it works!!! .... well... no..."
__________________
The skeleton ran out of shampoo in the shower. |
|
November 28, 2014, 07:42 |
|
#6 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi Philipp,
I have the same problem with pipe. When I do the simulation with LES it works fine, but with RANS I don't get a convergent case. For RANS I tried pimpleFoam and simpleFoam. The results looks not so bad (but not good enough), but the residuals are far from good. How do you use mappedPatch boundary for pipeflow??? Do you use it with fvOptions?? kind regard Florian |
|
December 1, 2014, 04:53 |
|
#7 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
Hi,
I changed the boundary file to Code:
Inlet { type mappedPatch; samplePatch Outlet; sampleMode nearestPatchFace; offsetMode uniform; offset (0 0 0.075); nFaces 6180; startFace 3689820; } Outlet { type patch; nFaces 6180; startFace 3696000; } Now, in my "0" directory I made some changes: Velocity: Code:
Inlet { type mapped; value uniform (0 0 9.2); setAverage true; average (0 0 9.2); } Outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } pressure: Code:
Inlet { type zeroGradient; } Outlet { type fixedValue; value uniform 0; } Code:
Inlet { type mapped; value uniform 1e-12; setAverage false; average 1e-12; } Outlet { type inletOutlet; inletValue uniform 1e-12; value uniform 1e-12; } Philipp.
__________________
The skeleton ran out of shampoo in the shower. |
|
December 1, 2014, 05:56 |
|
#8 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi Philipp,
thx for your help. k-epsilon works now. I will test some other models (k-omega, v2f ...). I am a little bit confused why the cyclic bc + fvOptions does not work. I have done it with LES and everything works, but for RANS no chance. kind regards Florian |
|
December 1, 2014, 06:17 |
|
#9 |
Senior Member
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 27 |
I read a comment in this forum (don't know where) where someone states, that he thinks SIMPLE needs some kind of additional correction to work with cyclic. I don't know if that is true, but if PIMPLE / PISO works and SIMPLE doesn't it is at least some good idea...
__________________
The skeleton ran out of shampoo in the shower. |
|
December 1, 2014, 06:28 |
|
#10 |
Member
Florian Ries
Join Date: Feb 2014
Location: Darmstadt, Germany
Posts: 88
Rep Power: 12 |
Hi,
I have tested it with piso and pimple. The convergence was better but not good. With PISO/Pimple you can do some pseudo-timestepping. This improves your convergence. This works as well with the mapped bc. I will give it a shot and compare the rate of convergence. I can live with your solution (using mapped boundary + SIMPLE). kind regards Florian |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to setup cyclic BCs in simpleFOAM | hhuang84 | OpenFOAM Running, Solving & CFD | 14 | December 8, 2016 12:39 |
Possible createPatch/createBaffles bug? | simpomann | OpenFOAM Bugs | 2 | July 15, 2014 08:07 |
Problems with Cyclic & init. BCs for turbulent (k-eps) pipe flow | florian_krause | OpenFOAM | 3 | December 1, 2012 05:11 |
CYCLIC BC in pipe flows | matthias | OpenFOAM | 0 | November 5, 2009 11:52 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |