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

Time-Dependent Viscosity

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 27, 2012, 09:44
Default Time-Dependent Viscosity
  #1
New Member
 
Damian
Join Date: Mar 2012
Posts: 1
Rep Power: 0
Dags is on a distinguished road
I am trying to create a time-dependent viscosity function in the udf. I need it to keep track of particles as soon as they enter the domain. I'm not really too familiar with the creation of udfs or how they work in general. I know how to program in C++, but I need a bit of a refresher. If someone can guide me through it or actually give me a site that can amply guide me through how it works, it would be greatly appreciated.
Dags is offline   Reply With Quote

Old   March 29, 2012, 03:45
Default
  #2
New Member
 
CH. Lee
Join Date: May 2010
Location: Seoul, Republic of Korea
Posts: 5
Rep Power: 8
cryfreer is on a distinguished road
Hi Dags

I am also trying to simulate time-dependent viscosity as you tried. I think I should use the DEFINE_PROPERTY macro to modify viscosity. However, If I hook this UDF to material panel, fluid in the whole domain will change by time, I think. So I think I need to evaluate the time, how long does it takes to move certain point from the inlet boundary. is there any idea?

Here is an example to change viscosity property by time.

-------------------------------------------------------------------------------------
#include "udf.h"
DEFINE_PROPERTY(cell_vis,thread,index)
{
real mu_lam; //define variables
real f_time = RP_Get_Real("flow-time"); //difine f_time to current flow time

mu_lam = ~~ *f_time; //viscosity function vs time

return mu_lam; //returned to the solver
}

Last edited by cryfreer; March 29, 2012 at 03:46. Reason: typoo
cryfreer is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 10:20
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 11:16
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48
Time Dependent Problem - Initial Conditions Willy FLUENT 1 August 10, 2005 15:42


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