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.
Constrained simulation
Posted 2015年3月1日 GMT-5 11:22 Modeling Tools & Definitions, Parameters, Variables, & Functions Version 5.0 2 Replies
Please login with a confirmed email address before reporting spam
Hi everybody !
for educational purpose I’m trying to build a comsol simulation of a simple 3D rectangular conductor (of conductivity sigma) in which a current flows BUT solving for the MAGNETIC FIELD.
More clearly I’m trying to solve the following equation (you can obtain it very easily using the Maxwell equations using the fact that epsilon0 is small in front of 1 ):
(1/mu0)*(d2/dx^2+d2/dy^2+d2/dz^2)B=sigma*dB/dt
with B={Bx,By,Bz}
together with :
div B=0
Then to go back to J via : curl(B)=mu0*J.
(mu0 is the vacuum permeability and epsilon0 the vacuum permittivity).
The way I do this is solving a « heat equation » (from the « General Form PDE » physics) with a source term equal to 0. To add the second constraint (i.e. divB=0) I use a « Global constraint » where I input this : Bxx+Byy+Bzz=0.
For the boundary conditions I use on two surfaces « dirichelet boundary condition » setting :
B={Jin*mu0*z,0,0}
(with Jin the input current density)
And on the other surfaces :
n.{Bzy-Byz,Bxz-Bzx,Byx,Bxy}=0
which corresponds to :
n.J=0
For me, everything seems well defined but it turns out that the simulation works very badly. First, it takes a lot of time to simulate this very simple problem and second the divB=0 constraint is not respected.
Do you see any problem in this approach ? Or better do you have any solution ?
Thanks in advance
Alex
ps. in attached you can find the comsol file.
for educational purpose I’m trying to build a comsol simulation of a simple 3D rectangular conductor (of conductivity sigma) in which a current flows BUT solving for the MAGNETIC FIELD.
More clearly I’m trying to solve the following equation (you can obtain it very easily using the Maxwell equations using the fact that epsilon0 is small in front of 1 ):
(1/mu0)*(d2/dx^2+d2/dy^2+d2/dz^2)B=sigma*dB/dt
with B={Bx,By,Bz}
together with :
div B=0
Then to go back to J via : curl(B)=mu0*J.
(mu0 is the vacuum permeability and epsilon0 the vacuum permittivity).
The way I do this is solving a « heat equation » (from the « General Form PDE » physics) with a source term equal to 0. To add the second constraint (i.e. divB=0) I use a « Global constraint » where I input this : Bxx+Byy+Bzz=0.
For the boundary conditions I use on two surfaces « dirichelet boundary condition » setting :
B={Jin*mu0*z,0,0}
(with Jin the input current density)
And on the other surfaces :
n.{Bzy-Byz,Bxz-Bzx,Byx,Bxy}=0
which corresponds to :
n.J=0
For me, everything seems well defined but it turns out that the simulation works very badly. First, it takes a lot of time to simulate this very simple problem and second the divB=0 constraint is not respected.
Do you see any problem in this approach ? Or better do you have any solution ?
Thanks in advance
Alex
ps. in attached you can find the comsol file.
Attachments:
2 Replies Last Post 2015年3月5日 GMT-5 04:05