0

Recently, I have been trying to discretise a PDE, however, I realized I may be lacking some fundamental knowledge regarding numerical methods.

I have the following PDE to discretise: $$ \frac{\partial g}{\partial t} = \frac{\partial f}{\partial x} $$ Now we can semi-discretise this using forward Euler in temporal space as follows: $$ g^{n+1} = g^n + \Delta t {\frac{\partial f}{\partial x}\bigg|}^n $$ where n is a superscript (not a power) and it denotes the step in time. This can be marched through time given initial conditions, and my question is, is it now possible to use classical RK4 to discretise $\frac{\partial f}{\partial x}$ in space? Problem is functions f and g are not the same which seems to be ALL the examples that textbooks dare go into. Do you some how need to link them or can you use RK4 regardless? It is also worth noting that $g = g(\alpha)$ and $f = f(\alpha) $ but they each depend on some other variables as well. Also, there is no direct link between them. How do I approach this problem?

Please let me know if more details are needed and I will elaborate. Thanks in advance.

  • 1
    Dear @thephysicsguy, your PDE seems meaningless, are you sure about it? – user90189 Aug 06 '17 at 00:50
  • If it is $∂^2f/∂x^2$: You are looking for the connection of an ODE-Solver (e.g. Euler, like in your question) and a (elliptic) PDE-Solver (FEM, FD, FV) using the Rothe Method or the Method of Lines. Also this question might be helpful. – P. Siehr Aug 07 '17 at 08:54
  • If $f$ and $g$ are really disctinct your "PDE" boils down to a simple integration problem: $g(t) = g(t_0) + \int_{t_0}^t \partial_x f (\tau)d \tau$ – Dan Doe Mar 14 '23 at 14:00

0 Answers0