Research question : how to compute chirality by DIV & CURL function
Show older comments
----------------------------------
[X Y Z] = meshgrid(y,x,z);
[cx1,cy1,cz1] = curl(X,Y,Z,Ex,Ey,Ez);
div1 = divergence(X,Y,Z,cx1,cy1,cz1);
term1 = 8.854*10^-12*0.5*div1;
[cx2,cy2,cz2] = curl(X,Y,Z,Hx,Hy,Hz);
div2 = divergence(X,Y,Z,cx2,cy2,cz2);
term2 = (1/(4*pi*10^-7))*0.5*div2;
chirality = term1 + term2;
----------------------------------
The above are my script to calculate chirality However, all Ex,Ey,Ez,Hx,Hy,Hz are complex number, but I already to transfer to real number. Should I use complex or real? Any error in syntax?
1 Comment
chi shing
on 21 Jan 2014
Answers (1)
Roger Stafford
on 21 Jan 2014
0 votes
As far as I can see, the equation you show does not contain any divergence operations. One term is the scalar (dot) product of the electric field, E, by its curl, and the other term the same with the magnetic field, B. I see no divergence here. The divergence of the curl would imply the presence of second partial derivatives and there are none in the equation. In any case, the divergence of the curl of any vector field would always be identically zero.
2 Comments
chi shing
on 22 Jan 2014
Roger Stafford
on 23 Jan 2014
Yes, the divergence of the curl of a vector field with continuous second derivatives with respect to position coordinates will always be zero even if this vector field is complex-valued.
Categories
Find more on Code Performance in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!