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

U velocity anomaly

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2015, 07:46
Default U velocity anomaly
  #1
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Dear OpenFOAM users.

Here is my code for Velocity:

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

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

internalField   uniform (0 0 0);

boundaryField
{
    fixedWalls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    roof
    {
        type            slip;
    }

    inlet
    {
       type            fixedValue;
        value           uniform (0.5 0 0);
    }
    outlet
    {
        type            outletInlet;
    outletValue    uniform (0.5 0 0);
        value           (0 0 0);
    }
}

// ************************************************************************* //
I have tried several BC. These were the best. The problem is that after OpenFOAM solves the problem in paraview viewing the velocity it increases. With this I mean after scaling it finds a place where the velocity is higher like 0.625 or 1 m/s which is not physical If my inlet flow is at 0.5 m/s and the outflow the same. It gets worse when I take a smaller mesh.

Can somebody explain what I am doing wrong?

Cheers

Raitis.
rietis is offline   Reply With Quote

Old   February 27, 2015, 09:06
Default
  #2
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 62
Rep Power: 14
thiagopl is on a distinguished road
Hi rietis,

Give us more details about your problem. Which solver are you using? How is your geometry?

Regards
__________________
Fields of interest: buoyantFoam, chtMultRegionFoam.
thiagopl is offline   Reply With Quote

Old   February 27, 2015, 17:08
Default
  #3
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Sorry.

I am using PISO solver. Pressure for all walls and patches are zero gradient.

The geometry is two boxes 3 by 3 and 3 by 3, which are conected by a path like 0.5 m from the top, and in the botton there are inlet and outlet faces.

the inlet and outlet are located 0.05 m or 5 cm from the wall.

The geometry is made from hex blocks. I tried to do snappyHex mesh, but were not able to do that sadly as well, to refine the mesh at the walls.

I hope I explained more precious this time.

Cheers,
Raitis.
rietis is offline   Reply With Quote

Old   March 2, 2015, 01:03
Default
  #4
Member
 
Vojtech Betak
Join Date: Mar 2009
Location: Czech republic
Posts: 33
Rep Power: 18
betakv is on a distinguished road
Hi rietis,

the outlet BC for velocity should be a inletOutlet with inletValue uniform (0 0 0)
betakv is offline   Reply With Quote

Old   March 2, 2015, 01:29
Default
  #5
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Thank you for your replie.

The problem is that I tried with the inletOutlet with inletValue uniform (0.5 0 0), but still there is that at certain time it jumps up the inlet value.

I tried these as well:
inletValue uniform (0 0 0);
value (0.5 0 0);


inletValue uniform (0.5 0 0);
value (0 0 0);

And pretty much every combination, even though some of them where not physical and did not bring to a good flux.

Do you know what inlet profile does the BC inletOutle give?

cheers Raitis.
rietis is offline   Reply With Quote

Old   March 2, 2015, 02:20
Default
  #6
Member
 
Vojtech Betak
Join Date: Mar 2009
Location: Czech republic
Posts: 33
Rep Power: 18
betakv is on a distinguished road
Have you checked boundary conditions for pressure? There should be a fixedValue on outlet and zeroGradient on other patches
betakv is offline   Reply With Quote

Old   March 2, 2015, 02:31
Default
  #7
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Fixed value pressure on outlet? No it is zero gradient.
Do I need to calculate the pressure or just guss?
rietis is offline   Reply With Quote

Old   March 2, 2015, 02:38
Default
  #8
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
As I understand I can use to determine the pressuere on the outlet like this:

P=F/A wher F=rho*v^2/2*A.

So it just p=rho*v^2/2?
rietis is offline   Reply With Quote

Old   March 2, 2015, 02:49
Default
  #9
Member
 
Vojtech Betak
Join Date: Mar 2009
Location: Czech republic
Posts: 33
Rep Power: 18
betakv is on a distinguished road
It depend on your case. If it is an incompressible case I suggest to set fixedValue to 0. If it is a compressible case you can set e.g. 1e5 but it depend on your case
betakv is offline   Reply With Quote

Old   March 2, 2015, 02:53
Default
  #10
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
it is a incompreesible case so I will try later this day to set on 0 and will report if it fixed the problem.

Thank You.

cheers

Raitis
rietis is offline   Reply With Quote

Old   March 2, 2015, 08:37
Default
  #11
Member
 
Thiago Parente Lima
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 62
Rep Power: 14
thiagopl is on a distinguished road
Hi,

You can use fixedFluxPressure as BC for pressure on the walls.
Regardless your BC's, according to your description your case has a restriction to the passage of the flow, right?

Regards.
__________________
Fields of interest: buoyantFoam, chtMultRegionFoam.
thiagopl is offline   Reply With Quote

Old   March 4, 2015, 07:41
Default
  #12
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Yes it really did help when I put 0 for pressure in the inlet.
rietis is offline   Reply With Quote

Old   March 9, 2015, 07:13
Default
  #13
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
It did not work for a finner mesh. After getting the results it wee as terrible as before.
fixedFluxPressure bc, how do I implement this?
rietis is offline   Reply With Quote

Old   March 9, 2015, 07:56
Default
  #14
Member
 
Vojtech Betak
Join Date: Mar 2009
Location: Czech republic
Posts: 33
Rep Power: 18
betakv is on a distinguished road
Can you post your case?
betakv is offline   Reply With Quote

Old   March 9, 2015, 08:13
Default
  #15
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
From blockMesh there are these bondaries (it containts like 60 blocks and it is preatty long)
Code:
boundary
(
    fixedWalls
    {
        type wall;
        faces
        (     
 .....

    );
    }
    roof
    {
        type wall;
        faces
       (            
.....
        );
    }
    
        inlet
    {
        type patch;
        faces
        (            
      ....
        );
    }

    outlet
    {
        type patch;
        faces
        (            
       ....
        );
    }
    
    problemFaces
    {
    type wall;
    faces
    (            
....
    );
    }


    zeroFaces
    {
    type empty;
    faces
    (            
....
    );
    }
);
For velocity I did

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

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

internalField   uniform (0 0 0);

boundaryField
{
    fixedWalls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    roof
    {
        type            slip;
    }

    inlet
    {
        type            fixedValue;
        value           uniform (0.74 0 0);
    }
    outlet
    {
        type            outletInlet;
        outletValue     uniform (0.74 0 0);
    value        uniform (0 0 0);
    }

    problemFaces
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    zeroFaces
    {
        type            empty;
    }
}

// ************************************************************************* //
Actually I wanted to implement parabolicVelocity for inlet, but I was not able to download the liberies for it.

Then for the pressure I have this:

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

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    fixedWalls
    {
        type            zeroGradient;
    }

        roof
    {
        type            zeroGradient;
    }

    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
           type            fixedValue;
    value        uniform 0;
    }

    problemFaces
    {
        type            zeroGradient;
    }
    zeroFaces
    {
        type            empty;
    }


}

// ************************************************************************* //
The geometry is two boxes conecting with one path, and there is a different inlet and outlet, at the wall, meaning the inlet is not moved any mm from the wall.

Cheers Raitis.
rietis is offline   Reply With Quote

Old   March 9, 2015, 14:23
Default
  #16
Member
 
Vojtech Betak
Join Date: Mar 2009
Location: Czech republic
Posts: 33
Rep Power: 18
betakv is on a distinguished road
Boundary seems to be okay. Have you checked the mesh with checkMesh?
betakv is offline   Reply With Quote

Old   March 9, 2015, 16:04
Default
  #17
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Yes I did check the mesh with check mesh. IT was ok. There was a problem, but I fixed it before. The speed of the velocity increases more at the outlet it looks like. And Preatty much every simulation I try to make it is like that. (I tried a different geometry with differenr BC, but still the same). Do I need to specify k or nuS ?

I am really confused, I am trying to solve this for an almost 3-4 months. I thought I got it after put the pressure but it was just for a not very fine mesh.

Do you have any other suggestions?

Cheers,

Raitis.
rietis is offline   Reply With Quote

Old   March 10, 2015, 14:04
Default
  #18
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Here I got a little bit father. I put zerogradient for outlet and it reduce significant the anomoly, but it is still there, I think it should be like that.

Here is the next think I want to make a profile for inlet.
In the attachment there are two files. One is showing the inler place and the other the profile.

In the picture which shows the inlet area is positioned in yz plane, and in the other it is zx plane.

I want that the profile is with these condition:
1) It is normal to yz plane so it is in the n (1 0 0) direction.
2) First I would like to make it z^4. (shown in the picture)
3) How would I be able to see the prfile after in the mesh?

How do I make it to the normal in x-direction? Here is my code (which is not finished), but is this how can I do it?

Code:
    inlet 
    { 
           type                           groovyBC;         
   variables                 "fz=pos().z^4;"; 
   valueExpression "vector(fz,0,0)";     
}
It looks to simple, and not right as well.
Attached Images
File Type: jpg profile.jpg (9.1 KB, 10 views)
File Type: jpg Inlet.jpg (7.3 KB, 7 views)
rietis 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
Plotting Radial Velocity and Tangential Velocity in CFD Post ashtonJ CFX 5 July 13, 2015 02:49
Velocity in Porous medium : HELP! HELP! HELP! Kali Sanjay Phoenics 0 November 6, 2006 06:10
Neumann pressure BC and velocity field Antech Main CFD Forum 0 April 25, 2006 02:15
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


All times are GMT -4. The time now is 10:42.