# QCriterion in Paraview

**URL:** https://discourse.paraview.org/t/qcriterion-in-paraview/2355
**Category:** ParaView Support
**Created:** [August 3, 2019, 3:49pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355 "2019-08-03T15:49:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [August 3, 2019, 3:49pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/1 "2019-08-03T15:49:32Z")

</div>

Hi, I’m working on a turbulent duct flow.  
I used Gradient of Unstructured Data set filter on velocity vector then I checked the Compute QCriterion option and Compute Vorticity option. (as you can see below)

![](https://i.imgur.com/CiXu8qa.png)

Finally, I used Contour to visualize the QCriterion. (as you can see)

![](https://i.imgur.com/dJyrMt9.png)

The result can be seen in the following image ,but I think it’s not correct.  
Where is the problem? Did I follow wrong procedures?

 ![](https://i.imgur.com/M2b92Me.png)

---

<div class="post-metadata">

### Author: ![arnaumiro](https://discourse.paraview.org/user_avatar/discourse.paraview.org/arnaumiro/32/335_2.png) [@arnaumiro](https://discourse.paraview.org/u/arnaumiro)
#### Post date: [August 12, 2019, 11:40am UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/2 "2019-08-12T11:40:07Z")

</div>

You did fine. The issue is probably that you selected an isosurface that is close to 0 (and negative!). The value you select depends on your problem, dimensions, Re, etc. I generally try 0.5 and then see whether I need a higher or lower value for a correct representation of my flow. I can’t tell you what will work for you, just that you explore some other values for the isosurface.

I recommend to read these:

- G. Haller, “An objective definition of a vortex,” _J. Fluid Mech._ , vol. 525, pp. 1–26, 2005.
- J. Jeong and F. Hussain, “On the identification of a vortex,” _J. Fluid Mech._ , vol. 285, pp. 69–94, 1995.

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 11:37am UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/3 "2020-09-12T11:37:52Z")

</div>

@Muhammad_Zangeneh were you able to generate the Q-criterion, I am getting an error.

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 2:25pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/4 "2020-09-12T14:25:30Z")

</div>

Yes I found out that I eas doing right! What kind of error do you get?

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 2:29pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/5 "2020-09-12T14:29:07Z")

</div>

this is Warning: In C:\bbd\8fbebceb\build\superbuild\paraview\src\VTK\Filters\General\vtkGradientFilter.cxx, line 326  
vtkGradientFilter (0000029BED8068A0): Input array must have exactly three components with ComputeDivergence, ComputeVorticity or ComputeQCriterion flag enabled.Skipping divergence, vorticity and Q-criterion computation.

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 2:38pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/6 "2020-09-12T14:38:45Z")

</div>

Do you select the velocity vector as the input of Gradient of Unstructured Data set filter? I think you are selecting a scalar instead of a vector.

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 2:48pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/7 "2020-09-12T14:48:54Z")

</div>

i imported the velocity in rotating reference frame scalar

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 3:16pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/8 "2020-09-12T15:16:00Z")

</div>

Can you attach your data?

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 4:00pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/9 "2020-09-12T16:00:49Z")

</div>

[star9veloc.case](https://discourse.paraview.org/uploads/short-url/9DDvOqUD1DqR15WRhcAQs3yUhCp.case) (423 Bytes)

here it is

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 4:03pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/10 "2020-09-12T16:03:34Z")

</div>

It’s not complete because the geometry file of the case is not attached. (.geo file is missing)

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 4:06pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/11 "2020-09-12T16:06:31Z")

</div>

I don’t get you. This is the file I am importing to the Paraview.

 ![image](https://discourse.paraview.org/uploads/default/original/2X/3/3f6a4ef3dca9edaa51487f88c93ae4c46ed8063e.png)

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 4:13pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/12 "2020-09-12T16:13:08Z")

</div>

You mean that your data is only 423 Bytes? It’s impossible! There must be some other files for geometry and data. You only attached one of them.

Your output data seems to be in EnSight format which must have a .geo file for the geometry case now I get this error in Paraview while loading your file:  
Unable to open star9veloc00000.geo

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 4:20pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/13 "2020-09-12T16:20:38Z")

</div>

@Muhammad_Zangeneh I exported the field function “Velocity in Rotating Reference frame”, by choosing mesh and solution data from STARCCM+ as a case file.

I have added other files here  
[https://drive.google.com/drive/folders/1EEeYt8WKpJ9qRAoJXXZ4fsBYI7hgCMUc](https://drive.google.com/drive/folders/1EEeYt8WKpJ9qRAoJXXZ4fsBYI7hgCMUc)

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 4:22pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/14 "2020-09-12T16:22:33Z")

</div>

Your files in Google Drive are private and I can’t access them.

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 4:23pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/15 "2020-09-12T16:23:45Z")

</div>

check this please  
[https://drive.google.com/drive/folders/1EEeYt8WKpJ9qRAoJXXZ4fsBYI7hgCMUc?usp=sharing](https://drive.google.com/drive/folders/1EEeYt8WKpJ9qRAoJXXZ4fsBYI7hgCMUc?usp=sharing)

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 4:34pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/16 "2020-09-12T16:34:27Z")

</div>

I found your problem. You are exporting the **magnitude** of the velocity vector in your CFD soft instead of the **vector** of the velocity which has 3 components. In order to calculate the QCriterion, you need the velocity **vector**. If you export the vector, Paraview automatically calculates it’s magnitude.

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 4:53pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/17 "2020-09-12T16:53:14Z")

</div>

Okay so I have used velocity in rotating reference frame vector now but nothing shows up after creating Q\_criterion. Can you please check the files star9vector.geo and star9vecor.case files in above link

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 5:17pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/19 "2020-09-12T17:17:11Z")

</div>

Bro, this is what I have  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/f/f8911bfdee71ff31fed7bcf8bd25fff21ce5bcb1.png)

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [September 12, 2020, 5:20pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/20 "2020-09-12T17:20:06Z")

</div>

I think you are simulating the flow around a wing. Now you extracted the wing (wall) itself without the fluid domain around it. QCriterion is visualizable over the fluid domain not on the wall because it’s a 3D property, not a 2D one.

---

<div class="post-metadata">

### Author: ![malieng](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/m/df705f/32.png) [@malieng](https://discourse.paraview.org/u/malieng)
#### Post date: [September 12, 2020, 5:25pm UTC](https://discourse.paraview.org/t/qcriterion-in-paraview/2355/21 "2020-09-12T17:25:56Z")

</div>

Alright. I have included the domain and did the same as earlier. Does it take too muc time? Since I see the little progress bar on the bottom but it doesn’t show anything

 ![image](https://discourse.paraview.org/uploads/default/original/2X/1/11f9c5423c803fb5a4004d3b972315b8db6940d5.png)

[Next page](https://discourse.paraview.org/t/qcriterion-in-paraview/2355.md?page=2)
