|
[Sponsors] |
How to write UDF for the density at melting point? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 22, 2018, 04:49 |
How to write UDF for the density at melting point?
|
#1 |
New Member
Shivam Kumar
Join Date: May 2018
Posts: 1
Rep Power: 0 |
I am modelling isothermal melting of the metals in FLUENT 17.2. I am unable to give different density for the solid and liquid at the melting point. Can any one please tell me about how to write an UDF for this.
Thank You! |
|
May 23, 2018, 07:54 |
|
#2 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
using define_property you can select the material and then in it's density tab hook the following macro
define the melting point and the solid and liquid density, and using an if else assign the required density and return it from the macro Code:
#define "udf.h" #define T_melting_point = 100; #define solid_density = 10.0; #define liquid_density = 2.0; DEFINE_PROPERTY(udf_name, c, ct) { real temp = C_T(c, ct); real metal_density; if(temp > T_melting_point) metal_density = liquid_density; else metal_density = solid_density; return metal_density } hope this helps |
|
May 23, 2018, 21:47 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
fluent has "solidification & melting" model
use Ansys Fluent User's Guide and Ansys Fluent Tutorial Guide to find detailed information best regards |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
confusion on how to write udf for density of a mixture solution in multiphase problem | Hirakjyoti | Fluent UDF and Scheme Programming | 1 | September 11, 2017 02:21 |
Can we write UDF for secondary phase droplet/bubble diameter in Eulerain model? | Navier Stoke | Fluent UDF and Scheme Programming | 1 | September 7, 2017 16:02 |
Point Source for Radiation by UDF | daire6 | FLUENT | 0 | May 13, 2016 09:07 |
[ICEM] Point density as a custom function/spline (Pre-Mesh Params)? | Electrophile | ANSYS Meshing & Geometry | 1 | July 21, 2015 09:03 |
UDF for searching the closest point to a certain point | princekar | Fluent UDF and Scheme Programming | 2 | April 26, 2015 05:53 |