|
[Sponsors] |
Is there any method for calculating each cells volume? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
S.J Chung
Join Date: Mar 2015
Posts: 6
Rep Power: 11 ![]() |
Hi guys.
I already calculate total volume of cell. Use this code. ---------------------------------------------------------- #include "udf.h" DEFINE_ON_DEMAND(demo_calc) { real volume, vol_tot; Domain* domain; Thread* t; cell_t c; vol_tot = 0.; domain = Get_Domain(1); thread_loop_c(t, domain) { begin_c_loop(c, t) { volume = C_VOLUME(c, t); vol_tot += volume; } end_c_loop(c, t) } Message("Total Volume=%g", vol_tot); } ------------------------------------------------------ After that, I want to calculate each (particle) cells volume. But I can't find it. Is there any sample code? |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
François Grégoire
Join Date: Jan 2010
Location: Canada
Posts: 392
Rep Power: 17 ![]() |
You could add this line to display cell volume:
Quote:
|
||
![]() |
![]() |
![]() |
Tags |
cell volume, udf |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 08:54 |
multiphaseEulerFoam (OF2.3.0) : Courant number explodes when running in parallel | Mehrez | OpenFOAM Running, Solving & CFD | 10 | May 18, 2016 11:44 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
Control Volume , Finite Volume, Finite Control Volume, Finite Element Method | technocrat.prakash | Main CFD Forum | 1 | April 24, 2010 19:24 |
Comparison: Finite Volume Method vs. Analytic Method | m-fry | Main CFD Forum | 1 | April 20, 2010 14:40 |