Fitting Experimental Data To SRK-Type Equation of State. Minimization

I’m trying to find parameters to fit an EoS to saturation pressures to different temperatures.

My experimental data are like this


Then I defined a function to calculate saturation pressures

psat[T_, p0_, Tc_, a0_, b_, c1_, E11r_, v11_] := (Do[    p[0] = p0;    f11 = Exp[-E11r/T] - 1;    m11 = v11*f11;    a = a0*(1 + c1*(1 - Sqrt[T/Tc]))^2;    \[Alpha] = p[i]*a/(R*T)^2; (* Dimensionless groups*)    \[Beta] = p[i]*b/R/T;    \[Gamma] = p[i]*m11/R/T;    d0 = -\[Gamma]*\[Beta]*(\[Beta] + \[Alpha]);(*Coefficients of the equation*)    d1 = \[Alpha]*(\[Gamma] - \[Beta]) - \[Beta]*\[Gamma]*(1 + \[Beta]);    d2 = \[Alpha] - \[Beta]*(1 + \[Beta]);    d3 = \[Gamma] - 1;    d4 = 1;    polin = d4*z^4 + d3*z^3 + d2*z^2 + d1*z + d0;    Raices = NSolve[polin == 0, z, PositiveReals]; (* Solving the 4th grade polinomy for compressibility factor*)    zv = Max[z /. Raices];    zl = Min[z /. Raices];    vv = zv*R*T/p[i];    vl = zl*R*T/p[i];    ln\[CapitalPhi]v =      zv - 1 - Log[zv] + Log[vv/(vv - b)] + a/b/R/T*Log[vv/(vv + b)] +       Log[vv/(vv + m11)]; (*Fugacity coefficients*)    ln\[CapitalPhi]l =      zl - 1 - Log[zl] + Log[vl/(vl - b)] + a/b/R/T*Log[vl/(vl + b)] +       Log[vl/(vl + m11)];    \[CapitalPhi]v = Exp[ln\[CapitalPhi]v];    \[CapitalPhi]l = Exp[ln\[CapitalPhi]l];    p[i + 1] = p[i]*\[CapitalPhi]l/\[CapitalPhi]v,    {i, 0, 9}];   p[9])  

Where T is the temperature, p0 is the initial guess for pressure, Tc is the critical temperature and a0, b, c1, E11r, v11 are the equation’s parameters.

Up to this point, we have a saturation pressure calculator, given the parameters, and it works just fine, now the thing that I can’t seem to solve is fitting it to my experimental data, by minimizing an objective function, which is:

enter image description here

I declared it like this:

F[a0_, b_, c1_, E11r_, v11_] :=   Sum[(psat[psatx[[k, 1]], psatx[[k, 2]], Tcaceto, a0, b, c1, E11r,        v11] - psatx[[k, 2]])^2/psatx[[k, 3]]^2, {k, 200}]; (* I declared the Tc as "Tcaceto", a constant, and I use as initial guess for each psat calculation the experimental pressure*) 

And then I just used NMinimize, in this way.

NMinimize[F[a0, b, c1, E11r, v11], {a0, b, c1, E11r, v11}] 

I run it, and it just never finishes. I don’t know what could be the thing that doesn’t work, I’ve tried setting the method, starting points, but the result is the same. I would really apreciate if someone helped me in this matter. Thanks.

Experimental design, ” how chatbots can impact on a user’s experience”, is better to use Within subjects or between subjects?

I have to do an experimental design “about how chatbots can impact on a user’s experience when using public transport websites to book journeys”. I am not really sure what type of experimental design to choose, would go for Within subjects or between subjects ?



How to opt-out of a specific experimental feature by Google

Recently, I apparently got entered into an experimental new layout of Google Images. The layout I now get for images can be seen below:

enter image description here

As you can see, the entire image preview is not much bigger than the original thumbnail, because the whole preview banner is shoved to the side of the images. I really dislike this new layout, because it basically forces me if I want to enlarge the image to do it by opening it in a new tab (which is an extra right click and ‘open image’ press). This is way more effort than browsing through images by simply clicking the thumbnail once, or even using arrow keys to navigate through.

I’d love to turn off this experimental feature. Is there an account setting I can change to opt-out of this feature? Or if not, is it possible to opt-out of experimental features whatsoever?

Before you ask, yes I just sent a feedback report to Google, but I’m not sure what they might do with it or if it’s even possible for the support staff to disable this feature for me.