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

Ansys fluent CFD

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 17, 2014, 08:35
Default Ansys fluent CFD
  #1
New Member
 
walied
Join Date: Aug 2014
Posts: 14
Rep Power: 4
walied123 is on a distinguished road
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)
}
walied123 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
CFD Design...The CFD Future John C. Chien Main CFD Forum 20 November 20, 2015 00:40
CFD papers Numerical study- upwind schemes ANSYS FLUENT Volumeoffluid Main CFD Forum 0 January 30, 2014 12:19
error in opening fluent in ansys workbench tmeysam92 ANSYS 3 March 12, 2013 07: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 21:42


All times are GMT -4. The time now is 04:59.