Question: Coupling fem equation with ordinary differential equation
Hello,
Nice to meet you all.
I want to simulate a partial differential equation, with time derivatives too, coupled with other equation that only has time derivatives in 3D. Let me explain with a simplified example.
The first equation in its week formulation is something like:
Integral { DtDof [ Dof{u} , {u} ]; In Volumenes; Jacobian JVol; Integration I1; } Integral { [ Dof{d u} , {d u} ]; In Volumenes; Jacobian JVol; Integration I1; } Integral { [ J_e_time[] , {u} ]; In Surface_with_neumann_condition ; Jacobian JSur; Integration I1; } Integral { [ Dof{u}, {u} ]; In Volumenes; Jacobian JVol; Integration I1; } Integral { [ -Dof{g}, {u} ]; In Volumenes; Jacobian JVol; Integration I1; } Integral { [ -Nonlinear[u]*Dof{u}, {u} ]; In Volumenes; Jacobian JVol; Integration I1; }
The unknown "u" is a scalar function, it has also a Dirichlet condition in another surface imposed as a constraint. The unknown "g" is also a scalar function, but it does not have boundary conditions.
The second equation is something like: dt{g} = -ag + bu + c; with a, b and c constants.
I don't want to write a week form for the second equation. I wanted to just use an Euler scheeme with the second equation in its strong form, but I do not know if it can be done in getdp. I also solved the ordinary differential equation (alone) and I have the expression for the unknown "g" depending on "u". If I use that expression I would need to integrate in time all the previous "u" and update the value of "g" in each iteration, but I do not know if it can be done in getdp.
I have been reading the tutorials, some examples, some previous questions from the mailing list. I have learned a lot about getdp, but I still not know how to do what I want or how to solve both equations in a different way.
Any advice it would be really appreciated.
Kind regards.