PDF

Generator in 2D
Introduction
This example shows how the circular motion of a rotor with permanent magnets generates an induced EMF in a stator winding. The generated voltage is calculated as a function of time during the rotation. The model also shows the influence on the voltage from material parameters, rotation velocity, and number of turns in the winding.
The center of the rotor consists of annealed medium carbon steel, which is a material with a high relative permeability. The center is surrounded with several blocks of a permanent magnet made of sintered NdFeB, creating a strong magnetic field. The stator is made of the same permeable material as the center of the rotor, confining the field in closed loops through the winding. The winding is wound around the stator poles. Figure 1 shows the generator with part of the stator sliced in order to show the winding and the rotor.
Figure 1: Drawing of a generator showing how the rotor, stator, and stator winding are constructed. The winding is also connected between the loops, interacting to give the highest possible voltage.
Modeling in COMSOL Multiphysics
The COMSOL Multiphysics model of the generator is a time-dependent 2D problem on a cross section through the generator. This is a true time-dependent model where the motion of the magnetic sources in the rotor is accounted for in the boundary condition between the stator and rotor geometries. Thus, there is no Lorentz term in the equation, resulting in the PDE
where the magnetic vector potential only has a  z component.
Rotation is modeled using a ready-made physics interface for rotating machinery. The center part of the geometry, containing the rotor and part of the air-gap, rotates relative to the coordinate system of the stator. The rotor and the stator are imported as two separate geometry objects, so it is possible to use an assembly (see Finalizing the Geometry in the COMSOL Multiphysics Reference Manual for details). This has several advantages: the coupling between the rotor and the stator is done automatically, the parts are meshed independently, and it allows for a discontinuity in the vector potential at the interface between the two geometry objects (called slits). The rotor problem is solved in a rotating coordinate system where the rotor is fixed (the rotor frame), whereas the stator problem is solved in a coordinate system that is fixed with respect to the stator (the stator frame). An identity pair connecting the rotating rotor frame with the fixed stator frame is created between the rotor and the stator. The identity pair enforces continuity for the vector potential in the global fixed coordinate system (the stator frame).
The stator and center of the rotor are made of annealed medium-carbon steel (soft iron), which is implemented in COMSOL Multiphysics as an interpolation function of the B-H curve of the material; see Figure 2.
Figure 2: The norm of the magnetic flux, |B|, versus the norm of the magnetic field, |H|, for the rotor and stator materials.
The generated voltage is computed automatically with the use of the Coil feature. By selecting all the coils and putting them in a Coil group, it takes into account the topology of the windings that are arranged in series. In this way, the output voltage is the sum of voltages generated by each coils even though they are not geometrically connected in the 2D model.
The resistive and iron losses are computed with the use of a Loss Calculation subfeature and a Time to Frequency Losses study. In this 2D model, the magnets are modeled by using the Coil feature, which allows for the calculation of circulating currents and resistive losses. The settings impose a zero net perpendicular current in each of the magnet by activating the Coil group checkbox. For the iron part of the generator, the Bertotti loss model is selected to compute the cycle averaged loss power density. A surface integration is then made to compute the total loss power of the generator. The generated voltage and the losses are compared with the 3D counterpart of this model, i.e., Modeling of an Electric Generator in 3D.
Results and Discussion
The generated voltage in the rotor winding is close to a sinusoidal signal. At a rotation speed of 60 rpm the voltage has an amplitude slightly lower 700 V in total; see Figure 3.
Figure 3: The generated voltage over one quarter of a revolution. This simulation used a 100-turn winding.
The norm of the magnetic flux, |B|, and the B field lines are shown below in Figure 4 at time 0.20 s.
Figure 4: The norm and the field lines of the magnetic flux after 0.2 s of rotation. Note the darker regions, which indicate the position of the permanent magnets in the rotor.
The cycle averaged losses power density is shown below in Figure 5.
Figure 5: The volumetric loss density of the generator.
Application Library path: ACDC_Module/Motors_and_Actuators/generator_2d
Modeling Instructions
From the File menu, choose New.
New
In the New window, click  Model Wizard.
Model Wizard
1
In the Model Wizard window, click  2D.
2
In the Select Physics tree, select AC/DC>Electromagnetics and Mechanics>Rotating Machinery, Magnetic (rmm).
3
Click Add.
4
Click  Study.
5
In the Select Study tree, select General Studies>Stationary.
6
Global Definitions
Parameters 1
1
In the Model Builder window, under Global Definitions click Parameters 1.
2
In the Settings window for Parameters, locate the Parameters section.
3
Geometry 1
Import 1 (imp1)
Import the geometry of the generator cross section from an external CAD file.
1
In the Home toolbar, click  Import.
2
In the Settings window for Import, locate the Import section.
3
Click Browse.
4
5
Click Import.
Form Union (fin)
The geometry you imported is composed by two objects, an inner part (corresponding to the rotor) and an outer part (the stator). Create an assembly from these objects.
1
In the Model Builder window, under Component 1 (comp1)>Geometry 1 click Form Union (fin).
2
In the Settings window for Form Union/Assembly, locate the Form Union/Assembly section.
3
From the Action list, choose Form an assembly.
4
In the Home toolbar, click  Build All.
In this way, an identity pair connecting the shared boundaries has been automatically created.
Definitions
Cylindrical System 2 (sys2)
1
In the Definitions toolbar, click  Coordinate Systems and choose Cylindrical System.
The cylindrical coordinate system you just added will be used to define the field of the permanent magnets.
Add Material
1
In the Home toolbar, click  Add Material to open the Add Material window.
2
Go to the Add Material window.
3
4
Click Add to Component in the window toolbar.
5
In the tree, select AC/DC>Soft Iron (Without Losses).
6
Click Add to Component in the window toolbar.
7
In the tree, select AC/DC>Hard Magnetic Materials>Sintered NdFeB Grades (Chinese Standard)>N50 (Sintered NdFeB).
8
Click Add to Component in the window toolbar.
9
In the Home toolbar, click  Add Material to close the Add Material window.
Materials
Soft Iron (Without Losses) (mat2)
1
In the Model Builder window, under Component 1 (comp1)>Materials click Soft Iron (Without Losses) (mat2).
2
N50 (Sintered NdFeB) (mat3)
1
In the Model Builder window, click N50 (Sintered NdFeB) (mat3).
2
Rotating Machinery, Magnetic (rmm)
1
In the Model Builder window, under Component 1 (comp1) click Rotating Machinery, Magnetic (rmm).
2
In the Settings window for Rotating Machinery, Magnetic, locate the Thickness section.
3
In the d text field, type L.
Next, use a Rotating Domain feature to specify the rotor’s rotational velocity.
Definitions
Rotating Domain 1
1
In the Definitions toolbar, click  Moving Mesh and choose Rotating Domain.
2
3
In the Settings window for Rotating Domain, locate the Rotation section.
4
From the Rotation type list, choose Specified rotational velocity.
5
From the Rotational velocity expression list, choose Constant revolutions per time.
6
In the f text field, type rpm.
Rotating Machinery, Magnetic (rmm)
The permanent magnets on the rotor have a radial field. Use the cylindrical coordinate system specified earlier to define it.
Permanent Magnets Outward
1
In the Physics toolbar, click  Domains and choose Coil.
2
In the Settings window for Coil, type Permanent Magnets Outward in the Label text field.
3
4
Locate the Coordinate System Selection section. From the Coordinate system list, choose Cylindrical System 2 (sys2).
5
Locate the Coil section. Select the Coil group check box.
6
In the Icoil text field, type 0[A].
7
Locate the Constitutive Relation B-H section. From the Magnetization model list, choose Remanent flux density.
Loss Calculation 1
In the Physics toolbar, click  Attributes and choose Loss Calculation.
Permanent Magnets Inward
1
In the Model Builder window, right-click Permanent Magnets Outward and choose Duplicate.
2
In the Settings window for Coil, type Permanent Magnets Inward in the Label text field.
3
4
Locate the Constitutive Relation B-H section. Specify the e vector as
Iron
1
In the Physics toolbar, click  Domains and choose Ampère’s Law.
2
In the Settings window for Ampère’s Law, locate the Constitutive Relation B-H section.
3
From the Magnetization model list, choose B-H curve.
4
5
In the Label text field, type Iron.
Add the Loss Calculation subfeature to compute iron losses.
Loss Calculation 1
1
In the Physics toolbar, click  Attributes and choose Loss Calculation.
Set loss model to Bertotti.
2
In the Settings window for Loss Calculation, locate the Loss Model section.
3
From the Loss model list, choose Bertotti.
Coil 3
1
In the Physics toolbar, click  Domains and choose Coil.
2
3
In the Settings window for Coil, locate the Coil section.
4
From the Conductor model list, choose Homogenized multiturn.
5
In the Icoil text field, type 0[A].
6
Locate the Homogenized Multiturn Conductor section. In the N text field, type N.
7
From the Coil wire cross-section area list, choose From round wire diameter.
8
In the dcoil text field, type d_wire.
9
Locate the Coil section. Select the Coil group check box.
Reversed Current Direction 1
1
In the Physics toolbar, click  Attributes and choose Reversed Current Direction.
2
The problem will be solved separately in the fixed frame of the stator and the rotating frame of the rotor. Apply a Continuity feature on the shared boundaries (that are connected by Identity Pair I).
Continuity 1
1
In the Physics toolbar, click  Pairs and choose Continuity.
2
In the Settings window for Continuity, locate the Pair Selection section.
3
Under Pairs, click  Add.
4
In the Add dialog box, select Identity Boundary Pair 1 (ap1) in the Pairs list.
5
Study 1
Time Dependent
1
In the Study toolbar, click  Study Steps and choose Time Dependent>Time Dependent.
2
In the Settings window for Time Dependent, locate the Study Settings section.
3
In the Output times text field, type range(0,0.005,0.25).
The problem is set and it would be essentially ready to solve. In the next section some adjustments to physics, mesh, and solver settings are presented. These offer a more stable solution which is also found in a shorter time.
Suggestion to make solution faster and more stable
There are several settings which, when applied to model like this, make solution faster and more stable. Even though not all of these are required for the presented simple generator model, all of these may turn to be useful for more complex problems. In particular, these settings are being applied:
- use of Linear elements for Discretization as this is offering a better alternative in models with magnetic saturation;
- use Weak constraints in the Continuity condition applied where the pair with sliding meshes is active; this offers an higher precision for a given mesh;
- use, in the Continuity identity pair, a destination mesh finer than the source as this simplifies continuity constraint handling;
- use tighter tolerances than default in stationary preliminary step as this will simplify the starting of the subsequent transient which is in general more demanding;
- use Initial value basedScaling of physical variables in time dependent study step; eventually set also scaling of rotation angle variable; such settings will make the time dependent solver able to better choose the time step;
- set Update Jacobian to On every iteration as this makes each of the time dependent solver step more stable;
- set Exclude algebraic in error estimate as this will enable time stepper to better balance equation among the actively inductive contributions and those corresponding to instantaneously adapting fields;
- set Steps taken by solver to Intermediate or Strict as this will offer a better value also for quantities which contains time derivatives as the electric potentials on theCoil.
Definitions
Identity Boundary Pair 1 (ap1)
1
In the Model Builder window, under Component 1 (comp1)>Definitions click Identity Boundary Pair 1 (ap1).
2
In the Settings window for Pair, locate the Destination Boundaries section.
3
Click  Create Selection.
4
In the Create Selection dialog box, type destination in the Selection name text field.
5
Mesh 1
Free Triangular 1
In the Mesh toolbar, click  Free Triangular.
Size
1
In the Model Builder window, click Size.
2
In the Settings window for Size, locate the Element Size section.
3
From the Predefined list, choose Coarser.
4
Click the Custom button.
5
Locate the Element Size Parameters section. In the Maximum element size text field, type 0.015.
Size 1
1
In the Model Builder window, right-click Free Triangular 1 and choose Size.
2
In the Settings window for Size, locate the Geometric Entity Selection section.
3
From the Geometric entity level list, choose Boundary.
4
From the Selection list, choose destination.
5
Locate the Element Size section. From the Predefined list, choose Extremely fine.
6
Click  Build All.
Rotating Machinery, Magnetic (rmm)
1
In the Model Builder window, under Component 1 (comp1) click Rotating Machinery, Magnetic (rmm).
2
In the Settings window for Rotating Machinery, Magnetic, click to expand the Discretization section.
3
From the Magnetic vector potential list, choose Linear.
4
From the Magnetic scalar potential list, choose Linear.
5
Click the  Show More Options button in the Model Builder toolbar.
6
In the Show More Options dialog box, in the tree, select the check box for the node Physics>Advanced Physics Options.
7
Continuity 1
1
In the Model Builder window, under Component 1 (comp1)>Rotating Machinery, Magnetic (rmm) click Continuity 1.
2
In the Settings window for Continuity, click to expand the Constraint Settings section.
3
Select the Use weak constraints check box.
Study 1
Solution 1 (sol1)
1
In the Study toolbar, click  Show Default Solver.
2
In the Model Builder window, expand the Solution 1 (sol1) node, then click Stationary Solver 1.
3
In the Settings window for Stationary Solver, locate the General section.
4
In the Relative tolerance text field, type 1e-5.
5
In the Model Builder window, under Study 1>Solver Configurations>Solution 1 (sol1) click Dependent Variables 2.
6
In the Settings window for Dependent Variables, locate the Scaling section.
7
From the Method list, choose Initial value based.
8
In the Model Builder window, under Study 1>Solver Configurations>Solution 1 (sol1) click Time-Dependent Solver 1.
9
In the Settings window for Time-Dependent Solver, click to expand the Time Stepping section.
10
From the Steps taken by solver list, choose Strict.
11
Find the Algebraic variable settings subsection. From the Error estimation list, choose Exclude algebraic.
12
In the Model Builder window, under Study 1>Solver Configurations>Solution 1 (sol1)>Time-Dependent Solver 1 click Fully Coupled 1.
13
In the Settings window for Fully Coupled, click to expand the Method and Termination section.
14
From the Jacobian update list, choose On every iteration.
15
In the Model Builder window, under Study 1>Solver Configurations>Solution 1 (sol1)>Time-Dependent Solver 1 click Direct.
16
In the Settings window for Direct, locate the General section.
17
From the Solver list, choose PARDISO.
18
In the Study toolbar, click  Compute.
Postprocessing the results
Now, plot the solution in the spatial frame (the stator’s fixed frame) at time t = 0.2 s.
1
In the Model Builder window, expand the Results>Datasets node, then click Magnetic Flux Density Norm (rmm).
2
In the Settings window for 2D Plot Group, locate the Data section.
3
From the Time (s) list, choose 0.1.
Contour 1
1
In the Model Builder window, expand the Magnetic Flux Density Norm (rmm) node, then click Contour 1.
2
In the Settings window for Contour, locate the Levels section.
3
In the Total levels text field, type 12.
4
In the Magnetic Flux Density Norm (rmm) toolbar, click  Plot.
As shown in Figure 4, it shows the rotor position at t = 0.2 s, the magnetic flux density norm and magnetic flux lines. Next, plot the induced EMF in a quarter of the cycle.
Induced Coil Voltage
1
In the Home toolbar, click  Add Plot Group and choose 1D Plot Group.
2
In the Settings window for 1D Plot Group, type Induced Coil Voltage in the Label text field.
3
Click to expand the Title section. From the Title type list, choose Manual.
4
In the Title text area, type Induced voltage.
5
Locate the Plot Settings section. Select the x-axis label check box.
6
7
Select the y-axis label check box.
8
Global 1
1
Right-click Induced Coil Voltage and choose Global.
2
In the Settings window for Global, click Replace Expression in the upper-right corner of the y-Axis Data section. From the menu, choose Component 1 (comp1)>Rotating Machinery, Magnetic (Magnetic Fields)>Coil parameters>rmm.VCoil_3 - Coil voltage - V.
3
In the Induced Coil Voltage toolbar, click  Plot.
The resulting plot is Figure 3.
Next, add the Time to Frequency Losses study to compute the iron loss.
Add Study
1
In the Home toolbar, click  Add Study to open the Add Study window.
2
Go to the Add Study window.
3
Find the Studies subsection. In the Select Study tree, select Preset Studies for Selected Physics Interfaces>Time to Frequency Losses.
4
Click Add Study in the window toolbar.
Study 2
Step 1: Time to Frequency Losses
1
In the Settings window for Time to Frequency Losses, locate the Study Settings section.
2
From the Input study list, choose Study 1, Time Dependent.
3
In the Electrical period text field, type 0.25.
4
In the Home toolbar, click  Compute.
Results
Cycle Averaged Losses (rmm)
The resulting plot is Figure 5.
Finally, compute the total iron loss power.
Surface Integration 1
1
In the Results toolbar, click  More Derived Values and choose Integration>Surface Integration.
2
3
In the Settings window for Surface Integration, locate the Data section.
4
From the Dataset list, choose Study 2/Solution 3 (sol3).
5
Click Add Expression in the upper-right corner of the Expressions section. From the menu, choose Component 1 (comp1)>Rotating Machinery, Magnetic (Magnetic Fields, No Currents)>Heating and losses>rmm.Qh - Volumetric loss density, electromagnetic - W/m³.
6
Locate the Expressions section. In the table, enter the following settings:
7
Click  Evaluate.
The computed total loss power is about 303 W.