-
Notifications
You must be signed in to change notification settings - Fork 30
Description
hi,
I was reading and trying the first example 'core_dual_numbers'
and got confused with some aspects:
(some of which apply to the example "core_user_defined_eos.ipynb as well")
see attachment notebook examples.zip
in the rev1 attachment i highlight some points of confusion
in the rev2 attachment i try to refactor the Helmholtz function of the EOS to S.I. and Reid/Poling/Prausnitz notation, and try to get the same results as before for the dimensionless results (a_kt)
main issues:
- results for a_kt of the pyfunc and a_kt of the "state.helmholtz_energy()/(KB300KELVIN)" method does not seem to match - what does that mean?
see values in the attachment
- the reference of the chemical potential, and its relation with fugacity coefficient is not clear for me,
also lnphi and lnphi_pure do not seem to match, what does that mean?
(in my opinion the chemical potential / lnphi is a very motivating application for autodiffing)
see values in the attachment
- i observed that the pyobject STATE, in the notebook body, contains quantities with units,
but the type of the object state that arrives at the Helmholtz function of the class is of the type "<class 'builtins.StateF'>"
and contains floats with implicit units - that also caused me some confusion when trying to take advantage of the units system inside the Helmholtz function, perhaps rename the argument of the "def helmholtz_energy(self, state):" to
"def helmholtz_energy(self, state_floats):" / warn in the docstring of the class in the example that the received object contains only floats and array of floats (mol fracs)
suggestions:
- the example represents a bulk system (no confinement), but the values used for the example are of few angstrom**3 and few molecules size
please see suggestion of macroscopic values
- the example uses values inside the helmholtz energy not in S.I., and with nonstandard notation for the a and a/(bt) or a/(brt) term
please see suggestion of my attempt at an eos reprogrammed in S.I. and with notation from reid/poling/prausnitz
where a has R**2 instead of R and helmholtz uses a term like a/(brt) instead of a/(bt)
thanks for your attention