Aalto-CFD / DLBFoam-Advanced-Tutorials

Advanced combustion tutorial cases for DLBFoam library for OpenFOAM
GNU General Public License v3.0
25 stars 13 forks source link

Polynomial type fits of mechanism transport data need to be 8th order #5

Open mahgadalla opened 1 year ago

mahgadalla commented 1 year ago

Apparently the mechanism data for all the demonstrated cases have been generated for 4th order polynomial fits, consistently with Cantera and Chemkin. While this is not a problem for Sutherland models, using e.g. logPolynomial models results in OpenFOAM crashes due to that OpenFOAM forces 8th order polynomials. The package ct2foam/pyjac2foam can be utilized to properly generate the 8th order polynomial type fits of the mechanism transport data.

banyangtju commented 7 months ago

Thanks for your comment. I have a question that the polynomial type is only matching with PengRobinsonGas and it cannot be combined with perfectGas as shown in https://www.cfd-online.com/Forums/openfoam-solving/196625-herhothermo-unknown-psithermo-type.html. So how to use the polynomial type? Can the PengRobinsonGas type be used in this case?

moreff commented 7 months ago

Transport properties have nothing to do with the equation of state in OpenFOAM. Any definition of the transport properties can be used with the perfect gas.

banyangtju commented 7 months ago

Thanks for your reply. Did you mean that the transport model logpolynomial you used for Flame D? or sutherland ? The native setup of constant/thermophysicalProperties is <hePsiThermo reactingMixture sutherland janaf perfectGas specie sensibleEnthalpy>. Does the class or combination <hePsiThermo reactingMixture logpolynomial janaf perfectGas specie sensibleEnthalpy> should be created for this case?

moreff commented 7 months ago

In the case setup, you can find the model used here https://github.com/Aalto-CFD/DLBFoam-Advanced-Tutorials/blob/OF8/Sandia_D/constant/thermophysicalProperties#L22 I think I did not mention logPolynomial model anywhere related to this case. So I am a bit confused, what do you mean by "should"? You can do it if you wish, the accuracy of transport properties will be thus higher, but the computational cost will also slightly rise. If you use ct2foam for the conversion of the mechanism, you can then check out the transport figures it outputs for species, where fitting errors for Sutherland's model are above the threshold. In my experience, these errors are quite small and do not affect the overall picture significantly for CH4/air combustion.

banyangtju commented 7 months ago

OK, thanks very much. I will use the sutherland model.