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

Failure to start from latest time when BC stores scalarlist

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2014, 06:13
Default Failure to start from latest time when BC stores scalarlist
  #1
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Dear all,

I have observed that OpenFOAM fails to start from latest time when a custom boundary condition stores (and not even needs to read) a scalarlist. The error is as follows:

Code:
Create time

Create mesh for time = 0.1

Reading transportProperties

Reading field p

Reading field U



--> FOAM FATAL IO ERROR: 
"ill defined primitiveEntry starting at keyword 'dumlist' on line 32 and ending at line 33"

file: /media/work/OpenFOAM/OpenFOAM-2.3.0/run/testBug/cavity_bin/0.1/U at line 33.

    From function primitiveEntry::readEntry(const dictionary&, Istream&)
    in file lnInclude/IOerror.C at line 132.

FOAM exiting
This only happens when you are writing the files in binary format. Simulations stored in ascii format or with scalars stored instead of scalarLists run flawlessly. The same error is present at least from version 2.1.1 to 2.3

I have created an easy-to-check scenario, so it can be reproduced in a direct manner (v. 2.2.2 or 2.3). Please, find it attached. The case is based on the cavity tutorial, only that the new BC has been applied. The new BC is called 'failFixedValue' and is a modified version of 'oscillatingFixedValue', tailored to behave as fixedValue and to store a dummy scalarList associated to the BC.

Am I doing something wrong or this is in fact a bug?

Best,

Pablo
Attached Files
File Type: gz testBug.tar.gz (5.1 KB, 6 views)
Phicau is offline   Reply With Quote

Old   February 25, 2014, 10:08
Default
  #2
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
That was quick.

http://www.openfoam.org/mantisbt/view.php?id=1184

I have further questions and hope that someone is able to answer or correct me.

Defining the former scalarList as a scalarField in the following way yields the same error for the binary case:

Code:
    scalarField dumfield = scalarField(10, -1.0);
    dumfield[3] = 6.0;
    os.writeKeyword("dumfield") << dumfield << token::END_STATEMENT << nl;
The next thing I thought to implement this solution is to output the scalarField by defining it as an IOobject and running dumfield.write();

However some questions arise, as for example, if the BC is applied to two different boundaries, with different dumfield values, one would overwrite the other and mess everything, wouldn't it?

I could try to create the field as dumfield_boundaryName, but isn't it a mess? Any thoughts on a better solution?

Thanks,

Pablo
Phicau is offline   Reply With Quote

Old   February 26, 2014, 03:43
Default
  #3
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Well, problem solved, it works either way as a scalarList or scalarField, but it has to be written out using the following command:

Code:
dumthing.writeEntry("dumthing", os);
Solution found in "totalTemperatureFvPatchScalarField.C". Apparently "#include fieldTypes.H " is not needed.

Thanks mattijs for your guidance!

QUICK EDIT:

This is great... now paraview fails to open this binary case due to not understanding the scalarLists embedded in the BC. Of course, no trouble with the ascii format.

Last edited by Phicau; February 26, 2014 at 09:44. Reason: Additional info
Phicau is offline   Reply With Quote

Old   March 27, 2023, 12:58
Default
  #4
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
I know this is a super old thread, but I'm having the same issue in OpenFOAM-10 with a custom BC. I currently have several List<scalars> read into the BC entry, and paraFoam refuses to load them. Running in OpenFOAM works fine.

Was a solution ever found?
mturcios777 is offline   Reply With Quote

Old   April 13, 2023, 04:19
Default
  #5
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,683
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
If you have a custom boundary condition, make sure that you emit a "value" entry as well. The ParaView/VTK reader should be able to use that. Do no expect the ParaView/VTK reader to manage various arbitrary boundary condition entries. There is no reasonable way to parse and interpret them in most cases.


Collated file format is also not currently supported, but if you or someone else would like that, please take a look at https://gitlab.kitware.com/vtk/vtk/-/issues/18157 for what is needed.
Would need some time and resources.
olesen 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
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
time step directories naming issue Andrea_85 OpenFOAM 3 April 3, 2014 08:38
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 07:56


All times are GMT -4. The time now is 07:49.