CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] How to calculate a Volume of all Cells after using snappyHexMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2017, 17:21
Exclamation How to calculate a Volume of all Cells after using snappyHexMesh
  #1
New Member
 
Joaquin Del Pino
Join Date: Jun 2017
Posts: 6
Rep Power: 9
joaquindelpino is on a distinguished road
Hello everyone.

I'm simulating a bio-filter inside of a room.
To generate mesh I used snappyHexMesh. Then I runed the simulation using simpleFoam and I got the velocity and pressure in each cell, but now I need to compute the volume of each cell to calculate the % of volume in that velocity is different from zero.

I read a lot of topics in CFD but i don't understand where I must be create codes or use mesh.V().


I would appreciate a detailed explanation

Regards.

Joaquin Del Pino
joaquindelpino is offline   Reply With Quote

Old   August 21, 2017, 05:56
Default
  #2
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13
Flowkersma is on a distinguished road
Hi Joaquin,

Can you use ParaView (paraFoam)?

Following filters in ParaView should do what you want:
1. Use Calculator filter to calculate the scalar of interest (mag(U)).
2. Use Clip filter to extract the volume of interest. Choose ClipType=Scalar, Scalars=magU and choose a delimit value for the velocity.
3. Use IntegrateVariables filter to calculate the volume. Choose attribute=Cell Data and then you should see a column with volume.

Best,
Mikko
Flowkersma is offline   Reply With Quote

Old   August 21, 2017, 09:08
Default
  #3
New Member
 
Joaquin Del Pino
Join Date: Jun 2017
Posts: 6
Rep Power: 9
joaquindelpino is on a distinguished road
Quote:
Originally Posted by Flowkersma View Post
Hi Joaquin,

Can you use ParaView (paraFoam)?

Following filters in ParaView should do what you want:
1. Use Calculator filter to calculate the scalar of interest (mag(U)).
2. Use Clip filter to extract the volume of interest. Choose ClipType=Scalar, Scalars=magU and choose a delimit value for the velocity.
3. Use IntegrateVariables filter to calculate the volume. Choose attribute=Cell Data and then you should see a column with volume.

Best,
Mikko
Thx Mikko, I really appreciate your answer. But I have some questions,

1. In calculator filter, I have 2 options, scalar and volume. In scalar appears: p, U_x, U_y, U_z. In vectors appears: U. Wich one I need? ((U_X)^2)+((U_Y)^2)+((U_Z)^2)^(1/2) ? That's correct?

2. In calculator filter mag(U) is the result array name?

3. In the delimit value for the velocity, I need the volume of cells in wich velocity is greater than 0.0001, this is my delimit value?

4. In integrateVariables filter show only one cell data, that's right?
Regards.
joaquindelpino is offline   Reply With Quote

Old   August 21, 2017, 11:03
Default
  #4
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13
Flowkersma is on a distinguished road
Hi Joaquin,

1. and 2. In Calculator you can specify the result array name. By default it is "Result". In the next field you define your function which is for velocity magnitude either "mag(U)" or "((U_X)^2)+((U_Y)^2)+((U_Z)^2)^(1/2)". Change the "Attribute Mode" to "Cell Data" if you want to extract only the cells. If you want a "smooth" surface at the interface then use "Point Data". ParaView will then automatically create a smooth interface with refined mesh and interpolated data.

3. and 4. that is right.
Flowkersma is offline   Reply With Quote

Old   August 21, 2017, 11:15
Default
  #5
New Member
 
Joaquin Del Pino
Join Date: Jun 2017
Posts: 6
Rep Power: 9
joaquindelpino is on a distinguished road
Ok, thank you for all your replies, there are very helpful.

Regards
joaquindelpino is offline   Reply With Quote

Reply

Tags
cell, cellvolume, mesh.v(), snappyhexmesh, volume


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
cellZone not taking all the cells inside rahulksoni OpenFOAM Running, Solving & CFD 6 January 25, 2019 01:11
cellZone not taking all the cells inside rahulksoni OpenFOAM 0 January 16, 2019 02:16
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 03:53
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42


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