How to calculate the magnetic force for metal on magnets?

I am currently trying to hold a metal block in place with the magnets shown in the layout below. These magnets are permanent magnets which both expose one of their poles on the top side as shown below.

When placing a metal piece on the product I could think of the following strategies. Green lines are my expected ideal magnetic field lines while blue would be hindered by an air gap.

• Case1: try to make straight magnetic lines which the thickest part of the product
• Case2: Try to get as much coverage as possible and expect the magnetic lines to "curve" through the product.
• Case3(no image): placing the product only on one pole, does not work due to air gap and I can push it over without a problem by hand.

How could I calculate the magnetic force on the product for these cases? The magnets I am working with are designed for ~1500kg so I cannot physically feel the difference by hand. Factors I think are in play:

• Magnetic field parameters of the manufacturer of the magnets (e.g. minimum and maximum height of the magnetic lines).
• Part size and layout(height, width).
• The kind of steel that is used for the part.

If the calculation also derives the resistence to forces in different directions that would be great, but only a force upwards would be sufficient for lifting the product. Note that my background is software engineering with a bit of electronic engineering, please try to account for this into the explanation / refer to literature I would need to learn.

• Check out magnetic tool clamps. Jun 15, 2022 at 19:25
• How will that help me calculate the force? Jun 15, 2022 at 19:28