|
[Sponsors] |
June 27, 2012, 05:13 |
add temperature
|
#1 |
Member
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 14 |
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? |
|
June 27, 2012, 07:23 |
|
#3 |
Member
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 14 |
the same error appears...
|
|
June 27, 2012, 07:24 |
|
#4 |
Member
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 14 |
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] |
|
June 27, 2012, 07:27 |
|
#5 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
Could you copy-paste the 7th line of CEqn.H? (that's where the error is, CEqn.H:7)
|
|
June 27, 2012, 07:31 |
|
#6 |
Member
anonymous
Join Date: Mar 2012
Posts: 45
Rep Power: 14 |
{
fvScalarMatrix CEqn ( fvm::ddt(C) + fvm::div(phi, C) - fvm::laplacian(DC, C) ); CEqn.solve(); } the 7th line is ); |
|
June 27, 2012, 07:55 |
|
#7 |
Disabled
Join Date: Mar 2011
Posts: 174
Rep Power: 15 |
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 }. |
|
June 27, 2012, 08:20 |
|
#8 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with zeroGradient wall BC for temperature - Total temperature loss | cboss | OpenFOAM | 12 | October 1, 2018 07:36 |
Density of fluid with respect to temperature and pressure | akash_max | CFX | 4 | November 6, 2011 10:00 |
High temperature methane+air | Peter | FLUENT | 5 | January 26, 2009 19:04 |
water temperature in heated container | ali | Main CFD Forum | 3 | July 23, 2007 12:54 |
Sequential calculation of Temperature and mass tra | J.W.Ryu | FLUENT | 7 | June 18, 2002 08:12 |