|
[Sponsors] |
Fluent: Find Cell Volume at Current Position DPM UDF |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 1, 2020, 15:41 |
Fluent: Find Cell Volume at Current Particle Position DPM UDF
|
#1 |
Senior Member
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 142
Rep Power: 7 |
Hello,
I am trying to extract the interpolated fluid velocities + cell volume at the current particle position. Anybody experienced in using UDF macros, could you help me to understand what I am doing wrong? #include "udf.h" DEFINE_DPM_SCALAR_UPDATE(interp_vel_and_volume,c,t ,init,p) { cphase_state_t *cp; cp = p->cphase; P_USER_REAL(p,0) = cp->V[0]; /* Interpolated x-velocity */ P_USER_REAL(p,1) = cp->V[1]; /* Interpolated y-velocity */ P_USER_REAL(p,2) = cp->V[2]; /* Interpolated z-velocity */ P_USER_REAL(p,3) = cp->C_VOLUME(TP_CELL(p),TP_CELL_THREAD(p)); } Last edited by alainislas; May 1, 2020 at 20:25. |
|
Tags |
dpm in fluent, udf compilation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
How to use a UDF to set the volume fraction in the cells next to a wall? | DF15 | Fluent UDF and Scheme Programming | 33 | August 20, 2020 14:36 |
negative cell volume detected while running ANSYS Fluent UDF | khushbu.bhavsar92 | FLUENT | 0 | March 27, 2016 23:45 |
Cell centroid and cell volume in general, and in Fluent | zmester | Main CFD Forum | 3 | October 17, 2009 12:05 |
On the damBreak4phaseFine cases | paean | OpenFOAM Running, Solving & CFD | 0 | November 14, 2008 22:14 |