Skip to content

Commit

Permalink
Merge pull request #127 from ESSS/release-v1.19.0
Browse files Browse the repository at this point in the history
Add units for the mass density derivative with respect to enthalpy
  • Loading branch information
caio-ramos authored Aug 10, 2023
2 parents adc07d7 + 2b38bf4 commit 5b8c2f0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
1.19.0 (2023-08-10)
-------------------

* Define the category and quantity type ``density derivative in respect to enthalpy``(default unit: ``kg2/m3.J``).

1.18.0 (2023-06-01)
-------------------

* Define the categories ``forchheimer linear productivity index`` and ``forchheimer linear productivity index``.
* Define the quantity types ``forchheimer linear productivity index`` and ``forchheimer quadratic productivity index``.
* Define categories ``forchheimer linear productivity index`` and ``forchheimer linear productivity index``.
* Define quantity types ``forchheimer linear productivity index`` and ``forchheimer quadratic productivity index``.
* Add units to categories ``forchheimer linear productivity index`` and ``forchheimer quadratic productivity index``.

1.17.0 (2023-05-02)
Expand Down
6 changes: 6 additions & 0 deletions src/barril/units/_tests/test_posc.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ def testDensityDerivativePerTemperatureUnitConversion() -> None:
assert density_derivative_per_temperature.GetValue("kg/m3.degC") == 1.0


def testDensityDerivativePerEnthalpyUnitConversion() -> None:
default = units.Scalar("density derivative in respect to enthalpy", 1, "kg2/m3.J")
assert default.value == 1.0
assert default.GetValue("kg2/m3.J") == 1.0


def testStandardVolumePerStandardVolumeSmoke() -> None:
standard_per_standard = units.Scalar(
"standard volume per standard volume", 1, "scm(15C)/scm(15C)"
Expand Down
11 changes: 11 additions & 0 deletions src/barril/units/posc.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ def FillUnitDatabaseWithPosc(
"kilogram per cubic meter degrees Celsius",
"kg/m3.degC",
)
db.AddUnitBase(
"density derivative in respect to enthalpy",
"square kilogram per cubic meter Joule",
"kg2/m3.J",
)
db.AddUnitBase("computer binary memory", "Byte", "Byte")
db.AddUnitBase("flow coefficient", "flow rate per pressure power of 0.5 ", "(m3/s)/(Pa^0.5)")
db.AddUnitBase("temperature per area", "degrees Celsius per square meter", "degC/m2")
Expand Down Expand Up @@ -15798,6 +15803,12 @@ def FillUnitDatabaseWithPosc(
override=override_categories,
valid_units=["kg/m3.degC", "kg/m3.K"],
)
db.AddCategory(
"density derivative in respect to enthalpy",
"density derivative in respect to enthalpy",
override=override_categories,
valid_units=["kg2/m3.J"],
)
db.AddCategory(
"computer binary memory",
"computer binary memory",
Expand Down

0 comments on commit 5b8c2f0

Please sign in to comment.