|
[Sponsors] |
July 18, 2020, 13:45 |
no match for ‘operator*’ error
|
#1 |
New Member
Join Date: Mar 2020
Posts: 1
Rep Power: 0 |
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 |
|
|
|
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 |