|
[Sponsors] |
July 8, 2021, 18:18 |
Normal derivatice of velocity gradient
|
#1 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Hello to all,
I would like to calculate the normal derivative of the velocity gradient on a patch. However, I am confused on which side to put the normal vector to dot with the velocity gradient. From here (https://cfd.direct/openfoam/tensor-mathematics/) it follows that : From here (https://en.wikipedia.org/wiki/Directional_derivative), that: When the gradient results in a vector, the dot product is commutative, so it does not matter the side. When it results in a tensor, this matters, and I would like to know on which side I get the correct definition. Code:
tensor a (1,2,3,4,5,6,7,8,9); vector b (1,2,3); Info << (a & b) << endl; Info << (b & a) << endl; Code:
(14 32 50) (30 36 42) Thanks in advance. |
|
July 9, 2021, 21:09 |
|
#2 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
So,
The gradient of a scalar is defined as: The divergence of a vector : The gradient of a vector quantity is not mathematically defined, but in CFD we give it the following treatment: The divergence of a tensor is also not mathematically defined, and here we will analyze this as follows: I guess the same reasoning can be applied to the directional derivative, where: So, I would say, the normal vector should be multiplied on the left side to behave has a column vector. Now... why do we have defined in programmers guide (https://sourceforge.net/projects/ope...e.pdf/download) (1) In https://cfd.direct/openfoam/tensor-mathematics/ (2): and in here (https://openfoamwiki.net/index.php/OpenFOAM_guide/Programmer%27s_Guide_Errata): (3) Which formulation in OpenFoam actually using? Does is depend on the flavor (ESI, Foundation an Extend?) From the source code we have: Inner-product of a Vector and a Tensor (Eq3) Code:
//- Inner-product of a Vector and a Tensor template<class Cmpt> inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt>>::type operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t) { return Vector<Cmpt> ( v.x()*t.xx() + v.y()*t.yx() + v.z()*t.zx(), v.x()*t.xy() + v.y()*t.yy() + v.z()*t.zy(), v.x()*t.xz() + v.y()*t.yz() + v.z()*t.zz() ); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF: problem with calculating velocity gradient to normal direction | hkdai | Fluent UDF and Scheme Programming | 0 | January 15, 2019 02:29 |
Same pressure gradient but different velocity field | TurbJet | Main CFD Forum | 22 | April 28, 2018 03:35 |
surface tension as function of normal gradient | tom | FLUENT | 2 | September 7, 2016 03:48 |
Normal particle velocity in particle deposition! | Prashanth | Fluent Multiphase | 1 | May 29, 2013 22:30 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 15:45 |