CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > 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 Search this Thread Display Modes
Old   June 17, 2014, 07:36
Default user defined function
  #1
New Member
 
sethu
Join Date: Jun 2014
Posts: 3
Rep Power: 11
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 01:52.
Geethu g is offline   Reply With Quote

Old   June 18, 2014, 08:22
Default
  #2
Sun
Senior Member
 
Sun's Avatar
 
Join Date: Nov 2010
Posts: 103
Rep Power: 15
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, 08:50
Default
  #3
New Member
 
Marco Dc
Join Date: Feb 2014
Location: Italy
Posts: 20
Rep Power: 12
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, 05:26
Default
  #4
New Member
 
sethu
Join Date: Jun 2014
Posts: 3
Rep Power: 11
Geethu g is on a distinguished road
okay... i will try these steps....thankyou so much guys.....
Geethu g is offline   Reply With Quote

Old   January 25, 2016, 15:01
Default
  #5
New Member
 
Harith Jayakody
Join Date: Dec 2015
Posts: 3
Rep Power: 10
Harith is on a distinguished road
Hi Geethu,

Did u manage to model Salt-water as a material in fluent?
I am struggling to do this as well.
Please let me know if you found out how to do this.

Thank you very much.

If anyone else has an idea on how to do this please let me know...

Thanks.
Harith 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
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 11:51
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 05:52.