|
[Sponsors] |
Is there any method for calculating each cells volume? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 24, 2016, 23:22 |
Is there any method for calculating each cells volume?
|
#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? |
|
April 25, 2016, 00:58 |
|
#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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
multiphaseEulerFoam (OF2.3.0) : Courant number explodes when running in parallel | Mehrez | OpenFOAM Running, Solving & CFD | 10 | May 18, 2016 12:44 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
Control Volume , Finite Volume, Finite Control Volume, Finite Element Method | technocrat.prakash | Main CFD Forum | 1 | April 24, 2010 20:24 |
Comparison: Finite Volume Method vs. Analytic Method | m-fry | Main CFD Forum | 1 | April 20, 2010 15:40 |