Hey Forum,
is it possible to measure automatically the distance from the bottom to the alpha.phase 1 level end ?
I want to get the relationship between h (heigt) and Q (flux), h(Q), therefor i need a good measurment of the waterlevel.
Below is a picture of my system.
Sure, you can sum up the cell volume where alpha.phase1 >-= 0.8. You can use a Python Annotation filter and set the Expression to something like
sum(volume(inputs[0]) * (alpha.phase1 >= 0.8))
volume computes the cell volumes for each cell, alpha.phase1 >= 0.8 produces a 1 where the threshold criterion is met and 0 otherwise, and sum adds up all the cell volumes.
Dividing the volume by the surface area should give you the height.
But if i dont know the groundarea, its possbile to calculate this too ?
And a little offtopic question. I marked one cell at the front surface, can i get a few information about the marked cell e. g. length in x, y, and z direction ?
aunt edit:
I think i finde a way to display the cell dimensions. I extract the selection (one Cell) and then the information is displayed.
Sure. You can first use Extract Surface filter to get just the surface of your domain. From that select the cells representing the ground using the cell selection tools (the tiny icons above the render view). Finally, extract those cells with an Extract Selection filter, then add a Python Annotation with the expression sum(area(inputs[0])).
Instead of Python Annotation only, you can use Programmable Filter to compute both volume and surface area from the full and extracted dataset.
First, click the original dataset in the Pipeline Browser, then Ctrl-click the Extract Surface Filter, so you have two selected filters in the browser. Now add a Programmable Filter with the following script:
With an ExtractSelection at the bottom, and a blue rectangle.
I write your script in the ProgrammableFilter, but i got this error message:
NameError: global name 'alphaphase1' is not defined
Traceback (most recent call last):
File "<stron>", line 24, in <modul>
File"<strin>" line 4, un RequestData
if i tried the script, without the * (alphaphase1 >= 0.8), i got no error at this point.
Then the error comes along with the PythonAnnotation, i got a hugh error message:
From the Pipeline Browser, it looks like one input is the Extract Selection filter and the other input is Extract Surface. That second input should be the Clip4 filter instead of Extract Surface, assuming that is the volume you want to process.
i took the liberty of uploading the files.
Here is the link. Its a zip file with the simulation (openfoam) and the psvm file. The password is “Paraview” without the ".
I have to change the Output Data Set Type to vtkUnstructuredGrid
but the expression (alphaphase1 >= 0.8) still dont work.
I cant finde the alphaphase1 comand, in the Guide at side 258 ff., is it even possible to filter the alphaphase with the ProgrammableFilter ?