Skip to content
Snippets Groups Projects
Commit 71b88eac authored by Ruth Sabariego's avatar Ruth Sabariego
Browse files

Update magnets.pro

parent 0e2b97d6
No related branches found
No related tags found
No related merge requests found
Pipeline #1953 passed
...@@ -8,35 +8,39 @@ ...@@ -8,35 +8,39 @@
- Maxwell stress tensor and rigid-body magnetic forces - Maxwell stress tensor and rigid-body magnetic forces
To compute the solution in a terminal: To compute the solution in a terminal:
getdp magnets.pro First generate the (3D) mesh and then run getdp with the chosen resolution
gmsh magnets.geo -3
getdp magnets.pro -solve MagSta_a
OR
getdp magnets.pro -solve MagSta_phi
To compute the solution interactively from the Gmsh GUI: To compute the solution interactively from the Gmsh GUI:
File > Open > magnets.pro File > Open > magnets.pro
Resolution can be chosen from the menu on the left:
MagSta_a (default) or MagSta_phi
Run (button at the bottom of the left panel) Run (button at the bottom of the left panel)
------------------------------------------------------------------- */ ------------------------------------------------------------------- */
/* /*
This rather didactic tutorial solves the electromagnetic field This tutorial solves the electromagnetic field
and the rigid-body forces acting on a set of magnetic pieces and the rigid-body forces acting on a set of magnetic pieces
of parallelepipedic or cylindrical shape. of either parallelepipedic or cylindrical shape.
Besides position and dimension, each piece is attributed Besides position and dimension, each piece is attributed
a (constant) magnetic permability and/or a remanence field. a (constant) magnetic permeability and/or a remanence field.
The pieces are all (a bit abusively) generically called "Magnet" Hereafter, the pieces are all, simply though imprecisely, referred to as "Magnet",
in the problem decription below, irresective of whether they are irresective of whether they are truly permanent magnets or ferromagnetic barrels.
truly permanent magnets or ferromagnetic barrels.
The tutorial model proposes two dual 3D magnetostatic formulations:
The tutorial model proposes both dual 3D magnetostatic formulations: - the magnetic vector potential formulation with spanning-tree gauging;
the magnetic vector potential formulation with spanning-tree gauging, - the scalar magnetic potential formulation.
and the scalar magnetic potential formulation. As there are no conductors, the later is rather simple. The source field "hs" is
The later is rather simple in this case since, as there are no conductors, directly the the known coercive field hc[]:
the known coercive field hc[] is the only source field "hs" one needs
to represent the magnetic field:
h = hs - grad phi , hs = -hc. h = hs - grad phi , hs = -hc.
As in tutorial 2 (magnetostatic field of an electromagnet), a shell If the "Add infinite box" box is ticked, a transformation to infinity shell is
of so-called infinite elements is used here to impose the exact used to impose the exact zero-field boundary condition at infinity.
zero-field boundary condition at infinity. See also Tutorial 2: magnetostatic field of an electromagnet.
The shell is generated automatically by including "InfiniteBox.geo" The shell is generated automatically by including "InfiniteBox.geo"
at the end of the geometrical description of the model. at the end of the geometrical description of the model.
It can be placed rather close of the magnets without loss of accuracy. It can be placed rather close of the magnets without loss of accuracy.
...@@ -44,24 +48,23 @@ ...@@ -44,24 +48,23 @@
The preferred way to compute electromagnetic forces in GetDP The preferred way to compute electromagnetic forces in GetDP
is as an explicit by-product of the Maxwell stress tensor "TM[{b}]", is as an explicit by-product of the Maxwell stress tensor "TM[{b}]",
which is a material dependent function of the magnetic induction "b" field. which is a material dependent function of the magnetic induction "b" field.
Exactly like we computed the heat flux "q(S)" through a surface "S" The magnetic force acting on a rigid body in empty space can be evaluated
using a special auxiliary function "g(S)" associated with that surface as the flux of the Maxwell stress tensor through a surface "S" (surrounding the body).
in "Tutorial 5 : thermal problem with contact resistances", A special auxiliary function "g(S)" linked "S" is defined for each magnet, i.e.
the magnetic force acting on a rigid body in empty space can be evaluated "g(SkinMagnet~{i}) = un~{i}".
as the flux of the Maxwell stress tensor through that surface. The resultant magnetic force acting on "Magnet~{i}" is given by the integral:
There is one auxiliary function "g(SkinMagnet~{i}) = un~{i}"
for each magnet, and the resultant magnetic force acting on "Magnet~{i}"
is given by the integral:
f~{i} = Integral [ TM[{b}] * {-grad un~{i}} ] ; f~{i} = Integral [ TM[{b}] * {-grad un~{i}} ] ;
It should be insisted on the fact that the Maxwell stress tensor This approach is analogous to the computation of heat flux "q(S)" through a
is always discontinuous on material discontinuities, surface "S" described in "Tutorial 5: thermal problem with contact resistances".
Note that the Maxwell stress tensor is always discontinuous on material discontinuities,
and that magnetic forces acting on rigid bodies and that magnetic forces acting on rigid bodies
only depend on the Maxwell stress tensor of empty space, depend only on the Maxwell stress tensor in empty space,
and on the "b" and "h" field distribution, and on the "b" and "h" field distribution,
on the external side of "SkinMagnet~{i}" on the external side of "SkinMagnet~{i}"
(the side of the surface in contact with air). (side of the surface in contact with air).
"{-grad un~{i}}" in the above formula can be regarded "{-grad un~{i}}" in the above formula can be regarded
as the normal vector to "SkinMagnet~{i}" as the normal vector to "SkinMagnet~{i}"
...@@ -79,7 +82,7 @@ ...@@ -79,7 +82,7 @@
Include "magnets_common.pro" Include "magnets_common.pro"
DefineConstant[ DefineConstant[
// preset all getdp options and make them invisible // preset all getdp options and make them (in)visible
R_ = {"MagSta_a", Name "GetDP/1ResolutionChoices", Visible 1, R_ = {"MagSta_a", Name "GetDP/1ResolutionChoices", Visible 1,
Choices {"MagSta_a", "MagSta_phi"}}, Choices {"MagSta_a", "MagSta_phi"}},
C_ = {"-solve -v 5 -v2 -bin", Name "GetDP/9ComputeCommand", Visible 0} C_ = {"-solve -v 5 -v2 -bin", Name "GetDP/9ComputeCommand", Visible 0}
...@@ -198,7 +201,7 @@ Constraint { ...@@ -198,7 +201,7 @@ Constraint {
} }
FunctionSpace { FunctionSpace {
{ Name Hgrad_phi ; Type Form0 ; // scalar magnetic potential { Name Hgrad_phi ; Type Form0 ; // magnetic scalar potential
BasisFunction { BasisFunction {
{ Name sn ; NameOfCoef phin ; Function BF_Node ; { Name sn ; NameOfCoef phin ; Function BF_Node ;
Support Dom_Hgrad_phi ; Entity NodesOf[ All ] ; } Support Dom_Hgrad_phi ; Entity NodesOf[ All ] ; }
...@@ -207,7 +210,7 @@ FunctionSpace { ...@@ -207,7 +210,7 @@ FunctionSpace {
{ NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint phi ; } { NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint phi ; }
} }
} }
{ Name Hcurl_a; Type Form1; // vector magnetic potential { Name Hcurl_a; Type Form1; // magnetic vector potential
BasisFunction { BasisFunction {
{ Name se; NameOfCoef ae; Function BF_Edge; { Name se; NameOfCoef ae; Function BF_Edge;
Support Dom_Hcurl_a ;Entity EdgesOf[ All ]; } Support Dom_Hcurl_a ;Entity EdgesOf[ All ]; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment