SharpFluids icon indicating copy to clipboard operation
SharpFluids copied to clipboard

R454B Run An Exception

Open JawadJaber opened this issue 2 years ago • 4 comments

Hello When I try get the properties of R454B, the following exception is shown and other properties such as critical temperatures and pressures are very high.

solver_rho_Tp was unable to find a solution for T= 448.369, p=6.31699e+07, with guess value 12028.2 with error: The molar density of -44003.133110 mol/m3 is below the minimum of 0.000000 mol/m3

Here is my code where above exception is raised

var fluid = FluidList.R454B_mix; Fluid test = new Fluid(fluid);

JawadJaber avatar May 21 '23 08:05 JawadJaber

I haven't really worked with mixtures myself, so that why this part of the interface is a bit buggy :-D

I believe I have fixed the error. Fell free to update to the newest nuget and try again.

Fluid Issue49 = new Fluid(FluidList.R454B_mix);

Issue49.SetFraction(0.5);

Pressure P49 = Pressure.FromBar(10);
Temperature T49 = Temperature.FromDegreesCelsius(50);

Issue49.UpdatePT(P49, T49);

MadsKirkFoged avatar May 22 '23 09:05 MadsKirkFoged

Now exception has gone, while the calculations are not yet complete. For example, critical temperature and pressure are zeros.

On the other hand, why you set the fraction as 0.5 what would be the purpose here?

JawadJaber avatar May 22 '23 11:05 JawadJaber

The 'FluidList.R454B_mix' is a mixture of two fluids and you can change fraction of the two. You might want to read up on this fluids in CoolProps docs or their github: https://github.com/CoolProp/CoolProp/issues/2222

The critical temperature and pressure does not work for mixtures

MadsKirkFoged avatar May 27 '23 09:05 MadsKirkFoged

All properties that are calculated are zeros. Not only critical temperature and pressure. If you look at the https://github.com/CoolProp/CoolProp/issues/2222#issuecomment-1470403158 The critical temperature is calculated there.

image

JawadJaber avatar May 29 '23 07:05 JawadJaber