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

Updating Mesh at time level N

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2014, 00:58
Default Updating Mesh at time level N
  #1
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Hey there!
I have employed a UDF in my Fluent application to ramp up the velocity at my velocity inlet (thanks to ComputerGuy). I have adapted it to parallel fluent (as far as I know) and it runs for 3 iterations before displaying "updating at time level N" in fluent and crashing. I plot the static pressure at the interface showing no instabilities or oscillations. Also, I have used the rpsetvar command to damp the pressure at the interface.

My UDF is:

#include "udf.h"
DEFINE_PROFILE(velocity_x, t, i)
{
#if !RP_HOST
real default_early_velocity_mag,default_late_velocity_m ag,velocity_mag;
real the_current_time;
real start_velocity,end_velocity;
real ramp_start,ramp_end;
real line_slope, line_intercept;

face_t f;

default_early_velocity_mag=0.001;
default_late_velocity_mag=10;
start_velocity=0.001;
end_velocity=10;
ramp_start=0;
ramp_end=0.8;


velocity_mag=default_early_velocity_mag;
the_current_time = CURRENT_TIME;

line_slope=(end_velocity-start_velocity)/(ramp_end-ramp_start);
line_intercept=start_velocity-line_slope*ramp_start;

if ((the_current_time>=ramp_start) && (the_current_time<=ramp_end))
{
velocity_mag=line_slope*the_current_time+line_inte rcept;
}

if ((the_current_time>ramp_end))
{
velocity_mag=default_late_velocity_mag;
}

begin_f_loop(f,t)
{
F_PROFILE(f,t,i) = velocity_mag;
}
end_f_loop(f,t)
#endif
}

Thank you very much!
Alex
Kina 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel colinB OpenFOAM Meshing & Mesh Conversion 14 December 12, 2018 09:07
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 14:40
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


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