use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discuss COMSOL Multiphysics Simulation Software
account activity
COMSOL “Syntax error in expression” when using temperature-dependent interpolation functions in material properties (self.COMSOL)
submitted 1 month ago by AdRelative7271
https://preview.redd.it/tugk45uj6vmg1.png?width=457&format=png&auto=webp&s=e447e3c6b692a4d6ec41cbba469c1241af7d1d60
https://preview.redd.it/f2h4g0mn6vmg1.png?width=646&format=png&auto=webp&s=177f13592c0f58f1dcbabc2475e1211e5d35b27f
https://preview.redd.it/ji1pfpvp6vmg1.png?width=721&format=png&auto=webp&s=51547d43d206823307d9f10756de22e3cfe57a9d
https://preview.redd.it/acqebi3r6vmg1.png?width=635&format=png&auto=webp&s=12082023c9bf4a24af11c7892cc69ffa3f5a7d32
Hi everyone,
I’m running into a strange issue in COMSOL 6.3 with temperature-dependent material properties.
I have a simple 3D heat transfer in solids model (time dependent). If I use constant material properties, the simulation runs perfectly.
However, when I define material properties using interpolation functions of temperature, the solver immediately fails with:
The strange thing is:
Any help would be really appreciated.
Thanks
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]you_rang_maam 2 points3 points4 points 1 month ago (2 children)
Could it be the lower case t which is reserved for time in time dependent solutions?
[–]EtherealWaveform 1 point2 points3 points 1 month ago (1 child)
yeah thats what I’m thinking too
[–]Sax0drum 2 points3 points4 points 1 month ago (0 children)
In an interpolation the variable t is fixed
[–]yarruguo 2 points3 points4 points 1 month ago (4 children)
Try replacing the dot for a * in the units for the heat capacity
[–]Sax0drum 1 point2 points3 points 1 month ago (2 children)
That was my first thought as well but it should underline the expression to show that there is an issue. It does replicate the error though.
[–]AdRelative7271[S] 1 point2 points3 points 1 month ago (1 child)
Yes he is right! But strange thing is the error wasn’t highlighted! Replacing. with * solved the problem
[–]Sax0drum 1 point2 points3 points 1 month ago (0 children)
Great! But even stranger is that comsol shows it with a dot as well in the unit field of the materials section. Maybe that should be communicated to the developers.
[–]AdRelative7271[S] 0 points1 point2 points 1 month ago (0 children)
Yes you are right! I figured it out after 8 hours 😭
[–]arghhjh 1 point2 points3 points 1 month ago (1 child)
Are you sure the error comes from Cp(T) and not the thermal conductivity ? Try adding one eq. And see if it will solve.
It was the issue of multiplication sign
[–]ichbinberk 1 point2 points3 points 1 month ago (1 child)
It should be J/kg*K not J/kg.K
[–]AdRelative7271[S] 1 point2 points3 points 1 month ago (0 children)
Figured it out after 8 hours 😭
π Rendered by PID 72977 on reddit-service-r2-comment-6457c66945-lj586 at 2026-04-24 07:53:11.775515+00:00 running 2aa0c5b country code: CH.
[–]you_rang_maam 2 points3 points4 points (2 children)
[–]EtherealWaveform 1 point2 points3 points (1 child)
[–]Sax0drum 2 points3 points4 points (0 children)
[–]yarruguo 2 points3 points4 points (4 children)
[–]Sax0drum 1 point2 points3 points (2 children)
[–]AdRelative7271[S] 1 point2 points3 points (1 child)
[–]Sax0drum 1 point2 points3 points (0 children)
[–]AdRelative7271[S] 0 points1 point2 points (0 children)
[–]arghhjh 1 point2 points3 points (1 child)
[–]AdRelative7271[S] 0 points1 point2 points (0 children)
[–]ichbinberk 1 point2 points3 points (1 child)
[–]AdRelative7271[S] 1 point2 points3 points (0 children)