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

reconstructPar super weird error

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By HPE
  • 1 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2020, 12:28
Default reconstructPar super weird error
  #1
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Hi guys.
I'm trying to reconstruct an interFoam simulation, but I'm getting a super strange error.
If I run a plain reconstructPar, I get:


Code:
--> FOAM FATAL ERROR: 
Not implemented

    From function virtual Foam::Istream& Foam::ITstream::read(char*, std::streamsize)
    in file db/IOstreams/Tstreams/ITstream.C at line 159.

FOAM aborting
(You can check the code for the mentioned function here: https://github.com/OpenFOAM/OpenFOAM...Tstream.C#L157)


I noticed this happens when it tries to reconstruct p_rgh.
Therefore, if, for instance, I run:
Code:
reconstructPar -fields '(U alpha.water)'
Everything is fine.


But if I try:
Code:
reconstructPar -fields '(p_rgh)'
Then, the error comes up.


Any idea what might be causing this?


I'm using v1812.
This problem does not happen on v7.
But if I run interFoam on v1812 and reconstructPar on v7, the error persists.
miotto is offline   Reply With Quote

Old   June 30, 2020, 16:51
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Can you test

reconstructPar -fields 'p_rgh'
HPE is offline   Reply With Quote

Old   June 30, 2020, 17:12
Default
  #3
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Thanks for the reply, HPE.




Quote:
Originally Posted by HPE View Post
Can you test

reconstructPar -fields 'p_rgh'

Results in:


Code:
--> FOAM FATAL IO ERROR: 
incorrect first token, expected <int> or '(', found on line 0 the word 'p_rgh'

I think, the correct syntax is really the one I sent.
miotto is offline   Reply With Quote

Old   June 30, 2020, 17:14
Default
  #4
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Just for completeness, here is the full error message (including stack trace):


Code:
--> FOAM FATAL ERROR: 
Not implemented

    From function virtual Foam::Istream& Foam::ITstream::read(char*, std::streamsize)
    in file db/IOstreams/Tstreams/ITstream.C at line 159.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::ITstream::read(char*, long) at ??:?
#3  Foam::Istream& Foam::operator>><int>(Foam::Istream&, Foam::List<int>&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#4  Foam::Function1Types::CSV<double>::CSV(Foam::word const&, Foam::dictionary const&) at ??:?
#5  Foam::Function1<double>::adddictionaryConstructorToTable<Foam::FieldFunction1<Foam::Function1Types::CSV<double> > >::New(Foam::word const&, Foam::dictionary const&) at ??:?
#6  Foam::Function1<double>::New(Foam::word const&, Foam::dictionary const&) at ??:?
#7  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::uniformFixedValueFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#9  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#10  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#11  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#12  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#13  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#14  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#15  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
#16  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#17  ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/reconstructPar"
miotto is offline   Reply With Quote

Old   July 1, 2020, 05:09
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
reconstructPar -fields 'p_rgh'

has been working for my v1812 and v2006 setups, just tested them for

"tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom".

But, your error might be related to one of the boundary conditions in "p_rgh", likely related to "Function1".

Could you please share your boundary condition file for "p_rgh", if possible?

Thank you.
HPE is offline   Reply With Quote

Old   July 1, 2020, 05:57
Default
  #6
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Quote:
Originally Posted by HPE View Post
reconstructPar -fields 'p_rgh'

has been working for my v1812 and v2006 setups, just tested them for

"tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom".

But, your error might be related to one of the boundary conditions in "p_rgh", likely related to "Function1".

Could you please share your boundary condition file for "p_rgh", if possible?

Thank you.

Sure, here it is:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    pres_inlet
    {
        type            uniformFixedValue;
        uniformValue
        {
            type                csvFile;
            nHeaderLine         19;  // number of lines in the header
            refColumn           0;  //time column index
            componentColumns    (1);  // pressure column index
            separator           ",";
            mergeSeparators     no;
            file                "$FOAM_CASE/inlet.csv";
        }
    }
    nozzle
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_0
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_1
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_2
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_3
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_4
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    nozzle_plate_outer
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    atm_side
    {
        type            totalPressure;
        p0              uniform 0;
    }
    atm_bottom
    {
        type            totalPressure;
        p0              uniform 0;
    }
    defaultFaces
    {
        type            empty;
    }
}

// ************************************************************************* //
And here is an example of the inlet.csv file:




Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       IOobject;
    object      inlet.csv;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//
//
//   DATA SHOULD START ON LINE 20
//
0.000000000000, 8346
0.000040000000, -1849
0.000120000000, 7919
0.000400000000, 10230
0.000840000000, 8381
0.001160000000, -58
0.002960000000, -1862
0.003000000000, 9366
miotto is offline   Reply With Quote

Old   July 1, 2020, 09:11
Default
  #7
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

I have tested your setup with v1812, and v2006, and it did not produce any error with the command I have suggested.

I had a second look at the error message you posted, and it seems the error belongs to OFv7, not v1812.

Therefore, I suggest you to issue a bug ticket in the OpenFOAM.org issue tracker for which you can find a link below by attaching your case in your issue ticket, so that they can reproduce the error.
HPE is offline   Reply With Quote

