# Mesh problem/ coarse OK - fine not OK

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

April 8, 2013, 14:47
Mesh problem/ coarse OK - fine not OK
#1
New Member

Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
Hello everyone,

I am trying to simulate maximum flow inside a tiny pipe using totalPressure = 106325 Pa boundary and fixedPressure=101325 Pa.
Dimensions of pipe is (0.004 m length and 0.003 mm diameter)

Using a very coarse netgen mesh and about 15000 iterations, a fully converged solution is obtained.
However, when refine the mesh, a solution cannot be obtained due to failure in the thermophyical- or the pressure model.

Anyone having ideas why the refined mesh cannot converge. Pictures are attached, 'fine2' is the fine mesh and 'coarse' is the coarse mesh. Coarse picture is posted separatley.

Thanks
Attached Images
 image.jpg (75.5 KB, 29 views)

April 8, 2013, 14:49
#2
New Member

Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
Coarse mesh attached
Attached Images
 image.jpg (59.5 KB, 18 views)

 April 8, 2013, 15:45 #3 Senior Member     Ehsan Join Date: Oct 2012 Location: Iran Posts: 2,209 Rep Power: 18 hi did you use both totalPressure and fixedValue? which is converged?both act same?

 April 8, 2013, 16:16 #4 New Member   Eric Join Date: Mar 2013 Posts: 22 Rep Power: 5 Thanks for a quick answer. I used inlet { type totalPressure; p0 uniform 106325; value uniform 106325; gamma 1.4; } outlet { type outletInlet; value uniform 101325; outletValue 101325; } How do I know from the output if inlet or outlet has converged? Furthermore, it appears that the underlying problem might be k or epsilon. If I change the relaxation factors for the coarse model to a slightly higher value than 0.4, OpenFOAM returns the same problem.

April 8, 2013, 19:17
#5
Senior Member

Jose Rey
Join Date: Oct 2012
Posts: 128
Rep Power: 9
In your problem you have pressure in both the inlet and the outlet?

I think pressure on both inlet and outlet is a classical CFD headache. Maybe try to follow how they do it in the T-junction tutorial (link to p setup):
https://github.com/OpenFOAM/OpenFOAM.../TJunction/0/p

I believe you have to reduce the pressure as the velocity increases using the relation ptot=p0-|U|^2/2 at the inlet. They put it in the form of a table in the p file. It is however a transient problem that uses pimpleFoam.

Ignore this, your mesh is very simple, it is unlikely that it is leaky:
Quote:
 Could it be that your surface is not watertight and when you make the elements smaller, you get the errors because the mesh elements are smaller than the holes?

Last edited by JR22; April 9, 2013 at 09:02. Reason: fluke of an answer, correcting

April 9, 2013, 03:44
#6
New Member

Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
@JR22

Interesting idea but I am not sure I follow you. Please explain further.

I have uploaded the system- as well the bc files in case someone has time to look through it (valid for both meshes with the result that the coarse mesh is working and the fine not working).
Attached Files
 BCandSYS.tar.gz (3.0 KB, 4 views)

April 9, 2013, 04:22
#7
New Member

Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
I have attached the second last iteration before the solver crash on the fine mesh. The last iteration looks rouhgly the same but in the lower left corner (inlet, left side) the maximum magnitude of U, epsilon, p locally spikes to values of ~1e18, 2e25, 1e22, respectivley.

The flow direction follows Z axis

While writing this message further investigated the pictures and added a glyph filter which brings a lot of more information and maybe an explanation as well. It seems like I have vortices close to the wall/inlet. My guess is that this comes from no slip BC. Maybe a coarse mesh is very forgiving and does not allow the flow to turn backwards as there is no small cells to represent the turbulence flow.

A glyph picutre is also attached for the fine mesh.

In case this is a BC problem, can someone give further guidance of how to properly set up the BC:s for this kind of problem?

Thanks!
Attached Images
 u.jpg (89.1 KB, 7 views) p.jpg (54.5 KB, 9 views) k.jpg (45.4 KB, 6 views) epsilon.jpg (72.8 KB, 5 views) glyph.jpg (50.5 KB, 7 views)

 April 10, 2013, 06:30 #8 New Member   Eric Join Date: Mar 2013 Posts: 22 Rep Power: 5 Problem solved Solutions: Using a structured mesh Choosing second order upwind Fine tuning k e initial values Fine tuning relaxation parameters during running solver. I found an old post yesterday pointing out that k-e is very hard to get working. A more stable way is to use RNG /realizable or omegaSST.

 April 10, 2013, 06:49 #9 Senior Member     Jose Rey Join Date: Oct 2012 Posts: 128 Rep Power: 9 Can you post what your fvSchemes looks like when you start your run? Thanks

April 10, 2013, 07:23
#10
New Member

Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 5
Quote:
 Originally Posted by JR22 Can you post what your fvSchemes looks like when you start your run? Thanks

interpolationSchemes default linear
laplacianSchemes Gauss linear corrected
divSchemes
div(phi,U) bounded Gauss upwind --> switch to Gauss linearUpwind phi after some it
others div(phi, XXX) bounded Gauss cubic

April 10, 2013, 12:29
#11
Senior Member

Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 18
Quote:
 Originally Posted by JR22 In your problem you have pressure in both the inlet and the outlet? I think pressure on both inlet and outlet is a classical CFD headache. Maybe try to follow how they do it in the T-junction tutorial (link to p setup): https://github.com/OpenFOAM/OpenFOAM.../TJunction/0/p I believe you have to reduce the pressure as the velocity increases using the relation ptot=p0-|U|^2/2 at the inlet. They put it in the form of a table in the p file. It is however a transient problem that uses pimpleFoam. Ignore this, your mesh is very simple, it is unlikely that it is leaky:
dear Rose whats the reason of putting a table for p in total pressure at inlet?
I have an issue on this problem.the pressure goes very low and velocity goes very high.
whats the reason? when i limit U on the ptch to 350m/s the neighbour cells act as i told above again.
why table is inverse from low value to high value for p?

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post ESC FLUENT 2 September 4, 2012 10:56 aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52 Silmaril CFX 7 October 19, 2010 10:00 SSL FLUENT 2 January 26, 2008 12:55 hung FLUENT 7 April 18, 2005 09:38

All times are GMT -4. The time now is 07:31.

 Contact Us - CFD Online - Top