The present invention provides compositions and methods related to aerogel materials, including polyimide-based aerogels. In particular, aerogel materials optimized to have certain physical and chemical properties such as flexural and compressive strength are provided. In some embodiments, the aerogel materials can be at least partially carbonized.