## Derived Values – Mass Flow

*How to calculate mass flow in COMSOL Multiphysics*

Mass flow calculation is one of the most practical result reporting in Computational Fluid Dynamics (CFD). For this aim in COMSOL Multiphysics, Derived Values has been employed and Simulation of * Supersonic Air-to-Air Ejector CMS* is used to illustrate this.

**Derived Values**

Compute the primary mass flow.

**Line Integration 1**

- In the
**Results toolbar**, click**More Derived Values**and choose**Integration>Line Integration**. - In the
**Settings**window for**Line Integration**, type*Primary Mass Flow*in the**Label**text field. - Locate the
**Data**section. From the Dataset list, choose**Study 1/ Adaptive Mesh Refinement Solutions 1 (sol3).** - From the
**Parameter selection (Refinement level)**list, choose**Last**. - Locate the
**Selection**section. From the**Selection**list, choose**Primary inlet**. - Locate the
**Expressions**section. In the table, enter the following settings:

Expression | Unit | Description |

hmnf.rho*w | kg/(m*s) |

- Click
**Evaluate.**

**Derived Values**

Compute the secondary mass flow.

**Line Integration 2**

- In the
**Results**toolbar, click**More Derived Values**and choose**Integration>Line Integration**. - In the
**Settings**window for**Line Integration**, type*Secondary mass flow*in the**Label**text field. - Locate the
**Data**section. From the**Dataset list**, choose**Study 1/Adaptive Mesh Refinement Solutions 1 (sol3).** - From the
**Parameter selection (Refinement level)**list, choose**Last**. - Locate the
**Selection**section. From the**Selection**list, choose**Secondary**inlet. - Locate the
**Expressions**section. In the table, enter the following settings:

Expression | Unit | Description |

hmnf.rho*w | kg/(m*s) |

- Click
**Evaluate.**

**Derived Values**

Compute the mixed mass flow.

**Line Integration 3**

- In the
**Results toolbar**, click**More Derived Values**and choose**Integration>Line Integration**. - In the
**Settings**window for**Line Integration**, type*Mixed mass flow*in the**Label**text field. - Locate the
**Data**section. From the**Dataset**list, choose**Study 1/ Adaptive Mesh Refinement Solutions 1 (sol3).** - From the
**Parameter**selection (Refinement level) list, choose**Last**. - Locate the
**Selection**section. From the**Selection**list, choose**Outlet**. - Locate the
**Expressions**section. In the table, enter the following settings:

Expression | Unit | Description |

hmnf.rho*w | kg/(m*s) |

- Click
**Evaluate.**