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

no match for ‘operator*’ error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2020, 13:45
Default no match for ‘operator*’ error
  #1
New Member
 
Join Date: Mar 2020
Posts: 1
Rep Power: 0
estr_sprt is on a distinguished road
Hi Foamers,

Please help to eliminate the following error in OF v6:

no match for ‘operator*’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<doubl e>, Foam::fvPatchField, Foam::volMesh> >’ and ‘Foam::volTensorField {aka Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>}’)
("rhotau",(mt*dev(twoSymm(tgrad_U))-(scalar(2)/scalar(3))*Ei*mt*tgrad_U_-(scalar(2)/scalar(3))*Ei*rho*(turbulence->k()+dummykk)));

which arises during the compilation. Here Ei is an identity matrix which I define before as

Ei = tensor:ne;

after adding the following to the createfields.H

volTensorField Ei
(
IOobject
(
"Ei",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
I
);

Which was suggested in the thread How to access identity matrix in OF?

I also looked through some related topics but can't still deal with it.
Also I tried define the Ei through a constant reference to "I" (which is an edintity tensor) defining is as a volTensor Field, but see the same.

I am only a new user to OF and c++ itself and therefore might be subject to beginner's errors.

"dummykk" is just a scalar, "mt" is a volScalarField and "tgrad_U_" is

const volTensorField& tgradU_ = fvc::grad(U);
volTensorField tgrad_U_ = tgradU_;

Thank you
estr_sprt 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
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 19:11
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 01:21
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 10:00
DPM udf error haghshenasfard FLUENT 0 April 13, 2016 07:35
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


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