It is time to calculate the force of the coil when the coil is energized (**Fcoil**).

This calculation is not intuitive so we need to do some simplifications.

We assume that the magnetic field inside the energized solenoid is uniform.

Since it is uniform we can apply the **Amperes law** in order to calculate the **magnetic field B** inside the solenoid.

We choose a rectangular **surface S **with l : length and h : height.

Take a look at the dia diagram made in the first page.

We apply the Amperes law into surface S

(1)

(2)

Using (1)+(2) we can find the magnetic field inside the solenoid : (3)

From the **magnetic flux** definition we have :

(4)

Using the (4) we get : (5)

From the **faraday law** we know that :

(6)

We know that :

(7)

So using (6) and (7) we get : (8)

The **energy of the magnetic field** is :

(9)

Using (8) and (9) we get :

(10)

Notice that this is the energy of the magnetic field when the core is outside the coil (0V case)

When the voltage is applied then the core is fully inside the coil. in that case the energy becomes :

(11)

(12)

Finally we can calculate the **force applied at the core** from the magnetic field using the (12) :

(13)

Let's now look at the rest of the forces.

On the 0V state we have :

**F _{spring} + F_{Liquid1} = F_{w} + F_{straw}**

Where :

F_{spring} is the force of the spring. Using the **Hookes law** we have **F _{spring} = -kξ**

F_{w} is the weight. **F _{w}=mg**

F_{Liquid1} can be calculated by** Pascals law**.

**P _{2}-P_{1}=pgH** => (using P=F/A) => F

_{Liquid1}= [(F

_{L2}/A

_{2}) - pgh]A

_{1}

Notice that : F_{L2}= F_{Liquid2} - F_{surface_y}

F_{straw }is the reaction force of the straw

At 12V state we have :

**F _{spring} + F_{Liquid1} = F_{w} + F_{coil }**

The condition in order to work our system is that the

**F _{coil} > F_{spring} + F_{Liquid1} - F_{w}**

That's all for now !

Stay tuned !