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

gradient for scalar quantity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2005, 20:24
Default gradient for scalar quantity
  #1
tseo
Guest
 
Posts: n/a
I simulated the advection-diffusion equation coupled with Navier-stokes 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
  Reply With Quote

Old   August 3, 2005, 22:31
Default Re: gradient for scalar quantity
  #2
ramesh
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
  Reply With Quote

Old   August 3, 2005, 22:56
Default Re: gradient for scalar quantity
  #3
Swarup
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 post-processing menu.

Swarup
  Reply With Quote

Old   August 4, 2005, 14:37
Default Re: gradient for scalar quantity
  #4
tseo
Guest
 
Posts: n/a
Thank you very much for your response. However I could not see the scalar gradient when I look at either xy-plot or contour menu. For instance if I click the xy-plot 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.
  Reply With Quote

Old   August 4, 2005, 22:51
Default Re: gradient for scalar quantity
  #5
Swarup
Guest
 
Posts: n/a
Sorry for being vague in the previous post. Did you check derivatives option in display->contour menus?

swarup
  Reply With Quote

Old   August 5, 2005, 15:19
Default Re: gradient for scalar quantity
  #6
tseo
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
  Reply With Quote

Old   August 5, 2005, 23:15
Default Re: gradient for scalar quantity
  #7
Swarup
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, post-processing 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
  Reply With Quote

Reply


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
specified shear at wall - temperature gradient - UDF - access violation error senD Fluent UDF and Scheme Programming 9 September 18, 2014 07:29
Temperature Gradient at Wall sven OpenFOAM 7 November 1, 2010 17: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 non-orthogonal grids? Paul Hsieh Main CFD Forum 3 November 11, 2003 04:52


All times are GMT -4. The time now is 16:40.