# Negative cells volume while reading Fluent .cas file

**URL:** https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285
**Category:** Development
**Created:** [March 28, 2024, 10:07am UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285 "2024-03-28T10:07:12Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![PawelekPro](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pawelekpro/32/14050_2.png) [@PawelekPro](https://discourse.paraview.org/u/PawelekPro)
#### Post date: [March 28, 2024, 10:07am UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/1 "2024-03-28T10:07:13Z")

</div>

I would like to load a Fluent .cas file using Fluent case reader in paraview. After loading the file, it appears that the mesh contains elements with negative volume (I checked this with the Cell Size filter). Let me just add that “Check mesh” in Fluent returns all positive volumes and no problems with the mesh.

The elements with negative volume belong to the boundary layer. In the image below, I have overlapped the original mesh and the Cell Size filter after the treshold operation (I am displaying only cells with negative volume). You can see that the problem is with prismatic cells.

Has anyone experienced similar behavior before? Maybe there is a simple way to remedy it?

 ![image](https://discourse.paraview.org/uploads/default/original/2X/e/e6ce0f7b925ed4d4e61d478abf891122fd928587.jpeg)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 28, 2024, 12:30pm UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/2 "2024-03-28T12:30:29Z")

</div>

Please share your data.

---

<div class="post-metadata">

### Author: ![PawelekPro](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pawelekpro/32/14050_2.png) [@PawelekPro](https://discourse.paraview.org/u/PawelekPro)
#### Post date: [March 28, 2024, 2:10pm UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/3 "2024-03-28T14:10:41Z")

</div>

I prepared a smaller case on which the same thing happens.  
[test\_geometry.cas](https://discourse.paraview.org/uploads/short-url/rf2fQSN1Tuj23ehHUfcZKde0Xpm.cas) (2.5 MB)

Localization of cells with negative volume:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/c/cc02b32baeb864284d1c395151a5c80ed525fe46.jpeg)

Treshold and isolate cells with negative volume:

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

I hope its enough

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 29, 2024, 12:06pm UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/4 "2024-03-29T12:06:43Z")

</div>

please share the .dat file too.

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [March 30, 2024, 12:58pm UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/5 "2024-03-30T12:58:38Z")

</div>

Consistency of the volume of the Wedge element seems to involve complications, but the most immediate fix would be to modify the following two lines in the **PopulateWedgeCell()** function in **vtkFLUENTReader.cxx**.

```auto
  if (this->Faces->value[base].c0 == i)
 → if (this->Faces->value[base].c1 == i)

```

and

```auto
  if (this->Faces->value[top].c1 == i)
 → if (this->Faces->value[top].c0 == i)

```

Note: The same modifications will be needed for **vtkFLUENTCFFReader** , which follows the **vtkFLUENTReader** implementation.

---

<div class="post-metadata">

### Author: ![PawelekPro](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pawelekpro/32/14050_2.png) [@PawelekPro](https://discourse.paraview.org/u/PawelekPro)
#### Post date: [April 2, 2024, 5:34am UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/6 "2024-04-02T05:34:12Z")

</div>

Thanks for the answers

I’ll try to do the same from the code level with the modifications [**Kyoshimi**](https://discourse.paraview.org/u/Kenichiro-Yoshimi) suggested and let you know if I succeeded

---

<div class="post-metadata">

### Author: ![Gaetano](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gaetano/32/15989_2.png) [@Gaetano](https://discourse.paraview.org/u/Gaetano)
#### Post date: [February 12, 2025, 3:30am UTC](https://discourse.paraview.org/t/negative-cells-volume-while-reading-fluent-cas-file/14285/7 "2025-02-12T03:30:19Z")

</div>

Ok that’s the problem. I bet you are initializing the simulation with a steady solution (previously calculated with a steady solver). Don’t do that. In the steady solver create an .ip file (file/interpolate/write-data). At the beginning of the FSI simulation read this ip file to initialize your simulation
