|
[Sponsors] |
March 26, 2013, 09:27 |
Error in compiling a modified solver
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I added some line to the rhoPimpleFoam as below:
Code:
word patchName = "left"; label patchID = mesh.boundary().findPatchID(patchName); forAll(U.boundaryField()[patchID],faceI) { U.boundaryField()[patchID][faceI].component(0)=min(U[cellI].component(0), 500); } Code:
ehsan@Ehsan-com:~/Desktop/rhoPimpleFoamLimited$ ./Allwmake + wmake Making dependency list for source file rhoPimpleFoamLimited.C SOURCE=rhoPimpleFoamLimited.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/cfdTools -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoPimpleFoamLimited.o rhoPimpleFoamLimited.C: In function ‘int main(int, char**)’: rhoPimpleFoamLimited.C:91:69: error: ‘cellI’ was not declared in this scope make: *** [Make/linux64GccDPOpt/rhoPimpleFoamLimited.o] Error 1 + wmake rhoPorousMRFPimpleFoam make: *** No rule to make target `rhoPorousMRFPimpleFoam'. Stop. + wmake rhoPorousMRFLTSPimpleFoam make: *** No rule to make target `rhoPorousMRFLTSPimpleFoam'. Stop. ehsan@Ehsan-com:~/Desktop/rhoPimpleFoamLimited$ |
|
March 26, 2013, 09:51 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
it resolved I changed it so:
Code:
U.boundaryField()[patchID][faceI].component(0)=min(U.boundaryField()[patchID][faceI].component(0), 500); |
|
March 27, 2013, 11:54 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
what means this error now?
Code:
ehsan@Ehsan-com:~/Desktop/rhoPimpleFoamLimited$ wmake Making dependency list for source file rhoPimpleFoamLimited.C SOURCE=rhoPimpleFoamLimited.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam211/src/finiteVolume/cfdTools -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoPimpleFoamLimited.o rhoPimpleFoamLimited.C: In function ‘int main(int, char**)’: rhoPimpleFoamLimited.C:90:85: error: invalid types ‘<unresolved overloaded function type>[Foam::label {aka int}]’ for array subscript rhoPimpleFoamLimited.C:94:41: error: name lookup of ‘cellI’ changed for ISO ‘for’ scoping [-fpermissive] rhoPimpleFoamLimited.C:94:41: note: (if you use ‘-fpermissive’ G++ will accept your code) rhoPimpleFoamLimited.C:100:132: error: ‘Foam::T’ does not have class type make: *** [Make/linux64GccDPOpt/rhoPimpleFoamLimited.o] Error 1 Code:
forAll(U,cellI) { U[cellI].component(0)=min(U[cellI].component(0), sqrt(1.4*287.14*T[cellI])-30); } forAll(U,cellJ) { U[cellJ].component(1)=max(U[cellI].component(1),-150); } word patchName = "left"; label patchID = mesh.boundary().findPatchID(patchName); forAll(U.boundaryField()[patchID],faceI) { U.boundaryField()[patchID][faceI].component(0)=min(U.boundaryField()[patchID][faceI].component(0), sqrt(1.4*287.14*T.boundaryField()[patchID][faceI])-30); U.boundaryField()[patchID][faceI].component(1)=max(U.boundaryField()[patchID][faceI].component(1),-150); } |
|
March 29, 2013, 01:29 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I've added T in I/O dictionary in createFields.H but nothing changed.
Why T doesn't have a class as OF says?what does this mean?what can do? All helps,opinions and hints are appreciated! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
wmake compiling new solver | mksca | OpenFOAM Programming & Development | 14 | June 22, 2018 07:29 |
thobois class engineTopoChangerMesh error | Peter_600 | OpenFOAM | 4 | August 2, 2014 10:52 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
Using a user-defined solver in OF | ozzythewise | OpenFOAM Running, Solving & CFD | 3 | February 8, 2011 16:28 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |