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

A quetion about function trunc()

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 3, 2014, 05:29
Question A quetion about function trunc()
  #1
New Member
 
Zhiwei Zheng
Join Date: May 2014
Posts: 23
Rep Power: 12
killsecond is on a distinguished road
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!
killsecond is offline   Reply With Quote

 


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
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 06:59
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50
Please help about the VTKFoam liugx212 OpenFOAM Running, Solving & CFD 0 November 18, 2005 18:27


All times are GMT -4. The time now is 05:32.