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

Time-Dependent Viscosity

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

Reply
 
LinkBack Thread Tools Search this Thread 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: 15
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 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 16, 2019 23:12
Full pipe 3D using icoFoam cyberbrain OpenFOAM 4 March 16, 2011 09: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
Time Dependent Problem - Initial Conditions Willy FLUENT 1 August 10, 2005 15:42


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