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

[OpenFOAM] an error in Calculator's equation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2013, 17:12
Default an error in Calculator's equation
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I have written this equation for averaging on p:
Code:
sum(p*area())/sum(area())
but there shown an error:
Code:
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 19 of /home/ehsan/Desktop/WR_4/0/T: Expected number, string or (, found Temperature


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 19 of /home/ehsan/Desktop/WR_4/0/U: Expected number, string or (, found Velocity


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 20 of /home/ehsan/Desktop/WR_4/0/k: Expected number, string or (, found turbulentK


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 20 of /home/ehsan/Desktop/WR_4/0/omega: Expected number, string or (, found turbulentOmega


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 19 of /home/ehsan/Desktop/WR_4/0/p: Expected number, string or (, found Pressure


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 185
vtkPVArrayCalculator (0xc531ca0): The result array must have a name.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x3b07920): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0xc531ca0): An error occured when parsing the calculator's function.  See previous errors.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 20, 2013, 02:45
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Looks like you are trying some funkyDoCalc kind of expression in ParaView, that won't work.
Bernhard is offline   Reply With Quote

Old   August 20, 2013, 04:25
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi Bernhard
what do you mean by "trying some funkyDoCalc kind"?
then can't do averaging in paraView?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 20, 2013, 04:28
Default
  #4
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Quote:
Originally Posted by immortality View Post
Hi Bernhard
what do you mean by "trying some funkyDoCalc kind"?
then can't do averaging in paraView?
I am not sure whether or not "area()" is correct notation in the ParaView calculator, I think it is not. I do recognize the notation from the funkyDoCalc utility (by Gschaider)
Bernhard is offline   Reply With Quote

Old   August 24, 2013, 02:52
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
is there a way to contribute area or volume of cells in the formulas in paraview?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 24, 2013, 13:20
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Ehsan:
Quote:
Originally Posted by immortality View Post
Code:
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481
vtkOpenFOAMReaderPrivate (0x19c60a0): Error reading line 19 of /home/ehsan/Desktop/WR_4/0/T: Expected number, string or (, found Temperature
I've written about this in the past and reminded you at least once... so this makes it the second time I'll have to remind you:
Quote:
Originally Posted by wyldckat View Post
The explanation is simple: you are using ParaView 3.12.0 with the internal FOAM reader, namely with the extension ".foam". But your case is using "$Temperature" and other similar variables, which unfortunately this internal reader is not able to handle.
If you use the official OpenFOAM reader, namely with the extension ".OpenFOAM", you no longer have this problem.

As for the area calculation, you'll have to first use the filter "Integrate Variables", which will calculate the area.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 24, 2013, 16:30
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi Bruno
yes I grasped that problem,I just put here the full error message.
could you clarify a bit about the filter?
thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 24, 2013, 17:37
Default
  #8
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Dear Ehsan
take the following steps:

1> first define the slice that you want to calculate its area or averaging data on it and click apply.
2> on the filters menu,select the last item i.e. Alphabetics and click on "Integrate Variables" and apply.
3> be sure to select attribute mode: cell data
4>you can see the area of the selected slice and the integral of any variable (e.g P in your case) on this plane. (i.e sum(p*area())). so in order to find the average P; just divide this value by the area.
5>You can also use calculator for this purpose;again on the filters menu,select the last item i.e. Alphabetic and click on calculator. be sure that is on: attribute mode: cell data and define the new variable Pbar by using the values that is on the scalar section.
you can see the new Pbar value on this plane now!
I hope that was useful!
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   August 24, 2013, 18:00
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi Mohsen
thanks,
I did the way you told in number 5,but it doesn't know area yet:
Code:
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x1e5fa90): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x1e5fa90): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0x1e5f900): An error occured when parsing the calculator's function.  See previous errors.


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x1e5fa90): Syntax error: expecting a variable name;  see position 0


ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Common/vtkFunctionParser.cxx, line 1480
vtkFunctionParser (0x1e5fa90): Syntax error: expecting a variable name;  see position 0


Warning: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Graphics/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0x1e5f900): An error occured when parsing the calculator's function.  See previous errors.
I did it by using 1-4 steps nad it was fine,thanks,but step 5 is a bit unclear to me.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; August 24, 2013 at 19:11.
immortality is offline   Reply With Quote

Old   September 3, 2013, 11:27
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi
how can I define two fields with calculator?
when I define second field it replaces to previous one!
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 3, 2013, 13:36
Default
  #11
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Dear Ehsan
Probably they have the same name.
choose a different name for your 2nd field
there shouldn't be any problem with defining more than 2 fields with calculator
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 3, 2013, 17:18
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I was using one calculator branch only!it resolved,thanks for consideration.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 29, 2021, 01:10
Default Nusslet calculation in openfoam
  #13
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12
alimea is on a distinguished road
Hi all

I want to calculate the Nusslet number in ParaView. When I calculate the inner product to normals and grad(T), it gives me this error:

Code:
ERROR: In /home/OpenFOAM/ThirdParty-7/ParaView-5.6.0/VTK/Common/Misc/vtkFunctionParser.cxx, line 1244
vtkFunctionParser (0x5612add94000): Syntax error: expecting a variable name;  see position 0
Do you know how to solve it?

Also, it seems that wallHeatFlux does not work in my solver: rheoHeatFoam.

Thank you!
alimea 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
Direct numerical simulation of species transport equation with phase change Pmaroul Main CFD Forum 2 October 12, 2018 17:02
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Derivation of Momentum Equation in Integral Form Demonwolf Main CFD Forum 2 October 29, 2009 20:53
Need help:about energy equation in CFX Stein CFX 4 July 2, 2009 23:31
Diffusion Equation izardy amiruddin Main CFD Forum 2 July 4, 2002 09:14


All times are GMT -4. The time now is 13:11.