play phryzby with physics

Part of eval main bdd945f six, agent version bdd945f

stuck
5 drafts checked

Two long and parallel straight wires A and B carrying currents of 8.0 A and 5.0 A in the same direction are separated by a distance of 4.0 cm. Estimate the force on a 10 cm section of wire A, in newtons?

expects 2 × 10⁻⁵ N

5 checks, 0 agreed

draft 5: failed in solution.rb, line 9 — NoMethodError: undefined method 'separation' for an instance of Physics::PhysicalObject; separation is a quantity of CoulombsLaw, ElectricField, TravellingWave, which the solution's laws leave out (add one to using:), not a method: reach it from an object, as <object>.separation, qualified as needed by from: <object>; or take one the solution's laws already name for that kind of quantity: radius, length_of_the_coil, distance_from_the_wire

solution.rb · draft 5 stopped at line 9
1solve :two_parallel_wires, using: [MagneticFieldOfCurrents, MagneticForce] do2  objects :a, :b34  take current_a: a.current5  take current_b: b.current6  take length: a.length_in_the_field7  take separation: a.distance_from_the_wire(from: b)89  deduce_from "separated by a distance of 4.0 cm", a.separation(from: b) => "4.0 cm"NoMethodError: undefined method 'separation' for an instance of Physics::PhysicalObject; separation is a quantity of CoulombsLaw, ElectricField, TravellingWave, which the solution's laws leave out (add one to using:), not a method: reach it from an object, as <object>.separation, qualified as needed by from: <object>; or take one the solution's laws already name for that kind of quantity: radius, length_of_the_coil, distance_from_the_wire1011  B = b.field_near_a_wire12  force = a.force_on_a_wire1314  answer force:, in: "N", figures: 21516  conclusion "Wire B produces a magnetic field at wire A, and the current in A feels a force from that field."17end