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

Getting nu at a particular location, please help!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2013, 08:44
Default Getting nu at a particular location, please help!
  #1
Member
 
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 13
JackW is on a distinguished road
Hi there!

I have the task of compiling some models into later versions of openFoam (from 1.7.1), I believe I am almost there however I have come a bit unstuck on:

nu()[CellI]

in the below code. Is there still a way to use index notation with nu in OF-2.1.0?

Thanks for any help you can give me!

Jack

Code:
labelHashSet fixCells;
scalarField yPlus = 0.547723*y_*sqrt(k_)/nu();

forAll(omega_, i)
{
	if(yPlus[i] < 2.0)
	{ 
		fixCells.insert(i);
		setO[i]=1;
		
	}
}

labelList fixCellsLabel = fixCells.toc();
scalarField fixO(fixCells.size());


forAll(fixO, i)
{
	label cellI =  fixCellsLabel[i];
	fixO[i]=6.0/beta1_.value()*nu()[cellI]/(sqr(y_[cellI]));
}

omegaEqn().setValues(fixCellsLabel, fixO );
JackW is offline   Reply With Quote

Old   May 31, 2013, 09:44
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I don't think these kind of addressing really changed from 1.7 to 2.1. I assume you got problems with compiling, can you shows some error messages?
Bernhard is offline   Reply With Quote

Old   May 31, 2013, 09:56
Default
  #3
Member
 
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 13
JackW is on a distinguished road
Hi, thank you very much for a quick reply.

The error is as follows:

Code:
Making dependency list for source file v2fEASMkOmegaV2/v2fEASMkOmegaV2.C
In file included from v2fEASMkOmegaV2/v2fEASMkOmegaV2.C:670:0:
v2fEASMkOmegaV2/omegaBSLWall.H: In member function 'virtual void Foam::incompressible::RASModels::v2fEASMkOmegaV2::correct()':
v2fEASMkOmegaV2/omegaBSLWall.H:75:38: error: no match for 'operator[]' in 'Foam::incompressible::turbulenceModel::nu() const()[faceCelli]'
In file included from v2fEASMkOmegaV2/v2fEASMkOmegaV2.C:672:0:
v2fEASMkOmegaV2/setOmega.H:30:39: error: no match for 'operator[]' in 'Foam::incompressible::turbulenceModel::nu() const()[cellI]'
make: *** [Make/darwinIntel64Gcc46DPOpt/v2fEASMkOmegaV2.o] Error 1
Basically from my limited C++ knowledge I assumed this was down to the operator [] not existing anymore, so I assumed there was another way?

Thanks

Jack
JackW 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
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30


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