Andreas Greuer

20 Reputation

One Badge

2 years, 39 days

MaplePrimes Activity


These are replies submitted by Andreas Greuer

Thank you for trying out with Maple 2017. As it works on your computer, it seems to be a version or configuration problem. 

If I run the sample with Maple 2019, the last command "fsolve" is not evaluated. Just compare the last line of my and your output.

I did edit the question to reduce the problem on this point.
 

restart; with(ThermophysicalData); with(ThermophysicalData[CoolProp]); fluid := "R717"; T__in := 310; p__in := 11*10^5; v__in := 10; A := 0.5e-2; h__in := Property(massspecificenthalpy, T = T__in, P = p__in, fluid); rho__in := Property(density, T = T__in, P = p__in, fluid); m := A*v__in*rho__in; p__out := 2*10^5; eq1 := h__out = Property("massspecificenthalpy", "temperature" = T__out, "P" = p__out, fluid); eq2 := rho__out = Property("D", "temperature" = T__out, "P" = p__out, fluid); eq3 := h__in+(1/2)*v__in^2 = h__out+(1/2)*v__out^2; eq4 := m = A*v__out*rho__out; res := fsolve({eq1, eq2, eq3, eq4})

[Chemicals, CoolProp, PHTChart, Property, PsychrometricChart, TemperatureEntropyChart]

 

[HAPropsSI, PhaseSI, Property, Props1SI, PropsSI]

 

"R717"

 

310

 

1100000

 

10

 

0.5e-2

 

1655590.94730295590

 

8.15132757401520713

 

.4075663787

 

200000

 

h__out = ThermophysicalData:-CoolProp:-Property("massspecificenthalpy", "temperature" = T__out, "P" = 200000, "R717")

 

rho__out = ThermophysicalData:-CoolProp:-Property("D", "temperature" = T__out, "P" = 200000, "R717")

 

1655640.947 = h__out+(1/2)*v__out^2

 

.4075663787 = 0.5e-2*v__out*rho__out

 

fsolve({.4075663787 = 0.5e-2*v__out*rho__out, 1655640.947 = h__out+(1/2)*v__out^2, h__out = ThermophysicalData:-CoolProp:-Property("massspecificenthalpy", "temperature" = T__out, "P" = 200000, "R717"), rho__out = ThermophysicalData:-CoolProp:-Property("D", "temperature" = T__out, "P" = 200000, "R717")}, {T__out, h__out, v__out, rho__out})

(1)

``


 

Download CoolProp_01.mw

 

I'm using UltraEdit. This editor allows to convert the file from ASCII to UTF8.

When I do this, it works in Maple 2017.

Independend from the mpl-file, Maple 2017 has difficulties to distinguish "ü" from "ü":

 

> h1:="hüstel";
                         h1 := "hüstel"
> length(h1);
                               7
> h2:=StringTools:-Substitute(h1, "ü","ü");
                      h2 := "
hüstel"
> length(h2);
                               11
> fd := fopen(terminal, WRITE):
> fprintf(fd,h1):
hüstel
> fprintf(fd,h2):
hüstel

 

While writing this comment, I found something strange:

If I copy the command with the result into this editor, I get the following:

h1:="hüstel";
                         h1 := "hstel"
If I copy only the result  into this editor, I get the following:

h1 := "hüstel"

 

 

 

 

Found a solution for this. If the special character is coded with HTML, it is read correct.

Example

test:=proc()
print("hüstel");
end proc:

I read the file with

> read("test.mpl");
> test()

"hüstel"

Page 1 of 1