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

Update compressor_performance.py #1

Closed
wants to merge 2 commits into from

Conversation

Meydom
Copy link

@Meydom Meydom commented Jun 18, 2022

Hello Daniel,

I´ve tried your code and got several errors caused by the wrong order of magnitude for the molecular weight of air. By dividing it by 10^6 I get 0,02897 kg/mol and therefore the correct value for the specific gas constant R (287,05). Maybe the error is anywhere else on my computer (e.g. version compatibility) , but this was the only way to make it work.

Great thesis and thank you very much for publishing your work. Currently I´m writing my own master thesis and I´d like to use your code for mass estimations for the FC´s, if it´s possible. Somehow I got a weight of 275890 kg for the compressor, when I´m using your default values for the calculation. May I ask you, what did I do wrong?

Best regards
Dominic

@danieljuschus
Copy link
Owner

Hi Dominic, thanks for your comments! I haven't run this in a while, so I was still on version 2.0.12 of pyromat. After updating it to the latest (2.1.10), the error you describe appeared.

At the top, I tell pyromat to use only the base units, because I don't like working with kmol etc.:

pm.config["unit_energy"], pm.config["unit_molar"], pm.config["unit_pressure"] = "J", "mol", "Pa"

In the old version, this worked fine, because I was getting 0.0289 (kg/mol) from air.mw(). Now, I get 28964 (g/kmol?).

I have opened an issue in pyromat about this: chmarti1/PYroMat#39

Regarding this PR, could you please also add a comment after the line, to clarify why it's being divided by 1e6? Then as soon as pyromat's problem is fixed we can revert it again.

Regarding the high mass, perhaps this is another unit problem? What if you just run compressor_mass.py? You should get 19.99 kg. The compressor model is far from perfect, but it should give results that are in the right order of magnitude.

Yes, you're welcome to use my thesis as a reference. I have improved the model in many areas since handing it in, but I'm not allowed to share those unfortunately. We might publish a paper about them instead, but that might take a while.

@danieljuschus
Copy link
Owner

There is a new version (2.2.0) of Pyromat, where this has been fixed. Could you please check if it works for you?

@Meydom
Copy link
Author

Meydom commented Jul 20, 2022

They fixed the issue with the wrong order of magnitude of the molecular weight, but with Pyromat Version 2.2.0 and 2.2.1 I get a new error about the wrong range of temperature.
PEMFC_Juschus

@danieljuschus
Copy link
Owner

Sorry for the late reply. Seems like an error with pyromat, I've opened an issue for it: chmarti1/PYroMat#52.

@danieljuschus
Copy link
Owner

Fixed with 1c6de3d. Therefore I'm closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants