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

Error no matching function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2015, 08:14
Default Error no matching function
  #1
New Member
 
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13
zoptirik is on a distinguished road
Dear All,

I
I would like to add the Clark's cross term to the Reynolds stress.
its expression is as follows
(u_i*\laplacian(u_j)+u_j*\laplacian(u_i)).

I added it to my model as follows:
Code:
volSymmTensorField Clark(U()*(Foam::fvc::laplacian(U())) + (Foam::fvc::laplacian(U()))*U());

but I get the following error when compiling .
I would be glad if you help where I did wrong.
Code:
 error: no matching function for call to ‘Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >)’
CinlarStress/CinlarStress.C:162:91: note: candidates are:
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:606:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const wordList&, const wordList&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:606:1: note:   candidate expects 4 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:571:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const Foam::word&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:571:1: note:   candidate expects 3 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:541:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:541:1: note:   candidate expects 2 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:508:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:508:1: note:   candidate expects 2 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:476:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:476:1: note:   candidate expects 2 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:445:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:445:1: note:   no known conversion for argument 1 from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> >&’
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:413:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:413:1: note:   no known conversion for argument 1 from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>&’
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:372:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dictionary&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:372:1: note:   candidate expects 3 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:332:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:332:1: note:   candidate expects 2 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:305:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::Field<TypeR>&, const Foam::PtrList<PatchField<Type> >&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:305:1: note:   candidate expects 5 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:275:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const wordList&, const wordList&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:275:1: note:   candidate expects 5 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:246:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const Foam::word&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:246:1: note:   candidate expects 4 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:218:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const wordList&, const wordList&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:218:1: note:   candidate expects 5 arguments, 1 provided
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:188:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = Foam::SymmTensor<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam230/src/OpenFOAM/lnInclude/GeometricField.C:188:1: note:   candidate expects 4 arguments, 1 provided
make: *** [Make/linux64GccDPOpt/CinlarStress.o] Error 1
zoptirik is offline   Reply With Quote

Old   February 24, 2015, 16:28
Default
  #2
New Member
 
karar
Join Date: Feb 2013
Posts: 13
Rep Power: 13
zoptirik is on a distinguished road
I solved by writing in two parts as follows
Code:
volTensorField  Clark1(U()*(fvc::laplacian(U()))); 
volTensorField  Clark2(fvc::laplacian(U())*U());
and I add these terms in the model such as
Code:
symm(Clark1+Clark2)
I hope that is correct.
zoptirik is offline   Reply With Quote

Old   January 24, 2018, 06:52
Default
  #3
New Member
 
Nick
Join Date: Dec 2017
Location: UK
Posts: 7
Rep Power: 8
NICKTAVOUKT is on a distinguished road
Hi all,

I'm also having a similar issue... namely I get the following error:
Quote:
injectorSolidParticleCloud.C: In member function 'void Foam::injectorSolidParticleCloud::move(const dimensionedVector&)':
injectorSolidParticleCloud.C:90:80: error: no matching function for call to 'Foam::injectorSolidParticle::injectorSolidParticl e(Foam::injectorSolidParticleCloud&, Foam::vector&, Foam::label&, Foam::scalar&, Foam::vector&)'
injectorSolidParticle* ptr= new injectorSolidParticle(*this,pos,cellI,d,vel);
when I run this code...
Quote:
if(cellI>=0)
{
injectorSolidParticle* ptr= new injectorSolidParticle(*this,pos,cellI,d,vel);
Cloud<injectorSolidParticle>::addParticle(ptr);
}
Do you have any ideas of what could be wrong?

thanks!
NICKTAVOUKT is offline   Reply With Quote

Old   January 24, 2018, 09:11
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
As it is stated:

Code:
injectorSolidParticle* ptr= new injectorSolidParticle(*this,pos,cellI,d,vel);
you are trying to build a new object of the injectorSolidParticle class (I do not know where it should be because doxygen does not tell me that this class exist). The error message tells you, that there is no constructor of this type.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27


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