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

UDF coming cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2020, 15:06
Default UDF coming cells
  #1
New Member
 
Alexander Sidorov
Join Date: May 2020
Posts: 1
Rep Power: 0
alexsid93 is on a distinguished road
Dear Fluent experts, good afternoon!

Please, tell me which way to dig, or maybe someone has encountered this and can tell.

The story is this. I supplement the solver by calculating some of the quantities I need, one of the terms of which is this thing:

ux*dSigma/dx=ux*((sigma(c-1)-sigma(c+1))/2deltax)

s-1 - cell "lower" on the axis, s + 1 - cell "higher" on the axis. - by itself conditionally.

I plan to replace the derivative of the quantity with its finite-difference analogue. However, here's the misfortune, how to find the nearest cells? As for the delta x, I understood roughly - if I know the number of the adjacent cell, I can find the coordinates of the centers of the cells and find the distance between them through C_CENTROID (x, c, t), it will suit me.

I tried to export the centers of the cells with their numbers, and realized that the cell with the number +1 could be in any direction. So you need to understand how to find the numbers of all adjacent cells.

Hope to help! Thanks in advance
alexsid93 is offline   Reply With Quote

Old   May 30, 2020, 07:27
Default Clarity
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
The description you provided is not very clear, such as, the statement,

Quote:
s-1 - cell "lower" on the axis, s + 1 - cell "higher" on the axis. - by itself conditionally
however, if you are struggling with ID of the cell, then you can fetch IDs using C_ID, just like you fetch centroid using C_CENTROID. ID returned by C_ID is global.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm 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
[snappyHexMesh] snappyHexMesh sticking point natty_king OpenFOAM Meshing & Mesh Conversion 11 February 20, 2024 09:12
[snappyHexMesh] snappyHexMesh Segmentation Fault avd28 OpenFOAM Meshing & Mesh Conversion 11 May 11, 2015 20:32
Setting pressure value for specific cells, UDF Amir FLUENT 2 September 1, 2005 18:59
UDF: neighbour cells, upwind cells Dmitriy Makarov FLUENT 0 February 18, 2001 13:53
UDF for looping over nodes in cells. Malcolm Wallace FLUENT 3 July 3, 2000 09:22


All times are GMT -4. The time now is 05:58.