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

the arrangement of the components gradU

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jackjiang1989@gmail.com

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2020, 19:36
Unhappy the arrangement of the components gradU
  #1
New Member
 
zaki
Join Date: Nov 2018
Posts: 17
Rep Power: 8
zikou55 is on a distinguished road
Hello,
gradU is a 9 components tensor, I want to know the arrangement of the components
gradU.compoent(0)=dudx
gradU.compoent(1)=dudy
gradU.compoent(2)=dudz
gradU.compoent(3)=dvdx
gradU.compoent(4)=dvdy
gradU.compoent(5)=dvdz
gradU.compoent(6)=dwdx
gradU.compoent(7)=dwdy
gradU.compoent(8)=dwdz


please am I right ?
zikou55 is offline   Reply With Quote

Old   September 17, 2021, 09:54
Default
  #2
New Member
 
jackjiang
Join Date: Feb 2020
Posts: 10
Rep Power: 6
jackjiang1989@gmail.com is on a distinguished road
Hi,
I got the same question, after some search found it should be like below,
gradU.compoent(0)=dudx
gradU.compoent(1)=dvdx
gradU.compoent(2)=dwdx
gradU.compoent(3)=dudy
gradU.compoent(4)=dvdy
gradU.compoent(5)=dwdy
gradU.compoent(6)=dudz
gradU.compoent(7)=dvdz
gradU.compoent(8)=dwdz

check below link,
discrepancy in fvc::grad(U)

BR/Jack
fly_light likes this.
jackjiang1989@gmail.com is offline   Reply With Quote

Old   September 17, 2021, 12:30
Default
  #3
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 746
Rep Power: 14
Tobermory will become famous soon enough
Yep - for confirmation, check out Tensor.H (https://cpp.openfoam.org/v8/Tensor_8H_source.html):

Code:
     //- Component labeling enumeration
     enum components { XX, XY, XZ, YX, YY, YZ, ZX, ZY, ZZ };
but remember that for partial derivatives, the derivative is the first index. So for the second component in the list above, XY, this is \partial /\partial x (V) = \partial V/\partial x. Take a look at the link that Jack quotes for more discussion.
Tobermory is offline   Reply With Quote

Reply

Tags
grad u


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
[General] Extracting ParaView Data into Python Arrays Jeffzda ParaView 30 November 6, 2023 22:00
Accessing velocity components and gradient of velcoity components vivekgnhtr OpenFOAM Programming & Development 3 June 27, 2022 03:39
Error while postProcessing icoFoam case to get grad(U) shashanktiwari619 OpenFOAM Post-Processing 1 July 29, 2019 03:47
Question on the sequence of grad(U) components ripperjack OpenFOAM Post-Processing 1 September 18, 2018 13:19
div(phi,U) linearUpwind default; or div(phi,U) linearUpwind grad(U); cyln OpenFOAM Running, Solving & CFD 8 August 1, 2018 09:46


All times are GMT -4. The time now is 17:24.