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

Avoid unit check warning in Dymola for IDEAS.Utilities.Psychrometrics.TWetBul_TDryBulPhi #1949

Open
kldjonge opened this issue Dec 20, 2024 · 0 comments

Comments

@kldjonge
Copy link
Contributor

kldjonge commented Dec 20, 2024

In Dymola a unit inconsitency is trown (warning) for IBPSA.Utilities.Psychrometrics.TWetBul_TDryBulPhi and IBPSA.Utilities.Psychrometrics.TWetBul_TDryBulXi . The inconsitency is because of the empirical correlation that uses atan() this adds radians as the units. When the block is often used, the multiple warnings cloud the translation log which is somewhat anoying.

It can be fixed by adding a constant unitconv 1 with a unit="1/rad" such that the updated model becomes:

protected 
  constant Real unitconv(unit="1/rad")=1 "constant 1 with unit K to avoid unit warning";

    TWetBul      = 273.15 + TDryBul_degC
       * Modelica.Math.atan(0.151977 * sqrt(rh_per + 8.313659))*unitconv
       + Modelica.Math.atan(TDryBul_degC + rh_per)*unitconv
       - Modelica.Math.atan(rh_per-1.676331)*unitconv
       + 0.00391838 * rh_per^(1.5) * Modelica.Math.atan( 0.023101 * rh_per)*unitconv  - 4.686035;
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