|
[Sponsors] |
August 1, 2011, 18:38 |
wmake error while adding T to icoFoam
|
#1 |
New Member
Brad Maeg
Join Date: Mar 2011
Posts: 11
Rep Power: 15 |
Hello,
I am trying to modify currently available solver in OpenFoam. http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam So, I found a great tutorial on how to implement temperature into icoFoam, which is currently available. I am having a little trouble wmake-ing the solver. After following the tutorial in detail, I was not able to compile the solver. Instead, the following came up as error. I only see one error and that is colored in red. I would like some insights from those who have already tried this particular tutorial or have implemented their own solver. By the way, I am using OpenFoam 2.0, the newest. Thanks so much for your time. Code:
root@brad-ThinkPad-X200:/opt/openfoam200/applications/solvers/incompressible/my_icoFoam# wmake SOURCE=my_icoFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam200/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam200/src/OpenFOAM/lnInclude -I/opt/openfoam200/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/my_icoFoam.o my_icoFoam.C: In function ‘int main(int, char**)’: my_icoFoam.C:104:2: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >)’ /opt/openfoam200/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidates are: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double] /opt/openfoam200/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double] /opt/openfoam200/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double] /opt/openfoam200/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double] /opt/openfoam200/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ /opt/openfoam200/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ /opt/openfoam200/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ make: *** [Make/linux64GccDPOpt/my_icoFoam.o] Error 1 |
|
August 1, 2011, 19:38 |
|
#2 |
New Member
Brad Maeg
Join Date: Mar 2011
Posts: 11
Rep Power: 15 |
Ah ha,
I figured it out. Simple mistake on my part. |
|
August 10, 2011, 04:49 |
|
#3 |
Member
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17 |
Hi Brad,
same problem here, but can't crack it. Could you please explain the solution! |
|
August 17, 2011, 08:34 |
|
#4 |
Member
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17 |
To finish this off!
Another freaking blind copy-paste error. In createFields.H: Code:
volScalarField T ( IOobject ( "T", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); |
|
November 1, 2012, 14:13 |
|
#5 |
New Member
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14 |
Hi everybody
I'm new in OpenFOAM and C++ and I'm trying to modify an available solver to solve a cross derivative equation. But unfortunately I'm getting the similar error while wmake-ing the solver: no matching function for call to ‘Foam::fvMatrix<Foam::Vector<double> > The modified solver is: Code:
#include "fvCFD.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" #include "createFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; fvVectorMatrix TEqn ( (fvc::grad(phi) & vector(1,0,0))) ); solve( TEqn == -s); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; Info<< "Estimating error in scalar poisson equation" << endl; runTime.write(); Info<< endl; } // Fin Error Info<< "End-loop\n" << endl; return 0; } Please excuse me because of my poor English. Thank you for your help |
|
November 2, 2012, 07:25 |
|
#6 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
Code:
fvVectorMatrix TEqn ( (fvc::grad(phi) & vector(1,0,0))) ); 1) extra ")" 2) inner product of two vector is an Scalar, so it should be "fvScalarMatrix"
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
November 2, 2012, 14:19 |
|
#7 |
New Member
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14 |
Thank you for your consideration
But unfortunately I'm still receiving the same error message even after correcting the mentioned errors. The new one is: Code:
fvScalarMatrix TEqn ( (fvc::grad(phi) & vector(1,0,0)) ); Code:
fvScalarMatrix TEqn ( fvm::laplacian(phi) - fvm::laplacian(phi) (fvc::grad(phi) & vector(1,0,0)) ); |
|
November 2, 2012, 14:45 |
|
#8 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
uhum
thats right, because you use "fvc" fvc convert a field to another field, it does not make any matrix
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
November 5, 2012, 18:03 |
|
#9 |
New Member
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14 |
Thank you Nima
yes , you are right, but it's still supposed to work because both sides are scalar fields. So why doesn't it work? Let's talk about something simpler. Even following code couldn't be compiled: Code:
fvScalarMatrix TEqn ( fvc::grad(phi) ); solve( TEqn == -s); what's the reason? |
|
November 6, 2012, 03:04 |
|
#10 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
because fvc::grad(phi) does not make the matrix of coefficient, it is a known and definite variable, it is like you put for example a variable T = s , which both T and s has value
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
November 6, 2012, 14:56 |
|
#11 |
New Member
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14 |
I appreciate your help Nima, I found the problem
Actually I was trying to solve Winslow equation by OpenFOAM: αxξξ − 2βxξη + γxηη = 0 but it seems that it's impossible. Does anybody know if there is a way to solve it by OpenFOAM? |
|
November 23, 2012, 20:34 |
|
#12 |
New Member
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14 |
Hi everybody
any idea to handle cross derivatives (like xξη) in OpenFOAM? Last edited by falsafioon; December 7, 2012 at 18:29. |
|
Tags |
compile, error, icofoam, implementation, wmake |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 09:48 |
Problems Installing OF 1.6 32 bit | bucksfan | OpenFOAM Installation | 19 | August 4, 2009 02:36 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 05:41 |
Problem of compilation OF 14Allwmake command not found | erik_d | OpenFOAM Bugs | 13 | September 13, 2008 22:45 |
[OpenFOAM] ParaFoam error message | joey | ParaView | 1 | October 2, 2006 14:28 |