CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   STAR-CCM+ (https://www.cfd-online.com/Forums/star-ccm/)
-   -   Mass flow of each cell (https://www.cfd-online.com/Forums/star-ccm/192288-mass-flow-each-cell.html)

pary07 September 1, 2017 03:25

Mass flow of each cell
 
Hello,

In version 12.02, how can we calculate the mass flow of each cell? I am interested in creating a field function which involves mass flow rate of each cell multiplied by velocity and its distance from the coordinate system, like this Mi*(Velocity, i x distance, i). Then I would like Sum these values over a section plane?
I also tried XYZ table with function as Mass flow rate or Mass flux, but it's giving me a double variable value(1.7976931348623157E+308) for all of the cells and that's wrong. Does anyone know why am I getting double variable as an answer? or what is the method to find the mass flow rate of individual cells?




Thank you in advance.

me3840 September 1, 2017 11:00

I'm not sure what the mass flow rate of a cell means. Cells are volumes, their mass flow is zero if the simulation is converged.

pary07 September 2, 2017 02:36

Hi,
Thank you for replying- I am trying to calculate the angular momentum inside a cylinder at a specific plane selection. Angular momentum Iw=mvr, therefore w= mvr/mr^2, here the m would represent the mass flow the cell i, v would be tangent velocity and r would be a distance of the cell. This I found in one of the SAE papers, and therefore I was trying to figure out the mass flow of the cell. So is this not possible?

Gerhard December 5, 2020 10:16

Hi,
Well, you could for example include a cell zone in the cylinder of width = W with nCells = N in the axial direction inside that cell zone. The following should then give you the cross-sectional area and mass flow through the cell, respectively.
Code:

const scalarField &V = mesh.V();
forAll(yourCellZone, index)
{
  label i = yourCellZone[index];
  scalar A_x = V[i] / (W / N);  // NB: assumes cells are prismatic
  scalar mdot = rho[i] * (U[i] & orientationVector) * A_x;
}

You will have to define that orientationVector, width and nCells for the cell zone.
There is hopefully an easier way to do what you want here, but I just thought I might as well share my thoughts here... Someone else might be able to improve on it.


All times are GMT -4. The time now is 10:52.