View Issue Details

IDProjectCategoryView StatusLast Update
0003685OpenFOAMFeaturepublic2021-06-10 16:54
ReporterpeksaAssigned Tohenry 
Status closedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Version8 
Fixed in Versiondev 
Summary0003685: Evaluate mixture diffusion coefficient only once prior to the species loop in YEqn.H
DescriptionI have noticed that the species transport takes unexpectedly long time in reacting flow cases with a large number of species. In particular, I have noticed that the evaluation of the laplacian term seems to take surprisingly long per species. Further tests showed that the laplacian term evaluation time could be decreased clearly by computing the mixture-averaged diffusion coefficient prior the Yi loop and use the same coefficient field for each species during the transport solution loop which is in my opinion the intention in such an operator splitting approach.

The reason for slower evaluation in the standard implementation *may* appear due to unnecessary re-evaluation of the diffusion coefficient for every species. However, I have not digged any deeper on the details.

I'm open to carry out further testing / implementation work if this is something you developers see as a relevant enhancement.

Steps To ReproduceI attached a new solver "reactingFoam2" which has a modified YEqn.H to highlight my explanation above. The tar file includes also the Sandia D flame tutorial from which I have just turned TDAC off to evaluate transport for all species at all times. You can compare run times with reactingFoam and reactingFoam2 to see the evaluation time difference by eye in printouts.
TagsNo tags attached.



2021-06-10 11:22


Yeqn_bugreport.tar.gz (253,189 bytes)


2021-06-10 11:37

manager   ~0012054

The change you propose is not compatible with OpenFOAM-8 or -dev as it hard-codes the particular model for specie transport and does not use the abstraction I introduced to support non-unity Lewis number and multi-component diffusion.


2021-06-10 11:46

reporter   ~0012055

You're right and this was not supposed to be the overall fix but more of an easy way to show the potential performance gain. I'm not yet sure about the best generalised way to implement this, especially considering your recent large changes in the transport libraries. However, as I stated, if you have immediately an idea how to proceed with the feature, I can provide support along the way.


2021-06-10 11:53

manager   ~0012056

We would need funding to work on this.


2021-06-10 12:17

reporter   ~0012057

Just to comment, have you peksa tested the performance difference with dev? After this commit the speed of evaluating the diffusion coefficient became much faster for cases with large number of species.


2021-06-10 12:33

reporter   ~0012058

Edit, I also used to have a custom solver with cached alphaEff, but the performance difference basically disappeared after that update.


2021-06-10 16:31

reporter   ~0012059

I can confirm tniemi's comment! The difference in evaluation times seems very small indeed!

I had a bit old dev version on local machine while I was importing some old code to newer version and did not run the test on dev properly then.

Thank you for pointing out this. This issue can be closed.

Issue History

Date Modified Username Field Change
2021-06-10 11:22 peksa New Issue
2021-06-10 11:22 peksa File Added: Yeqn_bugreport.tar.gz
2021-06-10 11:37 henry Note Added: 0012054
2021-06-10 11:46 peksa Note Added: 0012055
2021-06-10 11:53 henry Note Added: 0012056
2021-06-10 12:17 tniemi Note Added: 0012057
2021-06-10 12:33 tniemi Note Added: 0012058
2021-06-10 16:31 peksa Note Added: 0012059
2021-06-10 16:54 henry Assigned To => henry
2021-06-10 16:54 henry Status new => closed
2021-06-10 16:54 henry Resolution open => no change required
2021-06-10 16:54 henry Fixed in Version => dev