CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   error compiling modified applications (https://www.cfd-online.com/Forums/openfoam-programming-development/95239-error-compiling-modified-applications.html)

yvyan December 10, 2011 13:55

error compiling modified applications
 
Hello everybody,

I am using openFoam 2.0.1
I am trying to compile a modified version of the dieselEngineFoam solver that I made.
When I type 'wmake' I get a lot of the following errors:

error: '<name of the variable>' was not declared in this scope

I would like to specify that all these variables are already used by the original function and I didn't add them.

Some help? :confused:

Thank you all!!!

Linse December 12, 2011 05:41

First check I would suggest: Are your modifications included in the solver before the variables are defined?
I cannot think of more likely sources for the problem at the moment if the variables really already are included...

yvyan December 13, 2011 04:15

Thank you for replying me,

Quote:

Originally Posted by Linse (Post 335518)
First check I would suggest: Are your modifications included in the solver before the variables are defined?
I cannot think of more likely sources for the problem at the moment if the variables really already are included...

the modifications ara included after the variables declarations.

And now I can add that the problem is not given by my modifications.
In fact I obtain the same errors also if I copy the original directory of the solver dieselEngineFoam in my $WM_PROJECT_USER_DIR and I try to recompile it!!!! :eek:!!!!!
Where I wrong?

Thanks.

stevenvanharen December 13, 2011 05:38

How about your 'makefile' and 'options' file? Are they the same?

Did you change $FOAM_APPBIN into $FOAM_USER_APPBIN?

There might be write issues?

yvyan December 13, 2011 07:40

Thank you for replying me,

Quote:

Originally Posted by stevenvanharen (Post 335656)
How about your 'makefile' and 'options' file? Are they the same?

Did you change $FOAM_APPBIN into $FOAM_USER_APPBIN?

There might be write issues?

Yes, I have changed $FOAM_APPBIN into $FOAM_USER_APPBIN.

I changed only the file 'files' in the Make directory. The 'options' file is the original one.
Thanks.

Any other tips?

stevenvanharen December 13, 2011 11:11

Copy:
readEngineTimeControls.H

from:

$FOAM_SRC/../applications/solvers/combustion/engineFoam/


to your folder.

I think it should work then. This is also the first error you get I think.

yvyan December 13, 2011 14:14

Quote:

Originally Posted by stevenvanharen (Post 335694)
Copy:
readEngineTimeControls.H

from:

$FOAM_SRC/../applications/solvers/combustion/engineFoam/


to your folder.

I think it should work then. This is also the first error you get I think.

Thank you but I have already done it. In this way you solved just the first error.
The real question is given by a lot of '<name of the variable> was not declared in this scope' errors that I get when I try to compile!

Could this error be related to the fact that I don't have the root permissions?

Thanks! Help me please!!!! :D

stevenvanharen December 13, 2011 15:31

That is strange, when I copied that file it compiled just fine.

Maybe you can post the complete error message?

yvyan December 14, 2011 13:55

Here are the 'ls' result and the 'wmake' errors message

************************************************** ***********************************
gvirelli@froude:~/OpenFOAM/gvirelli-2.0.1/applications/solvers/dieselEngineFoamProva> ls
createFields.H dieselEngineFoamProva.C file logSummary.H pEqn.H readEngineTimeControls.H spraySummary.H UEqn.H
createSpray.H dieselEngineFoamProva.dep hsEqn.H Make readCombustionProperties.H rhoEqn.H startSummary.H YEqn.H
gvirelli@froude:~/OpenFOAM/gvirelli-2.0.1/applications/solvers/dieselEngineFoamProva> wmake
make: Warning: File `linux64GccDPOpt/options' has modification time 2,9e+03 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File `linux64GccDPOpt/options' has modification time 2,9e+03 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File `Make/linux64GccDPOpt/dontIncludeDeps' has modification time 3,6e+03 s in the future
make: warning: Clock skew detected. Your build may be incomplete.
make: Warning: File `dieselEngineFoamProva.dep' has modification time 2,9e+03 s in the future
SOURCE=dieselEngineFoamProva.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../engineFoam -I/opt/openfoam201/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam201/src/lagrangian/basic/lnInclude -I/opt/openfoam201/src/meshTools/lnInclude -I/opt/openfoam201/src/lagrangian/dieselSpray/lnInclude -I/opt/openfoam201/src/thermophysicalModels/properties/liquidProperties/lnInclude -I/opt/openfoam201/src/thermophysicalModels/properties/liquidMixtureProperties/lnInclude -I/opt/openfoam201/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam201/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/opt/openfoam201/src/thermophysicalModels/reactionThermo/lnInclude -I/opt/openfoam201/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam201/src/thermophysicalModels/laminarFlameSpeed/lnInclude -I/opt/openfoam201/src/../applications/solvers/reactionThermo/XiFoam -I/opt/openfoam201/src/thermophysicalModels/chemistryModel/lnInclude -I/opt/openfoam201/src/ODE/lnInclude -I/opt/openfoam201/src/engine/lnInclude -I/opt/openfoam201/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam201/src/OpenFOAM/lnInclude -I/opt/openfoam201/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dieselEngineFoamProva.o
In file included from dieselEngineFoamProva.C:52:0:
/opt/openfoam201/src/OpenFOAM/lnInclude/setRootCase.H: In function âint main(int, char**)â:
/opt/openfoam201/src/OpenFOAM/lnInclude/setRootCase.H:5:24: error: variable âFoam::argList argsâ has initializer but incomplete type
In file included from dieselEngineFoamProva.C:53:0:
/opt/openfoam201/src/engine/lnInclude/createEngineTime.H:1:5: error: âInfoâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineTime.H:1:38: error: âendlâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineTime.H:3:5: error: âengineTimeâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineTime.H:3:16: error: expected â;â before ârunTimeâ
In file included from dieselEngineFoamProva.C:54:0:
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:2:12: error: ârunTimeâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:2:34: error: ânlâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:4:5: error: âautoPtrâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:4:13: error: âengineMeshâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:6:9: error: âengineMeshâ is not a class or namespace
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:10:17: error: âengineMeshâ is not a class or namespace
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:14:13: error: âIOobjectâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:16:5: error: âmeshPtrâ was not declared in this scope
/opt/openfoam201/src/engine/lnInclude/createEngineMesh.H:18:17: error: âmeshâ was not declared in this scope
In file included from dieselEngineFoamProva.C:55:0:
createFields.H:3:9: error: âpsiChemistryModelâ was not declared in this scope
createFields.H:5:5: error: âpsiChemistryModelâ is not a class or namespace
createFields.H:6:1: error: âpChemistryâ was not declared in this scope
createFields.H:7:20: error: âchemistryâ was not declared in this scope
createFields.H:9:1: error: âhsCombustionThermoâ was not declared in this scope
createFields.H:9:21: error: âthermoâ was not declared in this scope
createFields.H:11:1: error: âbasicMultiComponentMixtureâ was not declared in this scope
createFields.H:11:29: error: âcompositionâ was not declared in this scope
createFields.H:12:1: error: âPtrListâ was not declared in this scope
createFields.H:12:9: error: âvolScalarFieldâ was not declared in this scope
createFields.H:12:26: error: âYâ was not declared in this scope
createFields.H:14:1: error: âwordâ was not declared in this scope
createFields.H:14:6: error: expected â;â before âinertSpecieâ
createFields.H:16:27: error: âinertSpecieâ was not declared in this scope
createFields.H:21:17: error: âFatalErrorâ was not declared in this scope
createFields.H:24:16: error: expected â;â before ârhoâ
createFields.H:36:1: error: âvolVectorFieldâ was not declared in this scope
createFields.H:36:16: error: expected â;â before âUâ
createFields.H:50:17: error: âpâ was not declared in this scope
createFields.H:51:7: error: âvolScalarFieldâ does not name a type
createFields.H:52:7: error: âvolScalarFieldâ does not name a type
createFields.H:53:17: error: âhsâ was not declared in this scope
In file included from createFields.H:56:0,
from dieselEngineFoamProva.C:55:
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCreatePhi.H:39:1: error: âsurfaceScalarFieldâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCreatePhi.H:39:20: error: expected â;â before âphiâ
In file included from dieselEngineFoamProva.C:55:0:
createFields.H:58:16: error: expected â;â before âkappaâ
createFields.H:73:9: error: âcompressibleâ has not been declared
createFields.H:75:5: error: âcompressibleâ has not been declared
createFields.H:77:9: error: ârhoâ was not declared in this scope
createFields.H:78:9: error: âUâ was not declared in this scope
createFields.H:79:9: error: âphiâ was not declared in this scope
createFields.H:82:1: error: âturbulenceâ was not declared in this scope
createFields.H:85:16: error: expected â;â before âDpDtâ
createFields.H:91:1: error: âmultivariateSurfaceInterpolationSchemeâ was not declared in this scope
createFields.H:91:40: error: âscalarâ was not declared in this scope
createFields.H:91:47: error: â::fieldTableâ has not been declared
createFields.H:91:60: error: expected â;â before âfieldsâ
createFields.H:95:5: error: âfieldsâ was not declared in this scope
createFields.H:97:1: error: âfieldsâ was not declared in this scope
createFields.H:99:1: error: âDimensionedFieldâ was not declared in this scope
createFields.H:99:26: error: âvolMeshâ was not declared in this scope
createFields.H:106:9: error: âIOobjectâ is not a class or namespace
createFields.H:107:9: error: âIOobjectâ is not a class or namespace
createFields.H:110:38: error: âdimEnergyâ was not declared in this scope
createFields.H:110:48: error: âdimTimeâ was not declared in this scope
createFields.H:110:56: error: âdimVolumeâ was not declared in this scope
createFields.H:110:70: error: âdimensionedScalarâ was not declared in this scope
createFields.H:111:1: error: âchemistryShâ was not declared in this scope
In file included from dieselEngineFoamProva.C:56:0:
/opt/openfoam201/src/finiteVolume/lnInclude/readGravitationalAcceleration.H:2:5: error: âuniformDimensionedVectorFieldâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/readGravitationalAcceleration.H:2:35: error: expected â;â before âgâ
In file included from dieselEngineFoamProva.C:57:0:
readCombustionProperties.H:3:1: error: âIOdictionaryâ was not declared in this scope
readCombustionProperties.H:3:14: error: expected â;â before âcombustionPropertiesâ
readCombustionProperties.H:15:19: error: expected â;â before âCmixâ
In file included from dieselEngineFoamProva.C:58:0:
createSpray.H:3:9: error: âgasThermoPhysicsâ was not declared in this scope
createSpray.H:3:49: error: âgasPropertiesâ was not declared in this scope
createSpray.H:9:13: error: expected type-specifier before âgasThermoPhysicsâ
createSpray.H:9:13: error: expected â)â before âgasThermoPhysicsâ
createSpray.H:17:1: error: âsprayâ was not declared in this scope
createSpray.H:17:7: error: expected â;â before âdieselSprayâ
createSpray.H:29:8: error: expected â;â before âgasMass0â
createSpray.H:31:5: error: âdieselSprayâ was not declared in this scope
createSpray.H:33:5: error: âgasMass0â was not declared in this scope
createSpray.H:33:17: error: âconstantâ has not been declared
createSpray.H:36:1: error: âgasMass0â was not declared in this scope
createSpray.H:37:5: error: âdieselSprayâ was not declared in this scope
In file included from dieselEngineFoamProva.C:59:0:
/opt/openfoam201/src/finiteVolume/lnInclude/initContinuityErrs.H:37:8: error: expected â;â before âcumulativeContErrâ
In file included from readEngineTimeControls.H:1:0,
from dieselEngineFoamProva.C:60:
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:35:8: error: expected â;â before âmaxCoâ
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:38:8: error: expected â;â before âmaxDeltaTâ
In file included from dieselEngineFoamProva.C:60:0:
readEngineTimeControls.H:3:5: error: âmaxDeltaTâ was not declared in this scope
In file included from dieselEngineFoamProva.C:61:0:
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:32:8: error: expected â;â before âCoNumâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:33:8: error: expected â;â before âmeanCoNumâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:37:5: error: âscalarFieldâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:37:17: error: expected â;â before âsumPhiâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:43:5: error: âCoNumâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:43:22: error: âsumPhiâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:43:45: error: âgMaxâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:45:5: error: âmeanCoNumâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:46:25: error: âgSumâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:49:35: error: âmeanCoNumâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:50:20: error: âCoNumâ was not declared in this scope
In file included from dieselEngineFoamProva.C:62:0:
/opt/openfoam201/src/finiteVolume/lnInclude/setInitialDeltaT.H:35:48: error: âSMALLâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/setInitialDeltaT.H:41:17: error: âmaxCoâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/setInitialDeltaT.H:43:13: error: âminâ was not declared in this scope
In file included from dieselEngineFoamProva.C:63:0:
startSummary.H:1:35: error: âfvcâ has not been declared
startSummary.H:5:1: error: âOFstreamâ was not declared in this scope
startSummary.H:5:10: error: expected â;â before âlogSummaryFileâ
startSummary.H:10:1: error: âlogSummaryFileâ was not declared in this scope
dieselEngineFoamProva.C:65:5: error: âpimpleControlâ was not declared in this scope
dieselEngineFoamProva.C:65:19: error: expected â;â before âpimpleâ
In file included from readEngineTimeControls.H:1:0,
from dieselEngineFoamProva.C:73:
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:35:8: error: expected â;â before âmaxCoâ
/opt/openfoam201/src/finiteVolume/lnInclude/readTimeControls.H:38:8: error: expected â;â before âmaxDeltaTâ
In file included from dieselEngineFoamProva.C:74:0:
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:32:8: error: expected â;â before âCoNumâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:33:8: error: expected â;â before âmeanCoNumâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:37:5: error: âscalarFieldâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:37:17: error: expected â;â before âsumPhiâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:43:22: error: âsumPhiâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:43:45: error: âgMaxâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleCourantNo.H:46:25: error: âgSumâ was not declared in this scope
In file included from dieselEngineFoamProva.C:75:0:
/opt/openfoam201/src/finiteVolume/lnInclude/setDeltaT.H:36:12: error: expected â;â before âmaxDeltaTFactâ
/opt/openfoam201/src/finiteVolume/lnInclude/setDeltaT.H:37:12: error: expected â;â before âdeltaTFactâ
/opt/openfoam201/src/finiteVolume/lnInclude/setDeltaT.H:43:13: error: âdeltaTFactâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/setDeltaT.H:45:9: error: âminâ was not declared in this scope
dieselEngineFoamProva.C:96:28: error: expected â;â before âtkâ
dieselEngineFoamProva.C:100:28: error: expected â;â before âtcâ
dieselEngineFoamProva.C:103:13: error: âkappaâ was not declared in this scope
dieselEngineFoamProva.C:103:41: error: âtcâ was not declared in this scope
dieselEngineFoamProva.C:103:70: error: âtkâ was not declared in this scope
dieselEngineFoamProva.C:106:23: error: âkappaâ was not declared in this scope
In file included from dieselEngineFoamProva.C:109:0:
rhoEqn.H:32:16: error: expected â;â before âSevapâ
rhoEqn.H:50:9: error: âSevapâ was not declared in this scope
rhoEqn.H:57:9: error: âfvmâ has not been declared
rhoEqn.H:58:9: error: âfvcâ has not been declared
rhoEqn.H:60:9: error: âSevapâ was not declared in this scope
rhoEqn.H:61:5: error: âsolveâ was not declared in this scope
dieselEngineFoamProva.C:111:14: error: âpimpleâ was not declared in this scope
In file included from dieselEngineFoamProva.C:113:0:
UEqn.H:1:5: error: âfvVectorMatrixâ was not declared in this scope
UEqn.H:1:20: error: expected â;â before âUEqnâ
UEqn.H:13:15: error: âUEqnâ was not declared in this scope
UEqn.H:13:24: error: âfvcâ has not been declared
UEqn.H:13:36: error: âsolveâ was not declared in this scope
In file included from dieselEngineFoamProva.C:114:0:
YEqn.H:1:1: error: âtmpâ was not declared in this scope
YEqn.H:1:5: error: âfvâ has not been declared
YEqn.H:1:34: error: expected primary-expression before â>â token
YEqn.H:3:5: error: âfvâ has not been declared
YEqn.H:3:33: error: â::Newâ has not been declared
YEqn.H:10:1: error: âmvConvectionâ was not declared in this scope
YEqn.H:14:5: error: âlabelâ was not declared in this scope
YEqn.H:14:11: error: expected â;â before âinertIndexâ
YEqn.H:15:20: error: expected â;â before âYtâ
YEqn.H:19:28: error: âinertSpecieâ was not declared in this scope
YEqn.H:21:29: error: âYiâ was not declared in this scope
YEqn.H:25:17: error: âfvmâ has not been declared
YEqn.H:27:17: error: âfvmâ has not been declared
YEqn.H:32:13: error: âsolveâ was not declared in this scope
YEqn.H:35:13: error: âYtâ was not declared in this scope
YEqn.H:39:13: error: âinertIndexâ was not declared in this scope
YEqn.H:43:7: error: âinertIndexâ was not declared in this scope
YEqn.H:43:33: error: âYtâ was not declared in this scope
In file included from dieselEngineFoamProva.C:115:0:
hsEqn.H:4:9: error: âfvmâ has not been declared
hsEqn.H:6:9: error: âfvmâ has not been declared
hsEqn.H:8:8: error: âDpDtâ was not declared in this scope
hsEqn.H:11:5: error: âsolveâ was not declared in this scope
In file included from dieselEngineFoamProva.C:120:0:
pEqn.H:3:16: error: expected â;â before âAâ
pEqn.H:4:5: error: âUEqnâ was not declared in this scope
pEqn.H:4:14: error: âAâ was not declared in this scope
pEqn.H:8:24: error: expected â;â before âphidâ
pEqn.H:17:9: error: âfvScalarMatrixâ was not declared in this scope
pEqn.H:17:24: error: expected â;â before âpEqnâ
pEqn.H:26:9: error: âpEqnâ was not declared in this scope
pEqn.H:39:11: error: âfvcâ has not been declared
pEqn.H:40:13: error: âfvcâ has not been declared
pEqn.H:40:48: error: âfvcâ has not been declared
pEqn.H:44:9: error: âfvScalarMatrixâ was not declared in this scope
pEqn.H:44:24: error: expected â;â before âpEqnâ
pEqn.H:53:9: error: âpEqnâ was not declared in this scope
In file included from pEqn.H:65:0,
from dieselEngineFoamProva.C:120:
rhoEqn.H:32:16: error: expected â;â before âSevapâ
rhoEqn.H:50:9: error: âSevapâ was not declared in this scope
rhoEqn.H:57:9: error: âfvmâ has not been declared
rhoEqn.H:58:9: error: âfvcâ has not been declared
rhoEqn.H:60:9: error: âSevapâ was not declared in this scope
rhoEqn.H:61:5: error: âsolveâ was not declared in this scope
In file included from pEqn.H:66:0,
from dieselEngineFoamProva.C:120:
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:33:23: error: expected â;â before âtotalMassâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:35:12: error: expected â;â before âsumLocalContErrâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:38:12: error: expected â;â before âglobalContErrâ
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:41:5: error: âcumulativeContErrâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:41:26: error: âglobalContErrâ was not declared in this scope
/opt/openfoam201/src/finiteVolume/lnInclude/compressibleContinuityErrs.H:43:60: error: âsumLocalContErrâ was not declared in this scope
In file included from dieselEngineFoamProva.C:120:0:
pEqn.H:68:6: error: âfvcâ has not been declared
pEqn.H:71:1: error: âDpDtâ was not declared in this scope
pEqn.H:71:8: error: âfvcâ has not been declared
pEqn.H:71:48: error: âfvcâ has not been declared
In file included from dieselEngineFoamProva.C:129:0:
logSummary.H:2:31: error: âTâ was not declared in this scope
logSummary.H:8:27: error: âtabâ was not declared in this scope
In file included from dieselEngineFoamProva.C:130:0:
spraySummary.H:1:5: error: âlabelâ was not declared in this scope
spraySummary.H:1:11: error: expected â;â before âNparcelsâ
spraySummary.H:2:12: error: âNparcelsâ was not declared in this scope
spraySummary.H:2:22: error: âsumOpâ was not declared in this scope
spraySummary.H:2:35: error: expected primary-expression before â)â token
spraySummary.H:2:36: error: âreduceâ was not declared in this scope
spraySummary.H:15:12: error: expected â;â before âevapMassâ
spraySummary.H:19:12: error: expected â;â before âgasMassâ
spraySummary.H:23:9: error: âgasMassâ was not declared in this scope
spraySummary.H:23:20: error: âconstantâ has not been declared
spraySummary.H:26:12: error: expected â;â before âaddedMassâ
spraySummary.H:28:56: error: âaddedMassâ was not declared in this scope
spraySummary.H:30:29: error: âevapMassâ was not declared in this scope
make: *** [Make/linux64GccDPOpt/dieselEngineFoamProva.o] Error 1
************************************************** *************

Any idea?

yvyan December 14, 2011 14:03

I would like to specify that:
1- I don't have root permissions on the workstation
2- I am working remotely via ssh from a windows laptot using puTTY.

Could this facts influence the wmake result?

Thank you all!

stevenvanharen December 14, 2011 14:54

Mmmmm... that is a really nasty error message you got there.

Did you try wclean and than wmake?

This is the last think a can think of.

yvyan December 14, 2011 16:09

Quote:

Originally Posted by stevenvanharen (Post 335843)
Mmmmm... that is a really nasty error message you got there.

Did you try wclean and than wmake?

At least one million times

Quote:

Originally Posted by stevenvanharen (Post 335843)
This is the last think a can think of.

Thank you anyway

ayhan515 December 15, 2011 04:31

Quote:

Originally Posted by yvyan (Post 335839)
I would like to specify that:
1- I don't have root permissions on the workstation
2- I am working remotely via ssh from a windows laptot using puTTY.

Could this facts influence the wmake result?

Thank you all!

I was same situation.

in my computer this works.
Code:

mydizel.C

EXE = $(FOAM_USER_APPBIN)/mydizel

but when i use ssh and putty, it doesnt works so i change like below.
Code:

mydizel.C

EXE = /our-programme-folder/users/myname/OpenFOAM/myname-2.0.x/platforms/linux64Gcc45DPOpt/bin/mydizel

i think you should ask the right path to your workstation's directors. Sorry my English not well.

yvyan December 15, 2011 15:21

Quote:

Originally Posted by ayhan515 (Post 335898)
Code:

mydizel.C

EXE = /our-programme-folder/users/myname/OpenFOAM/myname-2.0.x/platforms/linux64Gcc45DPOpt/bin/mydizel

i think you should ask the right path to your workstation's directors. Sorry my English not well.

I have tried introducing my full path but It doesn't work yet!!!

:confused:

yvyan December 16, 2011 14:21

Any help?????????????
Please!

Bernhard December 17, 2011 04:33

Following up on ayhan: Are you sure you sourced the /etc/bashrc?

You can do this like this:
Code:

> source /opt/openfoam201/etc/bashrc
This sets some necessary environmental variables.

You should also look into this Clock Skew, those messages are not normal. By the way, there is a .dep file already, so the wclean was not performed properly I guess.

gwierink December 17, 2011 04:51

Hi Giuseppe,

As Bernhard mentioned, you might want to look at the time stamp of the files. You can update file time stamps by using touch on the file (touch myFile).

You wrote that dieselEngineFoam doesn't compile form the beginning, even without changes. I tried as well and it turned out that there is a relative library path in Make /options. To fix this, just change
Code:

    -I../engineFoam \
to
Code:

    -I$(FOAM_SOLVERS)/combustion/engineFoam \
in Make/options. For me it then just compiled. Hope that helps.

yvyan December 17, 2011 06:27

Thank you guys for helping me!


@Bernhard: I setted my general bashrc file to automatically do source of the bashrc file of the openFoam software each time a new shell is opened. So I don't think I need to type this command anymore.

Quote:

You should also look into this Clock Skew, those messages are not normal. By the way, there is a .dep file already, so the wclean was not performed properly I guess.
I resolved the clock skew warning but the 'not declared in this scope' errors still persist.
Furthermore, I have tryed again typing in sequence rmdepall (and the .dep file has been correctly cancelled), wclean and wmake without success.

@gwierink
Quote:

You wrote that dieselEngineFoam doesn't compile form the beginning, even without changes. I tried as well and it turned out that there is a relative library path in Make /options. To fix this, just change
Code:
-I../engineFoam \
to
Code:
-I$(FOAM_SOLVERS)/combustion/engineFoam \
in Make/options. For me it then just compiled. Hope that helps.
I made this change too but this permit to wmake just to find the file readEngineTimeControls.H but the 'not declared in this scope' errors still persist!!!!!!!!

Anyway. Last minute news!!!!
I tryed to do the same thing (copy of the original dieselEngineFoam directory in my $(WM_PROJECT_USER_DIR)/applications/solvers/ directory, making the right change, and recompiling) using openFoam 1.7.1 and It work!!!

It definitely is a problem related to my installation or to the openFoam 2.0.1 version!!! Guys, what version of the software are you using??

Thank you!!!

ayhan515 December 17, 2011 14:39

Quote:

Originally Posted by yvyan (Post 336156)
It definitely is a problem related to my installation or to the openFoam 2.0.1 version!!! Guys, what version of the software are you using??
Thank you!!!

On my notebook i use OpenFoam 2.0.1, OpenFoam 2.0.x
is installed on remote computer and i could compile and use modified dieselEngineFoam on both of them.

potentialFoam February 8, 2016 09:04

Dear Foamers,

I have a similar problem with an error due to declaration (maybe...)
I wrote a new fvOptions class where I use a certain discretisation of the convective term, like for the upwind case:

Code:

volVectorField upwindConvection =
      fv::gaussConvectionScheme<vector>
      (
        mesh(),
        phi,
        upwind<vector>(mesh(), phi)
      ).fvcDiv(phi, U);

Now, I would like to use a high order convective scheme, like used in the fvSchemes file, e.g.
Code:

div(phi,U)      Gauss QUICK;
div(phi,U)      Gauss limitedCubicV 1;
div(phi,U)      bounded Gauss linearUpwind grad(U)

Problem:
Using e.g.
Code:

volVectorField upwindConvection =
      fv::gaussConvectionScheme<vector>
      (
        mesh(),
        phi,
        QUICK<vector>(mesh())
      ).fvcDiv(phi, U)

leads to the error:
Code:

error: ‘QUICK’ was not declared in this scope
      QUICK<vector>(mesh(), phi)

Although the QUICK.H header file is included like the upwind.H file at the top of the file.
So why is it not declared?!

potentialFoam February 22, 2016 12:07

Still need help concerning that issue...

Further points I checked:
- in foam-folder:
Code:

grep -nr "fv::gaussConvectionScheme"
(other applications only use a laminar or upwind type, but nothing like QUICK or other higher order schemes)

- building the fvOptions-class in the directory $WM_PROJECT_USER_DIR (same error occurring)

Can someone help me with the error described in the last post?

potentialFoam March 1, 2016 04:53

Solved
 
Finally, one solution is to refer to the system/fvSchemes file with
Code:

volVectorField QUICKConvection ( fvc::div(phi, U, "div(phi,U)") );
if
div(phi,U) Gauss QUICK;
is specified in fvSchemes.

A further possibility would be to define a new name for the convective part
"div(phi,U)" -> "newName"
and define it inside fvSchemes.


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