Dear Ross,
I am using dealii 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 = n X F ,
(Dirichlet)
or n X (curl(E)) = n X (curl(F))
(Neumann)
where F is a known exact solution.
Based on your code, I implemented my own exact solution and the assembly of
system of equations. My exact solution (including real and imaginary parts)
is as follows:
E_re = [0, sin(pi*x)/a*cos(k_z10_re*z)*exp(k_z10_im*z), 0],
E_im = [0, -sin(pi*x)/a*sin(k_z10_re*z)*exp(k_z10_im*z), 0]
And the exact solution for your case (if I take p=[0 1 0] and k=[0 0 0.1])
is given by:
E_re = [0, cos(0.1*z), 0],
E_im = [0, sin(0.1*z), 0]
The domain I want to solve this problem is a 3D hyperrectangle with width
= 19.05e-3, height = 9.524e-3, and length = 15.24e-3. I've tried to solve
the above equation with the two exact solutions. When I used the build-in
mesh generator in dealii (i.e., GridGenerator::hyper_rectangle
(triangulation, p1, p2);) to generate the mesh. The problem can be solved
correctly for both cases:
my exact solution, built-in mesh generator:
<https://lh3.googleusercontent.com/-OBpgHd_d1zc/Wjn4QmGmkYI/AAAAAAAAAIQ/jJ5M9dvfZMwveEkHfkTlyBARSuYERbEGQCLcBGAs/s1600/Picture1.png>
your exact solution, built-in mesh generator:
Cycle 0:Number of degrees of freedom: 3888
Done
cycle cells dofs L2 Error H(curl) Error
0 64 3888 9.73783895e-12 1.03298196e-11
When I use the mesh generated from Gmsh software (after conversion into
hexes), if I provide your exact solution, the problem can still be solved
correctly, as shown bellow:
Cycle 0:number of cells:244
Number of degrees of freedom: 13176
Done
cycle cells dofs L2 Error H(curl) Error
0 244 13176 1.36020912e-07 8.58355818e-05
However, when I switch to my exact solution, the results are totally wrong.
The electric field obtained has totally wrong direction (seems to be
arbitrary but the correct one should be along y-axis). The results are as
follows
<https://lh3.googleusercontent.com/-4-YDq6oGyq8/Wjn5pzuHvqI/AAAAAAAAAIg/X_p-s_5mmV8MhxyXB35InyJdzYKFU25wwCLcBGAs/s1600/Picture2.png>
<https://lh3.googleusercontent.com/-eGwOwq4oVpU/Wjn5-INq1CI/AAAAAAAAAIk/BXQVHh9_eZMxMD4x3U0pEOqFtDCOasbrgCLcBGAs/s1600/Picture3.png>
My question is like this, based on your experience of using FE_Nedelec, can
we use FE_Nedelec on a mesh imported from other mesh generators like Gmsh
instead of the one generated from dealii itself? Does dealii of the current
version has a good support for this kind of mesh? FYI, the following is the
mesh generated from Gmsh (after transformation).
<https://lh3.googleusercontent.com/-as7ovfmYh_c/WjrIv6gI89I/AAAAAAAAAI4/uZRGx-1lTjkc31XFhpRR64mwD_TUyk28ACLcBGAs/s1600/mesh.png>
Any suggestions and help is much appreciated
Thanks in advance.
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
>
>
--
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.