CFD Online Logo CFD Online URL
Home > Forums > CFX

Two ways for Gradient: two different worlds?

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

LinkBack Thread Tools Display Modes
Old   October 4, 2008, 09:35
Default Two ways for Gradient: two different worlds?
Posts: n/a
hi all,

I add an additional variable named 'myav' for a 3D subdomain with poisson equation to my model in CFX 10.0. I want to get the Gradient of 'myav', so i have done the following in user CEL subroutine and the core part is

CALL USER_GETVAR('myfluid.myav.Gradient',...)

and set the returned value to another additional variable named 'myavGrad'.This method can be found in given by opaque. Everything goes well.

But in CFX-POST, There is a variable named 'myav.Gradient' given by the system. So the two methods should give out the same gradient distribution, but they do not. The distribution by system is right and gradient by fortran subroutine is irrational.


I check the help document for USER_GETVAR. There is a paragraph about 'LOCALE',Gradient for 'Vertices', 'ELement averaged' and 'face averaged'. Is it where the difference comes from? How to select the LOCALE in USER_GETVAR?

Any suggestion will be appreciated.


  Reply With Quote

Old   October 4, 2008, 21:46
Default Re: Two ways for Gradient: two different worlds?
Posts: n/a
Sorry,they are the same. The difference come from me!
  Reply With Quote

Old   October 6, 2008, 10:46
Default Re: Two ways for Gradient: two different worlds?
Posts: n/a
Hi Frank,

Version 11 introduced CEL functions you can use in the solver to return gradients; you no longer need to use FORTRAN for this. The gradient of "myav" in the X direction is simply myav.Gradient X.

To get the gradients, create a second AV of type vector, "myav gradient" and set the X, Y, and Z components of the vecotr equal to myav.Gradient X, myav.Gradient Y, and myav.Gradient Z respectively.

  Reply With Quote


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
Ways to find Mass transfer coefficient using CFD? tuks_123 CFX 10 April 15, 2011 11:20
Two grid discretization ways songpen1985 FLUENT 0 January 14, 2010 10:45
simulate flat air passage ways Fonss OpenFOAM Running, Solving & CFD 2 July 21, 2009 23:54
Shock Ways saba Main CFD Forum 4 November 6, 2002 23:41
Shock Ways saba FLUENT 2 October 31, 2002 02:33

All times are GMT -4. The time now is 00:20.