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

Two ways for Gradient: two different worlds?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2008, 09:35
Default Two ways for Gradient: two different worlds?
  #1
frank
Guest
 
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 http://www.cfd-online.com/Forum/cfx_...cgi?read=21267 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.

Why?

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.

frank

  Reply With Quote

Old   October 4, 2008, 21:46
Default Re: Two ways for Gradient: two different worlds?
  #2
frank
Guest
 
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?
  #3
CycLone
Guest
 
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.

-CycLone
  Reply With Quote

Reply

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
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 09: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 22:41
Shock Ways saba FLUENT 2 October 31, 2002 01:33


All times are GMT -4. The time now is 14:56.