CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

tensorfields with 12 components??????

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2014, 07:16
Default tensorfields with 12 components??????
  #1
New Member
 
Join Date: Mar 2014
Posts: 21
Rep Power: 12
alisina-s is on a distinguished road
Hi everybody
In my implementation I need to multiply a tensor with div operator.
Does anyone know that It is possible in openfoam to crate a tensor with 12 elements?
my tensors need to have 12 components but I get the error regarding that I can not go further 9 elements.
I did like this in my createfield
volTensorField j2
(
IOobject
(
"j2",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedTensor( "j2Tensor", dimless, tensor(0,0,0,0,0,0,-1,0,0,1,0,0) )
);

and then
j2 & fvc::div(phi,u2)
-------------------------------------------
generally I want to know even is it possible to have tensors with more than 9 components???
thanks a lot in advance
alisina-s is offline   Reply With Quote

Old   October 3, 2014, 01:25
Default
  #2
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
"Tensors" in OpenFOAM are only rank-2. That is nine elements in 3D. I don't know what rank/symmetries gives you a tensor with 12 components, but OpenFOAM doesn't support it by default.

http://www.foamcfd.org/Nabla/guides/...sGuidese4.html

If you need to multiply a 4x3 matrix by a div operator, you can split the div operator apart to get the x,y,z components and multiply everything out by hand.
mprinkey is offline   Reply With Quote

Old   October 13, 2014, 06:37
Default
  #3
New Member
 
Join Date: Mar 2014
Posts: 21
Rep Power: 12
alisina-s is on a distinguished road
Thanks Micheal for your answer,
can you also mention how can I split the div component?
Regards,
ALI
alisina-s is offline   Reply With Quote

Old   October 13, 2014, 09:26
Default
  #4
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
Quote:
Originally Posted by alisina-s View Post
Thanks Micheal for your answer,
can you also mention how can I split the div component?
Regards,
ALI
It is on the same page I quoted above. x(), y() and z() are the access functions for a vector. If T is a rank 2 tensor, fvc::div(T) is a vector. fvc::div(T).x() is the x-comp, etc.

This presentation gives you all of the details that you need:

http://www.tfd.chalmers.se/~hani/kur...rogramming.pdf
mprinkey is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 to extract the components of radial and tangential velocities from pump impeller renyun0511 OpenFOAM Running, Solving & CFD 3 October 31, 2022 09:31
Accessing velocity components and gradient of velcoity components vivekgnhtr OpenFOAM Programming & Development 3 June 27, 2022 02:39
Question on the sequence of grad(U) components ripperjack OpenFOAM Post-Processing 1 September 18, 2018 12:19
wallGradU components amin66 OpenFOAM Post-Processing 9 March 25, 2016 20:09
Transient Statistics for turbo components Suzzn CFX 5 May 4, 2010 09:56


All times are GMT -4. The time now is 20:19.