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

Defining entries for VolTensorField depending on velocity components

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 20, 2019, 09:53
Default Defining entries for VolTensorField depending on velocity components
  #1
New Member
 
Join Date: Feb 2019
Posts: 1
Rep Power: 0
katab is on a distinguished road
Hi,

I need to create a tensorfield for the creation of the hydrodynamical dispersion tensor after Scheidegger.The entries depend on the two constants alphaL and alphaT as well as on different velocity components.


When I define the tensor with constant entries everything worked fine:


Quote:
dimensionedScalar alphaL
(
transportProperties.lookup("alphaL")
);

dimensionedScalar alphaT
(
transportProperties.lookup("alphaT")
);


volTensorField Dhyd
(
IOobject
(
"Dhyd",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedTensor("Dhyd", dimensionSet(0,2, -1, 0, 0, 0, 0),tensor(0,0,0,0,0,0,0,0,0))
);
But it did not compile if I make these entries depending on alphaL or on velocity components like:
Quote:
tensor(alphaL,0,0,0,0,0,0,0,0)
or

Quote:
tensor(velocity.component(0),0,0,0,0,0,0,0,0)
I get the message, that only one argument is expected for the tensor, but 9 are given.
Does anybody know, how I can define these entries for the tensor depending on the velocity components and on the alpha-values?


Thanks for your help
katab 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sand velocity depending on the flow velocity ealzeraim Fluent Multiphase 0 July 12, 2017 08:21
cartesian velocity components? hamidciv CFX 6 March 13, 2015 13:25
OpenFOAM Velocity BC two orthogonal components viv123 OpenFOAM 1 October 31, 2014 09:28
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 10:58.