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.

Electrical Circuit and Comsoll

Please login with a confirmed email address before reporting spam

Dear memebers

I Work with Comsol 4.3 ACDC. I know now how to import a SPICE Netlist to Comsol.But I still have a problem.


I followed the exmaple in ACDC modul called "inductor in a Circuit". So to be able to place the Comsoll Modell to the electrical Circuit you/I have to define it like this " I copied it from the inductor in circuit exmaple"



X1 4 5 inductor
.SUBCKT inductor V_coil I_coil COMSOL: *
.ENDS


-So X1 should be my Comsoll Modell What ist Inductor it is the name of the modell ??? cause the modell is called inductor_in_circuit

-The SUBCIRCUIT defeines <file name>|<physics_interface_name>|*

So what is <physics_interface_name> ..V_coil I_coil and where and how can I declare them in my Modell


I would be really thankfull if any one can give me some tipps esc.


Thanks and greetigs from Germany


13 Replies Last Post 26.03.2013, 07:44 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.03.2013, 08:49 GMT-4
Hi Ahmed,

i've got the same problem.

"The special implementation used here defines a subcircuit that
really is a COMSOL Multiphysics model, referenced with the option
COMSOL: <file name>|<physics_interface_name>|*. The asterisk means that
COMSOL Multiphysics looks for the first occurrence of the specified parameters
V_coiland I_coilin the current model. These parameters are the variables that link
the model with the circuits, and must be defined in the model in a certain way. The
variable V_coilmust give the voltage over the device, defined in the global scope.
I_coilmust be a global variable used in the model as a current through the device."

I read this more than 10 times but i also cannnot find V_coil, I_coil, nor have I understood the syntax

<file name>|<physics_interface_name>|*.

So did you find something yet ?


Also greetings from germany

Marius
Hi Ahmed, i've got the same problem. "The special implementation used here defines a subcircuit that really is a COMSOL Multiphysics model, referenced with the option COMSOL: ||*. The asterisk means that COMSOL Multiphysics looks for the first occurrence of the specified parameters V_coiland I_coilin the current model. These parameters are the variables that link the model with the circuits, and must be defined in the model in a certain way. The variable V_coilmust give the voltage over the device, defined in the global scope. I_coilmust be a global variable used in the model as a current through the device." I read this more than 10 times but i also cannnot find V_coil, I_coil, nor have I understood the syntax ||*. So did you find something yet ? Also greetings from germany Marius

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.03.2013, 09:06 GMT-4
Dear Marius.


I think its better to ignore the Circuit_example they really documented it in a bad way a

So after importing your circuit. and integrating it to your comsol modell you should look in under your component list foe the electrical componenets ann click on external I vs U and then electrical potenial take care not to choose used defined then you will have this strange V_coil if you declared it in your netlist.. choose another optin depends to your modell esc ...Tell me if it worekd.


Greetings from Germany !
Dear Marius. I think its better to ignore the Circuit_example they really documented it in a bad way a So after importing your circuit. and integrating it to your comsol modell you should look in under your component list foe the electrical componenets ann click on external I vs U and then electrical potenial take care not to choose used defined then you will have this strange V_coil if you declared it in your netlist.. choose another optin depends to your modell esc ...Tell me if it worekd. Greetings from Germany !

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.03.2013, 09:27 GMT-4
Thanks Ahmed,

i will try it and i will post, if it worked.

Viele Grüße

Marius
Thanks Ahmed, i will try it and i will post, if it worked. Viele Grüße Marius

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.03.2013, 09:35 GMT-4
Hello Marius

If you do the same with the comsol example. You will see when you click on V_coil " same steps like I wrote before" that comsol says V coil ist not a defined parameter ....strange ... this is why I said dont count on this example ;)


Hello Marius If you do the same with the comsol example. You will see when you click on V_coil " same steps like I wrote before" that comsol says V coil ist not a defined parameter ....strange ... this is why I said dont count on this example ;)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.03.2013, 12:58 GMT-4
Hi Ahmed,

thanks for your advise.
I've now managed it to connect a simple Comsol model of two condensator plates to a ciruit in SPICE. I simply replaced the
"V_coil I_coil" with "a b". And with this I got two external-I-Terminals in my Circuit in Comsol. The next step was to connect them with the Terminals in the model and i could do a time dependent study.

But now I'm wondering how to run a frequency domain study with a connected SPICE-Circuit.

There are 4 Voltage sources in the Comsol circuit: sine, DC, pulse and AC.
But how can I make Comsol perform the frequency domain analysis using a source in the Circuit ?

