CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

foamToVTK -fields syntax problem

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2016, 11:25
Default foamToVTK -fields syntax problem
  #1
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hello all,

I know it sounds really odd, but I have a problem with the foamToVTK syntax. I try to convert field data (in this case pressure) to the VTK format by typing
Code:
foamToVTK -fields p
I get the error message:
Code:
--> FOAM FATAL IO ERROR: 
incorrect first token, expected <int> or '(', found on line 0 the word 'p'
I cannot find any reason why foamToVTK is expecting an integer here. And yes, I have tried
Code:
foamToVTK -fields (p)
too as proposed.

Thanks in advance and best regards,

Kate

Last edited by KateEisenhower; September 22, 2016 at 06:52.
KateEisenhower is offline   Reply With Quote

Old   September 14, 2016, 04:51
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Kate,

Code:
foamToVTK -fields '(p)'
Works for me. Probably the apostrophes are needed to let OpenFOAM know it is a list of words between the brackets.

Best Regards,
Tom
tomf is offline   Reply With Quote

Old   September 14, 2016, 08:12
Default
  #3
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Little addition from foamToVTK.C ($FOAM_APP/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C) header:

Code:
Usage
    \b foamToVTK [OPTION]

    Options:
      ...
      - \par -fields \<fields\>
        Convert selected fields only. For example,
        \verbatim
          -fields "( p T U )"
        \endverbatim
        The quoting is required to avoid shell expansions and to pass the
        information as a single argument.
    ...
tomf and Ramsky like this.
alexeym is offline   Reply With Quote

Old   September 16, 2016, 06:29
Default
  #4
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Thank you both,

Don't you think the error message I posted above could be missunderstood easily and should be changed in the source code?

Best regards,

Kate
KateEisenhower is offline   Reply With Quote

Old   September 16, 2016, 06:39
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 646
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I am not certain whether that is easily done. It looks a lot like standard syntax error output and it is probably reused in multiple locations. Maybe the usage or help can be improved somehow. I would suggest you file a bug report with a suggested improved error message here:

http://bugs.openfoam.org/

Tom
tomf is offline   Reply With Quote

Old   September 22, 2016, 06:56
Default
  #6
Senior Member
 
Join Date: Mar 2015
Posts: 250
Rep Power: 12
KateEisenhower is on a distinguished road
Hello all,

see bug report 0002252.

Best regards,

Kate
KateEisenhower 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with velocity and pressure fields will_ca OpenFOAM Running, Solving & CFD 1 March 19, 2016 15:25
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 06:29
FoamToVtk syntax for fields tehache OpenFOAM Post-Processing 1 October 10, 2007 11:29
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13


All times are GMT -4. The time now is 20:01.