CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

Getting the y-coordinate of a particular cell

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2016, 07:32
Default Getting the y-coordinate of a particular cell
  #1
New Member
 
Elena F
Join Date: Nov 2015
Posts: 1
Rep Power: 0
Hell is on a distinguished road
Hi everyone;
I'm completely new in this forum.
I need to get the y coordinate of the first cell with zero velocity in the y axis. X and Z coordinate are fixed to zero.
I'm running a transient simulation and I'm intending to store the y-coordinate in a C_UDMI so I can get the time-dependent plot of this variable.
I'm kind of messed with the loop I need to use and also with the kind of predefined function (define_adjust?)
I pasted the "idea" I've got right now to try to explain it better.

DEFINE_ADJUST(my_adjust,d)

{
cell_t c;
Thread *t;
real xc[ND_ND];
xc[1]=0.0;
xc[2]=5.005;
xc[3]=0.0;
real v_zero=1.0;

C_CENTROID(xc,c,t);

if (C_V(c,t)!=0.0 )
xc[2]=xc[2]+0.005;
v_zero=C_V(c,t);
else
C_UDMI(c,t,0)=xc[2];

}

Thanks in advance
Elena
Hell is offline   Reply With Quote

Reply


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
Beginner help, coordinate udf with output file nb92 Fluent UDF and Scheme Programming 0 March 20, 2014 05:16
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 15:06
[Workbench] Creation of Cell Zones for processing in FLUENT kailingkk ANSYS Meshing & Geometry 0 October 5, 2013 06:09
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 15:38
Help Me, what's the Cell Above in 3D. gomane8 Main CFD Forum 0 September 10, 2011 20:09


All times are GMT -4. The time now is 19:56.