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.

use result from a study to calculate a variable and use this as input for another physics module

Please login with a confirmed email address before reporting spam

Dear COMSOL users,

I'm a student and attempting a RF system in combination with a DC magnetic field.

First, I simulated the magnetic field of my model in COMSOL. Now in my next study (frequency domain, RF physics) I need to use the previously calculated magnetic field to calculate the permittivity matrix: I need to calculate the local cyclotronfrequency, which depends on the local magnetic field (mfnc.Bz).

Now my question is: How do I use my result from the local magnetic field study to calculate all local cyclotron frequency and use this as input for my permittivity matrix in the RF module?

Thanks in advance.

Kind regards, Rik


1 Reply Last Post 25.05.2019, 06:06 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 25.05.2019, 06:06 GMT-4

Hi Rik,

You should have a look at the documentation of the withsol operator, it is used in the following way:

withsol('sol_tag', expr)

This will evaluate expr using the results from the solution with tag sol_tag for the values of the dependent variables (such as mfnc.Bz in your case). If you start using parametric sweeps, you should look at the setval operators, among others, which helps you further select your solution source.

It is possible that you are not seeing the tag of your solution nodes. To make it visible, at the top of the model builder window click the little arrow on the right and tick the "Tag" checkbox.

Hi Rik, You should have a look at the documentation of the `withsol` operator, it is used in the following way: withsol('sol_tag', expr) This will evaluate `expr` using the results from the solution with tag `sol_tag` for the values of the dependent variables (such as `mfnc.Bz` in your case). If you start using parametric sweeps, you should look at the `setval` operators, among others, which helps you further select your solution source. It is possible that you are not seeing the tag of your solution nodes. To make it visible, at the top of the model builder window click the little arrow on the right and tick the "Tag" checkbox.

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.