CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Cannot evaluate field function Density

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes
  • 1 Post By Blanco
  • 1 Post By Blanco
  • 1 Post By karahan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2017, 05:11
Default Cannot evaluate field function Density
  #1
New Member
 
Join Date: Jun 2016
Posts: 17
Rep Power: 9
karahan is on a distinguished road
Hello Everybody,

I am trying to simulate a relative simple incompressible flow field. Density is constant in the model physics and is defined. However, when I want to define a Report, in which a variable is dependent from the field function ${Density}, I receive an error in the beginning of the Simulation saying "Cannot evaluate field function Density".

I can overcome the Problem using a user-defined field function or a Report, where I insert the value of the constant density again.

Thank you for the answers.
karahan is offline   Reply With Quote

Old   July 21, 2017, 07:13
Default
  #2
Senior Member
 
Blanco
Join Date: Mar 2009
Location: Torino, Italy
Posts: 193
Rep Power: 17
Blanco is on a distinguished road
Which version are you using?

Maybe I'm missing something from your post, but if you define a report and want it to calculate, as an example, the surface average of density on a section plane, you just have to select density in the field function drop down menu, and it works as expected.

If you define a field function using density, e.g. ${Density}*${Pressure}, and you want to monitor its value, you have to create a report and refer to the name of your filed function (UserFieldFunction_1 or anything else you wrote). This also works as expected on my pc.

These, of course, after initialization of the simulation.

Can you further describe your problem?
karahan likes this.
Blanco is offline   Reply With Quote

Old   July 21, 2017, 08:03
Default
  #3
New Member
 
Join Date: Jun 2016
Posts: 17
Rep Power: 9
karahan is on a distinguished road
The Version I am using is 12.02.010.

I am trying to calculate the volumetric flow rate (l/h) from the mass flow rate (kg/s). For that, I wrote in the Definition of the Report this expression: abs(${MassFlowAtPosition1})*3600*1000/${Density}. And the density is already defined in the physics continuum as constant integer (1000 kg/m3).

I am now using my own User-defined density function and it works well. But it shouldn't be necessary of course. I would be happy, if somebody has a solution. When not, at least this error is documented here.

thanks!
karahan is offline   Reply With Quote

Old   July 21, 2017, 08:36
Default
  #4
Senior Member
 
Blanco
Join Date: Mar 2009
Location: Torino, Italy
Posts: 193
Rep Power: 17
Blanco is on a distinguished road
Quote:
Originally Posted by karahan View Post
The Version I am using is 12.02.010.

I am trying to calculate the volumetric flow rate (l/h) from the mass flow rate (kg/s). For that, I wrote in the Definition of the Report this expression: abs(${MassFlowAtPosition1})*3600*1000/${Density}. And the density is already defined in the physics continuum as constant integer (1000 kg/m3).

I am now using my own User-defined density function and it works well. But it shouldn't be necessary of course. I would be happy, if somebody has a solution. When not, at least this error is documented here.

thanks!
That's strange because if I use the same version it works for me:

abs(${MassFlow1Report})*1000*3600/${Density}

and it works even as

abs(${MassFlow1Report})*1000*3600/$Density

NOTE: in the field-function definition tab notes I get "floating point exception, invalid operation", stating that the function cannot be evaluated, but if I create a scalar scene or a report and I refer to the field function just created it works properly.

I've had a similar problem in the past, in another field function where there was a long-enough formula...I ended up in splitting the formula in single field-functions, and at the end the final field function was just a division of two: $num/$den. With this definition everything worked properly, even if formally there were no difference compared to a single formula...
karahan likes this.
Blanco is offline   Reply With Quote

Old   July 25, 2017, 07:01
Default
  #5
New Member
 
Join Date: Jun 2016
Posts: 17
Rep Power: 9
karahan is on a distinguished road
I couldn't remove the issue but I came to the conclusion that it has something to do with writing the density in the denominator. If the density is in the nominator, there is no error. This might be a bug or something like that.

Thank you for your answer.
Blanco likes this.
karahan is offline   Reply With Quote

Old   February 25, 2021, 12:20
Default Cannot evaluate field function Centroid
  #6
New Member
 
Prit K
Join Date: Jul 2020
Posts: 3
Rep Power: 5
Pkanugov is on a distinguished road
Hello everyone,

I am trying to create a variable density ( varying with height ) profile in a rectangular domain and the equation I'm using is:

0.2257*(pow($$Centroid[1],3))-0.4868*(pow($$Centroid[1],2))+0.06016*(pow($$Centroid[1],1))+1.301

I'm first generating a report using the expression and when I try to run the report ( after initialization ) I get an error saying:

Cannot evaluate field function Centroid.

Can someone please help me with this.

Thank you in advance.
Pkanugov is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
Compilation errors in ThirdPartymallochoard feng_w OpenFOAM Installation 1 January 25, 2009 07:59
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 18:07.