Linus Andersson
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
23 juin 2016, 04:26 UTC−4
Hi Steven,
A simple way to give the components control over the local properties in a global material is to have them define these same properties with a global scope. I am attaching a dummy example with a global material whose density depends on the temperature, "T". In Component 1, I have set up a variable called root.T, with the value 300[K]. In Component 2, I am instead defining root.T as the dependent variable T. The result is a density which in Component 1 evaluates to a constant and in Component 2 follows the temperature distribution.
I hope this helps! If not, please contact support with a model demonstrating the issue, and I or one of my colleagues will be happy to look at it.
Linus
Hi Steven,
A simple way to give the components control over the local properties in a global material is to have them define these same properties with a global scope. I am attaching a dummy example with a global material whose density depends on the temperature, "T". In Component 1, I have set up a variable called root.T, with the value 300[K]. In Component 2, I am instead defining root.T as the dependent variable T. The result is a density which in Component 1 evaluates to a constant and in Component 2 follows the temperature distribution.
I hope this helps! If not, please contact support with a model demonstrating the issue, and I or one of my colleagues will be happy to look at it.
Linus
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
23 juin 2016, 11:39 UTC−4
Linus,
This is exactly what I needed. I was not aware that I could define a globally-scoped variable at the component level, and that is what is needed to make this work.
If this issue is brought up by others, perhaps an article on the COMSOL blog might be a good idea.
Steve
--
Steven Conrad, MD PhD
LSU Health
Linus,
This is exactly what I needed. I was not aware that I could define a globally-scoped variable at the component level, and that is what is needed to make this work.
If this issue is brought up by others, perhaps an article on the COMSOL blog might be a good idea.
Steve
--
Steven Conrad, MD PhD
LSU Health
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
24 juin 2016, 00:43 UTC−4
Linus,
I ran into a snag. When my two components are of different dimensions (one is axisymmetric and the other is 3D), then I get an error about duplicate variable names. I think this is likely due to the fact that I had to include the 3D physics under the 3D component as well as including the 2D axi physics under the 2D axisymmetric component.
I noticed in your example that you had the Heat Transfer physics defined only once in one of the components, but your components were of the same dimension.
Any thoughts?
--
Steven Conrad, MD PhD
LSU Health
Linus,
I ran into a snag. When my two components are of different dimensions (one is axisymmetric and the other is 3D), then I get an error about duplicate variable names. I think this is likely due to the fact that I had to include the 3D physics under the 3D component as well as including the 2D axi physics under the 2D axisymmetric component.
I noticed in your example that you had the Heat Transfer physics defined only once in one of the components, but your components were of the same dimension.
Any thoughts?
--
Steven Conrad, MD PhD
LSU Health
Daniel Smith
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
24 juin 2016, 09:54 UTC−4
Hi Steve, when you defined root.T under Definitions>Variables, what was the "Geometric entity level" set to? If this is set to "Entire model", then you will get the error you reported. If it is set to "Domain>All Domains" then it should work.
Dan
Hi Steve, when you defined root.T under Definitions>Variables, what was the "Geometric entity level" set to? If this is set to "Entire model", then you will get the error you reported. If it is set to "Domain>All Domains" then it should work.
Dan
Please login with a confirmed email address before reporting spam
Posted:
8 years ago
6 juil. 2016, 23:53 UTC−4
Thanks, Dan & Linus
Thanks, this appears to be working. If any further problems develop, I'll repost.
--
Steven Conrad, MD PhD
LSU Health
Thanks, Dan & Linus
Thanks, this appears to be working. If any further problems develop, I'll repost.
--
Steven Conrad, MD PhD
LSU Health