Helmholtz free energy using MATLAB

63 views
Skip to first unread message

gabriel...@lepten.ufsc.br

unread,
May 25, 2016, 2:19:06 PM5/25/16
to coolprop-users
    Hi, I am currently using CoolProp in MATLAB to calculate helmholtz free energy, but I can't use the form G = alpha0 + alphar, because I get the following error:

>> CoolProp.PropsSI('alphar','T',t, 'P', p, 'Water')
Warning: This input [48: "alphar"] is not valid for keyed_output 
Error using CoolPropMATLAB_wrap
Fatal error.

Error in CoolProp.PropsSI (line 2)
  [varargout{1:max(1,nargout)}] = CoolPropMATLAB_wrap(313,varargin{:});

So I am calculating G = U - T*S, where S = S(T,P) and U = U(T,P) are calculated using CoolProp. For the derivatives of Helmholtz energy I just use the chain rule and CoolProp to calculate the U and S derivatives.

Is there something I can do to use the alpha0+alphar form?

Can I calculate the way I did?

Ian Bell

unread,
May 26, 2016, 8:55:50 AM5/26/16
to coolpro...@googlegroups.com

What version of CoolProp are you using?  I thought I had fixed this issue in v6.  Also we could export Helmholtz energy directly , so you would not need to do ideal plus residual sum.

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To post to this group, send email to coolpro...@googlegroups.com.
Visit this group at https://groups.google.com/group/coolprop-users.
For more options, visit https://groups.google.com/d/optout.

Ian Bell

unread,
Jun 5, 2016, 5:59:25 PM6/5/16
to coolprop-users
I added more access to Helmholtz energy here: https://github.com/CoolProp/CoolProp/issues/1086

alphar was definitely working in v6.  Again, what version of CoolProp are you using?

Best,
Ian


On Thursday, May 26, 2016 at 6:55:50 AM UTC-6, Ian Bell wrote:

What version of CoolProp are you using?  I thought I had fixed this issue in v6.  Also we could export Helmholtz energy directly , so you would not need to do ideal plus residual sum.

On May 25, 2016 7:19 PM, <gabriel...@lepten.ufsc.br> wrote:
    Hi, I am currently using CoolProp in MATLAB to calculate helmholtz free energy, but I can't use the form G = alpha0 + alphar, because I get the following error:

>> CoolProp.PropsSI('alphar','T',t, 'P', p, 'Water')
Warning: This input [48: "alphar"] is not valid for keyed_output 
Error using CoolPropMATLAB_wrap
Fatal error.

Error in CoolProp.PropsSI (line 2)
  [varargout{1:max(1,nargout)}] = CoolPropMATLAB_wrap(313,varargin{:});

So I am calculating G = U - T*S, where S = S(T,P) and U = U(T,P) are calculated using CoolProp. For the derivatives of Helmholtz energy I just use the chain rule and CoolProp to calculate the U and S derivatives.

Is there something I can do to use the alpha0+alphar form?

Can I calculate the way I did?

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-users+unsubscribe@googlegroups.com.
To post to this group, send email to coolprop-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages