CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Problem 45deg Inflow and Outflow (http://www.cfd-online.com/Forums/openfoam-pre-processing/124899-problem-45deg-inflow-outflow.html)

eRzBeNgEl October 15, 2013 09:55

Problem 45deg Inflow and Outflow
 
1 Attachment(s)
Hi guys

I want to investigate a flow over a cylinder with an velocitsy inflow angle of 45 degrees. Therfore I created the computational domain in the attachement. My inflow patch is the on the side in x-direction, outflow patch in following to that on the opposite. Top and Bottom of the domain are set to cyclic patches. Forget about the streamlines in the picture. The do make no sense.

eRzBeNgEl October 16, 2013 04:38

Ok I am sure I have to use periodic boundary conditions. Tried also to implement them but always getting following error:

Quote:

--> FOAM FATAL ERROR:
face 89000 area does not match neighbour by 199.956% -- possible face ordering problem.
patch:sym1 my area:0.972916 neighbour area:0.000106032 matching tolerance:0.0001
Mesh face:3705960 fc:(29.0593 -0.256446 1)
Neighbour fc:(1.5019 -0.0132541 1.98559e-16)
Here is the interesting part of my boundary file
Quote:

...
}
sym1
{
type cyclic;
nFaces 124600;
startFace 3616960;
neighbourPatch sym2;
}
sym2
{
type cyclic;
nFaces 124600;
startFace 3741560;
neighbourPatch sym1;
}

...
and my U file respectively for p, eg...


Quote:

...
sym1
{
type cyclic;
neighbourPatch sym2;
}


sym2
{
type cyclic;
neighbourPatch sym1;
}

...
What am I doing wrong?

eRzBeNgEl October 16, 2013 07:33

no one can help me?

zhengzh5 October 16, 2013 12:49

Quote:

Originally Posted by eRzBeNgEl (Post 457209)
Ok I am sure I have to use periodic boundary conditions. Tried also to implement them but always getting following error:

Here is the interesting part of my boundary file
and my U file respectively for p, eg...


What am I doing wrong?

first thing first, how did you generate that mesh? It seems like your mesh cells on the top and bottom patches don't match up nicely, hence the complain from the solver. Typically, in order to use the cyclic boundary conditions, you need cell matching on the periodic BCs within certain tolerance (insert "matchTolerance 0.0001;" in your constant/polyMesh/boundary under the cyclic boundaries). For example,

patch1
{
type cyclic;
nFaces 100;
startFace 1;
matchTolerace 0.0001;
neighbourPatch patch2;
}
patch2
{
type cyclic;
nFaces 100;
startFace 101;
matchTolerace 0.0001;
neighbourPatch patch1;
}

If your cells in the top and bottom faces are way off, such that the matchTolerance parameter doesn't help, then you will have to use cyclicAMI instead of the cyclic boundary type. I know of it, but haven't used it myself, so can't help you with the details related to how to use cyclicAMI. However, I'm sure you can find some information on the forum by doing a quick search.

Hope this helps! good luck!

shuoxue November 2, 2013 07:16

Quote:

Originally Posted by eRzBeNgEl (Post 457087)
Hi guys

I want to investigate a flow over a cylinder with an velocitsy inflow angle of 45 degrees. Therfore I created the computational domain in the attachement. My inflow patch is the on the side in x-direction, outflow patch in following to that on the opposite. Top and Bottom of the domain are set to cyclic patches. Forget about the streamlines in the picture. The do make no sense.

Hi, eRzBeNgEl!

I'm solving a flow around cylinder case with interFoam. My geometry is just like yours. I'm wondering how to simulate outflow BC(just like outflow BC in fluent) in openfoam.

I have tried freestream and freestreamPressure BC in U and p files. However, the drag coefficient doesn't match the values announced in papers.

Do you have any ideas?

thanks in advance.

eRzBeNgEl November 4, 2013 09:42

I want to refresh this topic:

Now I tried to use cyclicAMI


This is what I did so far:
Made faceSets:
setSet
faceSet AMI new patchToFace sym1
faceSet AMI add patchToFace sym2
quit

setsToZones -noFlipMap


boundary file:
Quote:

sym1
{
type cyclicAMI;
nFaces 124600;
startFace 37291000;
matchTolerace 0.001;
neighbourPatch sym2;
transform translational;
separationVector (0 0 0); ->first plane at xy-plane in origin
}
sym2
{
type cyclicAMI;
nFaces 124600;
startFace 37415600;
matchTolerace 0.001;
neighbourPatch sym1;
transform translational;
separationVector (0 0 -4);-height is 4m in z-direction
}


I also adjusted the initial conditions U and p correctly:
Quote:

sym1
{
type cyclicAMI;
neighbourPatch sym2;
}

sym2
{
type cyclicAMI;
neighbourPatch sym1;
.......................


Now I got following error
:
Quote:

AMI: Creating addressing and weights between 124600 source faces and 124600 target faces




--> FOAM FATAL ERROR:
Unable to find initial target face




I think I am almost there, the error is asking for intial target face. I thought I already defined this by faceSets at the beginning.


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