CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] paraView error: it opens and closes immediatly

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2018, 06:24
Default paraView error: it opens and closes immediatly
  #1
New Member
 
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 7
Loekatoni is on a distinguished road
Hello readers,

I'm new to openFoam and new to C++ and I'm trying to learn both. Now I'm trying to make a script which gives a velocity profile to the inlet of my system. To solve my problem I have a couple of resources to my disposal: the openFoam extended code guide on the internet, the user guid, the basic tutorial, the foundation training and the advanced training and I have also looked up this forum. I did not find the information I needed.

My system is a slice out of a channel, with the slice going from -2.5 degree to +2.5 degree, very long L and a tiny diameter D. The system worked with a different BC at the inlet, so I know that the problem lies in my current BC at the inlet.

I'm trying to make the inlet with the codedFixedValue BC and want to make a profile dependent on the x-position (or r-position), with a graded mesh with smaller dx on the wallside of the channel. The profile is calculated with the Hagen-Poisseuille equation.

To be honest , I do not fully understand what the code says yet. I numbered the components (//1 untill //4) I do not fully grasp and will try to explain what I think it does, feedback on my thoughts are welcome!
My code in 0/U looks as follows:

Code:
inlet
     {
         type            codedFixedValue;
         value           uniform (0 0 0);
         name            velocityProfile; //1

         code
         #{
                 scalar A = 0.9041;
                 scalar B = 0.035;
                 scalar R = 0.0005;

                 fixedValueFvPatchVectorField inlet(*this); //2

                 forAll(this->patch().Cf(),i) //3
                 {
                         inlet[i]= vector(0, 0, A*(Foam::pow(this->patch().Cf()[i]/R, 2)-1)-B);
                 }
                 operator == (inlet); //4
          #};

//1 This spot looks like it needs a pre-defined name. This one I just thought of as a fitting name, but it looks like it needs a name from a library, I could not find any information on this.

//2 the *this operator points towards the memorylocation of something, in this case it looks to the vectorfield, noted by fixedValueFvPatchVectorField of patch inlet. So now "this" has the values assigned to the memorylocations of the different boundary faces which are part of patch inlet. If this is true, than I still do not see how "this" retrieves the data, as in: how does it know where to look up the data?

//3 initialize a loop over specific data stored in "this". The term "patch().Cf()" is the same as the x-position i read somewhere, so it seems a logical loop, that loops over al the x-position values stored in "this". If this is correct, I still do not understand the formulation "patch().Cf()", so either way some remarks on this are welcome.

//4 Now the calculated values for the z-velocity need te be assigned to an operator, in this case U, to be used as the BC.
The profile being the z-velocity, I gave the same input to 0/Uz.

To mag(U), Ux and Uy I gave the following code
Code:
inlet
     {
type            codedFixedValue;
         value           uniform (0 0 0);
         name            velocityProfile;
}
Now the error message I get is:
Code:
Created temporary 'longChannelProfile.foam'
paraview: /build/paraview-lH8wFv/paraview-5.4.1+dfsg3/VTK/IO/Geometry/vtkOpenFOAMReader.cxx:3798: void vtkFoamEntryValue::ReadList(vtkFoamIOobject&): Assertion `"Label type not set!" && this->GetLabelType() != NO_LABEL_TYPE' failed.
 Aborted (core dumped)
With this error being the last question of my post, I cannot read anything in this error at all. Does anybody know what is says? And do you have any advice on learning to read those errors?

Sincerely,
Me

Last edited by wyldckat; November 3, 2018 at 20:38. Reason: Added [CODE][/CODE] markers
Loekatoni is offline   Reply With Quote

Old   November 3, 2018, 20:42
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: "longChannelProfile.foam" - this means that the internal reader that ParaView/VTK has got is not able to handle the more complex types of boundary conditions that OpenFOAM has got. It can only handle the more basic types.

You will either have to rely on foamToVTK to export the case first to VTK format and then open the files inside the folder VTK directly in ParaView; or you will have to use the official OpenFOAM reader, which requires using the Deb packages that are provided by the OpenFOAM Foundation or do a custom build of OpenFOAM+ParaView yourself.
__________________
wyldckat is offline   Reply With Quote

Old   November 8, 2018, 03:23
Default
  #3
New Member
 
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 7
Loekatoni is on a distinguished road
Dear Bruno,


Thanks for your reply, I will look into that.


Sincerely

Loek
Loekatoni is offline   Reply With Quote

Old   August 14, 2020, 09:13
Default
  #4
New Member
 
Mohammadreza Abyanaki
Join Date: Jan 2011
Posts: 5
Rep Power: 15
mra-cfd is on a distinguished road
Hey Bruno,

I have the same problem and error and as you described, using the "paraFoam" command, I can view simple boundaries with ParaView, but not more complicated ones such as baffles and cyclic faces.

I am using OpenFoam v2006 from "openfoam.com". I am trying to understand your answer. If I understood you correctly, there are 3 solutions:

1) Converting to VTK format
2) Using Debian package (which I assume you mean using openfoam.org version, right?)
3) Compiling paraView from source which seems to be a difficult task as it is written here and my own experience confirms that.

So the only reasonably feasible option seems to be the first one. Is this correct?
mra-cfd is offline   Reply With Quote

Old   November 12, 2020, 04:50
Default openfoam-v1912 paraFoam crashes after start
  #5
New Member
 
Join Date: Jun 2017
Posts: 14
Rep Power: 8
Akimlav is on a distinguished road
Installed OF from source, trying to open in paraview case reactingHeterogenousParcelFoam/rectangularDuct

paraFoam -builtin and click Apply button it crashes

I got this message

Created temporary 'rectangularDuct.foam'
paraview: /build/paraview-lH8wFv/paraview-5.4.1+dfsg3/VTK/IO/Geometry/vtkOpenFOAMReader.cxx:2977: bool vtkFoamEntryValue::ReadField(vtkFoamIOobject&): Assertion `"Label type not set!" && this->GetLabelType() != NO_LABEL_TYPE' failed.
Aborted (core dumped)

Akimlav is offline   Reply With Quote

Old   January 23, 2023, 05:40
Default
  #6
New Member
 
Turhan
Join Date: Sep 2022
Posts: 16
Rep Power: 3
Turhan is on a distinguished road
Quote:
Originally Posted by Akimlav View Post
Installed OF from source, trying to open in paraview case reactingHeterogenousParcelFoam/rectangularDuct

paraFoam -builtin and click Apply button it crashes

I got this message

Created temporary 'rectangularDuct.foam'
paraview: /build/paraview-lH8wFv/paraview-5.4.1+dfsg3/VTK/IO/Geometry/vtkOpenFOAMReader.cxx:2977: bool vtkFoamEntryValue::ReadField(vtkFoamIOobject&): Assertion `"Label type not set!" && this->GetLabelType() != NO_LABEL_TYPE' failed.
Aborted (core dumped)

I have the exact same issue, has this been resolved by someone?
Turhan is offline   Reply With Quote

Old   December 4, 2023, 10:30
Default Assertion `"Label type not set!"
  #7
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
same with me, never had that before. I ran subsetMesh on this case, could that be the reason? However, with foamToVTK it works
vonboett 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



All times are GMT -4. The time now is 06:51.