Diffusion Equation with source term

iva.mn87
Messages
1
Reaction score
0
I have been asked to solve a diffusion equation with a source term using finite differences method. I need to numerically integrate the following equation either in MATLAB or C++.

The equation is

dT/dt = d2T/dx2 + S(x)

The form of S(x) is some function given by a Gaussian profile.

Could anyone have a solution to the problem!

Thanks!
 
Physics news on Phys.org
What exactly is the problem? How far have you gotten?

I've been working on the same problem, and I solved it by using the Crank-Nicolson method. Look it up on e.g. Wikipedia.

A worse, but far simpler method (especially since the source is non-linear) is to use the Forward Euler method:
\frac{T(x,t+\Delta t)-T(x,t)}{\Delta t} = \frac{T(x-\Delta x,t)-2T(x,t)+T(x+\Delta x,t)}{(\Delta x)^2} + S(x)

Solve for T(x,t+\Delta t) and you get
T(x,t+\Delta t) = \frac{T(x-\Delta x,t)-2T(x,t)+T(x+\Delta x,t)}{(\Delta x)^2}\Delta t + S(x)\Delta t+T(x,t)

So if you know the value of T(x,t) for every x at some time t, you can calculate the value for a future time t+\Delta t
 
From the BCS theory of superconductivity is well known that the superfluid density smoothly decreases with increasing temperature. Annihilated superfluid carriers become normal and lose their momenta on lattice atoms. So if we induce a persistent supercurrent in a ring below Tc and after that slowly increase the temperature, we must observe a decrease in the actual supercurrent, because the density of electron pairs and total supercurrent momentum decrease. However, this supercurrent...
Hi. I have got question as in title. How can idea of instantaneous dipole moment for atoms like, for example hydrogen be consistent with idea of orbitals? At my level of knowledge London dispersion forces are derived taking into account Bohr model of atom. But we know today that this model is not correct. If it would be correct I understand that at each time electron is at some point at radius at some angle and there is dipole moment at this time from nucleus to electron at orbit. But how...
Back
Top