I thought I would come back to this now that I have an answer that works. The problem was multifaceted and I tried several solutions that worked to varying degrees before eventually settling on a solution.
Things I tried that didn't work on their own:
- Homotopy solver that tried to implement barriers
$g( x, s ) = (1 - \frac{ 1 } { a( s ) } ) R( x ) + \frac{ 1 }{ a( s ) } b( x, s )$
where
$b( x, s ) = e^{ s * a * ( b - x ) } - 1$$b( x, s ) = e^{ s a ( b - x ) } - 1$
$a( s ) = e^{ A * s }$$a( s ) = e^{ A s }$
Where $R$ is the orginaloriginal residual, $s$, is the pseudo time, and $A$ is some value large enough to make sure the barrier holds. I found that this gave a pretty smooth variation from the barrier function to the true function if A is at least 10 or so. This worked for toy problems but not for my actual problem.
- Newton homotopy solver:
$g( x, s ) = R( x ) + ( 1 - s ) R( x_0 )$
I like this homotopy and ended up using it for my final non-linear equation solve. In the solve I first try s = 1 and then cutback if required.
Performing multiple nested Newton-Raphson solves. Instead of trying to solve for $E^p$, $\xi$, and $\dot{\gamma}$ simultaneously I solved for $\xi$ analytically and $E^p$ numerically for a given value of $\dot{\gamma}$ as each iteration to solve for $\dot{\gamma}$. This dramatically helped with my convergence for many problems but didn't solve the more difficult cases.
Worked through my code and found a bug which was likely causing unintended behavior. Again, this helped, but didn't solve my problems.
Tried limiting the line-search in the Newton Raphson to always be in the correct domain. This helped, but sometimes didn't allow for convergence.
Now for what actually worked:
I had unintiontiallyunintentionally set up my residual equation such that if the error was too great it would pass over into a new basin of attraction which pulled it in the wrong direction. I needed to modify my residual equation to prevent this behavior. Note that in the original residual for $\dot{\gamma}$
$R^{\dot{\gamma}} = \langle F \rangle + \dot{ \gamma } F$
The problem with this is that if $F$ gets very large, eventually the Jacobian can go positive due to the second term which will try to drive $\dot{\gamma}$ negative. So in the end I needed to:
- Use a Newton homotopy solver ( this isn't necessarily required right now but helps when the problem gets stiff ).
- Break the monolithic solve into sub-problems.
- Modify my residual to exclude the problematic behavior.
In the context of the original equation, I believe 3 is probably the crucial point.