CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   <unresolved overloaded function type> - How to work with that (https://www.cfd-online.com/Forums/openfoam-solving/74963-unresolved-overloaded-function-type-how-work.html)

bastil April 13, 2010 05:57

<unresolved overloaded function type> - How to work with that
 
Dear Foamers,

I am trying to modify the incompressible realisableKE-Model. Therefore, I need to work with the function rCmu:

Code:

volScalarField myVariable_ = 2 * pow(rCmu, 0.5)
Obviously, rCmu is of function type and can not be multipled with a scalar/volScalarField and set into power with a double variable.
I tried converting rCmu into a volScalarField and work with this:

Code:

volScalarField rCmu_ = this->rCmu;
but this does not seem to work at all:

Code:

error: conversion from ‘<unresolved overloaded function type>’ to non-scalar type ‘Foam::volScalarField’ requested
Any suggestions about how to handle this? Thanks.

Regards Bastian

olesen April 14, 2010 03:57

Quote:

Originally Posted by bastil (Post 254414)
Dear Foamers,

I am trying to modify the incompressible realisableKE-Model. Therefore, I need to work with the function rCmu:

Code:

volScalarField myVariable_ = 2 * pow(rCmu, 0.5)
Obviously, rCmu is of function type and can not be multipled with a scalar/volScalarField and set into power with a double variable.

Without checking, I would have thought that one of these should work:

Code:

volScalarField myVariable_ = 2 * pow(rCmu(), 0.5);

volScalarField myVariable_ = 2 * sqrt(rCmu());

or
Code:

volScalarField myVariable_ = 2 * pow(rCmu()(), 0.5)

volScalarField myVariable_ = 2 * sqrt(rCmu()());

What does the compiler report with any of these?


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