View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003685 | OpenFOAM | Feature | public | 2021-06-10 11:22 | 2021-06-10 16:54 |
Reporter | peksa | Assigned To | henry | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 15.04 |
Fixed in Version | dev | ||||
Summary | 0003685: Evaluate mixture diffusion coefficient only once prior to the species loop in YEqn.H | ||||
Description | I 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 Reproduce | I 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. | ||||
Tags | No tags attached. | ||||
|
|
|
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. |
|
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. |
|
We would need funding to work on this. |
|
Just to comment, have you peksa tested the performance difference with dev? After this commit https://github.com/OpenFOAM/OpenFOAM-dev/commit/5e146ccf588bfe2d93f92032cf9471e4a71787ce the speed of evaluating the diffusion coefficient became much faster for cases with large number of species. |
|
Edit, I also used to have a custom solver with cached alphaEff, but the performance difference basically disappeared after that update. |
|
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. |
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 |