CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   InterFoam - no convergence (https://www.cfd-online.com/Forums/openfoam-solving/179641-interfoam-no-convergence.html)

DancingButterfly November 4, 2016 01:50

InterFoam - no convergence
 
Hey openFoam users

I'm trying to simulate the flow through a cylindric unit (3 inlets at the top, 6 outlets at the bottom). Now I'd like to make a 2D simulation of a slice (middle of the cylindric unit) such that the flow distribution is visible. As far as I know, openFoam operates in 3D.

I am drawing and meshing the unit in Salome. There I created a slice of the unit, which is still 3D though. Can I import this slice into openFoam and assign the front and the back side as empty patch?
I tried it and the program did no converge (I indicated the front and back side as empty patch in the alpha boundary folder as well as in U and p.)

What is my mistake? Or is there another way of just simulating a 2D slice? I want to do that because I think it is a easier way to look at the flow distribution.


I am very happy about any help as I am a rather new openFoam user :-)
Best,
Ann

floquation November 4, 2016 03:16

A 2D simulation in OpenFOAM is simply a 3D simulation with only one cell thickness in the third dimension and boundary condition "empty".

An alternative that could be of use to you is an axis-symmetrical simulation: use the "wedge" boundary condition.

A common reason for interFoam to behave strangely is the way in which you specify your inlet. Did you attach an inlet pipe for each inlet, or do you set all different velocities/alphas on the same patch? The latter will not behave properly (in my experience).

DancingButterfly November 6, 2016 18:15

Thanks for the reply and sorry for answering late.

That might be a stupid question, but how do I create a "one cell thickness in the third dimension" ? Does this mean 1 mm or what is meant by cell?

I do not have inlet pipes (just 3 wholes in the upper part of the unit). I created an inlet group with all three faces and use them in the program as one patch.

floquation November 7, 2016 03:46

Quote:

Originally Posted by DancingButterfly (Post 624413)
Thanks for the reply and sorry for answering late.

It was weekend, hence it is not late at all. ;)

Quote:

Originally Posted by DancingButterfly (Post 624413)
That might be a stupid question, but how do I create a "one cell thickness in the third dimension" ? Does this mean 1 mm or what is meant by cell?

A cell is the computational unit in which the equations are solved. Practically: if you are using blockMesh, it means that you have to set the number of cells to '1' in the third dimension. The following example sets only one cell in the z-direction:
Code:

blocks
(
    hex (0 1 2 3 4 5 6 7) (32 32 1) simpleGrading (1 1 1)
);

If you then set the patches that belong to the constant-z plane to type "empty", the z-direction of your 3D simulations will not do anything. Therefore, you will have a 2D simulation.

Quote:

Originally Posted by DancingButterfly (Post 624413)
I do not have inlet pipes (just 3 wholes in the upper part of the unit). I created an inlet group with all three faces and use them in the program as one patch.

I'm not sure if I understand this correctly.
Does this mean that you have a "wall" and an "inlet" on the same face? That is, on the same height?
If so, that might mean trouble.

Have a look at this tutorial. If you were to remove the inlet pipe above the box and just specify the inlet at the same height as the atmosphere, your simulation will not behave physical (or diverge even).

DancingButterfly November 8, 2016 22:06

Okay, thank you very much!
I will have a look at the tutorial you gave me :-)

Another question: In another set-up I used the command pre.cjk { font-family: "Nimbus Mono L",monospace; }p { margin-bottom: 0.1in; line-height: 120%; } transformPoints -scale '(0.001 0.001 0.001)'

to transform the geometry (with was drawn in mm dimension) to m dimension for OpenFOAM.
If I do so, the program does not converge anymore :( I tried then to run the program without the transformation
command, which is wrong I know, as the dimensions are totally wrong then. Buuut then the program
works.
Do you have an idea, where the problem lays?

Thank you :-)

floquation November 9, 2016 02:53

That's a completely different question - never heard of that method and it looks pretty weird: why do you need a font to transform a mesh...?

DancingButterfly November 9, 2016 03:29

I am sorry, there was a mistake with copy paste.

I use the command
transformPoints -scale '(0.001 0.001 0.001)'
in the terminal.

As I import a mesh (ideasUnvToFoam) which is drawn in other dimensions.

I hope it is more understandable now.

Arne87 November 9, 2016 08:11

since you reduced the size of the cells but the the physics of your flow (velocity etc..) remained the same, you should probably reduce the time step. A Courant lower then 1 is good for interfoam as the alpha equation is solved explicitly.


All times are GMT -4. The time now is 21:31.