Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in calculation of thermal conductivity for mixture gases #1187

Closed
modelica-trac-importer opened this issue Jan 14, 2017 · 2 comments
Closed
Assignees
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media
Milestone

Comments

@modelica-trac-importer
Copy link

Reported by bernath on 28 Jun 2013 10:06 UTC
Hello everybody,
the results of the calculation for thermal conductivity of mixture gases
("Modelica.Media.IdealGases.Common.MixtureGasNasa.thermalConductivity") is not correct.
I think the bug is, that the gas constant is not assigned in the function

lambdaX[i] :=SingleGasNasa.thermalConductivityEstimate(Cp=cp[i], eta=eta[i], method=method);

In function "Modelica.Media.IdealGases.Common.SingleGasNasa.thermalConductivityEstimate" the value "data.R" is always 0

lambda := if method == 1 then eta*(Cp - data.R + (9/4)*data.R) else eta*(Cp-data.R)*(1.32 + 1.77/((Cp/Modelica.Constants.R) - 1.0));

I've corrected the bug with an additional input "Rs" in "...MixtureGasNasa.thermalConductivity"

lambdaX[i] :=SingleGasNasa.thermalConductivityEstimate(Cp=cp[i], eta=eta[i],method=method,Rs=Modelica.Constants.R/fluidConstants![1].molarMass);

and in
"...SingleGasNasa.thermalConductivityEstimate"

lambda := if method == 1 then eta*(Cp - Rs + (9/4)*Rs) else (eta)*(1.32*Cp+0.45*Rs);

Maybe it is not the smartest solution, but now the calculation is correct.

Best regards
Michael Bernath
bernath@tum.de


Migrated-From: https://trac.modelica.org/Modelica/ticket/1187

@modelica-trac-importer modelica-trac-importer added bug Critical/severe issue L: Media Issue addresses Modelica.Media labels Jan 14, 2017
@modelica-trac-importer
Copy link
Author

Comment by hubertus on 28 Jun 2013 12:54 UTC
If my memory does not fail me this bug was fixed in trunk, but I have no time to verify this now.

@modelica-trac-importer
Copy link
Author

Comment by otter on 1 Jul 2013 12:11 UTC
I quickly checked by running on the trunk ModelicaTest.Media.TestOnly.DryAirNasa with DryAirNasa (a polynomial is used to determine thermal conductivity) and Modelica.Media.IdealGases.MixtureGases.CombustionAir (a mixture of N2 and O2; thermal conductivity is computed by SingleGasNasa.thermalConductivityEstimate. In both cases nearly the same thermal conductivity is computed.

To summarize, this bug was already fixed on trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Critical/severe issue L: Media Issue addresses Modelica.Media
Projects
None yet
Development

No branches or pull requests

2 participants