|
[Sponsors] |
How to calculate the gradient of a scaler variable? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 20, 2016, 13:00 |
How to calculate the gradient of a scaler variable?
|
#1 |
Member
Sidharath
Join Date: May 2015
Location: UK
Posts: 65
Rep Power: 11 |
Hi all,
I am trying to calculate the gradient of a variable in CFD-post. The gradient of interest is not the global coordinate frame (x,y & z) but instead along different planes (streamwise and spanwise planes) The option of using "expression" to calculate gradient will only allow me to calculate the gradient of the variable in the global reference frame (I reckon). Anyone can help me with this, can I directly compute gradient along the plane other than global XYZ planes ? Thank you |
|
May 20, 2016, 15:27 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
From calculus, the gradient along any direction of interest is the projection of the gradient in the global coordinate frame along the direction of interest, i.e. grad(Variable) . Direction
Now, do you have the direction vector of interest available already ? if you do, you must write the following CEL expression (for a scalar variable): MyScalarVar.Gradient X * MyDir X +MyScalarVar.Gradient Y * MyDir Y+MyScalarVar.Gradient Z * MyDir Z You can write it for vector variables as well. Hope the above helps, |
|
May 20, 2016, 18:24 |
|
#3 |
Member
Sidharath
Join Date: May 2015
Location: UK
Posts: 65
Rep Power: 11 |
Hi Opaque,
Thank you for your reply. Your solution to compute the gradient along a different axis using the dot product is spot on but the problem is the streamwise surfaces created in CFD-post are automatically generated and are circular in shape. To calculate the streamwise and spanwise vectors for the whole surface would be very difficult as circular shape would cause it to change at a lot. I am trying to find a way out. I was wondering if there is any direct way to compute it, using different coordinate system or polar one? Thank you. |
|
Tags |
cfd - post, cfx, compressor, gradient, turbo-machinery |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Periodic flow using Cyclic - comparison with Fluent | nusivares | OpenFOAM Running, Solving & CFD | 30 | December 12, 2017 06:35 |
How to calculate oscillating roll of 2D body (with variable amplitude and omega) | lavrov | OpenFOAM Running, Solving & CFD | 0 | March 19, 2015 07:31 |
calculate gradient tension in udf | mohsenz_136 | Fluent UDF and Scheme Programming | 1 | January 5, 2013 04:15 |
how to calculate the temperature gradient of wall | houbaolin | FLUENT | 0 | July 28, 2008 03:51 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 05:27 |