CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

simpleFoam diverges

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 17, 2014, 01:19
Default simpleFoam diverges
  #1
New Member
 
ILAM
Join Date: May 2012
Location: chennai, INDIA
Posts: 20
Rep Power: 13
dreamilam is on a distinguished road
Dear foamers,

I am trying to simulate an external aero case using simplefoam but without success.
It runs fine till 150 iterations or so. After that it starts diverging.

1. Tried switching turbulence off - didn't help
2. used very low relaxation factors for p and U - didn't help either
3. changed the solver for p from GAMG to PCG and for U from smoothsolver to PBiCG - No difference.
4. Deleted a few problematic cells just by visual inspection - No difference
5. Played around with the boundary conditions also.

can anybody help?

I am attaching my checkMesh results and other files
Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.0.1
Exec : checkMesh
Date : Jan 14 2014
Time : 15:36:03
Host : ###
PID : 13033
Case : ###
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 3187653
faces: 8793754
internal faces: 8421668
cells: 2823527
boundary patches: 7
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 2547951
prisms: 46259
wedges: 6148
pyramids: 0
tet wedges: 10862
tetrahedra: 79
polyhedra: 212228

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
frontAndBack 13780 14148 ok (non-closed singly connected)
inlet 4134 4266 ok (non-closed singly connected)
outlet 4134 4266 ok (non-closed singly connected)
lowerWall 28554 29231 ok (non-closed singly connected)
upperWall 10140 10349 ok (non-closed singly connected)
body 311263 358013 multiply connected (shared edge)
oldInternalFaces 81 137 ok (non-closed singly connected)
<<Writing 154 conflicting points to set nonManifoldPoints

Checking geometry...
Overall domain bounding box (-10 -15 -0.367733) (40 15 20)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (1.40214e-16 -1.55299e-16 4.47086e-15) OK.
Max cell openness = 8.96162e-16 OK.
Max aspect ratio = 52.1007 OK.
Minumum face area = 4.33694e-07. Maximum face area = 0.156207. Face area magnitudes OK.
Min volume = 1.10242e-09. Max volume = 0.0585742. Total volume = 30551.4. Cell volumes OK.
Mesh non-orthogonality Max: 64.9868 average: 7.86377
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 3.93546 OK.

Mesh OK.

End
k boundary conditions
Quote:
internalField uniform 0.153067;

boundaryField
{
frontAndBack
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform 0.153067;
}
outlet
{
type inletOutlet;
inletValue uniform 0.153067;
value uniform 0.153067;
}
lowerWall
{
type kqRWallFunction;
value uniform 0.153067;
}
upperWall
{
type symmetryPlane;
}
body
{
type kqRWallFunction;
value uniform 0.153067;
}
oldInternalFaces
{
type symmetryPlane;
}
}
omega
Quote:
internalField uniform 1020.16;

boundaryField
{
frontAndBack
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform 1020.16;
}
outlet
{
type inletOutlet;
inletValue uniform 1020.16;
value uniform 1020.16;
}
lowerWall
{
type omegaWallFunction;
value uniform 0;
}
upperWall
{
type symmetryPlane;
}
body
{
type omegaWallFunction;
value uniform 0;
}
oldInternalFaces
{
type symmetryPlane;
}
}
U
Quote:
internalField uniform (31.94 0 0);

