Dear Ross,

I've been studying your code for a few days and wondering if I can learn 
from it to solve my problem. I want to use deal.II to characterize 
discontinuities in a rectangular waveguide,
so I will use FE_Nedelec elements to solve the curl-curl equation:

curl(mu^(-1)curl(E)) + (-omega^2*epsilon+j*omega*sigma)*E=0,

with boundary conditions: n x E = 0, on waveguide walls
                                      n x (curl(E)) + gamma*n x (n x E) = 
U, on port 1 
                                      n x (curl(E)) + gamma*n x (n x E) = 
0,  on port 2
where U and gamma are known.

I consider that the waveguide is loaded with an obstacle of PEC, so the 
boundary conditions will be n x E = 0 on its surfaces and inside the 
obstacle E is zero. Since we know E is zero inside the obstacle, we can 
ignore the its existence when we do mesh generation. So the mesh I am 
working on is a block subtracted by some small blocks like the following 
<https://lh3.googleusercontent.com/-U87tPsYzs3Y/WSc4k65wx-I/AAAAAAAAAGc/fBe5QMhgMvgk2apPS4sKmLvO2_BENBKugCLcB/s1600/Picture1.png>
 
<https://lh3.googleusercontent.com/-e6Hc6SGy6jM/WScsubH8CuI/AAAAAAAAAGM/UI8XHlCkLxkWZ6ZLUXlbs_0jxLmwtKpvQCLcB/s1600/WaveguideDiscontinuities2.png>
                                          waveguide discontinuity problem

This problem has some similarities with the wave propagation problem you 
are solving except for the boundary conditions on the two ports. I am 
wondering if I can keep the way you assemble the system and only be 
bothered with the BCs? 

By the way, can you kindly give some hints on how you split the complex 
valued Maxwell equations into their real and imaginary parts, or is there 
any documents I can refer to?

Thanks a lot in advance and look forward to your reply.

Best 
Jianan Zhang


在 2014年7月15日星期二 UTC-4下午12:58:46,Ross Kynch写道:
>
> Hi all,
>
> I'm solving a complex-valued vector-wave equation (the curl-curl 
> formulation of the Maxwell equations):
>
> curl(curl(E)) + kappa*E=0
>
> with BCs given by
> n x E = g on \Gamma_D (Dirichlet)
> n x curl(E) = h on \Gamma_N (Neumann)
>
> note, I've set mu =1 for this problem.
>
> the wave propagation solution is given by:
>  E = p*exp(i*k*x),  x, k and p in R^3
>  
> with p orthogonal to k, |k| < 1, |p|=1.
>
> I've chosen k=(-0.1 -0.1, 0.2) and p=(1/sqrt(3))*[1 1 1].
>
> I've implemented this for both Neumann and Dirichet BCs using Nedelec 
> elements and splitting the system into real/imaginary parts. I am seeing 
> the correct rates of convergence in  the L2 and H(curl) norms of the error 
> for the Neumann version with both h and p refinement.
>
> However, when using Dirichlet BCs, after p=0, something seems to go wrong. 
> Am I enforcing the boundary conditions correctly for the 
> project_boundary_values_curl_conforming routine? - I have a function with 
> dim+dim components, with the first dim(3) being the real part and the 
> latter dim being the imaginary part - is this the correct way to do this?
>
> I've included an example with Dirichlet BCs, although if you uncomment the 
> 666-678 in the code then the boundaries will be changed to Neumann. It 
> takes the polynomial order as input, so run it with "./wave_propagation -p 
> 2" for order 2 elements, etc.
>
> For comparison, here are the results when I've run the code p=0,1,2 - 
> using a direct solver for now, so going above p=2 causes memory problems, 
> also runtime increases due to the slow generation of the Nedelec elements 
> at higher orders.
>
> Thanks,
>
> Ross
>
> Dirichlet:
> ./wave_propagation -p 0
> cycle cells dofs    L2 Error    H(curl) Error  
>     0     8  108 1.15904018e-01 1.24176508e-01 
>     1    64  600 5.77896943e-02 6.19578648e-02 
>     2   512 3888 2.88743606e-02 3.09624645e-02 
> ./wave_propagation -p 1
> cycle cells dofs     L2 Error    H(curl) Error  
>     0     8   600 8.35079734e-01 2.59980668e+00 
>     1    64  3888 7.93792725e-01 3.36290438e+00 
>     2   512 27744 7.77603612e-01 4.42928910e+00 
> ./wave_propagation -p 2
> cycle cells dofs     L2 Error    H(curl) Error  
>     0     8  1764 8.20717491e-01 2.50234579e+00 
>     1    64 12168 7.87196814e-01 3.17447088e+00 
>     2   512 90000 7.74601489e-01 4.11893779e+00 
>
> Neumann:
> ./wave_propagation -p 0
>     0     8  108 1.15471804e-01 1.23771671e-01 
>     1    64  600 5.77352583e-02 6.19069021e-02 
>     2   512 3888 2.88675425e-02 3.09560822e-02 
> ./wave_propagation -p 1
> cycle cells dofs     L2 Error    H(curl) Error  
>     0     8   600 2.58268149e-03 2.79282760e-03 
>     1    64  3888 6.45549584e-04 6.98219104e-04 
>     2   512 27744 1.61377755e-04 1.74553607e-04 
> ./wave_propagation -p 2
> cycle cells dofs     L2 Error    H(curl) Error  
>     0     8  1764 4.17828432e-05 4.53286783e-05 
>     1    64 12168 5.22313050e-06 5.66700077e-06 
>     2   512 90000 6.52897524e-07 7.08401532e-07 
>
>
<https://lh3.googleusercontent.com/-e-cBWMdhnQc/WScskVxcHXI/AAAAAAAAAGI/6RqBAnQDzRwEUQiefNowVHe0g8dV0xBrQCLcB/s1600/WaveguideDiscontinuities2.png>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to