CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   How to calculate free-surface area in a computational cell (https://www.cfd-online.com/Forums/fluent-udf/196927-how-calculate-free-surface-area-computational-cell.html)

cfdstar December 21, 2017 05:49

How to calculate free-surface area in a computational cell
 
hi experts,

I am working on a two-phase (gas-liquid) flow problem using the VOF method. I need to calculate the surface area of the free-surface in a computational cell. I am wondering if there is any macro for this purpose. If not, how can I calculate this surface area?

doruk December 22, 2017 04:25

I am currently working on a similar case. I am trying to find the surface normal.
They way I see it is very difficult to get it by using ansys fluent. There are no macros except C_VOF which only gives you the volume fraction of the cell. Even tough ansys fluent calculates these values we need (area, normal, curvature of the area etc) they dont let us use them in udf. You have to calculate them again in your own way then use them.

I suggest you to find some papers about how to calculate these values.

DEd December 22, 2017 13:10

Calculate the interfacial area density using C_VOF_G
 
You can calculate the interfacial area density by first calculating the gradient of VOF.

The macro is called "C_VOF_G"

The surface area is calculated by taking the absolute value of the components of this.

cfdstar December 22, 2017 15:38

Thanks for your replies. As far as I know, the macro "C_VOF_G"[x] returns the gradients of the VOF function in different directions. A normal to the free-surface can be found by the magnitude of the VOF function.

My problem is how to calculate the free-surface area in a computational cell.

DEd December 22, 2017 16:21

Check out this thread

https://www.cfd-online.com/Forums/fl...vof-model.html

xiatt March 12, 2018 02:05

Quote:

Originally Posted by DEd (Post 675904)
You can calculate the interfacial area density by first calculating the gradient of VOF.

The macro is called "C_VOF_G"

The surface area is calculated by taking the absolute value of the components of this.

Hi DEd,
Could you tell me how to use the macro "C_VOF_G"? When I load the macro by UDF, it always has the error:
received a fatal signal (Segmentation fault)

cfdstar July 12, 2018 13:24

Quote:

Originally Posted by xiatt (Post 684752)
Hi DEd,
Could you tell me how to use the macro "C_VOF_G"? When I load the macro by UDF, it always has the error:
received a fatal signal (Segmentation fault)

Dear Xiatt,

You should prevent the solver from freeing up memory. You can do that by answering "yes" to “Keep temporary solver memory from being freed?” from /solve/set/expert.

I hope it helps.


All times are GMT -4. The time now is 07:30.