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.

Question defining frequency as a parameter in RF module

Please login with a confirmed email address before reporting spam

Hi all,
I’m working on modeling the electric field of a gold nanowire under an incident electric field and I’m trying to set it up so I can change the frequency without having to manually change the dielectric constant in the materials section. I know the equation I have to use, but I’m having a bit of trouble actually getting it to work with the model.
The equation in question is ε=1-ωp2/ω(ω+iγ), with γ and ωp being constants that I have numbers for. What I’ve done is defined those two as parameters (currently under global definitions) and then further defined ω as another parameter with value 0. I then set a range for it in the “Step 1: Frequency Domain” node under Study 1 and also in “Parametric 1”. I put the equation as the value for the dielectric constant under its materials node.
The problem is that when I try to run it, I get either empty parameter errors or “undefined value found” errors with notes about large degrees of freedom giving NaN/Inf in the vector. I suspect that I’m only supposed to have ω defined one place, but I’m not sure how to do it and still have it work in the dielectric function I put in.
Basically, I’m having some trouble with defining parameters and how to use them in the model itself. Any help is appreciated.

4 Replies Last Post Mar 22, 2012, 3:39 a.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 18, 2012, 10:04 p.m. EDT
I'm not sure if I am reading you correctly. But your variable quantity omega = 2.0*pi*freq, right? Comsol's RF module, when in frequency domain mode, is already set up to do parametric sweeps in terms of frequency (freq). So why not just replace your omega variable with 2.0*pi*freq everywhere? It seems to me that that would solve all your issues in specifying omega as a parameter -- or am I missing something?
I'm not sure if I am reading you correctly. But your variable quantity omega = 2.0*pi*freq, right? Comsol's RF module, when in frequency domain mode, is already set up to do parametric sweeps in terms of frequency (freq). So why not just replace your omega variable with 2.0*pi*freq everywhere? It seems to me that that would solve all your issues in specifying omega as a parameter -- or am I missing something?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2012, 5:08 p.m. EDT
Mostly I'm just not sure where to define the freq parameter. It shows up under "Step 1: Frequency Domain", again in the Stationary Solver under Parametric 1, and I'm not sure whether I need to define it as a parameter separately under Global Definitions.
Mostly I'm just not sure where to define the freq parameter. It shows up under "Step 1: Frequency Domain", again in the Stationary Solver under Parametric 1, and I'm not sure whether I need to define it as a parameter separately under Global Definitions.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2012, 8:39 p.m. EDT
Define it only under "Step 1:.."
Define it only under "Step 1:.."

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 22, 2012, 3:39 a.m. EDT
Hi,

This is not a problem. You first define your parameter in Global definition with unit. And add parameter sweep in your type & give the sweep value. The important thing is that this parameter should be covered as a dependent variable of some function in model itself means this parameter should play a role. I have done it and got sensible results. If still it is not clear send me your file I will do thAT FOR YOU.

Cheers
DEepak
Hi, This is not a problem. You first define your parameter in Global definition with unit. And add parameter sweep in your type & give the sweep value. The important thing is that this parameter should be covered as a dependent variable of some function in model itself means this parameter should play a role. I have done it and got sensible results. If still it is not clear send me your file I will do thAT FOR YOU. Cheers DEepak

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.