CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Velocity u.Gradient X (http://www.cfd-online.com/Forums/cfx/22390-velocity-u-gradient-x.html)

Mgtripple April 4, 2006 06:07

Velocity u.Gradient X
 
Hi friends,

I tried to use the command "Velocity u.Gradient X" in order to extract the velocity gradient in X direction. Then this value enters a formulae to calculate viscosity. However it is not working in SOLVER. It gives an error: "Velocity u.Gradient X Velocity u.: read successfully, and then error found at item: Gradient X syntax error"

Is there anyway to solve this?

Thanks

Serdar

opaque April 4, 2006 09:18

Re: Velocity u.Gradient X
 
Dear Mgtripple,

The ANSYS CFX solver does not support access to miscellaneous/suffixed variables such Velocity u.Gradient X or the like via CEL..

However, you may write a User CEL Function where you can call USER_GETVAR for Velocity.Gradient and use it as needed. The pointer to the stack that USER_GETVAR provides includes all the components of the Gradient for all velocity components, i.e a matrix..

Good luck, Opaque..


CFXuser April 4, 2006 09:34

Re: Velocity u.Gradient X
 
Sorry to interupt. May I some question about this USer CEL thing? Would that be possible to use this function to define a plane in the flow domain and then output the area-averaged static pressure of this plane when the solver is running? Thank you for advice.

opaque April 4, 2006 09:43

Re: Velocity u.Gradient X
 
Dear CFXuser,

The ANSYS CFX solver can only compute averages on region/locations already defined as a boundary in CFX-Pre.. An option in 10.0 is to remesh, or define a surface (2D) region and create a domain interface at such region.. Then, you can use a areaAve(Pressure)@New 2D region..

It may work if you only need a single plane. However, if you need more than 1, I would not even try it..

I understand the upcoming 11.0 will allow to use average functions on already defined regions even if they are not boundaries, or domain interfaces..

Good luck, Opaque..


Mgtripple April 5, 2006 09:36

Re: Velocity u.Gradient X
 
Thanks for the answer

Please correct me if i am wrong but what i understood from the manuals that i need FORTRAN program installed on my computer to use CEL function ?

Regards,

Serdar

opaque April 5, 2006 10:00

Re: Velocity u.Gradient X
 
Dear Mgtripple,

You need to write your own FORTRAN routine, compile it (you need a supported compiler), and setup the proper details in CFX-Pre..

It is a workaround; otherwise, there is no mechanism to get what you want..

Opaque..


Mgtripple April 5, 2006 11:13

Re: Velocity u.Gradient X
 
thanks again

at least now i know where to start.


chandrasekhar January 26, 2014 15:00

how to use velocity gradient as a boundary codition
 
Hello opaque
i would like to know how to input a velocity gradient( say in the x direction) as a boundary condition. my case is very simple, it is a 2d box with inlet and outlet. the bc's are 1m/sec at inlet and i want to input du/dx=0 at outlet. can u please tell me how to do this. Many thanks for replying.

with regards
Chandra Sekhar



Quote:

Originally Posted by opaque
;75830
Dear Mgtripple,

You need to write your own FORTRAN routine, compile it (you need a supported compiler), and setup the proper details in CFX-Pre..

It is a workaround; otherwise, there is no mechanism to get what you want..

Opaque..


brunoc January 27, 2014 08:04

Why do you want to fix du/dx at the outlet? For almost all cases that should be a part of the solution. Fixing that would affect the velocity fied upstream, which is not something you'd want unless you're testing something.

That being said, if your channel is long enough with a constant shape before the outlet, your solution should be du/dx=0 (developed flow).

chandrasekhar January 27, 2014 11:01

Hi
first of all thanks for the prompt reply. i wanted to use du/dx=0 because i want to see how it is different from that of a pressure outlet at the outlet. I would like to know how to input such a boundary condition. Many thanks for replying.

with regards

brunoc January 28, 2014 09:31

Well, it's very different. On one you're imposing a prescribed pressure (velocity field is part of the solution), while on the other you're saying velocity u shouldn't change.

What is your application?

chandrasekhar January 28, 2014 11:01

Hi
my professor had told me to see the velocity and pressure contours by applying different boundary conditions. so i thought of comparing three different scenarios by keeping the bc at the inlet constant. they are outflow at outlet, pressure outlet at outlet, and du/dx=0 at the outlet. I would like to know if i am doing some thing wrong. Also i tried using du/dx=constant in my case, fluent is showing an error. my case is a simple 2d rectangle with inlet and outlet at the opposite sides. I think i am doing it wrong. will be grateful for any help. Many thanks for replying.
with regards


Quote:

Originally Posted by brunoc (Post 472143)
Well, it's very different. On one you're imposing a prescribed pressure (velocity field is part of the solution), while on the other you're saying velocity u shouldn't change.

What is your application?



All times are GMT -4. The time now is 11:31.