-
Notifications
You must be signed in to change notification settings - Fork 67
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
Trouble with current density inside domain #73
Comments
Hi Eduardo, I guess you use the spanningtree etc as needed. It is against Maxwell's equations to have current appearing and disappearing in A-v inside the geometry as in your case: you get this noise magnetic solution because of that. There are ways to cleanly solve your problem with the closed loop without having to cut-open the coils (both for the A-v and for the h-phi) formulations, but that more on the product side Quanscient.allsolve that we sell. Alternatively, you could try your code without spanningtree (it makes things really sensitive to the appearing currents out of nowhere) and add an extra formulation line: += integral(all, 1e-5/mu * dof(A)*tf(A)) I hope this helps! |
Hi Alexandre, Thanks for your reply. I tried your approach, but it seems the library objectively opposes removing the spanningtree: terminate called after throwing an instance of 'std::runtime_error'
what(): Error in 'rawfield' object: spanning tree was not provided to rawfield The extra formulation line also didn't solve it, unfortunately. |
That's because you have to also remove the field.setgauge call! |
Removing that call results in a NaN solution. |
Hi Eduardo, Was your problem solved ? Kind regards |
Hi Umar, Unfortunately I could not solve it properly. As a workaround I defined the vector current density field by hand, which is easy for this simple geometry, but not generalized for more complex geometries. |
Greetings!
Firstly, I'd like to say I'm very happy to get to learn about this library. Hopefully I'll try to add some contributions in the future.
I'm trying to solve an electromagnetism problem for my thesis based on the magnetodynamics-av-induction-3d, but without time derivatives for now.
The problem consists on a two windings transformer:
By applying a voltage potential on the inner windings terminal, we get the expected linearly decaying potential distribution$v$ :
... and a curl of current density$\vec{J}$ :
However, the generated solution for the magnetic vector potential$\vec{A}$ and the flux density $\vec{B}$ yield unexpected results:
When I tried setting the coil terminals in the domain boundary, I got somewhat close to the expected results. I've also tried defining a curled field$\vec{J}$ on the winding, but it instead got defined everywhere (making even the air conduct the same as the coppers), despite generating a convincing $\vec{B}$ field in the core.
However, by making the windings go from and to the boundary, the mesh and geometry complexity increases manifolds, not only making the simulation take much longer, but also making some glitches in Gmsh/OCC (possibly due to the high number of points to interpolate a pipe on) and making it harder to place one winding inside another.
I've seen some tutorial videos using commercial softwares, in which the windings are just cylinders with a forced current, but I could not get them working in Sparselizard for now.
Is it possible to define a current contained in the domain, and have it generate a magnetic field? How?
Could anybody give me a hint on it? I've attached the project folder below using the same structure as the examples in the repo, in case someone wants to try it out.
EER-core-3d-magnetostatics.tar.gz
The text was updated successfully, but these errors were encountered: