CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   studying a valve case (https://www.cfd-online.com/Forums/openfoam/121522-studying-valve-case.html)

mina.basta July 30, 2013 11:55

studying a valve case
 
5 Attachment(s)
Hi all,

I'm studing a simple case which is a box with circular inlet (velocity 5,3 m/s) and an outlet (pressure =0) with walls and a valve (which is also wall). I simulate with air and using simpleFoam. Attached the pictures of the geometry and in the next post i will attach the problem pictures.

mina.basta July 30, 2013 12:00

5 Attachment(s)
My problem is that using internal field, I have elements with high pressure at the interface between the inlet and the wall. Taking in consideration that I use feature edge: P { margin-bottom: 0.21cm; }
surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/surfacemesh.stl surfacemesh.



Can anybody help me to solve this issue?

nimasam July 30, 2013 15:54

it may return to your mesh, first check your mesh with checkMesh

mina.basta July 31, 2013 02:53

Dear Nima Sam,

I already check the mesh, & I think there is no problem.
Code:


// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          2025033
    faces:            5508958
    internal faces:  5238048
    cells:            1745217
    boundary patches: 10
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    1600537
    prisms:        35555
    wedges:        0
    pyramids:      0
    tet wedges:    156
    tetrahedra:    0
    polyhedra:    108969

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                 
    maxY                0        0        ok (empty)                       
    minX                0        0        ok (empty)                       
    maxX                0        0        ok (empty)                       
    minY                0        0        ok (empty)                       
    minZ                0        0        ok (empty)                       
    maxZ                0        0        ok (empty)                       
    stlSurface_entree  9843    10629    ok (non-closed singly connected) 
    stlSurface_mur      181055  187697  ok (non-closed singly connected) 
    stlSurface_sortie  24936    26265    ok (non-closed singly connected) 
    stlSurface_clapet  55076    55667    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-0.100007 -0.075 -0.000115936) (0.100007 0.075 0.280004)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-9.11983e-18 1.11344e-16 -6.07708e-15) OK.
    Max cell openness = 3.10437e-16 OK.
    Max aspect ratio = 6.2745 OK.
    Minumum face area = 1.68613e-08. Maximum face area = 0.000203991.  Face area magnitudes OK.
    Min volume = 1.03964e-11. Max volume = 2.89671e-06.  Total volume = 0.00758435.  Cell volumes OK.
    Mesh non-orthogonality Max: 51.5309 average: 7.30086
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.39272 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End


nimasam July 31, 2013 04:35

well, did you consider uniform velocity at inlet and fixedValue for walls ?
if yes, you may want to try a profile for inlet velocity to make it much smooth near wall :)
However you should provide more details until we can help you :)

mina.basta July 31, 2013 05:19

4 Attachment(s)
Dear Nima Sam,

yes I consider uniform velocity with fixedValue at inlet (0 0 5.3) and a fixed value wich is also uniform of (0 0 0) at walls

attached are the U, P, boundary files.

taking in consideration that:
stlSurface_mur --> wall
stlSurface_clapet --> valve
stlSurface_entree ---> inlet
stlSurface_sortie --->outlet

best regards,
Mina

nimasam July 31, 2013 08:50

well, its some how reasonable :), you assign a uniform fixed value velocity for inlet and also :) you assigned a no slip condition on wall :),consider just cells in edges, on those cells should be imposed both above conditions :), or in other words when fluid enters geometry with a uniform velocity, it should be compatible with no slip conditions on wall, so it should become zero :) so in one or two inlet cells you observed a high-pressure :) as i said in previous post you can assign a non-uniform velocity at inlet, for example parabolic one, then you would not see those high pressure

mina.basta July 31, 2013 09:04

I see, thanks a lot NimaSam for your help i will try now to search about non uniform velocity at inlet.

Regards,
Mina

Quote:

Originally Posted by nimasam (Post 443046)
well, its some how reasonable :), you assign a uniform fixed value velocity for inlet and also :) you assigned a no slip condition on wall :),consider just cells in edges, on those cells should be imposed both above conditions :), or in other words when fluid enters geometry with a uniform velocity, it should be compatible with no slip conditions on wall, so it should become zero :) so in one or two inlet cells you observed a high-pressure :) as i said in previous post you can assign a non-uniform velocity at inlet, for example parabolic one, then you would not see those high pressure


mina.basta July 31, 2013 09:20

But when i tried another geometry for inlet for example a rectangular surface instead of circular one.. I didn't realize these strange elements with high pressure !!!

wyldckat August 16, 2013 11:21

2 Attachment(s)
Greetings to all!

@Mina: I got your PM some time ago, but only today did I manage to look into this.
I only have a few comments to make:
  • The "blockMeshDict" file seems to be in metres, so I guess that you use transformPoints to change from millimetres to metres?
  • The images seem to have been taken while the "p" field was shown in vertex mode. In other words, instead of showing the values in the centre of the cells, it's showing the interpolated values on the vertexes of the mesh. Attached are two images that show the differences between the two modes.
    • The reason why this is important is because the representation you've shown us does not reflect properly where the crazy results are exactly.
    • In addition, you have not indicated what residual values you have for the respective runs, since it's very possible that the first case with the circular inlet didn't converge.
  • Another thing that might help is to use the filters "Slice" and "Extract Cells By Region", which can help you inspect which exact cells have the strange values.
Best regards,
Bruno


edit: Looks like the untrained readers are not able to understand which is which, in the attached images. It's simple:
  • The picture on the left is the one with the cells/faces representation, as you can see from the large data squares in the main 3D display.
  • The picture on the right is the one with the point/vertex/interpolated representation, which is looks so smooth, pretty and not very accurate ;)

immortality August 18, 2013 13:15

for more clarification,
Quote:

The picture on the right is the one with the point/vertex/interpolated representation, which is looks so smooth, pretty and not very accurate
whats differences between point and vertex?by poit it means its a cell center point and vertices are its corners points,right?

wyldckat August 18, 2013 13:35

Hi Ehsan,

Quote:

Originally Posted by immortality (Post 446462)
whats differences between point and vertex?by poit it means its a cell center point and vertices are its corners points,right?

For reference, the official guide says this: http://www.paraview.org/Wiki/ParaVie...s.2C_arrays.29

I can't believe I'm going to have to explain this :( ... OK, in ParaView there are three basic geometrical types of representation:
  • Points
  • Lines
  • Surfaces
If this wasn't enough, there are at least two basic types of data content:
  • Data that is registered in points, aka "Point Data". Among these are the following usual usage scenarios:
    • The data is associated to the vertexes of cells and faces as real data.
    • The data is associated to the vertexes of cells and faces as interpolated data. One example of this type of data is to use the filter "Cell Data" to "Point Data".
  • Data that is registered in surfaces, aka "Cell Data". Among these are the following usual usage scenarios:
    • The data is associated to the centre of each cell or face as real data (this is how OpenFOAM usually stores the real data).
    • The data is associated to the centre of each cell or face as interpolated data or perhaps as an average of the data. Example of interpolation for this case is the filter "Cell Data" to "Point Data".
In addition, ParaView uses the following convention:
  • Data on surfaces are either the real values from the centres i.e. "Cell Data" or are showing the interpolated values from the "Point Data".
  • Data on points are usually only the data from themselves, assuming that they have the geometrical characteristic associated to it.
    • Note: Glyphs themselves (e.g. used as vector representation or for seeing where the points are) only work on "Point Data".
  • Data on Lines... are probably what ParaView thinks it's best to show, depending on "Cell Data" or "Point Data".


Is it clear enough now? :confused:


Best regards,
Bruno

immortality August 18, 2013 15:54

very good description dear Bruno.there is one cfd-online and one Bruno Santos!
I don't know what I could do if you were not here. ;)
another non related question! how do you write lists in your posts?

wyldckat August 18, 2013 17:07

Quote:

Originally Posted by immortality (Post 446488)
another non related question! how do you write lists in your posts?

Ask here: http://www.cfd-online.com/Forums/sit...k-discussions/

mina.basta August 19, 2013 06:01

5 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 446170)
Greetings to all!

