I'm experimenting with creating regions that have uniform B- or H-fields. I have two questions.
Uniform B-field
I can successfully create a uniform B-field by using similar boundary conditions given in this post. In my sim, I just have a cylinder lying along the z-axis. The material is set to air. The BCs for the sides of the cylinder are
Code: Select all
Boundary Condition 1 ! left side
Target Boundaries(1) = 1
Name = "BoundaryCondition 1"
Magnetic Flux Density 3 = Real 5.0
End
Boundary Condition 2 ! right side
Target Boundaries(1) = 2
Name = "BoundaryCondition 2"
Magnetic Flux Density 3 = Real 5.0
End
The rectangular part of the cylinder has the following BC
Code: Select all
Boundary Condition 3 ! rectangle
Target Boundaries(1) = 3
Name = "BoundaryCondition 3"
Magnetic Flux Density {n} = Real 0.0
End
My question has to do with the edges of the plot. Why does it look like the plot is tending towards infinity? Does it have to do with the simulator trying to obey the rule that the normal component of the flux density is continuous just before and just after an interface between two different materials? So the infinity would be a result of the outside of the region not being defined.
Uniform H-field
If my understanding is correct, I can create an arbitrary H-field using the Magnetic Field Strength 1..3 keyword. However, if I replace the boundary conditions mentioned earlier with that keyword (see code below), I can only get the solver to run successfully if I set everything to zero. The other combinations I've tried either end up in a solution that doesn't converge or H-fields that flow from the top of one side and back down to the bottom of the same side (this happens if I set BC3 to use AV {e} = 0).
Code: Select all
Boundary Condition 1 ! left circle
Target Boundaries(1) = 1
Name = "BoundaryCondition 1"
Magnetic Field Strength 1 = Real 0.0
Magnetic Field Strength 2 = Real 0.0
Magnetic Field Strength 3 = Real 0.0
End
Boundary Condition 2 ! right circle
Target Boundaries(1) = 2
Name = "BoundaryCondition 2"
Magnetic Field Strength 1 = Real 0.0
Magnetic Field Strength 2 = Real 0.0
Magnetic Field Strength 3 = Real 0.0
End
Boundary Condition 3 ! rectangle
Target Boundaries(1) = 3
Name = "BoundaryCondition 3"
Magnetic Field Strength 1 = Real 0.0
Magnetic Field Strength 2 = Real 0.0
Magnetic Field Strength 3 = Real 0.0
End
If it helps, here is the gmsh file as well.
Code: Select all
SetFactory("OpenCASCADE");
Circle(1) = {0, 0, -300, 200, 0, 2*Pi};
Curve Loop(1) = {1};
Plane Surface(1) = {1};
Extrude {0, 0, 600} { Curve{1}; }
Curve Loop(3) = {3};
Plane Surface(3) = {3};
Surface Loop(1) = {1, 2, 3};
Volume(1) = {1};
Kind regards,
Nick.