CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Calculator problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2017, 11:03
Default Calculator problems
  #1
New Member
 
Svizzera + FL
Join Date: Mar 2017
Posts: 2
Rep Power: 0
niko992 is on a distinguished road
I have to use the formula
Code:
gradient(f-velocity_X)
where f-velocity_X is a number
but when i use this there appears the error message

HTML Code:
ERROR: In C:\bbd\df0abce0\source-paraview\VTK\Common\Misc\vtkFunctionParser.cxx, line 1244
vtkFunctionParser (000001C154368D50): Syntax error: expecting a variable name;  see position 0


Warning: In C:\bbd\df0abce0\source-paraview\VTK\Filters\Core\vtkArrayCalculator.cxx, line 405
vtkPVArrayCalculator (000001C154448380): An error occurred when parsing the calculator's function.  See previous errors.
Someone can tells me what i do wrong?
niko992 is offline   Reply With Quote

Old   March 27, 2017, 11:27
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
You're saying that f-velocity_X is one variable?
Then I'm guessing the hyphen '-' is interpreted as a minus, rather than as part of the variable name. This appears to be consistent with the error message: "expecting a variable name".
Can you change the variable name?
floquation is offline   Reply With Quote

Old   March 27, 2017, 11:32
Default
  #3
New Member
 
Svizzera + FL
Join Date: Mar 2017
Posts: 2
Rep Power: 0
niko992 is on a distinguished road
Quote:
Originally Posted by floquation View Post
You're saying that f-velocity_X is one variable?
Then I'm guessing the hyphen '-' is interpreted as a minus, rather than as part of the variable name. This appears to be consistent with the error message: "expecting a variable name".
Can you change the variable name?
Yes f-velocity_X is a variable but i have no idea how to change the name... I have received a simulation with this name.
niko992 is offline   Reply With Quote

Old   March 27, 2017, 11:46
Default
  #4
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
You import them into ParaView from all time directories.
Within all time directories you have a file with the variable name.
If you wish ParaView to see a different name, you'll have to change those names... (I don't know of any other way.)

I'm not sure whether you must change the filename, or
Code:
object      f-velocity_X;
which resides in each of those files. So try both one-at-a-time such that you know what ParaView reads to be the variable name.

If I were you, I'd change the file in the 0-directory (or any other time directory) by hand, and see if that works for that specific time.
If it does work, and it should work, you should write a quick script to search and replace the variable name in all time directories.
floquation is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 12:30.