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

setValues - access coordinates

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 1, 2011, 04:39
Default setValues - access coordinates
  #1
New Member
 
Gregory
Join Date: Nov 2010
Location: Dresden
Posts: 14
Rep Power: 15
catapult is on a distinguished road
Hi there,

I am using the function setValues of fvmatrix. I can create a labelList of the cells I want to update. I can not however create a corresponding scalarField that require the values of the turbulent energy k_ when looping over selected cells. The following exemple will help understand my problem:
---------------------------------------------
labelHashSet wallCells;
forAll(fmu_, cellI)
{
if (fmu_[cellI]<0.95)
{wallCells.insert(cellI);}
}
labelList cellLabels = wallCells.toc(); //I successfully created my list of selected cell

scalarField fixedEpsilon (cellLabels.size());
forAll(fixedEpsilon, cellI)
{
fixedEpsilon[cellI] = pow(k_[cellI], 1.5)/Leps_; //this is wrong **
}
epsEqn().setValues(cellLabels, fixedEpsilon);
----------------------------------------------

** this is where I get stuck. How can i set my epsilon in a particular cell given that I need to access the k_ in this cell ??? the cell [cellI] of fixedEpsilon doesnot match the cell [cellI] of k_. How can I solve this ?

Thank you very much for your help.
catapult 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
Can we have access to cells coordinates? adrianahscott OpenFOAM Running, Solving & CFD 20 January 23, 2018 14:39
access to velocity component in cylindrical coordinates swati_mohanty FLUENT 0 August 18, 2010 10:16
Access cell coordinates and wall data in posdat.f Boban Siemens 5 July 22, 2005 04:25
Coordinate's tranformation tommy FLUENT 0 February 13, 2004 02:19
Calculation in cylindrical coordinates Franz Wingelhofer CFX 0 December 28, 1999 07:46


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