How to save solution in .txt format?

What do you mean by different boundaries? Please supply a minimal code example as described in Read before posting: How do I get my question answered?