|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Qi
Join Date: Feb 2021
Posts: 7
Rep Power: 5 ![]() |
Hi everyone
I am a beginner of openfoam.I want to add a if condition in the following form to my turbulence model code volScalarField::Internal rek ( this->rho_*sqrt(k_)*y_/this->nu() ); if(rek > 10) ... but when I compile it the following error is being produced "no match for ‘operator<’ (operand types are ‘Foam::volScalarField {aka Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>}’ and ‘int’)" I would appreciate if you help me ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,906
Rep Power: 33 ![]() |
You are asking if a field is greater than 10: since the field has one value for each cell and each boundary face, this is how many results you get.
You seem to expect only one. Which? Is it max(field) > 10? I think you’ve got your coding logic mixed up. Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Match Control, is this weird or am I stupid? | Moufle | ANSYS Meshing & Geometry | 2 | November 18, 2015 16:00 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 02:01 |
Match Control and Symmetry Boundary Condtions in a quasi 2D calculation | peterputer | ANSYS Meshing & Geometry | 0 | May 15, 2012 08:53 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 22:50 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |