Using the Passive Scalar

In this week’s Volupe blog post we will look at the Passive scalar model. How to interpret the passive scalar, how to use it and how to set it up. What is a passive scalar? It is a good question because the answer is not necessarily completely intuitive. In reality, a passive scalar is whatever you want it to be, within reasonable limits of course. The passive scalar is a user-defined variable of arbitrary value, assigned to a fluid phase or to individual particles. The “passive”-part of a passive scalar indicates that they do not affect the physical properties of the simulation. You can consider the passive scalar as tracer dye in a fluid, having numerical values instead of colors, without real mass or volume. I will try here to give a few examples on how they can be used to further your understanding of the passive scalar model. You can use the passive scalar in various ways, for instance if you are interested in working with sensors, you use the passive scalar to check its values at discrete points in a domain. If used with multiple passive scalars, you can use this to figure out what scalar sends the strongest signal to a sensor. The mixing of two streams with the same properties is another example when the passive scalar comes in handy. It then allows you to represent the fluid as single phase (and single component), and you can use multiple passive scalars to examine the effect of mixing.

Density

When specifying a scalar source term there are two options aside from not having any active sources. The first one is Mass flux, and that will scale the passive scalar per unit density, meaning that it might be necessary to multiply with density to obtain the correct result. The other option is “Scalar flux with inferred density”. For that option Simcenter STAR-CCM+ will handle the scaling automatically. Both of these options are valid options when simulating, just keep in mind the difference.

Source options

Types of passive scalar

For Eulerian simulations you can apply a passive scalar for each separate phase, and you can apply explicit transfer between the passive scalars, meaning that you need to create the expressions as source terms based on the “other” passive scalar.  When it comes to transfer of passive scalar between a Lagrangian phase and a Eulerian, that is also possible. You then need to create a “Lagrangian Passive scalar” for the Lagrangian phase, and a passive scalar for the Eulerian phase. When doing so, you also need to utilize the “Passive scalar interactions” model. This will allow you to set up the transfer between the passive scalar in the Lagrangian phase and the passive scalar in the Eulerian phase.

There are two options for this, first is the volume-weighted Interaction, where the diffusion from the Lagrangian particle into the Eulerian field is modeled. This interaction conserves the density-weighted passive scalar. The other transfer model is the area-weighted interaction, where instead of diffusion, we model adsorption/desorption with distinct forward and backward rates.

It should be generally remembered that while a passive scalar can be considered a fraction, it can get values that are both negative and higher than unity. Let us now look at a few examples of where the passive scalar is used.

Passive scalar to calculate residence time

This is described in the documentation as well, so for a more extensive explanation of how to use this, make sure to look in the documentation under HomeàPhysics SimulationàPassive Scalars à Using the Passive Scalar for Residence Time.

By creating a passive scalar, that we name ResidenceTime and a field function (ResidenceTimeSource) that is the source for the passive scalar, we can in a steady state simulation look at the residence time of different locations in a calculation domain. The source term for the passive scalar is defined as:

($ResidenceTime > 1000) ? 0 : $Density

With this definition and applied as a passive scalar source term in the region, and a zero flux on any wall boundaries, the result can be seen below for an arbitrary domain. This gives a clear indication of where we have recirculation in the domain, and if there needs to be changes made to the domain to not have stagnant zones. Note that the “1000” in the definition of the passive scalar source is there to limit value to 1000, otherwise, if there are stagnant zones, the “ResidenceTime” could grow infinitely.

residence time

This workflow can also be extended to be used together with multiphase flow and for transient simulations. The different multiphase models have some variation in the definitions and details can be found here [How to calculate the residence time in multiphase cases (EMP, VOF, MMP, DMP)]. But generally, you need to add the volume fraction of the phase you are looking at and multiply that with the density in the definition of the source term.

Passive scalar for radiation dosage calculation

In this example we look at an example where we want to calculate radiation dosage of water at the end of an ultraviolet (UV) water treatment reactor. The full KB-article can be found here [Determining the appropriate Passive Scalar Source Term]. But here we use the passive scalar transport equation to determine the units of the passive scalar source.

In the picture below we see the passive scalar transport equation and the units for the left side of the equation below that. We know that we want to use the passive scalar that is incident radiation multiplied by time, to provide the UV-dosage. We then replace the source term with the units we want it to have and simplify the expression. From that we get that the input to the source term needs to have the same units as density times the incident radiation. Meaning that to track radiation dosage in the flow, the source term is equal to radiation intensity multiplied by the fluid density.

Equations

The picture below shows an example of what the result can look like when this is implemented.

UV radiation

I hope that this has furthered your understanding of the passive scalar and how you can use it. As usual, reach out to suppport@volupe.com, if you have any questions.

Author

Robin Viktor

Robin Victor
support@volupe.com

Scroll to Top