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

questions of nres and increase power per iteration

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2016, 14:09
Default questions of nres and increase power per iteration
  #1
New Member
 
Join Date: Mar 2015
Posts: 13
Rep Power: 11
dxm2008 is on a distinguished road
HI, all
I am trying to write a UDF to realize that it can increase the source power per 100 iterations. it is a steady calculation but I just want to increase the power. here is my udf:
#include "udf.h"
#include "sg_mphase.h"
#define T_SAT 572.09
#define LAT_HT 1412.58e3
DEFINE_PROFILE(fixedwall_heatflux_01,thread,index)
{
real z[ND_ND];
real y;
real q_avg;
face_t f;
int iter;
real q;

FILE *fp=fopen("qavg_01.txt","r");
fscanf(fp,"%f",&q_avg);
fclose(fp);

iter=nres;
printf("%d\n",iter);
if (iter<400)
{
q=q_avg;
}
else
{
q=q_avg+ceil((iter-400)/120.0)*22867.1;
}

begin_f_loop(f,thread)
{
F_CENTROID(z,f,thread);
y=z[2];
if ((y>=0.07)&&(y<=2.07))
{
F_PROFILE(f,thread,index)=(0.8187+0.6813*cos(2.*2. 4364*((y-0.07)/2.-0.5)))*q;
}
}
end_f_loop(f,thread)
}
I found the question happened to nres which I want to use the current iteration. it can increase. but when it is higher than 1000, it change to 501 suddenly. i check online while they say it may have a limitation for NRES, but is anyone know how to turn off or change this limitation?
dxm2008 is offline   Reply With Quote

Old   August 28, 2018, 23:08
Default
  #2
New Member
 
Etienne Lin
Join Date: Aug 2017
Location: la Chine
Posts: 4
Rep Power: 8
hongzhilin is on a distinguished road
i am using nres in my udf, but i don't understand its meaning, can you explain it?

thanks
hongzhilin 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



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