@Mina: I got your PM some time ago, but only today did I manage to look into this.
I only have a few comments to make:

Dear Bruno,
First of all, my STL file was in "mm" so after blockMesh and snappyhexMesh, I use transfomPoints to change from millimetres to metres. Is there any problems related to this?

Here are some pictures using cells/faces representation

I used these residuals values residualControl
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
and I put the endTime in controlDIct file to 3000 but in fact the solution didn't converge and it stops while attending the 3000 and it didn't converge before. I think i can't make the endTime more than 3000 because it took a lot of time to calculate.


and in the next post i will attach other pictures using slice fliter

Regards,
Mina

mina.basta August 19, 2013 06:02

2 Attachment(s)
These are other pictures, you can see these strange cells with high pressure .

wyldckat August 22, 2013 07:42

Hi Mina,

OK, there are several issues that seem to be possibly be occurring here:
  1. The cells near the corners of the cylinders are clearly a headache. Having one layer of cells with very low pressure and the ones next to it with high pressure values, seems to indicate that you have got vortexes in the zone of those cells. Here are a few solutions:
    • Remove completely the sharp edge where you're having problems, by applying a fillet in the CAD stage or something. This is if only you can modify the geometry.
    • Increase or reduce the mesh resolution near the edges of that cylinder, so that it can either better solve the vortexes or completely ignore them.
  2. It all depends if you have the turbulence model turned on or off. Because if you are solving in laminar mode, you will need very low inlet and outlet fluid speeds.
  3. If you are using a turbulence model, then you should check the y+ "yPlus" field on the walls. You can run:
    Code:

    yPlusRAS
    to calculate the y+.
    Depending on the values you get for y+, you need to adjust your mesh accordingly. More on this topic: http://www.cfd-online.com/Wiki/Dimen...e_%28y_plus%29


Best regards,
Bruno

mina.basta August 22, 2013 11:45

5 Attachment(s)
Quote:

Originally Posted by wyldckat (Post 447430)
Hi Mina,

OK, there are several issues that seem to be possibly be occurring here:
  1. The cells near the corners of the cylinders are clearly a headache. Having one layer of cells with very low pressure and the ones next to it with high pressure values, seems to indicate that you have got vortexes in the zone of those cells. Here are a few solutions:

Dear Bruno,

Thank you so much for your reply.
I created a very simple case which is a simple cylinder with inlet (velocity =5.3), walls , outlet (P=0).
I used the solver simpleFoam with turbulent.
I tried to vary the mesh with different values, increasing and reducing also i tried to apply a filled but the same problem is still there.
I'm so surprise, I attached some pictures which explain this issue.

novakm August 23, 2013 04:25

Quote:

Originally Posted by mina.basta (Post 447499)
Dear Bruno,

Thank you so much for your reply.
I created a very simple case which is a simple cylinder with inlet (velocity =5.3), walls , outlet (P=0).
I used the solver simpleFoam zith turbulent.
I tried to vary the mesh with different values, increasing and reducing also i tried to apply a filled but the same problem is still there.
I'm so surprise, I attached some pictures which explain this issue.

Hi Mina.

Could you post here the test case?
This is strange behavior indeed :)
I am guessing that it is caused due an inconsistent boundary conditions or due the numerical pressure singularity phenomena (e.g."L" problem or squeeze flow issue).

Btw. It is usual to use pressure driven flow. In the test case that can be interpreted as PRESSURE driven flow in cylindrical pipe there exists an analytical solution. You can find it as Poiseuille fluid flow. It could help you to set the model properly.

Best regards

Martin

mina.basta August 23, 2013 04:47

1 Attachment(s)
Quote:

Originally Posted by novakm (Post 447636)
Hi Mina.

Could you post here the test case?

Dear Martin,

here is the test case


All times are GMT -4. The time now is 12:16.