I am trying to solve the following one-dimensional problem:
(to better understand and extend the FEM for a more complex problem),
Needs["NDSolve`FEM`"]
f = 1000;
x0 = 1;
e = 2;
l = 100;
d = 10;
u[x_] = x0 Sin[(2*\[Pi]*f) * x];
ufun = NDSolveValue[{Laplacian[u[x], {x}] == (e/l) d u'[x],
u[0] == u[x], u[1] == 0}, u, {x, 0, 1}];
Plot[ufun[x], {x, 0, 1}]
The output is supposed to be an exponential function. @x=0 I am applying a sine wave and @x=1, the value is zero, (which I can't figure out how to do it). Any suggestions or recommendations?
t
andx
? Can you show us the equation you're trying to solve with traditional math notation? $\endgroup$t
andx
. The equation should beLaplacian[u[t, x], {x}] == e/(l d) D[u[t, x],t]
. And this is a spatially 1D problem i.e. 1+1D problem. There're many related examples in document and this site, please read them carefully. $\endgroup$NDSolve
andDSolve
by pressing F1 should be quite enough for your problem. For more advanced introduction see e.g. PDEModels/tutorial/HeatTransfer/HeatTransfer. $\endgroup$