Industrial

Educational

Scientific

Sample problems

Examples gallery

Step-by-step tutorials

Verification examples

Programming examples

Distributive examples

Success stories

Customers

Relay dynamics simulation using GNU Octave and ActiveField (QuickField Object Model)

QuickField simulation example

The electromagnetic and spring forces act on the plunger. Both forces depend on the plunger position. Calculate plunger motion function.
To combine the electromagnetic field analysis with the moving core dynamics both GNU Octave and QuickField are used. Interaction between QuickField and GNU Octave is performed using ActiveField application programming interface.

Problem Type
Axisymmetric problem of DC magnetics.

Geometry
Relay dynamics simulation The electromagnetic and spring forces act on the plunger. Both forces depend on the plunger position Coil Plunger Spring 20 mm x Ø 7.2 mm

Number of turns N = 2000;
Current I = 0.2 A;
Plunger pull-out position xmax = 10 mm.
Plunger pull in position xmin = 6 mm.
Plunger weight m = 4.5 g;
Spring constant k = 4 N/m
Spring free position xspring.free = 15 mm.

Task
The electromagnetic and spring forces act on the plunger. Both forces depend on the plunger position. Calculate plunger motion function.

Solution
The multi-turn winding is replaced with the equivalent total current.

The motion function can be found from second-order differential equation
m · d²x/dt² = f(x),
where m - is a plunger weight (kg),
x - is a plunger position (m)
f(x) - is the force acting on the plunger (N).
The force acting on the plunger is a sum of spring force fspring(x) = k·(xspring.free - x) and electromagnetic force.

The equations are solved in GNU Octave. The dynamic link is used to invoke QuickField and calculate the electromagnetic force at each step.

The calculations are stopped when x=xmin (pull in position, plunger hits damper).
GNU Octave to QuickField link The equations are solved in GNU Octave. The dynamic link through COM is used to invoke QuickField and calculate the electromagnetic force at each step GNU Octave QuickField Initial conditions x0 = xmax, v0 = 0 m/s Invoke QuickField to calculate Force(xi) vi+1 = vi + Force/mass*Δt xi+1 = xi + vi+1* Δt x>xmin ? true false EXIT

Results
The plunger hits initial position after 55 ms.
GNU Octave plot of the plunger position in meters vs time in seconds.