Boundary conditions for curl(H) Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Boundary conditions for curl(H) « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Daniil Andrienko (daniil)
New member
Username: daniil

Post Number: 1
Registered: 08-2008
Posted on Tuesday, August 05, 2008 - 07:57 am:   

Hi to everybody!
Here it is sample of my script:



TITLE 'New Problem'
COORDINATES xcylinder('Z','R')
VARIABLES
Az
V
SELECT { method controls }
ngrid = 13
errlim= 3e-5
DEFINITIONS
V0 = 0
V1 = 5
cond = 1.e4
Ez = - dz(V)

Jz = 10
D = 1
zmean = 0.5
rmin = 0.0
Atest(r) = -5/2*r*r { Az } !analytical solution
Btest(r) = - dr(Atest(r)) { Bphi}

Bphi = -dr(Az)
Ar = 0
A = vector(Az,Ar)


EQUATIONS

Az : dr(-r*dr(Az))=r*Jz
V : div(cond*grad(V) ) = 0


BOUNDARIES
REGION 1
START(0,rmin)
value(Az) = 0
natural(V)=0
LINE TO (1,rmin)
natural(Az)=0 {this does NOT work, even for the electric field !!!! }
value(V)=V1
line TO (1,1)
value(Az) = Atest(r) {this works (more or less) }
!natural(Az)=0 {this does NOT work, even for the electric field !!!! }

natural(V)=0
line TO (0,1)
natural(Az)=0
value(V)=V0
line to CLOSE


PLOTS
CONTOUR(Bphi)
contour(V) painted as 'Potential'
vector(Ez,0)
elevation(Bphi) from(zmean,0) to (zmean,D) as 'elevation Bphi'
elevation(Btest(r)) from(zmean,0) to (zmean,D) as 'elevation Btest'

END

this is an cylindrical geometry, current's direction is Z one. In this case we know the analytical solution, so this code is for test onyl. If we put on the outer boundary analytical boundary condition, the FlexPDE solution is similar to analytical solution, but let us consider that we dont know analytical solution. If on the same outer boundary we put natural condition, then script does not work! So which boundary condiyion do I need on the outer boundary?

Thanks!
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1152
Registered: 06-2003
Posted on Tuesday, August 05, 2008 - 01:32 pm:   

As we point out in the documentation of Natural boundary conditions, the Natural BC supplies the integrand of the surface terms generated by integrating the second-order terms of the PDE by parts.

For divergence terms, this is the same as applying the Divergence Theorem, Vol_integral(div(F)) = Surf_integral(normal(F)). The Natural BC supplies a value for normal(F) at the boundary.

So the meaning of the Natural BC depends on how you write your PDE.

In your Az equation, the Natural BC would supply the value of the outward normal component of -r*grad(Az) if you had used the full divergence term. On a boundary r=const, the natural supplies the outward value of -r*dr(Az). So you need to supply a relation that you know to be true for this quantity.

And similarly for the V equation, where the Natural BC supplies the outward normal component of cond*grad(V).

FlexPDE can't know what these values are supposed to be. As the author of the script, you have to supply what is correct for the system you are modeling.

Top of pagePrevious messageNext messageBottom of page Link to this message

Andreas Schaelicke (dreas)
New member
Username: dreas

Post Number: 1
Registered: 08-2008
Posted on Wednesday, August 06, 2008 - 12:13 pm:   

Thanks for the quick response, but we still have problems.

We understand that if we supply dr(Az)=Bphi on the boundary for r=1, everything works. For this idealised problem this is indeed possible since we know the analytic solution.

In fact, if and only if we place the solution on the boundary, the solution is correct. But if we know the solution, the problem is already solved.

On the other hand we have more general conditions for the r=0 boundary (due to the cylinder symmetry):
* Az(r=0) = 0
* dr(Az(r=0) = 0
This way it is more or less possible to identify that the given boundary condition on r=1 makes sense. Assuming that Bphi is independent of z (which is correct for this example), one can now iteratively determine the condition we have to place on r=1 , by checking if both conditions on r=0 are full filled (which is not very elegant).

Is there a more straight forward solution? E.g. is it possible not to place a boundary condition on one boundary, bot two conditions on another? (NOBC seems to imply Natural)

Secondly, you sort of proposed to write out the equation in curl/div/grad. This seems not to be possible (at least in 2D)

What we liked to specify is:
Az : curl( curl(Az,Ar) ) = (Jz, Jr)
Ar : div(Az,Ar) = 0
but this seems not possible. Actually, since our current does only flow in the (z,r) plane, the only non vanishing component of B is the phi-component. So we need in principle only one equation, e.g. it is possible to write:
Az: - grad(div(Az) ) = Jz
but this does not solve the problem of finding a boundary condition in a region, where want to get the solution from FlexPDE.

Are we correct, that the only solution out of this discrepancy is to write equations for the B-field, e.g either
Bphi: dr(r*Bphi)/r=Jz { eq. (1) }
or
Bphi: -dz(Bphi)=Jr { eq. (2) }
depending on, whether Jz, or Jr is the better defined variable?
But what does
Natural(Bphi)=0
imply here?

Thanks for help.

We attached an example, which illustrates the problem of boundary conditions for curl(H). If we use eq. (1), placing additional constrains (like Bphi(r=0) =0 ) causes problems. If we use eq. (2), we need to add the constrain Bphi(r=0)=0 to get the correct result.
mac/unknownexample
reifen2.pde (1.7 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 1153
Registered: 06-2003
Posted on Wednesday, August 06, 2008 - 01:42 pm:   

The FlexPDE distribution includes a long discourse on Electric and Magnetic field applications in the file "Applications_em_r1.pdf" in the "Applications_em" folder.

Have you read this discussion?

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration