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

Can any tell me which is right for the below codes?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 30, 2020, 07:20
Default
  #21
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
Quote:
Originally Posted by hitzhwan View Post
You mean the below code you load work? Why I have some errors when I load it by the same process, what fluent edition do you use? Would you please send me your case and udf to me, I want to try more, thank you so much .
#include "udf.h"

DEFINE_PROFILE(hf_change,thread,position)
{
face_t f;
const real heat_flux1 = 0;
const real heat_flux2 = 500;
const real switch time = 0.0001;
const real time = CURRENT_TIME;
const real hf = time<switch_time?heat_flux1:heat_flux2;
begin_f_loop(f,thread)
{
F_PROFILE(f,thread,position)=hf;
}
end_f_loop(f,thread)
}
The hitzhwan of 24 December was able to load this without errors. The hitzhwan of 29 December gets errors. It's very confusing like this.
pakk is offline   Reply With Quote

Old   December 30, 2020, 13:09
Default why to make it solid, not fluid?
  #22
Senior Member
 
Join Date: Dec 2017
Posts: 388
Rep Power: 10
hitzhwan is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
Unfortunately, I'm not able to send you any files.

This is not the problem of version, code is simple and should work in any version.

I recommend you to make new test simple geometry:
rectangular, make it solid, not fluid
make new source file (with other name) and compile it again
load and apply UDF, run transient simulation

most likely, you didn't compile the code
why to make it solid, not fluid?
hitzhwan is offline   Reply With Quote

Reply

Tags
udf


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



All times are GMT -4. The time now is 17:49.