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

UDF Profile Update once in one time step

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 12, 2014, 01:21
Default UDF Profile Update once in one time step
  #1
LYP
New Member
 
liuyaping
Join Date: Feb 2014
Posts: 1
Rep Power: 0
LYP is on a distinguished road
Hi Everyone,

I am working on a transient case and using a UDF with DEFINE_Adjust macro..
I want to use a udf controlling a boundary only updated once within one time step.The udf like this:
#include "udf.h"
#define Vg 1.0e-05
#define H 0.02
#define Rg 0.01
real current=0.0;
real profile=-0.01;
DEFINE_ADJUST(name,domain)
{
current = RP_Get_Real("flow-time");
}
DEFINE_PROFILE(density,thread,position)
{
real k,t;

face_t f;

if(profile !=current)
{
begin_f_loop(f,thread)
{
t=RP_Get_Real("physical-time-step");
k=Vg*t/(H-Vg*t);
F_PROFILE(f,thread,position)=F_UDSI(f,thread,0)+F_ UDSI(f,thread,0)*(1-Rg)*k;

}
end_f_loop(f,thread)
}
profile=current;
}

I found that can't achieve my goal.Can anyone here help?

Thank you.

Radit
LYP is offline   Reply With Quote

Old   February 12, 2014, 07:30
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
I found that can't achieve my goal.
Be more precise... What is the problem? Problems with compiling? Crashing when running? You don't know how to hook it to the simulation? The udf works, but does something else than you expected? In that case, what does it do?
If you give detailed information about your problem, it is much easier to find the solution.
pakk 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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
how to use velocity of current time step in next time step to update it aks CFX 16 October 16, 2013 08:14
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 01:36


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