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

Courant number, patches, etc

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2009, 18:20
Default Courant number, patches, etc
  #1
New Member
 
alex
Join Date: Jun 2009
Posts: 17
Rep Power: 17
oort is on a distinguished road
Hi!

I want simulate the water flow in a rectangular channel filled with transversal round shape fillaments.

I have build a php script that generates the vertices, blocks, edges and also the inlet and outlet patches.

When I run the blockMesh it gives a warning saying that I have 'n' undifined faces and that they will be added to default patch. I think this is normal and not problematic because I only have defined the inlet and outlet patches.

Code:
Create time


Reading block mesh description dictionary

Creating block mesh

Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty
--> FOAM Warning : 
    From function polyMesh::polyMesh(... construct from shapes...)
    in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576
    Found 322 undefined faces in mesh; adding to default patch.

Check block mesh topology

    Basic statistics
        Number of internal faces : 143
        Number of boundary faces : 326
        Number of defined boundary faces : 326
        Number of undefined boundary faces : 0

    Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty

Writing polyMesh

end
I'm trying to use the icoFoam solver but I don't know if this is the best solution.

But what should be the inicial conditions (at /0 directory) for p and U in the three patches (inlet, outlet and defaultFaces)?

I have tried several things but none works well.

I think the problem is not in the mesh generation because blockMesh only gives that warning,
The program starts building the mesh for the modules between the fillaments. First calculates the vertices and edges for the first module and calculate for each following module. Then adds the section before the first module and then adds the section after the last module. The program adds the number of modules we wish.

The vertices/blocks/edges are defined for the first block in the next picture:

http://www.carloscompleto.com/images/grid_img_04.pdf


In the next pictures you can see that the mesh looks good:

http://www.carloscompleto.com/images/grid_img_01.jpg
http://www.carloscompleto.com/images/grid_img_02.jpg
http://www.carloscompleto.com/images/grid_img_03.jpg

When I run the blockMesh I have to edit the boundary file and change the defaulFaces from "empty" to "patch" because if I don't do it the icoFoam gives an error.

Code:
3
(
    inlet
    {
        type            patch;
        nFaces          32;
        startFace       4976;
    }
    outlet
    {
        type            patch;
        nFaces          32;
        startFace       5008;
    }
    defaultFaces
    {
        type            patch;
        nFaces          1504;
        startFace       5040;
    }
)
The time zero (/0/U) i'm using the following code but I don't know if it well defined.

Code:
boundaryField
{
    inlet      
    {
        type            fixedValue;
        value           uniform (0.002 0 0);
    }

    outlet      
    {
        type            zeroGradient;
    }

    defaultFaces    
    {
        type            fixedValue;
    value           uniform (0 0 0);
    }
}
Any way the Courant number is only smaller than 1 in the first iteration then explodes and the solver stops after some iterations and the results are horrible (with no physical credibility). I'm using deltaT = 0.00001. If I use a smaller deltaT the solver does more iterations but explodes anyway.

I'm using the default fvSchemes and fvSolution files of the cavity tutorial.

What should I do?
oort is offline   Reply With Quote

Old   July 24, 2009, 19:05
Default
  #2
Senior Member
 
Steve Hansel
Join Date: Jun 2009
Location: Colorado, USA
Posts: 112
Rep Power: 17
hansel is on a distinguished road
Hi oort. I'm no expert, but I've been playing with TurbFoam and it seems to be very sensitive to abrupt cell size changes. An example is where your cells go from a square cross section to rectagles with half the width. In my simulation for no reason the velocity would change there.

Maybe if you could change the cell sizes more gradually, that might help.

But like I said, I'm no expert, this is just my experience.

Steve
hansel 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
[mesh manipulation] Mesh Refinement Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Meshing & Mesh Conversion 42 January 8, 2017 13:55
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 10:01
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 11:37
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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