CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Calculate net species/ UDS flux

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 13, 2004, 16:18
Default Calculate net species/ UDS flux
Posts: n/a
I am new to Fluent. I am using the software to model electrochemical analyses with advective effects. I have found in Fluent the capability to solve for the net flux of energy through a surface which has a specified temperature. Is there an easily available analogous capability for calculating the net flux of an electroactive species to a solid surface? Or the surface integral of normal gradient of the species concentration at a surface? Thanks!
  Reply With Quote

Old   July 21, 2004, 10:58
Default Re: Calculate net species/ UDS flux
Peter Kottke
Posts: n/a
Figured it out - a UDF to do this is based on Fluent 6.1 UDF Guide section 5.2.2 Connectivity Variables. Here's the UDF for UDS-0 : note that because Execute_at_end does not have threads available to be passed, the zone ID and index must be hard coded. Also, prior to linking to a case file, type "solve/set/expert" and then answer "yes" to the question "keep temporary solver memory from being freed? Finally, use as a compliled not interpreted UDF.


#include "udf.h"

#include "sg.h"



Domain *dom= Get_Domain(1);

int ID=5;

int index=0;

Thread *f_thread = Lookup_Thread(dom,ID);

Thread *tc0;

face_t f;

cell_t c0;

real grad[ND_ND];

real A[ND_ND];

real es[ND_ND];

real dr0[ND_ND];

real A_by_es;

real ds;

real flux;

real scalar_c;

real scalar_f;

real grad_p;

real grad_x;

real D;/* scalar diffusion coefficient*/

real rho;/* mixture density*/

flux = 0.0;

begin_f_loop(f, f_thread);


c0 = F_C0(f,f_thread);

tc0 = THREAD_T0(f_thread); BOUNDARY_FACE_GEOMETRY(f,f_thread,A,ds,es,A_by_es, dr0)





rho = C_R(c0,tc0);

D=C_UDSI_DIFF(c0,tc0,index)/rho; /* for my applications expect D to be constant therefore OK, also, my D is FLUENTs gamma/rho*/





end_f_loop(f, f_thread);

flux=flux*2.*M_PI; /* for 2-D axisymetric calculation */

Message("Surface integral of boundary flux of normal gradient of scalar: %g\n", flux);
  Reply With Quote

Old   August 2, 2004, 09:16
Default Re: Calculate net species/ UDS flux
Petere Kottke
Posts: n/a
Slight correction to the above - for general 2 or 3 - D problem replace lines such as "grad[0]=C_UDSI_G(c0,tc0,index)[0];" with ND_SET commands
  Reply With Quote

Old   August 4, 2004, 10:59
Default Re: VOF
Posts: n/a
How can I calculate the Flux of Vof species at the cell face. Please let me know
  Reply With Quote


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
How to specify surface flux of a species? ked FLUENT 18 February 15, 2022 16:03
UDS Flux Function Choice Yang Chung FLUENT 1 November 17, 2015 02:14
setting UDS Flux Andrew Garrard FLUENT 9 February 10, 2015 14:26
Help! How to calculate the diffusion flux of a UDS lzw FLUENT 0 June 18, 2008 04:50
Help with UDS FLUX Andrew Garrard FLUENT 2 February 14, 2005 06:47

All times are GMT -4. The time now is 18:09.