Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

frequency-dependent material - with coupled physics

Please login with a confirmed email address before reporting spam

Hi,

In the RF module, I have two EMW physics (emw1, emw2) with user-defined frequencies, f1 and f2, which are fully coupled and solved simultaneously in the frequency domain. So for example, f1=1e14[Hz], f2=2e14[Hz], then emw1.freq=f1 and emw2.freq=f2.
I also define an analytic function for the relative permittivity dependent on frequency, epsr(fx), so epsr(emw1.freq) is not equal to epsr(emw2.freq).

I would like to define a new material, with the relative permittivity being "epsr(fx)". I would like fx, the input to epsr(), to be dependent on the current physics, i.e. the physics that's calling the material rather, as I have two.

One option for me would be to define the relative permittivity in the physics, overriding the material definition, by choosing Model->EMW1->Wave Equation->Electric Displacement Field->Relative permittivity and changing it from "From material" to "User defined", then defining it with my function, "epsr(f1)", and the same for EMW2 with "epsr(f2)". However, it seems intuitive that I should be able to go to the Model->Materials and in my material define the relative permittivity to be something like "epsr(activeemw.freq)" or in the essence of "epsr( if_being_called_from_emw1_then_emw1.f1, else if_being_called_from_emw2_then_emw2.f2 )".

Has anyone ever faced this problem?

Thanks

6 Replies Last Post 23 giu 2013, 04:56 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 nov 2012, 04:56 GMT-5
Hmm, according to my latest experiments with COMSOL, the option I mentioned (editing epsilonr through Model->EMW1->Wave Equation->Electric Displacement Field->Relative permittivity) is NOT identical to changing epsilonr in the material. So there is epsilonr of the material and epsilonr of the "Electric Displacement Field"? this is confusing. I thought there was only one definition for epsilonr in Maxwell's equations?

To my understanding, this means I must find the way to refer to the "currently active physics" in the material. Any suggestions?
Hmm, according to my latest experiments with COMSOL, the option I mentioned (editing epsilonr through Model->EMW1->Wave Equation->Electric Displacement Field->Relative permittivity) is NOT identical to changing epsilonr in the material. So there is epsilonr of the material and epsilonr of the "Electric Displacement Field"? this is confusing. I thought there was only one definition for epsilonr in Maxwell's equations? To my understanding, this means I must find the way to refer to the "currently active physics" in the material. Any suggestions?

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: 1 decade ago 8 nov 2012, 05:46 GMT-5
Hi

I find it also strange if you observe 2 distinct e_r's, I wonder if it could come from some mixing of other parameters with two identical physics.
In such cases I sometimes define my material parameters locally, under the physics, to be sure I know which one is used where, but so far I have not encountered your issue there.

When nothing else works you have "support" too that could help, as they are really the only ones knowing what is going on "under the hood ;)

--
Good luck
Ivar
Hi I find it also strange if you observe 2 distinct e_r's, I wonder if it could come from some mixing of other parameters with two identical physics. In such cases I sometimes define my material parameters locally, under the physics, to be sure I know which one is used where, but so far I have not encountered your issue there. When nothing else works you have "support" too that could help, as they are really the only ones knowing what is going on "under the hood ;) -- Good luck Ivar

Andrea Ferrario COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 nov 2012, 08:29 GMT-5
Hi Roy,

The set-up you described can be done in Comsol, but you must be careful in picking the right frequency.
I'll start from the beginning: I assume you have selected Equation Form: Frequency Domain and Frequency: User Defined in the Electromagnetic Waves physics nodes, since that is the only way you can solve two coupled physics with two different frequencies. In this case you have:
- a global variable freq, defined by the solver, containing the frequency you wrote in the solver.
- two global variables emw.freq and emw2.freq with the user-defined frequencies, different from each other and (potentially) from freq.

To create a material that can be applied to both physics and use the correct frequency, you need to use model inputs. Model inputs are physical quantities that a material can use as input for its functions, and are automatically matched to the context where the material is used. Practical instructions:
- Create a material in the Materials node and apply it to the domains.
- Go in the Basic subnode of the material. This contains all the material properties definitions.
- From the Output Properties list, select the properties you want to specify ("Relative permittivity" in your case), then press the plus button. They will be added to the table.
- From the Model Inputs list, select Frequency, and click plus. It will be added to the second table, with variable name "freq". Note that this "freq" has nothing to do with the global variable freq I discussed before, this is just a local variable that you can use in the expressions in this material node.
- In the first table, write an expression for epsilonr using freq (I guess "epsr(freq)" in your case).
- Last, go in each physics' Wave Equation feature, expand the Model Inputs section and check that the frequency used is taken from the equation form (it should say something like "Frequency (emw/EquationForm)" and "Frequency (emw2/EquationForm)" ).

What just happened is this: each Wave Equation required a material property (epsilonr) from the material. The material notified back the Wave Equation features that a model input "frequency" is necessary, and the most appropriate frequency was picked from the context, i.e. the one specified in the respective parent nodes.

At first this Model Input machinery might seem complex, but the idea is pretty simple and very flexible: choose the input physical quantity in the material, and the features will pick the best one from the context.

--
Andrea Ferrario
Electromagnetics Group
COMSOL AB
Hi Roy, The set-up you described can be done in Comsol, but you must be careful in picking the right frequency. I'll start from the beginning: I assume you have selected Equation Form: Frequency Domain and Frequency: User Defined in the Electromagnetic Waves physics nodes, since that is the only way you can solve two coupled physics with two different frequencies. In this case you have: - a global variable freq, defined by the solver, containing the frequency you wrote in the solver. - two global variables emw.freq and emw2.freq with the user-defined frequencies, different from each other and (potentially) from freq. To create a material that can be applied to both physics and use the correct frequency, you need to use model inputs. Model inputs are physical quantities that a material can use as input for its functions, and are automatically matched to the context where the material is used. Practical instructions: - Create a material in the Materials node and apply it to the domains. - Go in the Basic subnode of the material. This contains all the material properties definitions. - From the Output Properties list, select the properties you want to specify ("Relative permittivity" in your case), then press the plus button. They will be added to the table. - From the Model Inputs list, select Frequency, and click plus. It will be added to the second table, with variable name "freq". Note that this "freq" has nothing to do with the global variable freq I discussed before, this is just a local variable that you can use in the expressions in this material node. - In the first table, write an expression for epsilonr using freq (I guess "epsr(freq)" in your case). - Last, go in each physics' Wave Equation feature, expand the Model Inputs section and check that the frequency used is taken from the equation form (it should say something like "Frequency (emw/EquationForm)" and "Frequency (emw2/EquationForm)" ). What just happened is this: each Wave Equation required a material property (epsilonr) from the material. The material notified back the Wave Equation features that a model input "frequency" is necessary, and the most appropriate frequency was picked from the context, i.e. the one specified in the respective parent nodes. At first this Model Input machinery might seem complex, but the idea is pretty simple and very flexible: choose the input physical quantity in the material, and the features will pick the best one from the context. -- Andrea Ferrario Electromagnetics Group COMSOL AB

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 nov 2012, 08:58 GMT-5
Dear Andrea,

Thanks for the prompt reply. Your solution worked wonderfully!

Roy
Dear Andrea, Thanks for the prompt reply. Your solution worked wonderfully! Roy

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: 1 decade ago 8 nov 2012, 09:26 GMT-5
Takk Andrea

Learned someting too ;)

--
Haveing fun Comsoling
Ivar
Takk Andrea Learned someting too ;) -- Haveing fun Comsoling Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 giu 2013, 04:56 GMT-4

Hi Roy,

The set-up you described can be done in Comsol, but you must be careful in picking the right frequency.
I'll start from the beginning: I assume you have selected Equation Form: Frequency Domain and Frequency: User Defined in the Electromagnetic Waves physics nodes, since that is the only way you can solve two coupled physics with two different frequencies. In this case you have:
- a global variable freq, defined by the solver, containing the frequency you wrote in the solver.
- two global variables emw.freq and emw2.freq with the user-defined frequencies, different from each other and (potentially) from freq.

