mutationpp / Mutationpp

The MUlticomponent Thermodynamic And Transport library for IONized gases in C++
GNU Lesser General Public License v3.0
106 stars 57 forks source link

Negative internal thermal conductivity #145

Closed BBArrosDias closed 3 years ago

BBArrosDias commented 3 years ago

Hello,

I have recently run some simulations with stagline (air_11) with the most recent version of m++, and they crash almost immediately. I ran the same simulations with a previous m++ that I have, and they were converging quite easily. The major modification from the most recent m++ and my old one is the new transport implementation. Running stagline with both versions for neutral mixtures (air_5) works just fine.

I am trying to find why the new m++ version crashes, and I manage to converge the simulation with air_11 by removing the collision integrals of electron-neutral from the collision.xml file. But I am not 100% sure this is the root of the problem.

I have also noticed with mppequil that the internal thermal conductivity is negative for high temperatures in the new m++.

I am not sure if the latter problem is related to the crashing of the stagline. Do you have any suggestions?

internalThermalCond

capriatim commented 3 years ago

Hello,

I noticed the same problem related the function electronThermalConductivity() returning me negative values (with a different CFD solver coupling). Following the discussion.

jbscoggi commented 3 years ago

Hey @BBArrosDias and @capriatim, could you provide some minimal working examples either as a small code snippet or mppequil options as a starting point to debug this issue?

BBArrosDias commented 3 years ago

I used mppequil and here are the options:

mppequil -T 300:10:50000 -m 0,37 air_11

Following a private discussion with @grgbellasvki, I will reduce the order of the Sonine polynomials. I think that the problem related with stagline might be related to the problem of @capriatim.

Thanks.

capriatim commented 3 years ago

Hello @jbscoggi , I will send you by mail.

jbscoggi commented 3 years ago

Hi @BBArrosDias and @capriatim, thanks. I will take a look probably today and see what I can figure out. Indeed, there may be problems using a 3rd order expansion for the electron thermal conductivity, though I don't remember ever seeing such extreme behavior. @BBArrosDias, the main problem using a 2nd order expansion is the accuracy is limited (though I guess you would rather be inaccurate than negative...).

BBArrosDias commented 3 years ago

Hi @jbscoggi, indeed, using the 2nd order for the electron subsystem, I can converge stagline. But the internal thermal conductivity is still negative; I don't think the Eucken formula depends on the Sonine order, right?

jbscoggi commented 3 years ago

Ah good point! Is this with RRHO or NASA thermo? Remember that Euken corrections us the Cp. It's possible that the NASA polynomials go negative if used well beyond the allowed temperature range...

BBArrosDias commented 3 years ago

Problem solved. I changed to RRHO, and now the thermal conductivity is positive. Thanks. So I guess the only issue now is the 3rd order sonine polynomials, which brings a lot of instability to the CFD code. I think we should use the 2nd order by default (for now); otherwise, others might have the same problem. What do you think?

jbscoggi commented 3 years ago

OK good! @capriatim, could you also confirm switching to RRHO works? In the future, we should clip the NASA polynomials in a better way to make sure this doesn't happen. Maybe someone can fill a separate issue for a feature request about that? Thanks.

capriatim commented 3 years ago

@jbscoggi unluckly not, but I think it is normal since my problem was on electrons them. cond and not on Eucken correction. Anyway decreasing to 2 the Sonine order worked. I forgot to say that I change electrons mw to 0.000548579903 in the elements.xml. I saw it has some influence, even if not solve my problem switching back to 0.00055.