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.

Passing material properties to other material properties

Please login with a confirmed email address before reporting spam

Hi All,

I was wondering if anyone knew the best way to pass a material property to another material property during a simulation.

In this case, I am using the refractive index as a 'flag' for a spatially dependent function, basically if n = 1, the point in the mesh has been activated and I'd like it to be left alone. If n = 0, it's fair game.

I have a 2d component (comp1) and a material (mat1).

No matter if I just use n, or root.comp1.mat1.n I get the yellow highlighting and the 'Unknown variable' message when I hover over the property.

I've attached a snip that shows the same issue with my refraction index function.

Also, if you know of a less hacky way to implement this I'd really appreciate hearing it.


2 Replies Last Post 27.01.2016, 15:35 GMT-5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.01.2016, 15:22 GMT-5
Hi

I would try not in the material node but in the physics node, and redirect the k vector to "User Defined" and do your equation modeling there.
I believe, but I'm not sure as I'm not from COMSOL ;) that there are some differences in the way COMSOL treats data in the physics node, versus referred data from a material.

But only someone from Support can really tell us *the way*

--
Good luck
Ivar
Hi I would try not in the material node but in the physics node, and redirect the k vector to "User Defined" and do your equation modeling there. I believe, but I'm not sure as I'm not from COMSOL ;) that there are some differences in the way COMSOL treats data in the physics node, versus referred data from a material. But only someone from Support can really tell us *the way* -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27.01.2016, 15:35 GMT-5
Thanks for the information. I'll give that a try and report back.
Thanks for the information. I'll give that a try and report back.

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.