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.

Plotting the real x component of magnetic field against time

Please login with a confirmed email address before reporting spam

I am working on an cavity resonator and would like to seperately plot the x and y components of the magnetic field against time. I have tried to work with 1d line graphs but the plot will either come up with an error or blank. I have even tried putting the data in a table then graphing it in excel but found that to be the complex number not real.

Any help would be greatly appreciated


5 Replies Last Post 02.07.2021, 13:46 GMT-4
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 01.07.2021, 14:04 GMT-4
Updated: 3 years ago 01.07.2021, 14:09 GMT-4
  1. Is this a time-domain or frequency-domain model? In a time-domain model, the fields are generally real-valued. In a frequency-domain model, they are complex (to conveniently handle phase) but then you wouldn't normally be plotting fields "against time." Thus, your question is puzzling.
  2. I encourage you to post your .mph file to the forum so that others can examine it and offer their suggestions.
-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
1. Is this a *time-domain* or *frequency-domain* model? In a time-domain model, the fields are generally real-valued. In a frequency-domain model, they are complex (to conveniently handle phase) but then you wouldn't normally be plotting fields "against time." Thus, your question is puzzling. 2. I encourage you to post your .mph file to the forum so that others can examine it and offer their suggestions.

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 01.07.2021, 16:04 GMT-4

the model is time dependent, we wish to extract the field components Hx and Hy and plot them as a function of time.

I have attached the file below

the model is time dependent, we wish to extract the field components Hx and Hy and plot them as a function of time. I have attached the file below


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 01.07.2021, 23:18 GMT-4

Adam, you attached the .lock file. That is a tiny file that appears in your directory when your .mph file is open. It doesn't contain the model. Ideally, you should close the model file, then attach the .mph file. :)

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Adam, you attached the .lock file. That is a tiny file that appears in your directory when your .mph file is open. It doesn't contain the model. Ideally, you should close the model file, *then* attach the .mph file. :)

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 02.07.2021, 06:08 GMT-4

That should be it below

That should be it below


Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 3 years ago 02.07.2021, 13:46 GMT-4
Updated: 3 years ago 02.07.2021, 13:48 GMT-4

Your model, at least as you posted it, doesn't have a mesh. And... by saying that, I don't mean that it was simply cleared by choosing "Clear All Meshes." Rather, you don't seem to have specified the mesh at all! Finite element models need meshes. Interestingly, it still executes (sort of) but immediately produces a warning that says "No mesh on domain 1 in the geometry with tag geom1. This may lead to incorrect results." Well, that's putting it rather mildly. So... I encourage you to mesh your problem space properly. Then, you can move on to dealing with some of the other possible problems with the way you've defined your model. But first things first.

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
Your model, at least as you posted it, *doesn't have a mesh*. And... by saying that, I don't mean that it was simply *cleared* by choosing "Clear All Meshes." Rather, you don't seem to have *specified* the mesh at all! *Finite element models need meshes*. Interestingly, it still executes (sort of) but immediately produces a warning that says "No mesh on domain 1 in the geometry with tag geom1. This may lead to incorrect results." Well, that's putting it rather mildly. So... I encourage you to mesh your problem space properly. Then, you can move on to dealing with some of the other possible problems with the way you've defined your model. But first things first.

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.