|
[Sponsors] |
[OpenFOAM] paraView error: it opens and closes immediatly |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 2, 2018, 07:24 |
paraView error: it opens and closes immediatly
|
#1 |
New Member
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8 |
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. To mag(U), Ux and Uy I gave the following code Code:
inlet { type codedFixedValue; value uniform (0 0 0); name velocityProfile; } 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) Sincerely, Me Last edited by wyldckat; November 3, 2018 at 21:38. Reason: Added [CODE][/CODE] markers |
|
November 3, 2018, 21:42 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
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.
__________________
|
|
November 8, 2018, 04:23 |
|
#3 |
New Member
Loek
Join Date: Oct 2018
Posts: 14
Rep Power: 8 |
Dear Bruno,
Thanks for your reply, I will look into that. Sincerely Loek |
|
August 14, 2020, 10:13 |
|
#4 |
New Member
Mohammadreza Abyanaki
Join Date: Jan 2011
Posts: 5
Rep Power: 15 |
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? |
|
November 12, 2020, 05:50 |
openfoam-v1912 paraFoam crashes after start
|
#5 |
New Member
Join Date: Jun 2017
Posts: 14
Rep Power: 9 |
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) |
|
January 23, 2023, 06:40 |
|
#6 | |
New Member
Turhan
Join Date: Sep 2022
Posts: 16
Rep Power: 4 |
Quote:
|
||
December 4, 2023, 11:30 |
Assertion `"Label type not set!"
|
#7 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
same with me, never had that before. I ran subsetMesh on this case, could that be the reason? However, with foamToVTK it works
|
|
|
|