Announcing UnitfulMoles.jl!
UnitfulMoles.jl allows you to use and define specific molar quantities in your equations. Instead of using u"mol/mol"
and similar, you can use u"molCO2/molH20"
. You can also do conversion to mass automatically for all the standard elements, and for compounds you define with @compound
.
julia> 3u"mmolFe" / 10u"molC"
0.3 mmolFe molC⁻¹
julia> @compound CH₄
molCH₄
julia> 1molCH₄ |> u"g"
16.043 g
You can also define custom mol types with @mol
, and fractional moles like Cmol with @xmol
. Again mass conversion and mol/cmol conversion just work.
I wrote this package a few years ago and didn’t do anything with it, so many thanks go to @briochemc for getting it ready to publish, and doing great work setting up subscript numbering, which looks very slick!
Anyway, check it out, hopefully someone finds it useful.
Next weeks ANN: GeoData.jl