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

Strange BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 29, 2018, 10:33
Default Strange BC
  #1
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Hi,
I am having problems with a BC, see the below picture, which displays Uz

strangeUz.png

For the top we have the BC U slip.
For the side facing the screen we have symmetryPlane.

Does anybody know how I can get Uz=0 everywhere on the top?
kaaja is offline   Reply With Quote

Old   January 29, 2018, 10:38
Default
  #2
Eko
Member
 
Join Date: Dec 2017
Location: Germany
Posts: 48
Rep Power: 8
Eko is on a distinguished road
Quote:
Originally Posted by kaaja View Post
Hi,
I am having problems with a BC, see the below picture, which displays Uz

Attachment 61080

For the top we have the BC U slip.
For the side facing the screen we have symmetryPlane.

Does anybody know how I can get Uz=0 everywhere on the top?
Can you post your U-file?
Would be easier to help you
Eko is offline   Reply With Quote

Old   January 29, 2018, 11:32
Default
  #3
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Of course:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Umean 0.12;//0.24;
mUmean -0.12;//-0.24;

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform ($mUmean  0 0);

boundaryField
{
    leftWall //outlet
    {
        type            outletPhaseMeanVelocity;
        alpha           alpha.water;
        Umean           $Umean;
        value           $internalField;
    }
    rightWall //intlet
    {
        type                    fixedValue;
        value                   $internalField;
    }
    lowerWall //part of bottom
    {
        type                    movingWallVelocity;  
        value                   $internalField;
    }
    lowerWallMoving //part of bottom
    {
        type                    movingWallVelocity;  
        value                   $internalField;        
    }
    boat
    {
        type            movingWallVelocity;
        value           uniform (0 0 0);
    }
    atmosphere // This is the top
    {

        type                slip;
    }
    back
    {
        type               slip;
    }
    front
    {
        type               symmetryPlane;
    }
}

// ************************************************************************* //
kaaja is offline   Reply With Quote

Old   January 29, 2018, 23:40
Default
  #4
New Member
 
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 14
luther1990 is on a distinguished road
  1. Why do you use mUmean as internalField but Umean as mean velocity at outlet?
  2. The aspect ratio at that location is too big.
  3. It also may be caused by the interpolation of visualization in paraview.
luther1990 is offline   Reply With Quote

Old   January 30, 2018, 03:32
Default
  #5
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
luther1990:
Thanks for answering!

1) mUmean: I don't think it matters, since it is the absolute value that is used in "Umean $Umean;".
2) Aspect ratio: Thank you, we had not thought about this.
3) Interpolation: I have changed the mesh to get better aspect ratio especially near the boundaries. Still I get the strange result in paraFoam. Maybe it has to do with paraFoam interpolation then, as you suggest.

Thanks again!
kaaja is offline   Reply With Quote

Old   February 12, 2018, 02:13
Default
  #6
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Using a good aspect ration, I still get the problem at the corner of the box. The values of U, p, k, and omega all explodes at this point. Does anybody have an idea on how to fix this?

edit: I think there is some conflict between the two BCs. The side BC allows Uz different from zero, while the top BC requires Uz = 0. OpenFoam seems to choose the first. How is it possible to make openFoam choose the top BC over the side BC in the intersectino point?

Last edited by kaaja; February 12, 2018 at 04:10.
kaaja is offline   Reply With Quote

Old   February 21, 2018, 22:23
Default
  #7
New Member
 
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 14
luther1990 is on a distinguished road
Quote:
Originally Posted by kaaja View Post
Using a good aspect ration, I still get the problem at the corner of the box. The values of U, p, k, and omega all explodes at this point. Does anybody have an idea on how to fix this?

edit: I think there is some conflict between the two BCs. The side BC allows Uz different from zero, while the top BC requires Uz = 0. OpenFoam seems to choose the first. How is it possible to make openFoam choose the top BC over the side BC in the intersectino point?

Sorry to reply late.

OpenFOAM uses FVM. Typically, U p k omega are all stored at cell center and patch face center, not at node. If a boundary cell has two or more patch faces, it will use distance-based weight function to calculate the value.

Check cell value instead of point value in paraview. And check the boundary values in the result files.

Theoretically, cell value at corner should have non-zero Uz, but top face value should have Uz=0.
luther1990 is offline   Reply With Quote

Old   February 23, 2018, 02:08
Default
  #8
Member
 
Join Date: Apr 2017
Posts: 68
Rep Power: 9
kaaja is on a distinguished road
Thanks for replying!
I got a really high value at the corner.
I ended changing the whole BC to avoid this.
If I change back the BC, I will certainly have a closer look at what you are prescribing!
kaaja 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
Strange STL when using cuttingPlane C-L OpenFOAM Post-Processing 2 September 26, 2017 05:44
[blockMesh] Strange non-hexahedral cells? maka15 OpenFOAM Meshing & Mesh Conversion 3 May 19, 2016 08:56
Strange rhoCentralFoam behavior after restart... vkrastev OpenFOAM Bugs 27 November 19, 2013 12:04
Strange residuals behaviour xxxx Main CFD Forum 1 July 13, 2013 14:40
A Strange Problem in making Parallel (Ansys/CFX 12) a.sarami CFX 13 October 7, 2010 01:33


All times are GMT -4. The time now is 01:18.