A nuclear magnetic resonance (NMR) apparatus includes at least one solenoid configured to induce a radio frequency magnetic field in a sample. The sample is located inside the solenoid. At least one cylindrical magnet is arranged to induce a static magnetic field in the sample, wherein the magnet is located inside the sample.