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.

Property functions

Please login with a confirmed email address before reporting spam

Hi,

I'm simulating a heat transfer that occurs in a material that goes through a phase change, so I need to change several boundary setting when this happens.

I probably have to to use the IF statement but not sure exactly how.
My simulation is from 900C down to 700C.
From 900C to 800C I have a function for each of these properties (all time dependent);
Thermal conductivity: f1(T)
Density: f2(T)
Heat Capacity: f3(T)
From 800 down to 700C I have 3 other functions for the above properties;
Thermal conductivity: f4(T)
Density: f5(T)
Heat Capacity: f6(T)

Is there a way to write both of these function in the property field with an IF syntax?
For example the density;
IF T>=800 f2(T)
IF T<800 f5(T)

Or do you use ELSE together with IF?

Thank you,




2 Replies Last Post 2016年10月14日 GMT-4 05:17

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年10月12日 GMT-4 08:11

Hi,

I'm simulating a heat transfer that occurs in a material that goes through a phase change, so I need to change several boundary setting when this happens.

I probably have to to use the IF statement but not sure exactly how.
My simulation is from 900C down to 700C.
From 900C to 800C I have a function for each of these properties (all time dependent);
Thermal conductivity: f1(T)
Density: f2(T)
Heat Capacity: f3(T)
From 800 down to 700C I have 3 other functions for the above properties;
Thermal conductivity: f4(T)
Density: f5(T)
Heat Capacity: f6(T)

Is there a way to write both of these function in the property field with an IF syntax?
For example the density;
IF T>=800 f2(T)
IF T<800 f5(T)

Or do you use ELSE together with IF?

Thank you,


if(T>=800[degC],f2(T),f5(T))

Case sensitive.
[QUOTE] Hi, I'm simulating a heat transfer that occurs in a material that goes through a phase change, so I need to change several boundary setting when this happens. I probably have to to use the IF statement but not sure exactly how. My simulation is from 900C down to 700C. From 900C to 800C I have a function for each of these properties (all time dependent); Thermal conductivity: f1(T) Density: f2(T) Heat Capacity: f3(T) From 800 down to 700C I have 3 other functions for the above properties; Thermal conductivity: f4(T) Density: f5(T) Heat Capacity: f6(T) Is there a way to write both of these function in the property field with an IF syntax? For example the density; IF T>=800 f2(T) IF T=800[degC],f2(T),f5(T)) Case sensitive.

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年10月14日 GMT-4 05:17
Thank you for the reply, it works.
Thank you for the reply, it works.

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.