CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

discrepancy in fvc::grad(U)

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes
  • 5 Post By backscatter
  • 1 Post By anon_q
  • 1 Post By anon_q
  • 1 Post By Tobermory
  • 1 Post By Tobermory
  • 3 Post By Voulet

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 3, 2019, 21:41
Default
  #4
Senior Member
 
Join Date: Mar 2018
Posts: 115
Rep Power: 8
anon_q is on a distinguished road
The result is correct because the gradient will be calculated as follows:

\begin{bmatrix}
\partial_1 U & \partial_1 V & \partial_1 W \\
{\color{green}\partial_2 U} & \partial_2 V & \partial_2 W \\
\partial_3 U & \partial_3 V & \partial_3 W 
\end{bmatrix}

As you can see: {\color{green}\partial_2 U} \equiv \dfrac{\partial U}{\partial y} is the 4th element in the tensor (correctly calculated by OpenFOAM).
Remember that the tensor class will represent it like this:
gradU =Tensor(\partial_1 U, \partial_1 V, \partial_1 W, {\color{green}\partial_2 U}, \partial_2 V, \partial_2 W, \partial_3 U, \partial_3 V, \partial_3 W) but to access {\color{green}\partial_2 U \equiv \dfrac{\partial U}{\partial y}} we use gradU.yx()
watermelon likes this.
anon_q is offline   Reply With Quote

 


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
how can I do dot product of U and fvc::grad(U) where U is an volVectorFiled ? mechy OpenFOAM 3 February 24, 2023 11:17
Acoustic Power Discrepancy Time4Tea FLUENT 0 August 21, 2018 09:46
implicit - (fvc::grad(U) & fvc::grad(muEff)) Kareem Abdelshafy OpenFOAM Programming & Development 1 August 20, 2016 20:57
strange behaviour of fvc::grad(U) and NonlinearKEShih turbmod - analitical comparison ancsa OpenFOAM Verification & Validation 1 January 20, 2015 11:00
FLUENT Version Mis-Match Discrepancy asd Main CFD Forum 0 April 19, 2007 04:58


All times are GMT -4. The time now is 03:44.