Old   July 1, 2020, 09:46
Default
  #8
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Quote:
Originally Posted by HPE View Post
Hi,

I have tested your setup with v1812, and v2006, and it did not produce any error with the command I have suggested.

I had a second look at the error message you posted, and it seems the error belongs to OFv7, not v1812.

Therefore, I suggest you to issue a bug ticket in the OpenFOAM.org issue tracker for which you can find a link below by attaching your case in your issue ticket, so that they can reproduce the error.

Thanks for the suggestion, HPE.
The message is indeed from v7, but I get the same thing with v1812. (I'll post later on)


One question, do you see anything wrong with the way I'm using the csv? I wondering if I'm doing something that is not allowed by v1812...
miotto is offline   Reply With Quote

Old   July 1, 2020, 10:29
Default
  #9
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
"One question, do you see anything wrong with the way I'm using the csv?"

Not so far, but my mind is very tired.
miotto likes this.
HPE is offline   Reply With Quote

Old   July 1, 2020, 10:43
Default
  #10
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
I'm now 100% sure that the problem is with v1812. Here are the results of some experiments.


  • if I run decomposePar, interFoam and reconstrucPar all on v7, no problems occur.

  • if I run decomposePar, interFoam and reconstrucPar all on v2006, also no problems occur.

  • if I try to run decomposePar, interFoam and reconstrucPar all on v1812, I can't get passed the decomposePar, because it raises this "Not implemeted error"

  • if I run decomposePar on v7 and interFoam on v1812, then reconstrucPar will raise the error on both v7 or v1812.
In other words, as long as v1812 is in the mix, it will break everything.



Sadly I have to run my simulations on a cluster (big shout-out to the folks from NEMO hpc), and they only have v1812. So I'm f***.
miotto is offline   Reply With Quote

Old   July 1, 2020, 10:48
Default
  #11
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Here is the error raised by decomposePar v1812.
It seems to be related to reading the csv...

Code:
--> FOAM FATAL ERROR: 
Not implemented

    From function virtual Foam::Istream& Foam::ITstream::read(char*, std::streamsize)
    in file db/IOstreams/Tstreams/ITstream.C at line 281.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::ITstream::read(char*, long) at ??:?
#3  Foam::Istream& Foam::operator>><int>(Foam::Istream&, Foam::List<int>&) at ??:?
#4  Foam::Function1Types::CSV<double>::CSV(Foam::word const&, Foam::dictionary const&, Foam::fileName const&) at ??:?
#5  Foam::Function1<double>::adddictionaryConstructorToTable<Foam::FieldFunction1<Foam::Function1Types::CSV<double> > >::New(Foam::word const&, Foam::dictionary const&) at ??:?
#6  Foam::Function1<double>::New(Foam::word const&, Foam::dictionary const&, Foam::word const&) at ??:?
#7  Foam::PatchFunction1<double>::adddictionaryConstructorToTable<Foam::PatchFunction1Types::UniformValueField<double> >::New(Foam::polyPatch const&, Foam::word const&, Foam::word const&, Foam::dictionary const&, bool) at ??:?
#8  Foam::PatchFunction1<double>::New(Foam::polyPatch const&, Foam::word const&, Foam::dictionary const&, bool) at ??:?
#9  Foam::uniformFixedValueFvPatchField<double>::uniformFixedValueFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10  Foam::fvPatchField<double>::adddictionaryConstructorToTable<Foam::uniformFixedValueFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11  Foam::fvPatchField<double>::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#12  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::readField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#13  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#14  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#15  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, bool) at ??:?
#16  ? at ??:?
#17  ? at ??:?
#18  __libc_start_main in /lib64/libc.so.6
#19  ? at ??:?
Aborted (core dumped)
miotto is offline   Reply With Quote

Old   July 1, 2020, 12:08
Default
  #12
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
Hmm. If you get an error with v1812, and I don't get it with v1812, it only means that we have different instances of v1812. Sometimes, bug fixes are pushed to the previous versions as maintenance activities.

If you are working on a cluster, you can definitely compile your own version (e.g. v1812 or v2006) in your local area. Just consult the cluster maintainers, or the cluster wiki. I am sure that you can do that since I have been doing this for my entire life (in fact, I have never used the system-wide compilations of OpenFOAM in our supercomputer facilities). So, you are definitely not f.cked up, don't worry .
miotto likes this.
HPE is offline   Reply With Quote

Old   July 2, 2020, 12:31
Default
  #13
Member
 
Gui Miotto
Join Date: Feb 2020
Posts: 30
Rep Power: 6
miotto is on a distinguished road
Dear HPE,


Thanks for your help all the way!
Your last post was really an eye opener. I did exactly as you suggested, and it worked! I'm new to this cluster thing, therefore I had to research it a bit, but it was totally worth it.


Thanks again. You saved my skin!
miotto 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
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 10:00
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
[swak4Foam] installing funkySetFields igo OpenFOAM Community Contributions 1 November 20, 2012 21:16
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 08:24
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50


All times are GMT -4. The time now is 16:02.