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/)
-   -   boundary condition of an internal surface (https://www.cfd-online.com/Forums/openfoam-solving/90070-boundary-condition-internal-surface.html)

ynsudo June 29, 2011 21:16

boundary condition of an internal surface
 
Dear all,

I would like to calculate mass flow rate of a small surface put in flow. The surface is put just for calculating flow rate so it should not affect the flow.

The solver I use is interFoam. I wonder if I have to define the small surface as a patch and pose boundary condition of gradient zero for pressure, velocity, and volume fraction or there is other better ways. I’d be glad if you give me advice.
Thank you in advance for your help.

Yu

Van de Leur June 30, 2011 09:23

Dear Yu,

Sampling data is explained in paragraph 6.5 of the OF user guide.
You can take samples anywhere in your domain without defining a surface, just create a file called sampleDict.

Regards,

Kevin

ynsudo June 30, 2011 21:59

Dear Kevin,

Thank you for your advice. It’s great that if I don’t have to specify patch for my purpose since I don’t have to think about boundary condition that doesn’t affect the flow.



I have a question about the sampleDict.
According to the paragraph 6.5 of the OF user guide, it seems that I could choose keyword "surfaces" in the sampleDict.
http://www.openfoam.com/docs/user/sa...hp#x34-2001106



The shape of a surface where I want to calculate flow rate is an ellipse so I want to know how to calculate flow rate on surface with any shape. I think it can be specified by the STL file. I am wondering if that is possible in sampleDict. Or if there is any other way to solve my problem and teach me it would be appreciated.

Best regards,
Yu

Van de Leur July 4, 2011 03:51

You could create a surface/patch to take samples. This is certainly possible for boundary patches but I'm not sure how it works with patches in the middle of a domain.

Another way is to use the 'cloud' option in the sampleDict and specify the coordinates of the points (on your ellipse) you want to sample.

Regards,

Kevin

ynsudo July 4, 2011 05:55

Hello Kevin,
Thank you for your reply. It is very helpful.

About the first way you mentioned I’m not sure but it seems that I have to define boundary patches so I need to think about proper boundary conditions that don’t affect flow around the patch.

The second way seems to work. For example, I may need a STL file for the shape such as an ellipse, then get the area and the coordinates of a triangle consisting of the STL, then get velocity for the coordinate by sampleDict with ‘cloud’ option, then calculate flow rate by multiplying the velocity by the area for a triangle and summing up them. I may need to make a program to calculate it.

Yu

miles_davis September 13, 2011 09:52

hi ynsudo,

I have the same problem: I want to have the flow rate throug a given surface. The surface is already defined in my mesh so it would be a boundary patch or a cyclic patch.
What I do not uynderstand when I look at the SampleDict example in the Userguide is how to find the syntaxe for programming the flow rate through each face of the patch surface and then sum it over all the faces of the surface patch. surface
Any help would be welcomed.

Thanks

ynsudo September 13, 2011 20:37

Hello Miles

I am trying to use a routine named calcMassFlow to calculate the mass flow rate.
http://openfoamwiki.net/index.php/Contrib_calcMassFlow
There would be a program for higher versions.
This routine could calculate the mass flow rate for one-phase flow.
If you would like to calculate the mass flow rate for two-phase flow you would need to modify the program.
Best,
Yu

miles_davis September 14, 2011 04:17

Thanks you
I am gonna check this... as soon as I have found a good programming tuto on openfoam.


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