As part of the Diabelli Project, I've sketched out two other piano pieces that are in D. One was in D minor (see Diabelli Project 045), the other in D aeolian mode (see Diabelli Project 054). In this case, though, I wasn't worried about scales or modes. D was the tonal center that I wanted to return to or play off of. But other than that, I just let the music go where it will. (click on image to enlarge)
I'll need to look at this in context with those other sketches. Perhaps they're all part of a bigger piano work in D-something? Hard to say -- but remember. As always, you're welcome to use this material as you will. Just share the results.