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

UDF velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2017, 21:40
Default UDF velocity
  #1
New Member
 
Part
Join Date: Dec 2017
Posts: 3
Rep Power: 9
gomugom is on a distinguished road
I am not familiar with ansys so it keeps getting error.
I am going to make simulation about winecellar.
I want to change inlet velocity according to other plane temperature.
But 'Divergence detected in AMG solver: temperature' appears
please
#include "udf.h"

DEFINE_ADJUST(center_temp,domain)
{

real A[2];
real temper;
int ID=12;
Thread *t;
face_t f;

t = Lookup_Thread(domain,ID);
begin_f_loop(f,t)
{
F_CENTROID(A,f,t);
temper = F_T(f,t);

}
end_f_loop(f,t)
F_UDMI(f,t,0) = temper;
}

DEFINE_PROFILE(inlet_y_velocity, t, i)
{
real y[ND_ND];
face_t f;
real current_time;
current_time=CURRENT_TIME;
begin_f_loop(f,t)
{

if(current_time>1 && F_UDMI(f,t,0)>290)
F_PROFILE(f,t,i)=8;
else if (current_time>1 && F_UDMI(f,t,0)<288 && F_UDMI(f,t,0)>200)
F_PROFILE(f,t,i)=0.1;
else if (current_time>1 && F_UDMI(f,t,0)<=290 && F_UDMI(f,t,0)>=288)
F_PROFILE(f,t,i)=4;

}
end_f_loop(f,t)
}
gomugom is offline   Reply With Quote

Old   December 5, 2017, 04:08
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27
pakk will become famous soon enough
This UDF does not change temperature. It only reads the temperature from the simulation.

You simulation complains it has a problem with temperature. I don't see how this UDF can cause this. Does it also happen if you don't use this UDF, but a simpler velocity boundary condition?
pakk is offline   Reply With Quote

Old   December 5, 2017, 06:50
Default
  #3
New Member
 
Part
Join Date: Dec 2017
Posts: 3
Rep Power: 9
gomugom is on a distinguished road
Quote:
Originally Posted by pakk View Post
This UDF does not change temperature. It only reads the temperature from the simulation.

You simulation complains it has a problem with temperature. I don't see how this UDF can cause this. Does it also happen if you don't use this UDF, but a simpler velocity boundary condition?
I made a room which changes temperature according to outside temperature.
No using constant velocity did not make any problem.
gomugom is offline   Reply With Quote

Reply

Tags
udf, velocity bc


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
2D UDF for inlet y velocity Keyu Fluent UDF and Scheme Programming 1 April 26, 2016 06:01
Having trouble adapting serial UDF to work in parallel muyuntao Fluent UDF and Scheme Programming 1 November 10, 2015 14:42
Velocity boundary condtion UDF help victoryv Fluent UDF and Scheme Programming 2 October 9, 2012 16:27
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11
UDF component in Cyliderical Velocity? Hongchan Kim FLUENT 3 April 24, 2001 13:20


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