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

Unused variable warning in compiling coalChemistryFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2018, 07:56
Default Unused variable warning in compiling coalChemistryFoam
  #1
New Member
 
Xiaoshuai Yuan
Join Date: Mar 2017
Posts: 6
Rep Power: 9
kk2017 is on a distinguished road
Hello everyone,

I'm wondering about why the coalChemistryFoam solver includes the the $(FOAM_SOLVERS)/combustion/reactingFoam folder in Make/options file. After remove the inclusion, the following warning is given during the compiling process.

Quote:
In file included from /home/user/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/postProcess.H:129:0,
from coalChemistryFoam.C:50:
./createFields.H: In function ‘int main(int, char**)’:
./createFields.H:30:23: warning: unused variable ‘T’ [-Wunused-variable]
const volScalarField& T = thermo.T();
^
./createFields.H:31:23: warning: unused variable ‘psi’ [-Wunused-variable]
const volScalarField& psi = thermo.psi();
^
I checked the $(FOAM_SOLVERS)/combustion/reactingFoam folder, and it seemed that none of the files are used by the coalChemistryFoam. In addition, the variables 'T' and 'psi' are used in the files EEqn.H and pEqn.H, which are included in the coalChemistryFoam.C file. Why it still gives the warning saying unused?

Should I ignore the warning? Does the warning cause anything abnormal?
kk2017 is offline   Reply With Quote

Old   March 23, 2018, 13:08
Default
  #2
Member
 
HK
Join Date: Oct 2015
Location: Madras
Posts: 31
Rep Power: 10
Luttappy is on a distinguished road
Got the reason for this issue?
Luttappy is offline   Reply With Quote

Old   March 23, 2018, 17:04
Default
  #3
New Member
 
Xiaoshuai Yuan
Join Date: Mar 2017
Posts: 6
Rep Power: 9
kk2017 is on a distinguished road
Quote:
Originally Posted by Luttappy View Post
Got the reason for this issue?
No, I didn't know the reason yet.
kk2017 is offline   Reply With Quote

Reply

Tags
coalchemistryfoam, compile solver, warning message

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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[waves2Foam] Waves2Foam Related Topics ngj OpenFOAM Community Contributions 660 August 20, 2018 12:39
[swak4Foam] installing funkySetFields prapanj OpenFOAM Community Contributions 65 October 8, 2015 17:46
OpenFoam 14 installation problem gfcoppola OpenFOAM Installation 20 November 2, 2007 13:38
Warning 097- AB Siemens 6 November 15, 2004 04:41


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