I've discovered if writing is going badly or if I'm working on a scene that doesn't seem to do what I want it to the best thing to do is leave it alone and work on something else. Forcing writing works sometimes (it's called discipline) but there are times when words simply won't be forced out or when everything you write sounds like drivel (and while it sometimes happens that drivel leads to good writing, if that's all you're getting it's not worth continuing for a long period of time).
I'm not one of those writers who can write a novel from start to finish, going from chapter one until the conclusion. I write best when I'm excited about each particular scene. And sometimes I'm not in the mood to write about something. So I tend to jump around. The most interesting scenes get written first, followed by the next interesting scenes and ending with the scenes that are necessary to push the plot forward but which aren't that fun to read, or write. It means I do more editing than people who can write sequentially (as I typically forget what's already been written, sometimes writing the same scene twice by mistake). But as I enjoy editing I don't consider this a problem. And it means I can jump scenes if I need to.
I've heard of some authors who can flip between projects when they get bored of one. I tried that for a while and it sort of worked, but then I got engrosed in one project and found it easier just to finish that one. The problem of working on two separate novels at the same time is that each time you switch you have to remind yourself where you are in your writing and what the characters have just done and what they're going to do next. Contrary to popular belief, it's not that easy to remember all the details of a novel, even if you are making everything up yourself.