CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Inappropriate boundary conditions? (http://www.cfd-online.com/Forums/openfoam-solving/109673-inappropriate-boundary-conditions.html)

Studi November 23, 2012 07:32

Inappropriate boundary conditions?
 
3 Attachment(s)
Hello everyone!
I want to ask, if you might take a look into my following case? The calculations abort after ten or some more iterations due to an excessively raising Courant number. Apparently the fast raising velocity U causes the solver to give up. In my experience most cases aborted in consequence of wrong boundary conditions, but I can't see any mistakes there. (see codes below)
The model is a flow channel (see attachment 'model) which has an inlet 'einlass' on its upper side (green) and an outlet (red) below. The wall 'wand' is yellow.
Postprocessing the few time steps before the calculations stop shows me results I really don't understand.
Time step 1 (1.jpg) seems okay, but time step 11 (11.jpg) already shows an outrageous high velocity U.

The BCs:
U
Code:

dimensions      [0 1 -1 0 0 0 0];
internalField  uniform (0 0 0);
boundaryField
{
    einlass
    {
        type            fixedValue;
        value          uniform (1e-3 0 0);
    }
    auslass
    {
        type            zeroGradient;
    }
    wand
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}

p
Code:

dimensions      [0 2 -2 0 0 0 0];
internalField  uniform 1;
boundaryField
{
    einlass
    {
        type            zeroGradient;
    }
    auslass
    {
        type            fixedValue;
        value          uniform 1;
    }
    wand
    {
        type            zeroGradient;
    }   
}

transportProperties
Code:

transportModel  CrossPowerLaw;
CrossPowerLawCoeffs
{
    nu0            nu0 [ 0 2 -1 0 0 0 0 ] 300000;
    nuInf          nuInf [ 0 2 -1 0 0 0 0 ] 50;
    m              m [ 0 0 1 0 0 0 0 ] 2.5;
    n              n [ 0 0 0 0 0 0 0 ] 0.8;
}

Does anybody have an idea or sees a mistake?
Salome meshes without errors and checkMesh is happy, too. (see below)
Code:

Mesh stats
    points:          5378
    faces:            46288
    internal faces:  39840
    cells:            21532
    boundary patches: 3
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    21532
    polyhedra:    0

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                 
    einlass            908      503      ok (non-closed singly connected) 
    auslass            116      77      ok (non-closed singly connected) 
    wand                5424    2778    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-0.15 -0.0559199 -0.125) (-0.0297394 0.045 -0.035)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (3.0834e-16 2.71627e-17 8.63031e-17) OK.
    Max cell openness = 2.25618e-16 OK.
    Max aspect ratio = 30.2779 OK.
    Minumum face area = 1.31017e-09. Maximum face area = 9.67659e-05.  Face area magnitudes OK.
    Min volume = 2.37245e-13. Max volume = 3.29188e-07.  Total volume = 0.000503545.  Cell volumes OK.
    Mesh non-orthogonality Max: 84.4948 average: 19.033
  *Number of severely non-orthogonal faces: 10.
    Non-orthogonality check OK.
  <<Writing 10 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 1.41613 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End

I appreciate any idea or any help! Many thanks in advance.


Regards
Sebastian

chegdan November 23, 2012 07:44

Can you use hex or polyhedral cells instead of tetrahedral? Tets are known to behave badly. If there is swirl at the exit, you might want to try inletOulet for velocity. Also, it has been noted in the forum and from my own personal experience, that fixedMeanValue for pressure can be a little more stable. However, I have only used that BC in steady-state problems. Lastly, how does a steady-state solver perform, can you get a SS solution?

Studi November 23, 2012 11:32

Thanks for your response, chegdan!

I use Salome for the meshing... What would you recommend?
The BC inletOutlet unfortunately didn't solve my problem, but I have to admit, that I am not sure, if i used it correctly. I integrated it for the velocity U at the outlet. Would you use it for pressure BCs, too?
Concerning the fixedMeanPressure I didn't try it until now. Did I read correctly, that I have to compile it from other sources?


Sebastian

Lieven November 23, 2012 12:10

Have a look at http://www.cfd-online.com/Forums/ope...condition.html for a link (and some explanation) to the sources of the fixedMeanValue boundary condition.

Do you let your time step to be determined dynamically (i.e. based on the courant number)? If not, try to run the case with pimpleFoam (or the equivalent if its not an incompressible flow) and set the maximum courant number < 1.

Greetz,

L

chegdan November 23, 2012 12:21

Sebastian,

If you can get an stl out of salome for the surfaces, you might want to give snappyHexMesh a try and generate Hex cells. If you want to go the arbitrary polyhedral mesh route, you can generate a Delaunay triangulate tet mesh and then convert it to arbitrary polyhedral using polyDualMesh. fixedMeanValue is in the extend version of OpenFOAM and you can get the code and compile it with minimal effort. There is a discussion located at http://www.cfd-online.com/Forums/ope...condition.html. Good luck and have a great weekend!


Quote:

Originally Posted by Studi (Post 393859)
Thanks for your response, chegdan!

I use Salome for the meshing... What would you recommend?
The BC inletOutlet unfortunately didn't solve my problem, but I have to admit, that I am not sure, if i used it correctly. I integrated it for the velocity U at the outlet. Would you use it for pressure BCs, too?
Concerning the fixedMeanPressure I didn't try it until now. Did I read correctly, that I have to compile it from other sources?


Sebastian


sharonyue January 17, 2013 09:08

Quote:

transportModel CrossPowerLaw;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 300000;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 50;
m m [ 0 0 1 0 0 0 0 ] 2.5;
n n [ 0 0 0 0 0 0 0 ] 0.8;
}
Are you sure the nu0 and nuInf is correct? what kind of substance is this so viscous?


All times are GMT -4. The time now is 22:44.