|
[Sponsors] |
March 27, 2012, 09:44 |
Time-Dependent Viscosity
|
#1 |
New Member
Damian
Join Date: Mar 2012
Posts: 1
Rep Power: 0 |
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.
|
|
March 29, 2012, 03:45 |
|
#2 |
New Member
CH. Lee
Join Date: May 2010
Location: Seoul, Republic of Korea
Posts: 5
Rep Power: 15 |
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 |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |