Chemical investigations of isotope separation on line target units for carbon and nitrogen beams