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

Simulation Pausing Durning Velocity Profile Update

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 4, 2015, 03:38
Default Simulation Pausing Durning Velocity Profile Update
  #1
Member
 
Join Date: May 2012
Posts: 30
Rep Power: 14
CaptainCombo is on a distinguished road
Hi everybody,

I am trying to simulate flow in heated flat channel while inlet velocity changes according to formula below.

Uin = Uo*[1+Ao*sin(w*t)]

Here;

Uin: inlet velocity
Uo: avarage inlet velocity
Ao: dimensionless pulsation amplitude
w = (2*pi*f)
f : frequency of pulsation
t: time

The program updates velocity profile via compiled UDF. Here is the source code;

Quote:
#include "udf.h"

DEFINE_PROFILE(pulsating_velocity, t, nv)
{
face_t f;

real flow_time = RP_Get_Real("flow-time");

real PI = 3.141592;

real vel;

begin_f_loop(f,t)
{
F_PROFILE(f,t,nv) = (0.1*(1+1*sin(2*PI*flow_time)));
}
end_f_loop(f,t)

printf("Time =%f sec. \n", flow_time);
printf("Target velocity set at ")
}
The problem is: for every 3th (sometimes 4th) time steps simulation is pausing. During these pausing sequences I observed that cpu usage drops to 10%. It rises to 90% again when calculation of new time step is started. I am not sure whether this is a problem or not but this situation increases total calculation time very much. This is what happens when simulation is paused:

https://www.dropbox.com/s/pr2adqk4or...07.36.png?dl=0
CaptainCombo is offline   Reply With Quote

Old   September 4, 2015, 10:55
Default
  #2
Member
 
Join Date: May 2012
Posts: 30
Rep Power: 14
CaptainCombo is on a distinguished road
Problem solved after removing lines below;

Quote:
printf("Time =%f sec. \n", flow_time);
printf("Target velocity set at ")
CaptainCombo is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF inlet velocity profile mismatch with Fluent ChristineL Fluent UDF and Scheme Programming 15 November 25, 2016 06:45
Shear stress from velocity profile baranii2000 COMSOL 4 November 11, 2015 04:08
Velocity profile boundary condition Tuca FLOW-3D 1 April 23, 2013 12:02
Simulation with UDF for species mass fraction and velocity profile virgy Fluent UDF and Scheme Programming 8 February 7, 2012 04:30
Prescribed inflow velocity profile - how to? Alan Main CFD Forum 10 October 28, 2005 12:14


All times are GMT -4. The time now is 22:23.