- #1
msanx2
- 13
- 0
I have a PDE which is the following:
$$\frac {\partial n}{\partial t} = -G\cdot\frac {\partial n}{\partial L}$$
with boundary condition: $$n(t,0,p) = \frac {B}{G}$$
, where G is a constant, L is length and t is time.
G and B depend on a set of parameters, something like $$B = k_1\cdot C^a$$ and $$G = k_2\cdot C^b$$, where C is a given variable.
I am using finite differences method to integrate this PDE, but I also wanted to obtain the derivatives of n with respect to its parameters (k1, k2, a and b in this case) along the integration. How can this be done?
I thought about something like integrating these derivatives like in the previous PDE. Something like:
$$ \frac{\partial}{\partial t}\left(\frac {\partial n}{\partial p}\right) = -[\frac{\partial G}{\partial p}\frac{\partial n}{\partial L} + G\cdot\frac{\partial}{\partial L}\left(\frac {\partial n}{\partial p}\right)]$$
and apply the respective boundary conditions: $$\frac {\partial n}{\partial p}(t,0) = \frac {\partial}{\partial p}(\frac {B}{G})$$
I have already calculated this using Matlab, and the results look similar although not exactly equal to the ones obtained with finite differences (which I also don't trust much). Do you agree with this formulation?
$$\frac {\partial n}{\partial t} = -G\cdot\frac {\partial n}{\partial L}$$
with boundary condition: $$n(t,0,p) = \frac {B}{G}$$
, where G is a constant, L is length and t is time.
G and B depend on a set of parameters, something like $$B = k_1\cdot C^a$$ and $$G = k_2\cdot C^b$$, where C is a given variable.
I am using finite differences method to integrate this PDE, but I also wanted to obtain the derivatives of n with respect to its parameters (k1, k2, a and b in this case) along the integration. How can this be done?
I thought about something like integrating these derivatives like in the previous PDE. Something like:
$$ \frac{\partial}{\partial t}\left(\frac {\partial n}{\partial p}\right) = -[\frac{\partial G}{\partial p}\frac{\partial n}{\partial L} + G\cdot\frac{\partial}{\partial L}\left(\frac {\partial n}{\partial p}\right)]$$
and apply the respective boundary conditions: $$\frac {\partial n}{\partial p}(t,0) = \frac {\partial}{\partial p}(\frac {B}{G})$$
I have already calculated this using Matlab, and the results look similar although not exactly equal to the ones obtained with finite differences (which I also don't trust much). Do you agree with this formulation?