Newton-galerkin method for non-linear differential equation

3 次查看(过去 30 天)
Hi
I want to implement the newton galerking method in order to solve the equation c(0)=1 & .I know there might be a built in function in matlab but I want to build my own code. The problem is that I am stuck in discretization of the equation for the R and J matrix(J δu=-R). I analyze c in quadratic basis functions , c=. The R must be nnx x 1 in dimensions in order to solve the system with newton iterative method but if I substitute c the R discretization has terms with i and also j so the matrix should be nnx x nnx in dimensions right?But thats impossible cause the R must have only i in discretization. I was used to implementing the galerkin method in linear differential equations where we solve the system Rij=0 and there is no need for initial values and iterative methods but now the R must be a vector not a matrix and I dont know how to deal with that. I know my question is a result of not fully undestanding the method. Any answer would help.
DISCRETIZATION: Ri=
J=
  7 个评论
christos d
christos d 2020-6-26
编辑:christos d 2020-6-26
Yeahp it worked perfectly mr J Alex Lee. I calculated the derivative in each element somewhere in between(ξ=0.25 for input in basis functions) ,cause at the start or at the end of each element basis functions are not differentiable, using the solutions I got and the results are pretty much values that i expected so it must be right. It appears that derivative calculation is an easy task as soon as you create the code for the solution of equation.Thanks again for your help sir!

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by