boundaryField
{
frontAndBack
{
type symmetryPlane;
}
inlet
{
type fixedValue;
value uniform (31.94 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (31.94 0 0);
}
lowerWall
{
type fixedValue;
value uniform (31.94 0 0);
}
upperWall
{
type symmetryPlane;
}
body
{
type fixedValue;
value uniform (0 0 0);
}
oldInternalFaces
{
type symmetryPlane;
}
}
p
Quote:
nternalField uniform 0;

boundaryField
{
frontAndBack
{
type symmetryPlane;
}
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
lowerWall
{
type zeroGradient;
}
upperWall
{
type symmetryPlane;
}
body
{
type zeroGradient;
}
oldInternalFaces
{
type symmetryPlane;
}
}
nut
Quote:
internalField uniform 0;

boundaryField
{
frontAndBack
{
type symmetryPlane;
}
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
lowerWall
{
type nutkWallFunction;
value uniform 0;
}
upperWall
{
type symmetryPlane;
}
body
{
type nutkWallFunction;
value uniform 0;
}
oldInternalFaces
{
type symmetryPlane;
}
}
Attached Images
File Type: png output.png (9.9 KB, 27 views)
Attached Files
File Type: txt logpotentialFoam.txt (2.5 KB, 3 views)
File Type: gz logsimpleFoam.txt.gz (52.9 KB, 2 views)
dreamilam is offline   Reply With Quote

Old   January 17, 2014, 03:08
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I am not so sure about your mesh. Especially the old_Internal_Faces patch seems odd to me. You also seem to have a lot of different cell types, I am guessing this may have to do with the divergence. Could you post pictures of the mesh or maybe results from your latest iteration? Boundary conditions seem appropriate except once again the old internal faces, seems weird to have a symmetry plane in the middle of the mesh (guessing this). Please show this patch as well when showing the mesh.

Regards,
Tom
tomf is offline   Reply With Quote

Old   January 17, 2014, 04:24
Default
  #3
New Member
 
ILAM
Join Date: May 2012
Location: chennai, INDIA
Posts: 20
Rep Power: 13
dreamilam is on a distinguished road
Hi Tom,
Thanks for your reply.
I generated my mesh using SHM. Initially, there were a lot of skewed faces and my mesh check failed. so, I deleted those cells and the internal faces are a result of that.

I am really sorry. I am not at a liberty to post images of the mesh because of the rules in my company.

How can I make sure that I dont have too many different cell types?
dreamilam is offline   Reply With Quote

Old   January 17, 2014, 04:33
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Well in that case I think it is because of deleting the cells and the neighbouring cells of the ones you deleted. I think you need to work on the settings of snappy to make sure it gets a good mesh without deleting cells. I do not use snappy, so I am not sure what are the best settings, but there are a lot of discussions on the forum.

So fix the mesh (without deleting bad cells), than try again.

Other than that it can be in fvSchemes. Could you post that one as well?

Regards
tomf is offline   Reply With Quote

Old   January 17, 2014, 05:19
Default
  #5
New Member
 
ILAM
Join Date: May 2012
Location: chennai, INDIA
Posts: 20
Rep Power: 13
dreamilam is on a distinguished road
Hi Tom,

I ll work on improving the mesh. But, we used to remove the bad cells in starccm+ and convert the internal faces to symmetryPlane. can't we do something like that in openfoam?

Here is my fvSchemes
Quote:
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}

// ************************************************** *********************** //
dreamilam is offline   Reply With Quote

Old   January 17, 2014, 06:04
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
I never did something like that, I do not think it will give you a good result in the end, I do not know how starccm+ handles it, but the general procedure would make me doubtful about the final result.

Probably in starccm+ there are additional limiters on gradients active. You can try to add them to you fvSchemes to get a converged result:

Code:
gradSchemes
{
    default         cellLimited Gauss linear 1;
}

laplacianSchemes
{
    default         Gauss linear limited 0.333;
}

snGradSchemes
{
    default         limited 0.333;
}
You can look on the forum for other examples.

Basically your setup (fvSchemes/fvSolution, boundary conditions) should be fine on a good enough mesh. My suggestions above may work on a slightly worse mesh. Last thing to check is the transportProperties files for correct value of viscosity, but I do not see anything very weird with your settings.

Good luck,
Tom
tomf is offline   Reply With Quote

Old   January 17, 2014, 14:40
Default
  #7
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Ilam,
The solver simpleFoam is for steady-state flows. If your flow is expected to have vortex shedding this can hinder convergence. In this case it would be better to use a transient flow solver like pisoFoam.
Best Regards,
Paulo
vatavuk is offline   Reply With Quote

Old   January 18, 2014, 14:47
Default
  #8
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 12
Alfalfa is on a distinguished road
I found out that you can still get decent results even with some skeewed faces (providing the skeewness is not too high). At least you can get convergence and if you only have something like 10 skeewed faces, I don't think it will be a big problem.
Alfalfa is offline   Reply With Quote

Old   January 27, 2014, 23:32
Default
  #9
New Member
 
ILAM
Join Date: May 2012
Location: chennai, INDIA
Posts: 20
Rep Power: 13
dreamilam is on a distinguished road
Hi Tom and others,
Thanks for the reply first of all.

@Tom: I did the changes you said. No change in the residual pattern.

@Vatavuk: Hi, we are trying to simulate the flow around a bike, which would be used for thermal analysis later. vortex shedding is not of any interest to us as such .

@Boucher: Hi, Initially I ran the case without removing any cells. It was diverging and that's when I started removing those bad cells.

P.S: Really sorry for the late reply.
dreamilam is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
interFoam vs. simpleFoam channel flow comparison DanM OpenFOAM Running, Solving & CFD 12 January 31, 2020 15:26
SimpleFoam Race Car case, solution diverges GPan1 OpenFOAM 1 December 3, 2012 13:22
Same SimpleFOAM Case converges with openFOAM 2.1 but diverges with openFOAM 2.0.1 alsdia OpenFOAM Running, Solving & CFD 3 October 22, 2012 11:25
Trying to run a benchmark case with simpleFoam spsb OpenFOAM 3 February 24, 2012 09:07
simpleFoam always diverges RugbyGandalf OpenFOAM 20 January 25, 2012 06:54


All times are GMT -4. The time now is 20:59.