|
[Sponsors] |
August 19, 2013, 17:12 |
an error in Calculator's equation
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I have written this equation for averaging on p:
Code:
sum(p*area())/sum(area()) 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. |
|
August 20, 2013, 02:45 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Looks like you are trying some funkyDoCalc kind of expression in ParaView, that won't work.
|
|
August 20, 2013, 04:25 |
|
#3 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
August 20, 2013, 04:28 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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)
|
|
August 24, 2013, 02:52 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
August 24, 2013, 13:20 |
|
#6 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Ehsan: Quote:
Quote:
As for the area calculation, you'll have to first use the filter "Integrate Variables", which will calculate the area. Best regards, Bruno
__________________
|
|||
August 24, 2013, 16:30 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
August 24, 2013, 17:37 |
|
#8 |
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16 |
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.” |
|
August 24, 2013, 18:00 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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.
__________________
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. |
|
September 3, 2013, 11:27 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
September 3, 2013, 13:36 |
|
#11 |
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16 |
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.” |
|
September 3, 2013, 17:18 |
|
#12 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
June 29, 2021, 01:10 |
Nusslet calculation in openfoam
|
#13 |
Senior Member
A. Min
Join Date: Mar 2015
Posts: 308
Rep Power: 12 |
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 Also, it seems that wallHeatFlux does not work in my solver: rheoHeatFoam. Thank you! |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |