Ok, this should be a simple problem, but for some reason it is taking me far too long to solve, and I'd like to see if anyone could help me towards the solution. I hope I've put this in the correct section.
So...
I have a set of nonlinear equations, which I'm trying to linearise about some equilibrium condition. I could do this analytically, but I since the equations are pretty complicated, I would like to computationally calculate them first as a starting point so I can at least get some preliminary results, and then I have a result to aim for when I do form the analytical solution.
My equations can be written in this form...
and so on. Or, in short hand
where is the full vector of all the equations I'm solving. I can obtain an equilibrium condition, and , and then linearise the equation to
, where is a perturbation to the system, i.e., , and is the matrix I'm trying to calculate, which could be written as
.
To calculate , I am cycling through each element of the vector, and perturbing it by some value . I can then calculate each column through finite elements, such that
.
However...all the states that make up my vector are of different orders. Some are very big, and some very small. Therefore, I need to have a different value for depending on which row of the matrix I'm calculating to ensure that that row is sufficiently accurate.
Currently, I'm cycling through the whole vector, and just calculating the row of the matrix with an initial estimate of , then reducing it by an order of magnitude, and recalculating. Somehow I hope to show convergence of the new matrix and the previous one through norms of some description, and then, once the matrices are sufficiently converged, I move onto the next row. However, I don't know how to fairly compare two matrices to ensure accuracy, and to prove that the matrix is converging to the right value.
I hope that you can understand my query. Please message me if not and I can clear any misunderstandings.
Thanks for your help.