|
[Sponsors] |
August 17, 2014, 08:35 |
Ansys fluent CFD
|
#1 |
New Member
walied
Join Date: Aug 2014
Posts: 16
Rep Power: 11 |
hello every body...........need for help
i try to make an UDF for changing density as a function of coordinates(say z coordinate) but it didnot work in fluent. this is my UDF. #include "udf.h" DEFINE_PROPERTY(ANODE_DENSITY, thread, position) { float x[ND_ND]; /* this will hold the position vector */ float t,air,anode,electrolyte,po,va,ve,n,z,a,r,l,p,d,w,y ,u,POROSITY; cell_t c; t= 0.00008; /* ANODE THICKNESS */ air=1.28; anode=4500.; electrolyte=6010.; n=2; z=5; w=(n+z)/n; y=n/(n+z); r=pow(w,n); l=pow(y,z); a=r/(1-l); begin_c_loop(c,thread) { C_CENTROID(x, c, thread); va=x[3]/t; ve=1-va; u=x[3]/t; p= pow(u,n); d= pow(u,z); POROSITY = (a*p*(1-d)); po= ((va*anode)+(ve*electrolyte)); C_R(c, thread, position) =po*(1-POROSITY)+air*POROSITY; } end_c_loop(c, thread) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD Design...The CFD Future | John C. Chien | Main CFD Forum | 20 | November 19, 2015 23:40 |
CFD papers Numerical study- upwind schemes ANSYS FLUENT | Volumeoffluid | Main CFD Forum | 0 | January 30, 2014 11:19 |
error in opening fluent in ansys workbench | tmeysam92 | ANSYS | 3 | March 12, 2013 06:10 |
Will the ANSYS - FLUENT- CFX kill freedom of CFD? | Ben | Main CFD Forum | 17 | September 20, 2006 03:36 |
Ansys to aquire FLUENT | Michael Bo Hansen | CFX | 74 | February 24, 2006 20:42 |