
[Sponsors] 
August 3, 2005, 20:24 
gradient for scalar quantity

#1 
Guest
Posts: n/a

I simulated the advectiondiffusion equation coupled with Navierstokes equation. I'd like to calculate the spatial gradient of scalar quantity (dC/dx) along the wall in the flow direction. If anyone has the experience to calculate the gradient of scalar, could you please tell me how to write the UDF and to link in FLUENT? Thank you in advance


August 3, 2005, 22:31 
Re: gradient for scalar quantity

#2 
Guest
Posts: n/a

I suppose u solved the UDS along with the NS equations. Then Fluent automatically gives u the gradient in some of the post processing options. Like in xy plot if u have velocity as main menu then in the u have gradients and all other things as sub menu. In the similar way u have UDS as main menu then in that u have different options.
Bye ramesh 

August 3, 2005, 22:56 
Re: gradient for scalar quantity

#3 
Guest
Posts: n/a

you should see the contour quantity menu. you will get many relevant scalar and vector gradients there. you will be able to obtain a data file also in the postprocessing menu.
Swarup 

August 4, 2005, 14:37 
Re: gradient for scalar quantity

#4 
Guest
Posts: n/a

Thank you very much for your response. However I could not see the scalar gradient when I look at either xyplot or contour menu. For instance if I click the xyplot menu in plot, and choose user defined scalar..., I only can choose user scalar 0 or diffusion coefficient of user defined scalar 0. Same thing in Contour. I can't find the gradient of scalar any where in FLUENT. Did I miss something? I'd like to know more specific guide from you. Is there any other method to calculate the gradient of scalar in the flow direction? Thank you very much.


August 4, 2005, 22:51 
Re: gradient for scalar quantity

#5 
Guest
Posts: n/a

Sorry for being vague in the previous post. Did you check derivatives option in display>contour menus?
swarup 

August 5, 2005, 15:19 
Re: gradient for scalar quantity

#6 
Guest
Posts: n/a

Yes, I checked derivative option in contour menu, but there exist only for velocity and pressure gradient. I'd like to know the gradient of scalar quantity, (dC/dx), where C represents the concentration and x the direction of flow.
Thank you very much 

August 5, 2005, 23:15 
Re: gradient for scalar quantity

#7 
Guest
Posts: n/a

Tseo,
Please see the UDS sample example in UDF guide (p.547 for 6.2 and p. 432 for 6.1). you will need to calculate your gradient first and then again put it in some UDS. actually, as you said, postprocessing is available only for scalar and diffusion coefficient. so you need to do gradient computation yourself. this is what is shown in the example UDF code. the code also stores the gradient value to another scalar. I hope it will be possible for you to access your scalar first and then compute its gradient. if you are able to access your scalar then rest of the code will be similar to the one shown in the cited example. Swarup 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
specified shear at wall  temperature gradient  UDF  access violation error  senD  Fluent UDF and Scheme Programming  7  May 12, 2012 18:23 
Temperature Gradient at Wall  sven  OpenFOAM  7  November 1, 2010 18:25 
Pressure Gradient in channelOodles  sega  OpenFOAM Running, Solving & CFD  14  August 12, 2009 06:21 
can I use static enthalpy gradient to describe dT  Jay  CFX  0  August 6, 2008 23:01 
How to compute gradient for nonorthogonal grids?  Paul Hsieh  Main CFD Forum  3  November 11, 2003 04:52 