Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with radObjDivMag (radia, Mathematica) #13

Open
msigrist opened this issue Mar 3, 2021 · 0 comments
Open

Issue with radObjDivMag (radia, Mathematica) #13

msigrist opened this issue Mar 3, 2021 · 0 comments

Comments

@msigrist
Copy link

msigrist commented Mar 3, 2021

I'm using Radia 4.32 and Mathematica 12.0

I've come across a problem with an issue with subdivisions using radObjDivMag.

It appears to occur when specifying parallel planes which aren't in the X, Y, Z directions and also have a larger number of subdivisions.

I think the following code should demonstrate this problem.

This works for me as I expect:

material = radMatLin[{0.06, 0.17}, {1, 0, 1}];
tstmag = radObjRecMag[{15, 5, 15}, {30, 10, 30}];
radMatApl[tstmag, material];

SDtype = {"pln", {1, 0, -1}, {0, 1, 0}, {1, 0, 1}};
SDnum = {2, 1, 2};
radObjDivMag[tstmag, SDnum, SDtype];

RadSolve[tstmag, 0.01, 10];

ListVectorPlot[radObjM[tstmag][[All, All, 1 ;; 3 ;; 2]],
VectorPoints -> All]
Graphics3D[radObjDrw[tstmag]]'

I get a square block cut on diagonals into 4 triangles and each subdivision is magnetised on the diagonal in the x-z plane.

If I change the number of subdivisions and keep the rest the same

SDnum = {10, 3, 10};
the magnetization of the subdivisions is no longer all in the same direction. Some pieces are correct and others have some rotation to the applied magnetization.

If I change the number of subdivisions and subdivide along the X, Y, Z planes I don't get the same problem.

SDnum = {10, 3, 10};

and

SDtype = "pln";

or

SDtype = {"pln", {1, 0, 0}, {0, 1, 0}, {0, 0, 1}};

I don't find any problems with the "cyl" form of subdivisions, and don't find any differences by changing the Frame option. Changing the magnetization direction doesn't seem to effect the issue.

I think this is a bug, but would welcome any usage advice if I am using the options for this function incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant