A quetion about function trunc()
Hi all,
In my turbulence model, I want to use the function trunc(), its' type is "double trunc(double)", something went wrong when I compiled. Example: Fblend_(F2()*max(scalar(1)-trunc(k_/Cblend_/omega_/nu()), scalar(0))), and the error is: error: cannot convert ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘double’ for argument ‘1’ to ‘double trunc(double)’ I wonder that whether I can't use the "k_/Cblend_/omega_/nu()" in trunc() directly, because "k_/Cblend_/omega_/nu()" is flow field datas, which is not "double" type. How can I solve this problem? Thank you! |
I am not sure, but nu() is a scalar with some dimensions whereas trunc wants an double as argument. Try nu().value()
|
All times are GMT -4. The time now is 07:08. |