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

Ideal gas check #175

Open
RaphaelGebhart opened this issue Mar 15, 2024 · 0 comments
Open

Ideal gas check #175

RaphaelGebhart opened this issue Mar 15, 2024 · 0 comments

Comments

@RaphaelGebhart
Copy link
Contributor

ThermofluidStream.Processes.Compressor, ThermofluidStream.Processes.Fan and ThermofluidStream.Processes.Turbine checks if ideal gas law is applicable using:

Real R_in(unit="J/(kg.K)") = p_in/Medium.temperature(inlet.state)/Medium.density(inlet.state);
Real R_out(unit="J/(kg.K)") = p_out/Medium.temperature(outlet.state)/Medium.density(outlet.state);

equation
  // test for ideal gas
  assert(abs(R_in- R_in)/R_in < max_rel_R, "Medium in compressor is assumed to be ideal gas, but check failed", dropOfCommons.assertionLevel);
  1. It should probably be abs(R_out- R_in)/R_in < max_rel_R instead of abs(R_in- R_in)/R_in < max_rel_R
  2. We should rather base that check on compressibility factor, i.e. something like
Z_in = (p*v/(R*T))_in;
Z_out = (p*v/(R*T))_out;
assert(abs(Z_in-1) < error_IdealGas_max);
assert(abs(Z_out-1) < error_IdealGas_max);
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

No branches or pull requests

1 participant