CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

fvc::reconstruct !!!!

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 15, 2014, 05:45
Default error from fvc::reconstruct !!!!
  #1
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 283
Rep Power: 5
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Hi everybody,

I'm trying to add energy equation to porousSimpleFoam and I faced this error when I wanted to wmake my solver:
(this is part of the error appeared in my terminal)
Code:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:2140:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::dimensioned<Type>&, const Foam::tmp<Foam::fvMatrix<Type> >&)
In file included from doubleDiffPorousSimpleFoam.C:83:0:
pEqn.H:55:41: error: ‘faceInterpolate’ is not a member of ‘Foam::fvc’
In file included from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/doubleFloat.H:30:0,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/floatScalar.H:38,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/scalar.H:39,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/IOstream.H:49,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/Ostream.H:39,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/OSstream.H:40,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/messageStream.H:211,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/error.H:51,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/UListI.H:26,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/UList.H:365,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/List.H:43,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/labelList.H:48,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/UPstream.H:43,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/Pstream.H:42,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/parRun.H:35,
                 from /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvCFD.H:4,
                 from doubleDiffPorousSimpleFoam.C:48:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/products.H: At global scope:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/products.H: In instantiation of ‘Foam::outerProduct<Foam::Vector<double>, Foam::Tensor<double> >’:
pEqn.H:56:68:   instantiated from here
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/OpenFOAM/lnInclude/products.H:72:13: error: no type named ‘type’ in ‘class Foam::typeOfRank<double, 3>’
In file included from doubleDiffPorousSimpleFoam.C:83:0:
pEqn.H: In function ‘int main(int, char**)’:
pEqn.H:56:68: error: no matching function for call to ‘reconstruct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvsPatchField, Foam::surfaceMesh> >)’
pEqn.H:56:68: note: candidates are:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvcReconstruct.C:50:1: note: template<class Type> Foam::tmp<Foam::GeometricField<typename Foam::outerProduct<Foam::Vector<double>, Type>::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::reconstruct(const Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh>&)
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvcReconstruct.C:91:1: note: template<class Type> Foam::tmp<Foam::GeometricField<typename Foam::outerProduct<Foam::Vector<double>, Type>::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::reconstruct(const Foam::tmp<Foam::GeometricField<Type, Foam::fvsPatchField, Foam::surfaceMesh> >&)
make: *** [Make/linux64GccDPOpt/doubleDiffPorousSimpleFoam.o] Error 1
and I used the reconstruct as follow:

Code:
    tmp<volTensorField> tTU = tensor(I)*UEqn().A();
    surfaceTensorField tUf("(1|TA(U))", fvc::faceInterpolate(tTU()));
    U -= trTU()&fvc::reconstruct((buoyancyPhi + tpEqn().flux())*tUf);
where trTU is a volTensorField.

I guess that reconstruct cannot handle tonsorial input!!! If yes, what should I use instead of reconstruct?

any tips appreciated

Regards,
Mostafa

Last edited by adambarfi; March 17, 2014 at 10:04.
adambarfi is offline   Reply With Quote

Old   March 16, 2014, 06:24
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Rotterdam, The Netherlands
Posts: 1,532
Rep Power: 23
ngj will become famous soon enoughngj will become famous soon enough
Hi Mostafa,

The issue is (at least) the fact that you are parsing a tmp<> object to reconstruct. The following line would strip away the tmp-type:

Code:
U -= trTU&fvc::reconstruct((buoyancyPhi + tpEqn().flux()())*tUf);
Note the additional set of parentheses after the call the "flux()".

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is online now   Reply With Quote

Old   March 17, 2014, 10:01
Default
  #3
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 283
Rep Power: 5
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
thank you Niels,

I surfed the internet and found that I had a wrong definition of fvc::reconstract in my mind.

Best,
Mostafa
adambarfi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fvc::reconstruct( ) algorithm tetraeder OpenFOAM Programming & Development 6 August 27, 2014 13:56
fvc::reconstruct( ) algorithm Dieth01 OpenFOAM Programming & Development 0 January 29, 2014 21:23


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