|
[Sponsors] |
March 22, 2020, 14:47 |
Calculating liquid volume in interFoam
|
#1 |
Senior Member
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8 |
Hi FOAMers!
A tank partially filled with liquid has a hole at the bottom where liquid drains. In searching for how to do this, I found this thread. Specifically, post #13, which states to post this code Code:
dimensionedScalar totalLiquidVolume = sum(mesh.V()*gamma); Info << "Total Liquid Volume, Value: " << totalLiquidVolume.value() << ", Dimensions = " << totalLiquidVolume.dimensions() << endl; runTime.write(); and recompile your solver. The post also says to check it first on a single processor because you might need to change sum() with gSum(). Before I ask if this works, I don't know how to recompile my solver. Is it as simple as backing up a few folders to /applications and then executing ./Allwmake ? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 04:27 |
multiphase turbulance case floating error | harsha_kulkarni | OpenFOAM Running, Solving & CFD | 3 | February 18, 2016 05:06 |
How to calculate liquid volume as the interface moves for interFoam Solver | asaha | OpenFOAM Running, Solving & CFD | 25 | October 21, 2009 04:34 |
Calculating volume of Phase | Pavan | FLUENT | 2 | March 5, 2008 10:04 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |