add temperature
HI!
I do the tutorial how to add temperature, but I want to add concentration, and the changes I made is to put C instead of T... with the same formula I dont understand why the program gives me an error: Making dependency list for source file my_Buoyant.C SOURCE=my_Buoyant.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I../buoyantBoussinesqSimpleFoam -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/turbulenceModels -I/opt/openfoam210/src/turbulenceModels/incompressible/RAS/lnInclude -I/opt/openfoam210/src/transportModels -I/opt/openfoam210/src/transportModels/incompressible/singlePhaseTransportModel -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/my_Buoyant.o In file included from my_Buoyant.C:86: CEqn.H: In function ‘int main(int, char**)’: CEqn.H:7: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam:: fvMatrix<Foam::Vector<double> > >)’ /opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:418: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double] /opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:361: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double] /opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:330: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double] /opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:273: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double] /opt/openfoam210/src/finiteVolume/lnInclude/readTimeControls.H:38: warning: unused variable ‘maxDeltaT’ my_Buoyant.C:110: error: expected ‘}’ at end of input make: *** [Make/linux64GccDPOpt/my_Buoyant.o] Error 1 Does anyone knows why appears this error? |
first "wclean" to clean previous .dep file
then use wmake |
the same error appears...
|
CEqn.H:7: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<F oam:: fvMatrix<Foam::Vector<double> > >)’
/opt/openfoam210/src/finiteVolume/lnInclude/fvMatrix.C:418: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double] |
Could you copy-paste the 7th line of CEqn.H? (that's where the error is, CEqn.H:7)
|
{
fvScalarMatrix CEqn ( fvm::ddt(C) + fvm::div(phi, C) - fvm::laplacian(DC, C) ); CEqn.solve(); } the 7th line is ); |
Could you try again without the { } ?
I think these make the concentration (C) a temporary object (tmp) and as a result you can not use any of the constructors. And even if you could, it would be deleted from memory after the }. |
Quote:
|
All times are GMT -4. The time now is 09:38. |