To create a material that can be applied to both physics and use the correct frequency, you need to use model inputs. Model inputs are physical quantities that a material can use as input for its functions, and are automatically matched to the context where the material is used. Practical instructions:
- Create a material in the Materials node and apply it to the domains.
- Go in the Basic subnode of the material. This contains all the material properties definitions.
- From the Output Properties list, select the properties you want to specify ("Relative permittivity" in your case), then press the plus button. They will be added to the table.
- From the Model Inputs list, select Frequency, and click plus. It will be added to the second table, with variable name "freq". Note that this "freq" has nothing to do with the global variable freq I discussed before, this is just a local variable that you can use in the expressions in this material node.
- In the first table, write an expression for epsilonr using freq (I guess "epsr(freq)" in your case).
- Last, go in each physics' Wave Equation feature, expand the Model Inputs section and check that the frequency used is taken from the equation form (it should say something like "Frequency (emw/EquationForm)" and "Frequency (emw2/EquationForm)" ).

What just happened is this: each Wave Equation required a material property (epsilonr) from the material. The material notified back the Wave Equation features that a model input "frequency" is necessary, and the most appropriate frequency was picked from the context, i.e. the one specified in the respective parent nodes.

At first this Model Input machinery might seem complex, but the idea is pretty simple and very flexible: choose the input physical quantity in the material, and the features will pick the best one from the context.

--
Andrea Ferrario
Electromagnetics Group
COMSOL AB

Hi
I am struggling with similar problem. I have a .dat file which contains three column.col 1 is for frequency col 2 is for epsilon_single prime and col 3 is for epsilon_double prime....
1)how can i assign col 1 as frequency variable in comsol?
2)how can i assign col 2 and col 3 as the input of complex permittivity in a material's permittivity parameter as (epsilon_prime-j*epsilon_double prime)
Thanks in advance.
Saimoom
[QUOTE] Hi Roy, The set-up you described can be done in Comsol, but you must be careful in picking the right frequency. I'll start from the beginning: I assume you have selected Equation Form: Frequency Domain and Frequency: User Defined in the Electromagnetic Waves physics nodes, since that is the only way you can solve two coupled physics with two different frequencies. In this case you have: - a global variable freq, defined by the solver, containing the frequency you wrote in the solver. - two global variables emw.freq and emw2.freq with the user-defined frequencies, different from each other and (potentially) from freq. To create a material that can be applied to both physics and use the correct frequency, you need to use model inputs. Model inputs are physical quantities that a material can use as input for its functions, and are automatically matched to the context where the material is used. Practical instructions: - Create a material in the Materials node and apply it to the domains. - Go in the Basic subnode of the material. This contains all the material properties definitions. - From the Output Properties list, select the properties you want to specify ("Relative permittivity" in your case), then press the plus button. They will be added to the table. - From the Model Inputs list, select Frequency, and click plus. It will be added to the second table, with variable name "freq". Note that this "freq" has nothing to do with the global variable freq I discussed before, this is just a local variable that you can use in the expressions in this material node. - In the first table, write an expression for epsilonr using freq (I guess "epsr(freq)" in your case). - Last, go in each physics' Wave Equation feature, expand the Model Inputs section and check that the frequency used is taken from the equation form (it should say something like "Frequency (emw/EquationForm)" and "Frequency (emw2/EquationForm)" ). What just happened is this: each Wave Equation required a material property (epsilonr) from the material. The material notified back the Wave Equation features that a model input "frequency" is necessary, and the most appropriate frequency was picked from the context, i.e. the one specified in the respective parent nodes. At first this Model Input machinery might seem complex, but the idea is pretty simple and very flexible: choose the input physical quantity in the material, and the features will pick the best one from the context. -- Andrea Ferrario Electromagnetics Group COMSOL AB [/QUOTE] Hi I am struggling with similar problem. I have a .dat file which contains three column.col 1 is for frequency col 2 is for epsilon_single prime and col 3 is for epsilon_double prime.... 1)how can i assign col 1 as frequency variable in comsol? 2)how can i assign col 2 and col 3 as the input of complex permittivity in a material's permittivity parameter as (epsilon_prime-j*epsilon_double prime) Thanks in advance. Saimoom

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.