# Help, I don't understand how to convert my "passive scalar" to ppm

My master’s thesis project is to study the benefits of displacement ventilation within Italian classrooms.
To do this, I thought of doing cfd analysis to understand co2 concentration.
I created “geometry primitives” over the rectangles representing people.
Infinte I entered as “Passive scalar source” the children’s co2 generation. I read several articles about “flux” then I entered as unit 0.007371 g/s.
Finished the simulation I get this message “A possible divergence was detected in the solver” ( any advice on how to solve?).
My main problem remains in post processing of results.
I can’t figure out how to convert my passive scalar (CO2) to ppm.
Is anyone able to help me?
I attach the link of my project (sorry if the names are in Italian).

in this image you can see the “passive scalar” filter inserted, how can I interpret these numbers?

for example, in the image I attached you can see that in my section I have 0.6 (but what are these 0.6 ? grams ? )

Hello @s289286

I see this is your first time ever posting in our forum so I would like to welcome you in our community

The warning about possible divergence refers is directly connected to the passive scalar calculation T1 as indicated in the warning message

“A possible divergence was detected in the solver. Please double check your results and consider lowering the relaxation factor for field T1.”

Checking your latest simulation residuals, it appears that from 200 to 350 iterations, the T1 residual was oscillating quite excessively. However, it was then able to converge without issues so you are safe to ignore this warning.

You can optionally reduce the relaxation factor of the variable in question (in this case T* - Passive scalar Equation) to avoid such warnings in the future but this may lead to more iterations needed for achieving convergence.

The flux term in the passive scalar source is always defined as concentration and its a non-dimensional parameter. A passive scalar, as the name “passive” suggests, has no real effect on the flow - its rather a means of just tracking a passive substance within the domain.

Please check our documentation for more details about passive scalar flux definition here

You should then define the concentration of CO2 in ppm or any other concentration unit. Then, the result in the post-processor will also be consistent to the concentration you defined at simulation setup

Feel free to check our Car Park Contamination Tutorial which follows a similar philosophy with what you are trying to achieve.

Hope this helps for now,
Happy simulations

Thank you for your response. I am very grateful to be part of this beautiful community.
I have followed the recommended tutorials in great detail.
Good suggestion the one about the error message appeared during the simulation.
From my research I was only able to find how many grams of CO2 people emit per second. No data on ppm per second. I was wondering if you think there was a way to convert the g/s data to ppm/s in the flux term in the passive scalar source.
Or if by doing a simulation using g/s you could trace back (once you get the results) how many ppm of CO2.
My input data are:
Fresh air flow rate: 0.243055 m^3/s
CO2 generation (flux term) : 0.007371 1/s (g/s) emitted per person within the domain.
Room volume: 175 m^3

I hope I have explained myself, in case I can give other examples.

Hello!

With volumetric scalar sources, you have flexibility with respect to the units/interpretation of the results. I find that assuming units of concentration for the flux works best.

The idea is simple: whatever unit of concentration you use for the volumetric source, you can interpret the scalar results to be in the same unit of concentration. E.g. if your flux is in ppm (mg/kg or mL/m3), then the results will be in ppm.

The amount of scalar created in a volumetric source will be the concentration (flux) times the volume of the source inside of the computational domain. E.g. a flux of 100 ppm defined to a 1 m3 volume will give you 100 mL/m3 * 1 m3 = 100 mL of scalar being released per second.

If you know how much scalar is being released in g/s, then work out how much that would be in mL/s. Then check the volume of the source that is within the computational domain (‘out of bounds’ doesn’t count). Then divide the volume of scalar being dissipated (in mL) by the volume of the source (m3). This will be your flux in ppm.

Some projects of interest:

Cheers

I’m probably getting lost in some steps.
I created geometric figures representing people and to simulate co2 generation I added cartesian boxes ( at the height of their heads ) .
As you can see in figure below

next I went to the Passive scalar source panel and set that for each of these cartesian boxes there was generation of 0.005187g/s there CO2.

In the post-processing part I then get this data, I assume then that these are grams of CO2?

I have seen and read all the articles explaining the concept of passive scalar, however, I still do not understand how to adapt it to my case.
How would you recommend that I proceed?
Is the cartesian box method correct or are there other more intelligent ways to simulate the co2 emitted by people ?
My ultimate goal is always to monitor co2 trends with different ventilation strategies.
Thanks for your attention, I hope to find a solution soon.

Since the sources are currently “Volumetric scalar sources”, the generation of scalar is based on the volume of the boxes contained in the flow domain. At the moment a good chunk of the volume of the boxes is out of the computational domain (inside of the ‘head’ of each person).

I’ll come up with some fictitious numbers just to exemplify:

• Let’s say that the full volume of each box is 1 m3 at the moment
• However, let’s say that only 0.1 m3 is within the computational domain, the other 0.9 m3 are out of bounds
• You have a flux of 5.187 1/m3.s. Let’s say you’re assuming this is in units of g/m3
• The amount of scalar dissipated in each one of these boxes will be 5.187 g/m3.s*0.1m3 = 0.5187 g/s
• The units in the post-processor for passive scalar would be g/m3 in this case
• You’d have to work out the conversion formula from g/m3 to either mg/kg or mL/m3 (i.e. ppm)
• Alternatively, you can set your flux directly in ppm to make the post-processor units be ppm as well

In short, the easiest way to achieve your objective is to determine the amount of scalar being dissipated per person (in mL), then determining how much volume of each cartesian box is currently within the flow domain (in m3), then dividing the scalar amount by the volume of each source (mL/m3) and defining this value as the volumetric flux. The values in the post-processor will be in ppm.

Cheers

Thank you for the clarification.
I followed your reasoning, then I modified my cartesian boxes. placed them over the “heads” of the people, then calculated the volume = 0.038736576 m^3.
Having done this, I took the co2 generation in mL/s and divided it by the previously derived volume.
I then obtained a value of about 73.57 ppm.
Once the simulation is finished I get these results:

This time the data I get makes sense. I can finally see how the CO2 concentration varies in ppm in my domain.
Thank you very much for your explanation and patience.

2 Likes