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

define_profile UDF question

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 12, 2010, 15:17
Default define_profile UDF question
  #1
New Member
 
Andrei
Join Date: May 2010
Posts: 1
Rep Power: 0
andu is on a distinguished road
Hello everyone

I am trying to write an UDF that changes the pressure value in a pressure outlet every 5000 iterations, in a steady case.

When I interpret it, I get this error, wich i do not understand.
Error: D:\\pump\\P.c: line 32: label "count2" not found (pc=16).

Here is the code

#include "udf.h"

DEFINE_PROFILE(pressure,t,i)
{

face_t f;
real p;

if(N_ITER<=5000)p=0;
else if(N_ITER<=10000)p=1e5;
else if(N_ITER<=15000)p=2e5;
else if(N_ITER<=20000)p=3e5;
else if(N_ITER<=25000)p=4e5;
else if(N_ITER<=30000)p=5e5;
else if(N_ITER<=35000)p=6e5;
else if(N_ITER<=40000)p=7e5;
else if(N_ITER<=45000)p=8e5;
else if(N_ITER<=50000)p=9e5;
else p=1e6;


begin_f_loop(f,t)
{

F_PROFILE(f,t,i)=p;

}
end_f_loop(f,t)


}

I would appreciate any kind of help.

Thank you,
Andrei
andu is offline   Reply With Quote

Old   July 1, 2010, 07:15
Default how do you control the N_INTER out of loop?
  #2
New Member
 
王国斌
Join Date: Jun 2010
Location: beij,chongqing,Chengdu
Posts: 22
Rep Power: 7
wangguobin14 is on a distinguished road
Send a message via ICQ to wangguobin14 Send a message via MSN to wangguobin14
Quote:
Originally Posted by andu View Post
Hello everyone

I am trying to write an UDF that changes the pressure value in a pressure outlet every 5000 iterations, in a steady case.

When I interpret it, I get this error, wich i do not understand.
Error: D:\\pump\\P.c: line 32: label "count2" not found (pc=16).

Here is the code

#include "udf.h"

DEFINE_PROFILE(pressure,t,i)
{

face_t f;
real p;

if(N_ITER<=5000)p=0;
else if(N_ITER<=10000)p=1e5;
else if(N_ITER<=15000)p=2e5;
else if(N_ITER<=20000)p=3e5;
else if(N_ITER<=25000)p=4e5;
else if(N_ITER<=30000)p=5e5;
else if(N_ITER<=35000)p=6e5;
else if(N_ITER<=40000)p=7e5;
else if(N_ITER<=45000)p=8e5;
else if(N_ITER<=50000)p=9e5;
else p=1e6;


begin_f_loop(f,t)
{

F_PROFILE(f,t,i)=p;

}
end_f_loop(f,t)


}

I would appreciate any kind of help.

Thank you,
Andrei
hi,
i am interesting in your case, especially on N_ITER ?how could you control it?
thank you !
wangguobin14@163.com
wangguobin14 is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple UDF question Pirooz Darabi FLUENT 0 October 31, 2007 16:22
Basic question: UDF for wall heat flux Carl FLUENT 1 August 5, 2006 19:01
Question about UDF summer FLUENT 1 July 18, 2006 10:13
UDF question Ryan FLUENT 2 July 5, 2006 14:54
A question about the dynamic mesh UDF Tango FLUENT 1 November 27, 2003 03:56


All times are GMT -4. The time now is 19:26.