Flow of polar and nonpolar liquids through nanotubes: A computational study