|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Mohammad Jamali
Join Date: Oct 2020
Posts: 6
Rep Power: 6 ![]() |
Hello dear friends.
If you pay attention to the submitted forms. I want to write a program that can automatically record the density and pressure associated with the id-nub of each zone . please guide me how could write Code for get Cell_zone ID automaticly and put It as Zone_ID Argument In function. also in third Pic -i know Code Is Wrong But when i Load it in Fluent Show Error For Second Line And Write (PARSE....) why Fluent did not Accept DEFIEN_INIT...... Thank You for Response and Help Last edited by Mohammad_Jamali; November 18, 2020 at 14:47. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
Next time, can you just copy your code, not a picture of your code?
You have already a typo in the first line. It is include, not inclide. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Mohammad Jamali
Join Date: Oct 2020
Posts: 6
Rep Power: 6 ![]() |
hi , first i am thankful for your helps and notes for guide me .
i have Some Change in Code but it doe not work , may be write 2 example for how use Lookup thread and thread_id in the fact must of my problems are about define ID numbers and how Relating ID number to Cell Zone or Domain my Code : #include "udf.h" DEFINE_ADJUST(M_Dens,d){ Domain *d ; d=Get_Domain(1) ; int id=4; Thread t=lookup_thread(1,4); double Den = 0.655 ; thread_loop_t (t,d){ begin_t_loop(t,d) c_r(c,t) = Den ; c_t(c,t) = 300 ; end_t_loop } } |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 ![]() ![]() |
Code:
#include "udf.h" DEFINE_ADJUST(M_Dens,d) { int id=4; Thread *t=Lookup_Thread(d,id); cell_t c; double Den = 0.655 ; begin_c_loop(t,d) { C_R(c,t) = Den ; C_T(c,t) = 300 ; } end_c_loop }
__________________
best regards ****************************** press LIKE if this message was helpful |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Mohammad Jamali
Join Date: Oct 2020
Posts: 6
Rep Power: 6 ![]() |
Hi - thank you for attention .
I read Fluent's udf manual - but unfortunately I did not find a good example to illustrate these phrases. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
udf for multiphase flow with real gas mixture | sugumaran | Fluent UDF and Scheme Programming | 2 | January 28, 2013 00:10 |
UDF programming | fullmonty | FLUENT | 5 | June 30, 2011 03:40 |
udf for multiphase flow with real gas mixture | sugumaran | ANSYS | 0 | July 30, 2010 12:38 |
UDF programming for pressure 3D..HELP | coolyihao | Fluent UDF and Scheme Programming | 4 | July 15, 2010 16:28 |
multiphase udf | Rashmi | FLUENT | 1 | March 7, 2006 03:17 |