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

Access (I, J) component of a volTensorField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2018, 12:11
Default Access (I, J) component of a volTensorField
  #1
New Member
 
Gianluca
Join Date: Mar 2011
Posts: 1
Rep Power: 0
longonig is on a distinguished road
How can I access the (I, J) component of a volTensorField?

I am able to do just that with a Tensor2 such as
- TensorN<scalar, 2> aa
- aa(0, 1) = -1.0
- Info << aa(0, 1) << end;

I then get the value -1.0 from location (0, 1) of tensor2.

How do I do that for a volTensorField created with tensor2 vectors?

I am trying to use each component of the volTensorField as a scalar field and perform operations on it.

Thanks.
longonig is offline   Reply With Quote

Old   February 1, 2018, 20:22
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

Have you taken a look at this? http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   February 15, 2018, 07:53
Default
  #3
New Member
 
shayan tanweer
Join Date: Oct 2016
Location: DELHI,INDIA
Posts: 4
Rep Power: 9
stanweer is on a distinguished road
Hi,
You can access the components of volTensorField like this:
volScalarField scalar_1("scalar_1", mytensorfield.component(tensor::XX));
you can access other components by replacing XX with YY, ZZ, XY, YZ, ZX etc.
stanweer is offline   Reply With Quote

Reply

Tags
field acces, tensor


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
Is there a way to access the gradient limiter in Fluent ? CFDYourself FLUENT 1 February 16, 2016 05:49
Momentum source coefficient, cylindrical coordinates, circumferential component? polakse CFX 15 January 18, 2016 02:40
How can I access to a volTensorField elements? urgent!!! adambarfi OpenFOAM Running, Solving & CFD 6 May 14, 2013 16:28
access to velocity component in cylindrical coordinates swati_mohanty FLUENT 0 August 18, 2010 10:16
probes for a component of a volTensorField titio OpenFOAM Post-Processing 0 July 2, 2010 13:50


All times are GMT -4. The time now is 21:16.