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

cells position and properties

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2023, 04:40
Default cells position and properties
  #1
New Member
 
HRSD
Join Date: Jul 2023
Posts: 11
Rep Power: 3
HRSD is on a distinguished road
hi friends,
i want find cells position and properties(for example temperature) in solution domain(same below picture) i can find cell2 position and properties but for cell3 , have problem.
friends can help me to find position and properties for cell3?
thankyou.


Untitled.png

Last edited by HRSD; August 27, 2023 at 22:42.
HRSD is offline   Reply With Quote

Old   August 27, 2023, 21:14
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
whats the difference between cell 2 and cell3 ? it's not clear from your sketch

sketch is wrong for cell1 as boundary can't cross center of cell in Fluent
__________________
best regards


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

Old   August 27, 2023, 22:53
Default
  #3
New Member
 
HRSD
Join Date: Jul 2023
Posts: 11
Rep Power: 3
HRSD is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
whats the difference between cell 2 and cell3 ? it's not clear from your sketch

sketch is wrong for cell1 as boundary can't cross center of cell in Fluent
hi, thanks for your attention,
- fluent save date in cell center and dash line for cell1 is imaginary boundary(for more description),
- cell3 position and properties is different with cell2.
numerical domain is full of cells and I draw 3 cells for sample.
thanks.
Untitled.png
HRSD is offline   Reply With Quote

Old   August 28, 2023, 07:02
Default
  #4
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
if you can find position of cell2 why you can't do same for cell3?

your algorithm not clear
__________________
best regards


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

Old   August 31, 2023, 15:24
Default cells position and properties
  #5
New Member
 
HRSD
Join Date: Jul 2023
Posts: 11
Rep Power: 3
HRSD is on a distinguished road
hi, thanks for attention,
this problem has be solved,
please see below code if interest for you,

begin_f_loop_int(f0,tf0)
if PRINCIPAL_FACE_P(f0,tf0)
{
tc1 = THREAD_T0(tf0);
c1 = F_C0(f0,tf0);
c_face_loop(c1,tc1,n)
{
f1_temporary = C_FACE(c1,tc1,n);
tf1_temporary = C_FACE_THREAD(c1,tc1,n);
if (F_C1(f1_temporary,tf1_temporary) == c1)
{
tf1 = C_FACE_THREAD(c1,tc1,n);
f1 = C_FACE(c1,tc1,n);
}
}
tc2 = THREAD_T0(tf1);
c2 = F_C0(f1,tf1);
gfcp = (C_CP(c1,tc1) + C_CP(c2,tc2)) / 2;
khc = (C_K_L(c1,tc1) + C_K_L(c2,tc2)) / 2;
tj1 = C_T(c1,tc1);
tj2 = C_T(c2,tc2);
F_CENTROID(pos0,f0,tf0);
C_CENTROID(pos1,c1,tc1);
C_CENTROID(pos2,c2,tc2);
dy1 = pos0[1] - pos1[1];
dy2 = pos1[1] - pos2[1];
alp = dy2 / dy1;
.
.
.
other actions in udf codes for problem ...
.
.
.
}
end_f_loop_int(f0,tf0)

number 0 for cell 1,
number 1 for cell 2,
number 2 for cell 3,

thanks.
HRSD is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Properties as a function of space/cellzone – porous region absorbedsponge OpenFOAM Pre-Processing 0 September 29, 2021 14:59
simplifiedSiwek - error in calculating the position of a coal error guitar_love_15 OpenFOAM Running, Solving & CFD 0 November 4, 2018 04:06
Calculate Bubbles Centre position and Velocity arsalan.dryi OpenFOAM Post-Processing 2 May 21, 2016 05:28
Material properties variation mattedi CFX 2 August 29, 2012 12:57
Combustion Convergence problems Art Stretton Phoenics 5 April 2, 2002 05:59


All times are GMT -4. The time now is 07:34.