I am trying to discretize the following PDE (but in 2D) to have a numerical solution, using any method. But I will not soon understand the mathematics involved and so.
$$ \underbrace{\rho_t c_t \frac{\partial T}{\partial t}}_{\substack{\text{rate of temperature} \\ \text{changes}}} = \overbrace{\nabla \cdot (k_t \nabla T)}^{\substack{\text{heat conduction } \\ \text{in the tissue}}} - \underbrace{\rho_b c_b w_b (T-T_b) }_{\substack{\text{advection by perfusing} \\ \text{blood (cooling source)}}} + \overbrace{Q_m}^{\substack{\text{methabolic} \\ \text{heating}}} + \underbrace{P}_{\substack{\text{energy dissipation by} \\ \text{the MNPs (heat source)}}}$$
I'm programming a solver in Python for this one, but I need the discretization of it. Then it occurs to me that I could do it with sympy, only I can't do it if I use it very well. Until then, this is what I have.
from sympy.interactive import printing
printing.init_printing(use_latex=True)
import sympy as sym
from sympy.vector import CoordSys3D, Del
T_a = sym.Symbol("T_b")
k = sym.Symbol("k")
rho_t = sym.Symbol("rho_t")
rho_b = sym.Symbol("rho_b")
c_t = sym.Symbol("c_t")
c_b = sym.Symbol("c_b")
w_b = sym.Symbol("w_b")
q_m = sym.Symbol("q_m")
P_m = sym.Symbol("P_m")
x,y,t=sym.symbols('x y t', real=True)
T = sym.Function("T")(x,y,t)
f = sym.Function("f")(T,t)
h = sym.Function("h")(k,T,t)
f_ddt = f.diff(T, t)
h_ddt_xy = k * (h.diff(T, x,2) + h.diff(T, y,2))
eq = sym.Eq(f_ddt, h_ddt_xy - rho_b * c_b * w_b * (Ta - T) + q_m + P_m)
The problem is to solve the temperature distribution of tissue that was inyected with nanoparticles, in contact with other that dosn't have the nanoparticles (same equation but without P_m). This ecuation is known as Pennes Bioheat equation.
I have build a mesh for my problem and compute P_m for every node of the tissue with nanoparticle, as P_m its not a diferential equation.
In this figure the 1/4 of ellipse is the tissue with nanoparticles and P_m values.
But now I need to solve the differential part of the equation.
