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

volVolumeField from volSurfaceField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2011, 13:53
Default volVolumeField from volSurfaceField
  #1
New Member
 
Ivan
Join Date: Sep 2010
Location: Russia , Moscow.
Posts: 14
Rep Power: 15
Zato_Ichi is on a distinguished road
Greetings !

To make a volVolumeField consisting of 3 volScalarField i tried this code? but it doesn't work.

Code:
volTensorField gradq = fvc::grad(q);

volScalarField qx = gradq.component(vector::X);
volScalarField qy = gradq.component(vector::Y);
volScalarField qz = gradq.component(vector::Z);

diaggradq.internalField() = vectorField(qx,qy,qz) ;
there q is volVectorField and diaggradq is volVectorField too.

The main goal is to make a vector (dq/dx , dq/dy , dq/dz), and I can't think how to do it without extracting diagonal elements from grad(q) tensor.

Thanks for helping, best regards.
Zato_Ichi is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 12:15.