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.

can I have different variable definitions for different subdomains?

Please login with a confirmed email address before reporting spam

Hi

I am modeling a rectangular coil in 3D. The rectangle lies in the xy plane with the coil axis in the z-direction. The corners are rounded so that the current density in these subdomains is Jex = -J0*(y-yc)/(sqrt((x-x)^2+(y-yc)^2)) where J0 is the total current density, xc and yc are the center location of the "cylinder" for each corner.

I would like to have one "external current density" node in the magnetic fields model with the current density defined by:

Je(x) = tx*J0
Je(y) = ty*J0

In order to do this, I need to define the variables tx and ty to be different in each of the coil subdomains. So far, I have not been able to do this. Is it possible? Is there an easier method of defining the current density in my rectangular coil?

Thanks,
Julie Slaughter

4 Replies Last Post 8 mars 2011, 17:34 UTC−5
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 mars 2011, 15:48 UTC−5
Hi

I'm not sure I fully catch you, but are you saying you have a torus of square/rectangular section ?

If so, why not use a cylindrical coordinate and add a current of J0 only in he "phi" direction ?

By the way sharp corners (even 90° one) are singularities in ACDC (how yould you define a gradient on an edge, or a point in 2D-axi ?, its not really defined) So I can advice you to fillet the "corners" with a realistic radius

--
Good luck
Ivar
Hi I'm not sure I fully catch you, but are you saying you have a torus of square/rectangular section ? If so, why not use a cylindrical coordinate and add a current of J0 only in he "phi" direction ? By the way sharp corners (even 90° one) are singularities in ACDC (how yould you define a gradient on an edge, or a point in 2D-axi ?, its not really defined) So I can advice you to fillet the "corners" with a realistic radius -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 mars 2011, 16:19 UTC−5
Sorry for my poor description of the coil... I have attached a file that should clear things up on the coil geometry and orientation. The "current" is traveling perpendicular to the z-axis and travels the path as shown in the xy plane.

The "straight" sections of the coil have their current density either all in the x or y directions albeit with different signs in different segments, but at the curved corners it is in the "phi" direction but as defined by a local coordinate system at the center point for the arc of each corner. I am trying to simplify the model so that I do not need to define eight different "external current density" nodes in the magnetic fields model for each of the eight different coil subdomains. If instead, I could define variables tx and ty for each subdomain of the coil corresponding to the x and y component of the current density. I could then use one "external current density" node with the Je(x) = tx*J0 and Je(y) = tx*J0.

If this is not possible, is there a simpler method of defining the current density in this coil geometry?

Thanks again,

Julie
Sorry for my poor description of the coil... I have attached a file that should clear things up on the coil geometry and orientation. The "current" is traveling perpendicular to the z-axis and travels the path as shown in the xy plane. The "straight" sections of the coil have their current density either all in the x or y directions albeit with different signs in different segments, but at the curved corners it is in the "phi" direction but as defined by a local coordinate system at the center point for the arc of each corner. I am trying to simplify the model so that I do not need to define eight different "external current density" nodes in the magnetic fields model for each of the eight different coil subdomains. If instead, I could define variables tx and ty for each subdomain of the coil corresponding to the x and y component of the current density. I could then use one "external current density" node with the Je(x) = tx*J0 and Je(y) = tx*J0. If this is not possible, is there a simpler method of defining the current density in this coil geometry? Thanks again, Julie


Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 mars 2011, 17:04 UTC−5
Hi

OK now I see the square, it was jut not the way I imagined it ;)

A few comments:
Avoid using single character names as these are already (almost) fully booked by COMSOL, in particular your h, w ... (try ww and hh)

You will need to surround your coil with some "air" or vacuum (typically a spherical domain, as a box has corners, they influence the field lines, this so that the field lines might loop areound

currently you have not defined any material to your coil so it's physical properties are not defined (probably set to "0" by default not the best way to get useful results ;) If you use the library ones, check that all parameters are really defined, often some are missing

In MF you need to define the current density everywhere since you do not solve for V whichwould, in my opinion, force the current to flow even where ists not strictly defined. But MEF is far tougher to get to solve (and needs more RAM) so why not define all 8 sections, the corners reamin slightly tricky indeed, but feasible with 4 cylindrical coordinates placed in the corners

By the way, if you do not need to refer or change the current J0 you can also call it a parameter (evaluated at the beginning of the run, then kept constant, except is used for a parametric sweep. Variables are typically for values that are referred to and will change during the solving process. (but this is a secondary issue, it will not affect your results)

--
Good luck
Ivar
Hi OK now I see the square, it was jut not the way I imagined it ;) A few comments: Avoid using single character names as these are already (almost) fully booked by COMSOL, in particular your h, w ... (try ww and hh) You will need to surround your coil with some "air" or vacuum (typically a spherical domain, as a box has corners, they influence the field lines, this so that the field lines might loop areound currently you have not defined any material to your coil so it's physical properties are not defined (probably set to "0" by default not the best way to get useful results ;) If you use the library ones, check that all parameters are really defined, often some are missing In MF you need to define the current density everywhere since you do not solve for V whichwould, in my opinion, force the current to flow even where ists not strictly defined. But MEF is far tougher to get to solve (and needs more RAM) so why not define all 8 sections, the corners reamin slightly tricky indeed, but feasible with 4 cylindrical coordinates placed in the corners By the way, if you do not need to refer or change the current J0 you can also call it a parameter (evaluated at the beginning of the run, then kept constant, except is used for a parametric sweep. Variables are typically for values that are referred to and will change during the solving process. (but this is a secondary issue, it will not affect your results) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 8 mars 2011, 17:34 UTC−5
Thanks for the advice on getting the problem to solve. I will look at MF versus MEF more closely to determine which one best describes the problem I am solving. The coil will eventually be part of a more complex system that actually has multiple coils each with a different current density and pointing in different directions. I was hoping to find a way to simplify the "accounting" so I didn't have to keep track of eight different current densities for eight different domains in 3 (or more) different directions... and that's just for the coil! If I come across a better method, I'll be sure to share it.

Julie
Thanks for the advice on getting the problem to solve. I will look at MF versus MEF more closely to determine which one best describes the problem I am solving. The coil will eventually be part of a more complex system that actually has multiple coils each with a different current density and pointing in different directions. I was hoping to find a way to simplify the "accounting" so I didn't have to keep track of eight different current densities for eight different domains in 3 (or more) different directions... and that's just for the coil! If I come across a better method, I'll be sure to share it. Julie

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.