CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 9, 2020, 23:46
Default Udf
  #1
New Member
 
kedy6lsy
Join Date: Oct 2019
Posts: 10
Rep Power: 7
kedy6lsy is on a distinguished road
Hello guys,

i wonder if my code is correct, note that the y/R in the picture is actually x/R in my simulation

#define Tinlet 300 //in kelvin
#define Th 1800 //in kelvin

DEFINE_PROFILE(Temperature_Wall,thread,index)
{
face_t f;
real x[ND_ND];

begin_f_loop(f,thread);
{
F_CENTROID(x,f,thread);
F_PROFILE(f,thread,index) = Tinlet + 0.5*(1+tanh(20*(x[0]/Ra-0.45)))*(Th-Tinlet);
}
end_f_loop(f,thread);
}

Many thanks
Attached Images
File Type: png Capture.PNG (5.4 KB, 4 views)
kedy6lsy is offline   Reply With Quote

Old   February 11, 2020, 17:02
Default Ra is missing
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
You do not have Ra declared in the code. It will give compile time error. You need to declare Ra as a real variable and then assign a value. Rest appears to be alright
__________________
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
udf for one dimensional linear motion based on force maccheese Fluent UDF and Scheme Programming 2 September 1, 2019 03:18
Save output of udf in another udf! JuanJoMex FLUENT 0 February 8, 2018 13:43
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 01:53
UDF parallel error: chip-exec: function not found????? shankara.2 Fluent UDF and Scheme Programming 1 January 16, 2012 23:14
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 05:01


All times are GMT -4. The time now is 10:50.