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

Creating a new variable in a .C file?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 27, 2011, 09:31
Default Creating a new variable in a .C file?
  #1
Member
 
Greg Givogue
Join Date: Aug 2010
Location: Ottawa Canada
Posts: 57
Rep Power: 15
Greg Givogue is on a distinguished road
Hi Everyone,

I'm relatively new with OpenFOAM and C++ programming. I'd like to modify the Forces.C file to include the following calc;

vector CP = sum(Md^(vf+pf))/sum(vf+pf);

I believe I have to update the forces.H file as well to define CP... but I'm not sure how.

When I ran wmake in the forces folder I got:

forces/forces.C:469: warning: unused variable ‘CP’
make: *** [Make/linux64GccDPOpt/forces.o] Error 1

Thanks for the help!

Greg
Greg Givogue is offline   Reply With Quote

 


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
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
OpenFOAM Install Script ljsh OpenFOAM Installation 82 October 12, 2009 11:47
[OpenFOAM] ParaView 33 canbt open OpenFoam file hariya03 ParaView 7 September 25, 2008 17:33
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


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