CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Verification & Validation

Validation of passive scalar transport

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2016, 03:41
Default Validation of passive scalar transport
  #1
New Member
 
Patrick Kastner
Join Date: Apr 2016
Posts: 10
Rep Power: 10
kostnermo is on a distinguished road
Hi everyone,

I am trying to validate a passive scalar transport case. The idea is to model the emission of simplified CO_2 by people in a room with a certain air change rate. My goal is to obtain the average CO_2 concentration in ppm in that domain.

My current issue is that I cannot correctly reproduce average CO_2 concentrations compared to mass balances calculated on paper.
A simple mass balance can be done like this: http://www.engineeringtoolbox.com/po...oms-d_692.html

As test cases I tried the simpleFoam solver as well as the passiveScalarsimpleFoam by Yan Wang. In order to keep it simple, lets start with simpleFoam.


---

Steps I took:

1. The domain is a cuboid with (30*10*2.5) m, which yields 750 m^3. Both inlet and outlet spans one full boundary (25 m^2)

2. The source term is triggered by a (volumetric) source at breathing height within the room of about 40 m^3 (10*4*1) m

3. For the source term I use a field called TS with an entry in ./0/ and dimensions of kg/m^3. Apart from the inlet, I set all the BCs(TS) to zeroGradient.
The inlet concentration should be 400 ppm (vol-based). m_{CO2}=\frac{p V M}{R_m T} yields 7.22 E-04 for the inlet.

Then, the following entry in controlDict:


Code:
TS
  {
          type scalarTransport;
          active true;
          resetOnStartUp false;
          autoSchemes false;
 
          fvOptions {
                  TS-01
                  {
                          active true;
                          type scalarSemiImplicitSource;
                          scalarSemiImplicitSourceCoeffs
                          {
                                  cellSet volumeCell;
                                  selectionMode cellSet; 
                                  volumeMode absolute; // absolute <quantity>; specific <quantity>/m^3
                                  injectionRateSuSp
                                  {
                                          TS     0.000528; //kg/s/ accounts for 64 people (number of people * density(CO2) * 15 l/h CO2 /3600s)
                                  }
                          }
                  }
          }
 
  }
4. This test case represents 64 people with an emission of 0.96 m^3/h CO_2 per hour in a room with an air change rate of 2.3. This should yield 1000 ppm CO_2 after a certain amount of time.

5. Now, I obtain the following visual result which looks reasonable to me (inlet is on the left):



An evaluation with swak4Foam yields an average value of ~1000 ppm for those conditions which is acceptable.
Now, if I test this setup for different occupancies, the results get significantly worse (rel. error > 10 %), as can be seen in the following plots:

http://postimg.org/gallery/icavz4dy/

The only sub-case that goes along with the static calculation, coincidentally, is the 64 people emission case. On both ends of the spectrum the results deviate significantly.
In my opinion, if I change the number of people, which scales the emission linearly, the relative error should not change at all.

Interestingly enough, the option specific/absolute doesn't change the result to a large extent, which is not what I would expect. In fact, the absolute option yields better results.

---

With that being said, I have some questions regarding my method:
  • Is this setup comparable with a static calculation on paper?
  • If yes, am I doing something wrong with the corresponding BCs?
  • How do I appropriately address the source-term (absolute vs. specific) (maybe even SemiImplicitSource vs. ExplicitSetValue)? The fluctuating relative error leads me to think that I am assuming wrong source-term emission values.
  • Do I need to multiply with density in order to calculate the source emission massflow, although the solver doesn't calculate the density explicitly? If not, how do I calculate the correct mass source-term?
  • Does OF take care of the dimensions regarding the TS field? In other words, how come that using absolute vs. specific doesn't make much of a difference?


Any hint is appreciated!


Kind regards,

Patrick

Last edited by kostnermo; September 26, 2016 at 05:29.
kostnermo is offline   Reply With Quote

Old   September 28, 2016, 05:47
Default
  #2
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 11
Naresh yathuru is on a distinguished road
Hi patrick,

I have the same problem and same questions. were you able to find answers for your questions?
Naresh yathuru is offline   Reply With Quote

Old   October 6, 2016, 04:37
Default
  #3
New Member
 
Patrick Kastner
Join Date: Apr 2016
Posts: 10
Rep Power: 10
kostnermo is on a distinguished road
Hi Naresh,

I did receive some remarks as PMs but none that solve the issue.
How about you share your current findings and we work it out together?

Best,

Patrick
kostnermo is offline   Reply With Quote

Old   December 18, 2016, 15:25
Default
  #4
Senior Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 120
Rep Power: 15
kerim is on a distinguished road
Hi,
Could some of you please share the case setup for openfoam? Best regards
kerim is offline   Reply With Quote

Reply

Tags
gas, passive scalar, scalar, scalartransport, tracer


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
using a Fortran library of thermodynamics inside sutherland transport model Mehdi3031 OpenFOAM Programming & Development 0 April 7, 2016 09:34
Issue symmetryPlane 2.5d extruded airfoil simulation 281419 OpenFOAM Running, Solving & CFD 5 November 28, 2015 13:09
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


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