Errors with Piecewise Function

Please login with a confirmed email address before reporting spam

Hello,

I'm testing incorporating variable material properties into my model with a piecewise function but am getting errors when I try to run it. Is this the correct syntax? When changing the material property to the function argument it goes yellow.

Here are images of my view from a specific heat function.

Thank you. Jocelyn



1 Reply Last Post 9 mars 2025, 05:11 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 5 days ago 9 mars 2025, 05:11 UTC−4
Updated: 5 days ago 9 mars 2025, 05:19 UTC−4

If you hover over the orange colored (which indicates problem) text, maybe an error text pops up.

I think you can't use T there as used. The used function argument name T only exist inside your piecewise function. From outside you must use a constant or a variable, which exists outside.

Or Cp as variable name and Cp also as function name is a problem.

Nice greetings

If you hover over the orange colored (which indicates problem) text, maybe an error text pops up. I think you can't use T there as used. The used function argument name T only exist inside your piecewise function. From outside you must use a constant or a variable, which exists outside. Or Cp as variable name and Cp also as function name is a problem. Nice greetings

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.