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

Inflow moving in wrong direction

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2018, 02:57
Exclamation Inflow moving in wrong direction
  #1
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Greetings!

I am simulating a very simple scenario of fluid entering through an inflow patch, overcoming a static boundary and exiting through an outflow. Very similar to the weir overflow in interfoam. My problem is that, instead of flowing in the x-direction, the flow goes up! I tried my boundary conditions on the blockMesh of the dambreak example, and it seemed to work fine, indicating that the problem is with my geometry.

Here is my blockMesh
Code:
convertToMeters 1;

vertices
(
    (0 0 0)//0
    (2 0 0)//1
    (3 0 0)//2
    (5 0 0)//3
    (0 1 0)//4
    (2 1 0)//5
    (3 1 0)//6
    (5 1 0)//7
    (0 1.5 0)//8
    (2 1.5 0)//9
    (3 1.5 0)//10
    (5 1.5 0)//11
    (0 5 0)//12
    (2 5 0)//13
    (3 5 0)//14
    (5 5 0)//15

    (0 0 0.5)//16
    (2 0 0.5)//17
    (3 0 0.5)//18
    (5 0 0.5)//19
    (0 1 0.5)//20
    (2 1 0.5)//21
    (3 1 0.5)//22
    (5 1 0.5)//23
    (0 1.5 0.5)//24
    (2 1.5 0.5)//25
    (3 1.5 0.5)//26
    (5 1.5 0.5)//27
    (0 5 0.5)//28
    (2 5 0.5)//29
    (3 5 0.5)//30
    (5 5 0.5)//31
);

blocks
(
    hex (0 1 5 4 16 17 21 20) (30 30 15) simpleGrading (1 1 1)
    hex (2 3 7 6 18 19 23 22) (30 30 15) simpleGrading (1 1 1)
    hex (4 5 9 8 20 21 25 24) (30 15 15) simpleGrading (1 1 1)
    hex (6 7 11 10 22 23 27 26) (30 15 15) simpleGrading (1 1 1)
    hex (8 9 13 12 24 25 29 28) (30 60 15) simpleGrading (1 1 1)
    hex (9 10 14 13 25 26 30 29) (30 60 15) simpleGrading (1 1 1)
    hex (10 11 15 14 26 27 31 30) (30 60 15) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
	type patch;
	faces
	(
	    (0 16 20 4)
	);
    }
    outlet
    {
	type patch;
	faces
	(
	    (7 23 19 3)
	);
    }
    leftWall
    {
        type wall;
        faces
        (
            (4 20 24 8)
            (8 24 28 12)
        );
    }
    rightWall
    {
        type wall;
        faces
        (
            (11 27 23 7)
            (15 31 27 11)
        );
    }
    lowerWall
    {
        type wall;
        faces
        (
            (0 1 17 16)
            (1 5 21 17)
            (9 10 26 25)
            (10 6 22 26)
            (6 2 18 22)
            (2 3 19 18)
        );
    }
    atmosphere
    {
        type patch;
        faces
        (
            (12 28 29 13)
            (14 13 29 30)
            (14 30 31 15)
        );
    }
);
As you can see it is extremely simple. Its pretty much like an overgrown dambreak which is why i don't understand the problem.
To further clarify my U:
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
	value		uniform (1 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }
    leftWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    rightWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value           uniform (0 0 0);
    }
    defaultFaces
    {
        type            empty;
    }
}
and p:
Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
	type		zeroGradient;
    }
    outlet
    {
        type            totalPressure;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0;
    }

    leftWall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

    rightWall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

    lowerWall
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }

    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           1;
        value           uniform 0;
    }

    defaultFaces
    {
        type            empty;
    }
}
are as follows.

The simulation results are attached as an image.
The error might be very simple. If you could just point me in the right direction, i'd be really grateful!
Attached Images
File Type: jpg big dambreak.jpg (95.6 KB, 19 views)
cuikahlil is offline   Reply With Quote

Old   May 1, 2018, 15:21
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Hi there,

Could you upload a stripped version of your case with all the BC's. I'm thinking perhaps your alpha field might have issues? If you suspect your geometry, does checkmesh work?
mturcios777 is offline   Reply With Quote

Old   May 1, 2018, 22:22
Default
  #3
New Member
 
Kahlil Fredrick Cui
Join Date: Apr 2018
Posts: 29
Rep Power: 8
cuikahlil is on a distinguished road
Hello!

Thanks for the response, but I already figured out the error. I should've updated this question then. I apologize.

I actually found out that one of my floor faces was undefined. Weird thing was it didn't turn up during checkMesh. When I re-created the whole mesh, I found out I neglected one face. I also didn't expect the fluid to behave that way as a reaction to a missing face.

Hope my error becomes a lesson for someone else.
cuikahlil is offline   Reply With Quote

Reply

Tags
dambreak, inflow bc, outflow bc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Flow Direction: normal to boundary!!! Atit CFX 1 August 2, 2015 14:42
[snappyHexMesh] jagged, ragged edges... ziemowitzima OpenFOAM Meshing & Mesh Conversion 138 July 24, 2012 00:41
Moving mesh in Fluent fivos FLUENT 0 April 2, 2010 10:45
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15
moving cylinder blur boy Main CFD Forum 4 October 12, 2001 06:32


All times are GMT -4. The time now is 15:06.