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

How looping over cells works in FLUENT UDFs?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2022, 03:12
Default How looping over cells works in FLUENT UDFs?
  #1
Member
 
Join Date: Jul 2020
Location: India
Posts: 66
Rep Power: 6
Cooper24 is on a distinguished road
I just have a simple 2D domain consisting of uniform hexahedral cells as shown in the attached image. I want to know the looping pattern in which looping over the cells happens. I have a total of 11232 cells. As I have understood, the cell index c is a number assigned to the cells and therefore there should be a total of 11232 values for c. Is there a way to know how begin_c_loop and end_c_loop works over the domain and in what order the looping over the cells works? I want to loop over the cells in a particular direction(say y, along each column). Can someone please help? Thanks in advance.
Attached Images
File Type: jpg mesh.jpg (183.2 KB, 13 views)
Cooper24 is offline   Reply With Quote

Old   August 10, 2022, 04:21
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
you may check it using udmi

put inside cell loop
Code:
C_UDMI(c,t,0) = k;
k+=1;
then plot udmi_0
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   August 10, 2022, 06:17
Default
  #3
Member
 
Join Date: Jul 2020
Location: India
Posts: 66
Rep Power: 6
Cooper24 is on a distinguished road
Thanks for your reply Alexander. I read and found that if I am using multiple cores, then the domain is divided into a number of partitions each having its own looping pattern. To get the idea, I need to see UDFs in parallel. Hope I am right.
Cooper24 is offline   Reply With Quote

Reply

Tags
cell count, loop meshing


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
Fluent UDF wrong number of cells in parallel - correct in serial dralexpe Fluent UDF and Scheme Programming 7 May 17, 2018 09:26
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
looping over selected / marked cells Jonathan Fluent UDF and Scheme Programming 0 November 22, 2012 05:59
pushback function for vectors in Fluent UDFs ScottN Fluent UDF and Scheme Programming 0 January 31, 2011 10:20
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23


All times are GMT -4. The time now is 14:13.