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.

"Compile equations" not using the correct physics

Please login with a confirmed email address before reporting spam

Hi,

In my model, I use 3 physics: "Electric currents", and twice "Electric circuit".

I want to couple a lumped resistance to my FEM model, which acts as electric generator. But first, I want to compute the internal resistance of my FEM model, to be able to match the lumped resistance to achieve impedance matching.

In my model tree, I have:
1) - Electric currents
2) - Electric circuit #1 (lumped resistance to act as load for the FEM electric generator)
3) - Electric circuit #2 (current source to compute internal resistance of FEM electric generator)

In the "Electric currents" physics, I defined a terminal to a circuit.
Both "Electric circuit" physics use this terminal, once connected to a resistor, and once to a current source.

In my study steps, I define first a stationary step, where only physics 1 and 3 are selected. I then have a second study step where only physics 1 and 2 are selected. In my first study step, although I deactivated physics 2 ("Use in this study" option unchecked), the "Compile equations" node keeps using the variables of the physics 2 to define the boundary conditions of the terminal node in the "Electric currents physics". So I am unable to compute what I want, because the "Compile equations" connects the wrong physics (i.e. physics 1&2 instead of 1&3).

Any clue how I can overcome this issue?

Thanks a lot.

Alois Pfenniger

1 Reply Last Post May 16, 2011, 11:07 a.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 16, 2011, 11:07 a.m. EDT
Hi,

I built a simple example to show what the problem is.

If you run the attached file as it is, you get the expected result (a nice potential distribution as consequence of the current source applied to the FEM part). But if you enable the second physics, and run the study again, you will not get the expected result (although the second physics is not enabled in the solver). If you look at the equation which is generated for the terminal in the "Electric currents" physics, you will see that it has now taken the value of the circuit #1, although this physics is not activated in the solver. It seems that the terminal in the "Electric currents" physics is connected to the first available circuit in the model tree, regardless whether this circuit is actually used or not in the solver.

Suggestions?

Thanks. Alois
Hi, I built a simple example to show what the problem is. If you run the attached file as it is, you get the expected result (a nice potential distribution as consequence of the current source applied to the FEM part). But if you enable the second physics, and run the study again, you will not get the expected result (although the second physics is not enabled in the solver). If you look at the equation which is generated for the terminal in the "Electric currents" physics, you will see that it has now taken the value of the circuit #1, although this physics is not activated in the solver. It seems that the terminal in the "Electric currents" physics is connected to the first available circuit in the model tree, regardless whether this circuit is actually used or not in the solver. Suggestions? Thanks. Alois

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.