|
[Sponsors] |
October 4, 2008, 09:35 |
Two ways for Gradient: two different worlds?
|
#1 |
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 |
|
October 4, 2008, 21:46 |
Re: Two ways for Gradient: two different worlds?
|
#2 |
Guest
Posts: n/a
|
Sorry,they are the same. The difference come from me!
|
|
October 6, 2008, 10:46 |
Re: Two ways for Gradient: two different worlds?
|
#3 |
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 |
|
|
|
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 |