Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
How to set units for spreadsheet interpolation functions
Posted 2020年2月17日 GMT-5 08:36 General, Materials, Parameters, Variables, & Functions Version 5.4 1 Reply
Please login with a confirmed email address before reporting spam
Hi everyone,
I am using interpolation functions as part of my user-defined material of supercritical nitrous oxide.
- I created a single file containing all the necessary properties from REFPROP 9.1 like this:
%generated by refprop 9.1
%T(K) P(MPa) rho(kg/m^3) Cp(kJ/kg/K) Cp/Cv(1) k(mW/m/K) mu(uPa*s)
253.15 8 1023.00991952422 1.87478181419069 2.05862096967249 133.59295029882 123.111262318369
259.15 8 999.687331636415 1.91519420464732 2.10639877679575 127.442508528812 114.379782308368
265.15 8 975.107703547733 1.96439137197161 2.16285754923595 121.274960352074 106.229100271817
271.15 8 948.992870033893 2.02552466499771 2.23120949426288 115.078351346467 98.5329513547296
277.15 8 920.952036990524 2.10368706490453 2.31658227212712 108.836909650465 91.1699309861214
- I import it as spreadsheet in interpolation function node;
- I set the correct positioning of the interpolation functions:
rho_int
as position1
,Cp_int
as position2
, etc; - Interpolation is
linear
and extrapolation isconstant
as default setting; In units setting, I set arguments as
K, MPa
, but I cannot specify units for Function.I got error
Syntax error in expression. - Expression: kg/m^3, kJ/kg/K, 1, mW/m/K, uPa*s - Subexpression: , kJ/kg/K, - Position: 7 - Function: root.comp1.mat2.def.rho_int - Property: mquantitymatrix (Output properties)
when I set it as
1,1,1,1,1
orkg/m^3, kJ/kg/K, 1, mW/m/K, uPa*s
.I can only leave it blank or set it to
1
and use the functions as unitless, which means I have to setDensity
inBasic properties
asrho_int(T,pA)[kg/m^3]
rather thanrho_int(T,pA)
.
FYI, I am using: comsol version: 5.4 build 225 OS: windows 10, 64bit
Any idea? I do not know if it is possible to assign unit for each function in newest comsol. But I think it would be more straight forward to do that.
p.s. The attachment is the spreadsheet file I am using.
Attachments: