|
[Sponsors] |
[Help] identify the cell next to the liquid/vapor interface |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 4, 2020, 17:58 |
[Help] identify the cell next to the liquid/vapor interface
|
#1 |
New Member
Maggie hsu
Join Date: Apr 2014
Posts: 2
Rep Power: 0 |
Dear all,
I would like to identify the cell next to the liquid/vapor interface using Fluent UDF code. I have looked through the manual, and it mentioned that i can use F_C0, However, I never get it right. Can anyone help me check my code? Which parts of the code i am making mistake? or the idea is wrong. thanks ahead. So the thing I did to my code is that first I define a value to C_UDMI( c, ct, 4) to all cell of the domain mp_thread_loop_c(ct,domain,pt) { begin_c_loop(c,ct) { C_UDMI(c,ct,4)=0; } end_c_loop (c,ct) } Then I go to subdomain which is a vapor domain. I tried to use F_C0 to find the interface ( which should be a boundary of the vapor phase) sub_domain_loop(subdomain,domain, phase_domain_index) { if (DOMAIN_ID(subdomain) == 3) thread_loop_c(cell_thread,subdomain) { begin_c_loop_all(c,cell_thread) { c0 = F_C0(f,f_thread); t0 = F_C0_THREAD(f,f_thread); } end_c_loop_all(c,cell_thread) C_UDMI(c,cell_thread,4)=0; } } |
|
February 5, 2020, 04:29 |
F_c0()
|
#2 |
Senior Member
|
F_C0() is not what you understood it is. F_C0(f,t) returns the cell ID of the cell of which face f is primary face with the thread t. It has got nothing to do with the interface. You have to use C_VOF to identify the cell that contains the interface.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
February 5, 2020, 13:13 |
|
#3 |
New Member
Maggie hsu
Join Date: Apr 2014
Posts: 2
Rep Power: 0 |
Dear Vinerm,
Your answer is so so so helpful. I have solved my problem. thank you so much again. ---------------------------------------------------------------------- Regards, Maggie |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simulating fire in a tunnel | luca1992 | OpenFOAM | 14 | August 16, 2017 14:50 |
How to determine the direction of cell face vectors on processor patches | sebastian_vogl | OpenFOAM Programming & Development | 1 | October 11, 2016 14:17 |
interFoam running blowing up | sandy13 | OpenFOAM Running, Solving & CFD | 2 | May 5, 2015 08:16 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
[snappyHexMesh] snappyhexmesh cell splitted ununiform..2D case | sharonyue | OpenFOAM Meshing & Mesh Conversion | 1 | April 23, 2013 00:34 |