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

Problem with assign a value to Cell !

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2015, 08:09
Question Problem with assign a value to Cell !
  #1
Senior Member
 
Hesam
Join Date: Feb 2015
Posts: 139
Rep Power: 11
rapierrz is on a distinguished road
Hi friends,

I want to assign a value to alpha with below code but i can't do it ???

forAll (T , celli)
{
if ( T[celli] > Tsat )
{
alpha[celli] = c*(T[celli]-Tsat);
}
}


that c is a constant parameter.

error is : 'celli' does not name a type

and

expected unqualified-id before 'for'
rapierrz is offline   Reply With Quote

Old   October 25, 2016, 15:58
Default
  #2
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 16
T.D. is on a distinguished road
Hi,

use:
forAll(mesh.C(), celli)
.
.

regards
T.D. 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
Problem with cell aspect ratio in the wake nw_ds Main CFD Forum 0 May 29, 2015 19:16
Cell Zone Conditions initialization Problem ansys_matt FLUENT 3 October 13, 2014 04:45
Negative cell volume problem in-cylinder ziani.lotfi FLUENT 0 April 11, 2012 07:54
CHT cell layer thickness problem Arnab Siemens 1 March 13, 2005 08:36
Baffle cell problem in shock tube AB Siemens 4 November 15, 2004 08:44


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