CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Fluent: Find Cell Volume at Current Position DPM UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 1, 2020, 15:41
Post Fluent: Find Cell Volume at Current Particle Position DPM UDF
  #1
Senior Member
 
alainislas's Avatar
 
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 142
Rep Power: 7
alainislas is on a distinguished road
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.
alainislas is offline   Reply With Quote

Reply

Tags
dpm in fluent, udf compilation


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 16:42.