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

DEFINE_ON_DEMAND problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 25, 2013, 12:56
Question DEFINE_ON_DEMAND problem
  #1
New Member
 
Tiago Morgado
Join Date: Dec 2012
Posts: 8
Rep Power: 4
TMorgado is on a distinguished road
Hi everybody

I want to change the temperature of slab inside a furnace in particular time step of a transient simulation, with a DEFINE_ON_DEMAND udf.
After the simulation is completed, I execute the UDF and finnally, procede the calculation for another period of time.
That is something wrong with this approach?

Thank you
Tiago
Attached Files
File Type: c slab_1.c (347 Bytes, 2 views)
TMorgado is offline   Reply With Quote

Old   January 25, 2013, 13:09
Default
  #2
New Member
 
Tiago Morgado
Join Date: Dec 2012
Posts: 8
Rep Power: 4
TMorgado is on a distinguished road
The UDF was compiled and hooked with success, but althought it is executed without a problem, the temperature of slab ( cell zone solid ) doesn´t change.
Maybe there is something wrong with the UDF, but I can't figure out what could it be.

this is my UDF

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(Slab_1)
{

Domain *d=Get_Domain(1);
int zone_ID=121, Temp=400, cont;
cell_t c;
Thread *t=Lookup_Thread(d,zone_ID);

begin_c_loop(c,t)
{
C_T(c,t)=Temp;

}
end_c_loop(c,t)


}
TMorgado is offline   Reply With Quote

Reply

Tags
define_on_demand; udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On



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