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.

Create an electric terminal in physics builder

Please login with a confirmed email address before reporting spam

Hi,

I am trying to create a boundary condition feature in physics builder that functions similar to an '(electric) terminal' in AC/DC physics module.

At least, I would like to know if it is possible to make an 'electric terminal node' through physics builder.

This is because I would like to use an electric current as an input in the thermoelectric physics interface provided in COMSOL 4.3. In the thermoelectric physics interface (COMSOL 4.3), only an electric potential is an input. And I am having trouble with creating terminal node through physics builder.

Any help is appreciated.

Thank you


6 Replies Last Post Jan 13, 2015, 9:24 p.m. EST
Luke Gritter Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 2, 2015, 2:47 p.m. EST
Beomjin,

One way to accomplish this is to use a global constraint for the integrated normal current density on the boundary. To do this, you need to implement the following:

1) On your boundary feature, declare a global variable (set "Type" to "Shape function" and "Selection" to "Global") for the electric potential on the boundary.

2) Create an integration operator on the boundary.

3) Add a constraint specifying that the integral of the normal current density is equal to the user-specified total current. Set the constraint force to "Customized" and use the force expression test(name), where you should replace "name" by the name of the variable you created in step 1. Set the selection to Global.

4) Add a constraint specifying that the electric potential is equal to the variable you created in step 1.

Good luck!
--
Luke Gritter
AltaSim Technologies
Beomjin, One way to accomplish this is to use a global constraint for the integrated normal current density on the boundary. To do this, you need to implement the following: 1) On your boundary feature, declare a global variable (set "Type" to "Shape function" and "Selection" to "Global") for the electric potential on the boundary. 2) Create an integration operator on the boundary. 3) Add a constraint specifying that the integral of the normal current density is equal to the user-specified total current. Set the constraint force to "Customized" and use the force expression test(name), where you should replace "name" by the name of the variable you created in step 1. Set the selection to Global. 4) Add a constraint specifying that the electric potential is equal to the variable you created in step 1. Good luck! -- Luke Gritter AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 3, 2015, 11:49 p.m. EST
Thank you so much Luke.

I am following what you suggested, but I think that I am missing something.

Here are what I did.

1) created a boundary feature named 'Current'.
2) created dependent variable definitions for electric potential and current density.
3) created a user input (physical quantity: current)

Then as you suggested,
4) declared a global variable for the electric potential
5) declared another variable for a current density (type: expression, expression: nx*ec.Jx+ny*ec.Jy+nz*ec.Jz)
6) created an integration operator
7) added a constraint: intop1(current density) - I0; integral of current density = user input current
8) added a constraint: V - electric potential defined in step 4;

However, when I excute this interface with the current source, it says 'Failed to find a solution. Max number of Newton iterations reached...'). Did I miss something? If you are OK, I can send you my interface file...

Thanks
Thank you so much Luke. I am following what you suggested, but I think that I am missing something. Here are what I did. 1) created a boundary feature named 'Current'. 2) created dependent variable definitions for electric potential and current density. 3) created a user input (physical quantity: current) Then as you suggested, 4) declared a global variable for the electric potential 5) declared another variable for a current density (type: expression, expression: nx*ec.Jx+ny*ec.Jy+nz*ec.Jz) 6) created an integration operator 7) added a constraint: intop1(current density) - I0; integral of current density = user input current 8) added a constraint: V - electric potential defined in step 4; However, when I excute this interface with the current source, it says 'Failed to find a solution. Max number of Newton iterations reached...'). Did I miss something? If you are OK, I can send you my interface file... Thanks

Luke Gritter Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 12, 2015, 9:20 a.m. EST
Beomjin,

If you post the interface file, I will take a look at it.

--
Luke Gritter
AltaSim Technologies
Beomjin, If you post the interface file, I will take a look at it. -- Luke Gritter AltaSim Technologies

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 12, 2015, 7:46 p.m. EST
Thank you Luke!

Please see the attached interface file.

The interface is based on the thermoelectric model in COMSOL 4.3. And I added

1) feature 8 (current)
2) Dependent variable declaration 3 (current)
3) Override Rule 1 - exclusiveI (for current)

Beomjin
Thank you Luke! Please see the attached interface file. The interface is based on the thermoelectric model in COMSOL 4.3. And I added 1) feature 8 (current) 2) Dependent variable declaration 3 (current) 3) Override Rule 1 - exclusiveI (for current) Beomjin


Luke Gritter Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 13, 2015, 3:35 p.m. EST
Beomjin,

The method I proposed does not seem to work in version 4.3, due to a problem with the global constraint. It works in later versions, and it also works in 4.3 when it is implemented in the GUI, but the global constraint does not appear to be effective when implemented through the physics builder in 4.3.

An alternative way to apply the global constraint is to use a weak constraint (i.e. apply the constraint using a weak contribution). I've set this up in the attached file, and it seems to work well in 4.3.

A dependent variable for the current is not necessary, so I deleted those nodes. The Current boundary condition is actually a boundary condition for the electric potential variable, so I adjusted the override settings accordingly. Note that the normal current density expression assumes a 3D geometry, so you will have to make modifications if you want to use the interface on non-3D geometries.

--
Luke Gritter
AltaSim Technologies
Beomjin, The method I proposed does not seem to work in version 4.3, due to a problem with the global constraint. It works in later versions, and it also works in 4.3 when it is implemented in the GUI, but the global constraint does not appear to be effective when implemented through the physics builder in 4.3. An alternative way to apply the global constraint is to use a weak constraint (i.e. apply the constraint using a weak contribution). I've set this up in the attached file, and it seems to work well in 4.3. A dependent variable for the current is not necessary, so I deleted those nodes. The Current boundary condition is actually a boundary condition for the electric potential variable, so I adjusted the override settings accordingly. Note that the normal current density expression assumes a 3D geometry, so you will have to make modifications if you want to use the interface on non-3D geometries. -- Luke Gritter AltaSim Technologies


Please login with a confirmed email address before reporting spam

Posted: 10 years ago Jan 13, 2015, 9:24 p.m. EST
Thank you Luke!

It is a great help! Looks like it functions well.

Thanks,
Beomjin
Thank you Luke! It is a great help! Looks like it functions well. Thanks, Beomjin

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.