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 enter Arrays

Please login with a confirmed email address before reporting spam

Hi,

I have a simulation where I have an anisotropic electrical conductivity for two different materials.
I was wondering how I go about entering the material properties.

For example, the conductivity is a 3x3 tensor, but I don't know the syntax/where to enter the component values.

For a single material I just enter the values from the equation view and it gives me a matrix where I type in the value in each location. But with two materials, I'm assuming I have to enter the 3x3 tensor in the material properties node. I only know how to type in a scalar.

Should I type it something like {s11,s12,13,s21,s22,s23,s31,s32,s33} where s11,s12,etc is the values I have? Or do I have to click on something to get the matrix view that I can fill in the components of?

2 Replies Last Post Jan 10, 2017, 8:28 a.m. EST
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 10, 2017, 2:36 a.m. EST
Hi,

Please see the attached screenshot. You click the 'table' icon in the Property Group settings to bring up the editor.

You can also type in the data using the syntax {11, 12, 22, 13, 23, 33}.

Regards,
Henrik
Hi, Please see the attached screenshot. You click the 'table' icon in the Property Group settings to bring up the editor. You can also type in the data using the syntax {11, 12, 22, 13, 23, 33}. Regards, Henrik


Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jan 10, 2017, 8:28 a.m. EST
That's where it is! I thank you very much. I just couldn't seem to find it for the life of me.

Thanks again!
That's where it is! I thank you very much. I just couldn't seem to find it for the life of me. Thanks again!

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.