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.

Mesh and dispersive material properties

Please login with a confirmed email address before reporting spam

I have a very simple test model of a cube of water with two PEC plates on each side and a TEM port defined on one of the remaining cube faces. The cube is surrounded by a layer of PML. I want to model the dispersive material response of water using a Debye model and simulate the wave propagation at any single frequency or range of frequencies between 100 and 800 MHz.

To do so, I followed the instructions and:

  1. Defined an analytic function "debye" that takes, among others, an argument "f" as frequency (added to the list of arguments for the function).

  2. Defined a blank material "water", added permittivity and conductivity as its properties.

  3. Plugged in the function "debye" for those properties using "freq" as frequency argument.

  4. I added frequency (freq) under the "basic > model input" tab of the material.

  5. In the "model input" tab of the "wave equation", I set frequency "from solver".

  6. In the only frequency domain step of the study, I set the frequency to 500 MHz.

  7. I set the mesh as "physics controlled" and its parameters "from study", then enable "resolve wave in lossy media".

The mesh should now be calculated automatically based on material properties and frequency. Yet, when I click on "build all", I get the following error:

Size cannot be defined automatically for this node. Unknown model parameter. Parameter: freq

All other settings are left on default and all domains are assigned.

What am I missing?



2 Replies Last Post 16 nov. 2021, 04:27 UTC−5

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 12 nov. 2021, 12:58 UTC−5
Updated: 3 years ago 12 nov. 2021, 12:58 UTC−5

Well, it seems I found a way after some struggle. Although a bit counterintuitive.

The reference says that standard Model Input(s) to a Material such as "Frequency" are automatically taken from the context (physics interface). In this case, I configured the physics interface to retrieve the frequency from the solver. But for some reason the information is not passed on. Even if I manually configure the mesh, the solver complains about "freq" not found when preparing the material matrix.

Apparently, one has to go to "Global Definitions > Default Model Inputs", then right click on "Frequency" and then "Create Model Input". Then, in "Component > Definitions > Shared Properties > Model Input", ones has to write "freq" in the field for frequency.

That one has to explicit "freq" does not seem to be the desired behavior (at least according to the reference). Shouldn't COMSOL already pick the value from the solver? Maybe a bug?

Best,

/Max

Well, it seems I found a way after some struggle. Although a bit counterintuitive. The reference says that standard Model Input(s) to a Material such as "Frequency" are automatically taken from the context (physics interface). In this case, I configured the physics interface to retrieve the frequency from the solver. But for some reason the information is not passed on. Even if I manually configure the mesh, the solver complains about "freq" not found when preparing the material matrix. Apparently, one has to go to "Global Definitions > Default Model Inputs", then right click on "Frequency" and then "Create Model Input". Then, in "Component > Definitions > Shared Properties > Model Input", ones has to write "freq" in the field for frequency. That one has to explicit "freq" does not seem to be the desired behavior (at least according to the reference). Shouldn't COMSOL already pick the value from the solver? Maybe a bug? Best, /Max

Ulf Olin COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 16 nov. 2021, 04:27 UTC−5

Dear Max,

As you experienced, the Physics-controlled mesh sequence type cannot handle arbitrary function definitions. However, functions similar to those in the Optics and RF material libraries, defined under the material property group with a single input parameter, can be parsed. Thus, in your case, you could move the function to appear below the Water>Basic property group and then only keep the frequency input argument. The other Debye model constants could be defined as parameters in a separate parameter group (just to separate them from any other parameters). Notice also that the checkbox May produce complex output for real arguments, found in the Advanced section for the function, should be checked.

I attach an updated version of your model.

Best regards,

Ulf Olin

Dear Max, As you experienced, the Physics-controlled mesh sequence type cannot handle arbitrary function definitions. However, functions similar to those in the Optics and RF material libraries, defined under the material property group with a single input parameter, can be parsed. Thus, in your case, you could move the function to appear below the Water>Basic property group and then only keep the frequency input argument. The other Debye model constants could be defined as parameters in a separate parameter group (just to separate them from any other parameters). Notice also that the checkbox May produce complex output for real arguments, found in the Advanced section for the function, should be checked. I attach an updated version of your model. Best regards, Ulf Olin

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.