Andreas Greuer

30 Reputation

3 Badges

7 years, 291 days

MaplePrimes Activity


These are replies submitted by Andreas Greuer

@Thomas Richard 

I installed 2021.1 update und tried again. Now it works correct.

@TechnicalSupport 

I just tried this example again on my computer (Windows 10, Maple 2021.0).
Now I get sometimes the error and sometimes not. Once the error disappeared it doesnt appear until I start Maple new.

I get the error, if I open Maple, press "new file" and paste the 2 lines.  (separately )

And

I do not get this error, if I press File->New->WorksheetMode

In the beginning for me, it looked like it depends on the way, how I create a new document.

But maybe it depends on the way how I paste the example.
Copy the 2 lines in an text editor:
with(Student:-Calculus1);
ShowSolution(Int(sin(x)^2, x));

And then copy each line separately into Maple

 

@acer 

No this posting is not from me.

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