CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

wmake error while adding T to icoFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By falsafioon
  • 1 Post By falsafioon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2011, 18:38
Default wmake error while adding T to icoFoam
  #1
New Member
 
Brad Maeg
Join Date: Mar 2011
Posts: 11
Rep Power: 15
boongsin12 is on a distinguished road
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
boongsin12 is offline   Reply With Quote

Old   August 1, 2011, 19:38
Default
  #2
New Member
 
Brad Maeg
Join Date: Mar 2011
Posts: 11
Rep Power: 15
boongsin12 is on a distinguished road
Ah ha,

I figured it out. Simple mistake on my part.
boongsin12 is offline   Reply With Quote

Old   August 10, 2011, 04:49
Default
  #3
Member
 
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17
Toorop is on a distinguished road
Hi Brad,
same problem here, but can't crack it. Could you please explain the solution!
Toorop is offline   Reply With Quote

Old   August 17, 2011, 08:34
Default
  #4
Member
 
Tibor Nyers
Join Date: Jul 2010
Location: Hungary
Posts: 91
Rep Power: 17
Toorop is on a distinguished road
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
);
Toorop is offline   Reply With Quote

Old   November 1, 2012, 14:13
Default
  #5
New Member
 
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14
falsafioon is on a distinguished road
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;

}
Does anybody know how can I fix the problem?
Please excuse me because of my poor English.
Thank you for your help
Kummi likes this.
falsafioon is offline   Reply With Quote

Old   November 2, 2012, 07:25
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Code:
fvVectorMatrix TEqn
        (
                  (fvc::grad(phi) & vector(1,0,0)))            
        );
at least two errors:
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)
nimasam is offline   Reply With Quote

Old   November 2, 2012, 14:19
Default
  #7
New Member
 
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14
falsafioon is on a distinguished road
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))                  
);
But I think the problem is somewhere else because when I change the code like to the following it works properly:

Code:
fvScalarMatrix TEqn         
(
                  fvm::laplacian(phi)
                - fvm::laplacian(phi)
                 (fvc::grad(phi) & vector(1,0,0))                     
);
Any help?
falsafioon is offline   Reply With Quote

Old   November 2, 2012, 14:45
Default
  #8
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
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)
nimasam is offline   Reply With Quote

Old   November 5, 2012, 18:03
Default
  #9
New Member
 
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14
falsafioon is on a distinguished road
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);
both sides are scalar fields
what's the reason?
falsafioon is offline   Reply With Quote

Old   November 6, 2012, 03:04
Default
  #10
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
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)
nimasam is offline   Reply With Quote

Old   November 6, 2012, 14:56
Default
  #11
New Member
 
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14
falsafioon is on a distinguished road
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?
falsafioon is offline   Reply With Quote

Old   November 23, 2012, 20:34
Default
  #12
New Member
 
Mehdi
Join Date: Jan 2012
Posts: 5
Rep Power: 14
falsafioon is on a distinguished road
Hi everybody

any idea to handle cross derivatives (like xξη) in OpenFOAM?
Kummi likes this.

Last edited by falsafioon; December 7, 2012 at 18:29.
falsafioon is offline   Reply With Quote

Reply

Tags
compile, error, icofoam, implementation, wmake


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


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