CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

user defined function

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

Like Tree2Likes
  • 1 Post By Sun
  • 1 Post By I-mech

Reply
 
LinkBack Thread Tools Display Modes
Old   June 17, 2014, 06:36
Default user defined function
  #1
New Member
 
sethu
Join Date: Jun 2014
Posts: 3
Rep Power: 3
Geethu g is on a distinguished road
hello,

am new in fluent. i want to create a new material in fluent database. the material is salt water. but i dont know how to write udf code for making this new material. can anyone help me???

Last edited by Geethu g; June 18, 2014 at 00:52.
Geethu g is offline   Reply With Quote

Old   June 18, 2014, 07:22
Default
  #2
Sun
Member
 
Join Date: Nov 2010
Posts: 86
Rep Power: 6
Sun is on a distinguished road
Hi,
If the properties of salt water are not varying (say with respect to time or other independent variables), I don't think you need any UDFs. You can simply create a new material by modifying an available one. For example see this tutorial on how to create a new material:
http://aerojet.engr.ucdavis.edu/flue...tg/node309.htm

cheers!
Geethu g likes this.
Sun is offline   Reply With Quote

Old   June 18, 2014, 07:50
Default
  #3
New Member
 
Marco Dc
Join Date: Feb 2014
Location: Italy
Posts: 20
Rep Power: 3
I-mech is on a distinguished road
Quote:
Originally Posted by Geethu g View Post
hello,

am new in fluent. i want to create a new material in fluent database. the material is salt water. but i dont know how to write udf code for making this new material. can anyone help me???
There are few threads about it, have a look.
Once you've created a new material, if you need to set a property that is for example temperature dependent you need a UDF similar to the following.
Once you've interpreted your udf, you have to modify material property calling your function.

This udf set a temperature dependent viscosity, you can modify it for your goal.

/************************************************** *******************
UDF for Temperature dependent Dynamic Viscosity
************************************************** ********************/
#include "udf.h"
#include "math.h"
DEFINE_PROPERTY(cell_viscosity,cell,thread)
{
real mu_lam;
real temp = C_T(cell,thread);
{
mu_lam=0.0000631*pow(10,3.722*pow(1+(temp-273)/(135),-1.102));
return mu_lam;
}
}
Geethu g likes this.
__________________
Marco
I-mech is offline   Reply With Quote

Old   June 19, 2014, 04:26
Default
  #4
New Member
 
sethu
Join Date: Jun 2014
Posts: 3
Rep Power: 3
Geethu g is on a distinguished road
okay... i will try these steps....thankyou so much guys.....
Geethu g 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
Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Native Meshers: blockMesh 43 February 18, 2014 03:42
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 05:37
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27
Help: user defined function alice FLUENT 3 December 13, 2000 01:10


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