Is there some way to roote the input voltages of the FD analysis to the circuit?
Hi Ahmed, thanks for your advise. I've now managed it to connect a simple Comsol model of two condensator plates to a ciruit in SPICE. I simply replaced the "V_coil I_coil" with "a b". And with this I got two external-I-Terminals in my Circuit in Comsol. The next step was to connect them with the Terminals in the model and i could do a time dependent study. But now I'm wondering how to run a frequency domain study with a connected SPICE-Circuit. There are 4 Voltage sources in the Comsol circuit: sine, DC, pulse and AC. But how can I make Comsol perform the frequency domain analysis using a source in the Circuit ? Is there some way to roote the input voltages of the FD analysis to the circuit?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.03.2013, 13:35 GMT-4


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.03.2013, 14:26 GMT-4
Hi Ahmed,

I'm not at work anymore. So I don't have acces to the model. Tomorrow morning I will sent it.

Ich wünsche noch n schönen Abend ;)

Viele Grüße

Marius
Hi Ahmed, I'm not at work anymore. So I don't have acces to the model. Tomorrow morning I will sent it. Ich wünsche noch n schönen Abend ;) Viele Grüße Marius

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.03.2013, 04:38 GMT-4
Hi

here is my modell. It is a simple resonating circuit consiting of a voltage source, inductor, capacitor and a resistance. They all are connected in series.
The capacitor is a model in 2D in Comsol 4.3.

The attached model contains a study which performs a time dependend analysis.

My attempt is to do a frequency domain analysis with the EMF physics.

I also attached the netlist. Because *.cir is not allowed in attachments I renamed it in

netlist.mph

Thank your for your help


Marius
Hi here is my modell. It is a simple resonating circuit consiting of a voltage source, inductor, capacitor and a resistance. They all are connected in series. The capacitor is a model in 2D in Comsol 4.3. The attached model contains a study which performs a time dependend analysis. My attempt is to do a frequency domain analysis with the EMF physics. I also attached the netlist. Because *.cir is not allowed in attachments I renamed it in netlist.mph Thank your for your help Marius


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.03.2013, 05:04 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.03.2013, 03:43 GMT-4
Hi Ahmed,

sorry, i couldn't answer yesterday.

I created the circuit with LT-Spice and exported the the netlist. I attach both files. The draft-File is the circuit in LT-Spice.
Hi Ahmed, sorry, i couldn't answer yesterday. I created the circuit with LT-Spice and exported the the netlist. I attach both files. The draft-File is the circuit in LT-Spice.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.03.2013, 06:08 GMT-4
Hi Marius


So I see that you followed my advices for I_coil an dV_Coil to be able to integrate the Electrical circuit. It looks good and im at the same level now...

I also have the same problem I want to have AC (FD) Source and sin (time dependend) but I dont know how

I attached to sorces to comsol AC and Sin the same nood .... it didnt help... I think this is laos your problem or ??


Please let me know if you have any progress or a new idea


greetings



Hi Marius So I see that you followed my advices for I_coil an dV_Coil to be able to integrate the Electrical circuit. It looks good and im at the same level now... I also have the same problem I want to have AC (FD) Source and sin (time dependend) but I dont know how I attached to sorces to comsol AC and Sin the same nood .... it didnt help... I think this is laos your problem or ?? Please let me know if you have any progress or a new idea greetings

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.03.2013, 06:39 GMT-4
Hi Ahmed,

yes, that's the problem. I now believe, that It is not possible to place the source for the FD-Analysis into the circuit.

The usual way to do a FD-Analysis in Comsol is to build two Terminals in the model where current or voltage for the analysis is applied.

So I'm thinking of setting the voltage source in the circuit to zero volts and applying a current into the capacitor in the model. Maybe one can "mesure" the voltage at the nodes of the zero voltage source in the circuit.

I'm already trying this, but now im having trouble with the FD-Analysis itself. So I have to solve that issue first befor I can try it.

I wrote you a Private message with the same text in german.
Hi Ahmed, yes, that's the problem. I now believe, that It is not possible to place the source for the FD-Analysis into the circuit. The usual way to do a FD-Analysis in Comsol is to build two Terminals in the model where current or voltage for the analysis is applied. So I'm thinking of setting the voltage source in the circuit to zero volts and applying a current into the capacitor in the model. Maybe one can "mesure" the voltage at the nodes of the zero voltage source in the circuit. I'm already trying this, but now im having trouble with the FD-Analysis itself. So I have to solve that issue first befor I can try it. I wrote you a Private message with the same text in german.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26.03.2013, 07:44 GMT-4

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.