[Paraview] Minor bug in OPENFOAM filter

Eugene de Villiers e.devilliers at engys.com
Wed Jun 22 11:56:56 EDT 2016


Hi Takuya!

The problem is that not all boundaries have "value" entries. zeroGradient, fixedGradient, symmetry, empty - none have values. It is a frustrating inconsistency for 3rd-party interfaces, but that's the way it is unfortunately. 

If you want a reasonable and straight-forward solution, I would say check for a "value" entry and if you don't find it assume zero gradient. From our side it is much easier to modify boundaries to write value fields than to change the reader to deal with exceptions and new formats. The "value" entry format is also well defined (i.e. there are only two permutations), so it is easier to support. 

I know nothing about the parser, but I should note that it is entirely possible that multiple "value" keywords might exist in a boundary at different levels of the input structure. It is important that only the first value entry on the base level of the boundary condition is actually identified as the face value correlated "value" entry. So some kind of interpretation of OPENFOAM syntax would be required - a simple pattern-match won't work.

Eugene

-----Original Message-----
From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of Takuya OSHIMA
Sent: 22 June 2016 16:22
To: paraview at paraview.org
Subject: Re: [Paraview] Minor bug in OPENFOAM filter

Hi Eugene and all,

Sorry for not giving a concrete solution but just a comment. The current reader handles the complex OpenFOAM format without a priori knowledge of exact format of a specific dictionary entry. With further growing complexity and format extensions made over OpenFOAM versions, there can always be such a problem especially when reading entries required by certain types of boundary conditions. Either implementing such knowledge or skipping the entire dictionary entries other than the "value" entries in the boudaryFields could be an idea though.

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN

From: paraview-request at paraview.org
Subject: ParaView Digest, Vol 146, Issue 25
Date: Tue, 21 Jun 2016 12:00:08 -0400

> Hi,
> 
> We have come across a minor but annoying bug in the Paraview OPENFOAM reader.
> 
> The component of the Paraview OPENFOAM parser that reads boundary conditions has been set up to always expect another number where a scalar is encountered in the following configuration:
> 
> (1.111 ###
> 
> when you follow a bracket-scalar with another bracket like this
> 
> (1.111 (
> 
> an exception is thrown and the field is not loaded. However, if the leading number is an integer, then it copes fine:
> 
> (1 (###
> 
> So it simply doesn't parse a scalar followed by a bracket. Most of such instances are not relevant to the display of data as they concern table inputs for time varying vector boundary conditions. The current workaround is to always use integers in interpolation input tables, but obviously this is not ideal. To reproduce the issue, simply add the following entry to any boundary condition for any volumetric field:
> 
> RandomEntry table (1.1 ( 1 2 3));
> 
> It will result in an "Error reading line XXX ... " output and the field that the entry was added to will not be loaded. If you change it to:
> 
> RandomEntry table (1 ( 1 2 3));
> 
> Then it works fine. I can provide a small case that reproduces the issue if the above is not clear.
> 
> Best regards,
> 
> Eugene de Villiers
> e.devilliers at engys.com<mailto:e.devilliers at engys.com>
> Mob: +44 (0) 77 89748490
> Tel: +44 (0)20 32393041 (ext. 102)
> Fax: +44 (0)20 33573123
> [logo_red-black_fonts_signature]<http://www.engys.com/>
> 
> This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from your system.
> 
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


More information about the ParaView mailing list