CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Mesh problem/ coarse OK - fine not OK

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By JR22
  • 1 Post By erichu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2013, 14:47
Default Mesh problem/ coarse OK - fine not OK
  #1
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
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
File Type: jpg image.jpg (75.5 KB, 65 views)
erichu is offline   Reply With Quote

Old   April 8, 2013, 14:49
Default
  #2
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
Coarse mesh attached
Attached Images
File Type: jpg image.jpg (59.5 KB, 38 views)
erichu is offline   Reply With Quote

Old   April 8, 2013, 15:45
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
hi
did you use both totalPressure and fixedValue? which is converged?both act same?
immortality is offline   Reply With Quote

Old   April 8, 2013, 16:16
Default
  #4
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
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.
erichu is offline   Reply With Quote

Old   April 8, 2013, 19:17
Default
  #5
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 17
JR22 will become famous soon enough
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?
immortality likes this.

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

Old   April 9, 2013, 03:44
Default
  #6
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
@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
File Type: gz BCandSYS.tar.gz (3.0 KB, 5 views)
erichu is offline   Reply With Quote

Old   April 9, 2013, 04:22
Default
  #7
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
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
File Type: jpg u.jpg (89.1 KB, 28 views)
File Type: jpg p.jpg (54.5 KB, 21 views)
File Type: jpg k.jpg (45.4 KB, 19 views)
File Type: jpg epsilon.jpg (72.8 KB, 21 views)
File Type: jpg glyph.jpg (50.5 KB, 22 views)
erichu is offline   Reply With Quote

Old   April 10, 2013, 06:30
Default
  #8
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
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.
erichu is offline   Reply With Quote

Old   April 10, 2013, 06:49
Default
  #9
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 17
JR22 will become famous soon enough
Can you post what your fvSchemes looks like when you start your run? Thanks
JR22 is offline   Reply With Quote

Old   April 10, 2013, 07:23
Default
  #10
New Member
 
Eric
Join Date: Mar 2013
Posts: 22
Rep Power: 13
erichu is on a distinguished road
Quote:
Originally Posted by JR22 View Post
Can you post what your fvSchemes looks like when you start your run? Thanks

snGradSchemes default corrected
interpolationSchemes default linear
laplacianSchemes Gauss linear corrected
divSchemes
div(phi,U) bounded Gauss upwind --> switch to Gauss linearUpwind phi after some it
div((muEff*dev2(T(grad(U)))) Gauss linear
others div(phi, XXX) bounded Gauss cubic
gradSchemes default linear
ddtSchemes default steadyState
JR22 likes this.
erichu is offline   Reply With Quote

Old   April 10, 2013, 12:29
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Quote:
Originally Posted by JR22 View Post
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?
immortality 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
FLUENT adding mesh nodes problem when importing 3D mesh from ICEM guxin7005 FLUENT 2 June 27, 2016 21:41
[ANSYS Meshing] Transition from coarse to fine mesh Shruti ANSYS Meshing & Geometry 0 June 29, 2015 13:35
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38


All times are GMT -4. The time now is 08:21.