|
[Sponsors] |
How to loop the outer cells of the volume cell zone? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 12, 2017, 06:28 |
How to get cell adjacent to another thread?
|
#1 |
New Member
Gene
Join Date: Mar 2017
Posts: 13
Rep Power: 9 |
Hi,
I have been working for several days. I have 3 cell zones. their arrangement: surface(ID=42)/volume(ID=60)/volume The problem is I want to get face area(that point to surface) and volume of the cells that ONLY adjacent to surface(ID=42). Here is my effort. So I started with looping all faces in ID=42 which is the surface and check whether c1 has thread number equal to 60. Please help me #include "udf.h" #include "mem.h" DEFINE_EXECUTE_AT_END(execute_at_end){ Domain *d; face_t f, f0; cell_t c, c1; Thread *t, *t1, *ct; int Zone_ID = 42; /* ice outer = 42 */ d = Get_Domain(1); real A[], area=0; /* Loop over all faces on ice outer(surface) */ t = Lookup_Thread(d, Zone_ID); begin_f_loop(f,t) { /* c0 and t0 identify the adjacent cell */ t1 = THREAD_T1(t); //return number of thread (ice layer = 60) if (t1==60){ c1 = F_C1(f, t0); //return cell index of opposite thread to 42 which is 60 F_AREA(A,f,t);//area vector on the surface area = NV_MAG(A);//magnitude of the area } end_f_loop(f,t) } } Last edited by gzsakuraz; April 12, 2017 at 08:36. |
|
April 12, 2017, 14:46 |
|
#2 |
New Member
Swapnil Chavanda
Join Date: Jan 2017
Location: Pune
Posts: 19
Rep Power: 9 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
snappyhexmesh remove blockmesh geometry | philipp1 | OpenFOAM Running, Solving & CFD | 2 | December 12, 2014 11:58 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |