mutationpp / Mutationpp

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

Segmentation fault for a mixture with multiple species #236

Closed localhost79 closed 10 months ago

localhost79 commented 10 months ago

Hello, first of all thank you very much for this incredible tool.

When trying to use the expression {gases with e-,C,H,N,O} to define the species and when I run checkmix, I get a "Segmentation fault" message and nothing else is shown. If I remove the H (hydrogen), the program runs without problems. I am assuming this has to do with the large number of gases, but I am not sure. Could you please help with this error ? (I followed all the instructions for the install and I use Ubuntu on Windows (WSL)).

Thank you.

Best regards,

grgbellasvki commented 10 months ago

Hello, Can you please share your input file here? I just checked and M++ works for NASA-9 with the expression above.

Thanks

localhost79 commented 10 months ago

Dear @grgbellasvki, thank you for your reply.

Here is the input file which gives Segmentation fault error.

`

{gases with e-,C,H,N,O} C:0.501, H:1.09, N:0.016, O:0.514 ` Thanks!
grgbellasvki commented 10 months ago

Can you try this input file instead:

<mixture mechanism="none" thermo_db="NASA-7">

<species>
    {gases with e-,C,H,N,O}
</species>

<element_compositions default="default">
    <composition name="default"> e-:0., C:0.501, H:1.09, N:0.016, O:0.514 </composition>
</element_compositions>

</mixture>
localhost79 commented 10 months ago

Thank you @grgbellasvki for your response. I tested your input file with this command mppequil -T 300 -P 101325 -m 0,1,3,9-12 casetest and it has been running for more than one hour without giving any result (no error though). I am using Ubuntu inside Windows (WSL). Any thoughts about this?

Thank you!

grgbellasvki commented 10 months ago

Please use NASA-9 for equilibrium calculations with all the gases.

Is checkmix working?

localhost79 commented 10 months ago

Thank you @grgbellasvki. Checkmix works fine with NASA-9, and this command mppequil -T 300:50:25000 -P 101325 -m 0,1,3,9-12 casetest works fine. However when trying to compute also mu and lambda (viscosity and conductivity), it gives the following error : M++ error: error parsing file. file: /home/localhost/Mutationpp/data/transport/collisions.xml line: 52 Could not find data necessary to load Q11_(C16H10,C16H10). Was trying to load a collision integral.

Do you know to what is this due?

Thank you very much for your help!

grgbellasvki commented 10 months ago

I will close the issue in a week, as it seems to be solved.

The error you are getting is because some of the collision integrals for the calculation of transport properties (e.g. viscosity) (e.g. C16H10-C16H10) are not available. For non-ionized mixtures, I strongly recommend you check this reference: https://doi.org/10.1063/5.0098060 as it practically includes all the neutral species in NASA-9.

An alternative would be to reduce your species set size.

localhost79 commented 10 months ago

Thank you for all your help @grgbellasvki !