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

Tetra Mesh with interfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2011, 08:27
Question Tetra Mesh with interfoam
  #1
New Member
 
Diego Sanz
Join Date: Aug 2011
Posts: 9
Rep Power: 15
dsanza is on a distinguished road
hi,
I am new with openfoam. I am simulating an open water channel with interfoam and due to complex geometry i would like to use a mesh with tetra cells. I copied the files from the breakdam k-epsilon tutorial and modified them to suit my case. When i try to simulate the channel with my mesh, the courant number becomes very big (e^15) and delta_t very small (e^-20). I supose i have something wrong in my fvSolution and/or fvSchemes.

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
pcorr
{
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0;
}

p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0.05;
}

p_rghFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0;
}

"(U|k|epsilon)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 0;
}

"(U|k|epsilon)Final"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-08;
relTol 0;
}
}

PIMPLE
{
momentumPredictor no;
nCorrectors 3;
nNonOrthogonalCorrectors 5;
nAlphaCorr 1;
nAlphaSubCycles 4;
cAlpha 2;
}
relaxationFactors
{
p 0.3;
U 0.85;
k 0.7;
epsilon 0.65;
R 0.7;
nuTilda 0.65;
}

----------------------------------

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
div(rho*phi,U) Gauss limitedLinearV 1;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss interfaceCompression;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) 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_rgh;
pcorr;
alpha;
}

as you can see, i already tried using nNonOrthogonalCorrectors and Relaxation Factors.

My checkMesh says everything is ok.

Any sugestuions as where my mistake might be?

thank you!
dsanza is offline   Reply With Quote

Old   August 30, 2011, 21:22
Default
  #2
New Member
 
Aidan
Join Date: Apr 2010
Posts: 18
Rep Power: 16
flowman is on a distinguished road
I tried interFoam with a Tet mesh once before and the results were not great!

Have you tried using snappyHexMesh to automatically generate a predominantly Hex mesh? It can handle very complex geometries.
flowman is offline   Reply With Quote

Old   August 30, 2011, 22:23
Default
  #3
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
I have used interFoam with a tet mesh with success before (for a 2D spillway case)...it seems to work fine for me. My fvSchemes and fvSolution files were very similar to yours (same as the dam break ones).

I have been using snappyHexMesh lately for recent 3D cases and it works very well.

What are your boundary conditions? Does it run at all before starting to blow up. How do you have alpha1 set using setFields?

MD
mgdenno is offline   Reply With Quote

Old   August 31, 2011, 03:23
Default
  #4
New Member
 
Diego Sanz
Join Date: Aug 2011
Posts: 9
Rep Power: 15
dsanza is on a distinguished road
i will give snappyHexMesh a try, thanks for the advice!

and yes, alpha1 ist set with setfields. the simulation runs for about 0.02 seconds before blowing up.

i atached my bpundary conditions. i have no inlet, just an outlet, walls and the atmosphere.

maybe i defined k or epsilon wrong, it is the first time i am working with them.

thank you all for your help!
Attached Files
File Type: zip 0.zip (3.4 KB, 12 views)
dsanza is offline   Reply With Quote

Old   August 31, 2011, 03:30
Default
  #5
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Hi,

maybe you should give polyDualMesh for conversion of tetrahedral mesh to polyhedral mesh a try. http://www.openfoam.com/features/mesh-generation.php
=>can be used to generate a “honeycomb” polyhedral mesh from a tetrahedral mesh.
http://www.cfd-online.com/Forums/ope...h-utility.html
http://www.cfd-online.com/Forums/ope...eneration.html
elvis is offline   Reply With Quote

Old   August 31, 2011, 11:44
Default
  #6
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
One way to tell if it is your turbulence inputs that are giving you trouble is to run as laminar flow.

To do so, in your constant/turbulenceProperties file set

simulationType laminar;
mgdenno is offline   Reply With Quote

Old   August 31, 2011, 13:02
Default
  #7
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
You also might want to change your velocity outlet to inletOutlet, if that makes sense for your case.
mgdenno is offline   Reply With Quote

Old   September 1, 2011, 07:59
Default
  #8
New Member
 
Diego Sanz
Join Date: Aug 2011
Posts: 9
Rep Power: 15
dsanza is on a distinguished road
in my case i wan to have a constant flow going out of the channel, that is the resason why i chose it as a fixed value.

when i start the simuilation, i do see some areas of the channel where the k factor of the turbulence model grows it then stabylizes, is it posible i defined them wrong? how are these factors defined at the beginning, i understand k and epsilon are then calculated throughout the simulation.

thank you for your help
dsanza is offline   Reply With Quote

Old   September 1, 2011, 17:10
Default
  #9
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Just so I understand your case, you are starting your channel full of water and then it drains out during the simulation, eventually drying out?

The initial k values would either be set at the top of the 0/k file. I am not sitting at my OpenFOAM machine right now but I think it is something like:

internal uniform 0.1;

If you don't want it to be uniform you could set it using setFields...although I don't think that would be necessary to get it going.

Have you looked at the results for the first few tenths of a second that it is running with paraFOAM? Does it give any indication of where the problem might be?

Others on the Forum have suggested using totalPressure for the outlet in place of inletOutlet. I haven't seen much difference using totalPressure, but I always have used a velocity inlet - you might want to try totalPressure outlet.

If you can't get it going I would be happy to take a look at it if you can post the case. I don't really consider myself an expert, but I have had some success so far.

MD
mgdenno is offline   Reply With Quote

Reply

Tags
interfoam, interfoam diverging, tetrahedral mesh


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
[ICEM] Hexa mesh, curve mesh setup, bunching law Anorky ANSYS Meshing & Geometry 4 November 12, 2014 01:27
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 10:38
VOF with tetra mesh doesn't converge Gregor FLUENT 1 March 1, 2005 14:09


All times are GMT -4. The time now is 16:35.