Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Electrical Engineering sorted by activeHow to NDSolve two coupled first order PDEs with specific boundary conditio
https://community.wolfram.com/groups/-/m/t/1635326
Hi :-)
Reading and re-reading the NDSolve documentation, I don't understand the generic way to express boundary conditions. I want to solve the wave equation expressed as a system of two coupled first order equations on the voltage v(t,x) and current i(t,x). The initial v(0,x) has a bell shape and the initial i(0,x) is zero everywhere.
> eq1 = D[v[t, x], x] + D[i[t, x], t] == 0;
>eq2 = D[i[t, x], x] + D[v[t, x], t] == 0;
> shape = D[0.125 Erf[(x - 0.5)/0.125], x];
> ics ={v[0, x] == shape, i[0, x]==0};
Now the problem is to be numerically integrated with NDSolve over x in [0,1] and t in [0,2]. I want to specify either open ends v[t, 0] =v[t, 1]=0 or non reflective boundary conditions. In the first case I can do it:
> region = Line[{{0}, {1}}];
> bcs = {v[t, 0] == 0, v[t, 1] == 0};
> sol = NDSolve[{eq1,eq2, ics, bcs}//Flatten, {v, i}, {t,0,2}, {x} \[Element] region]
How to do the same in the non-reflective (or impedence matched) case? All my attemps fail.
> sol2 = NDSolve[{eq1,eq2, ics}//Flatten, {v, i}, {t,0,2}, {x} [Element] region]
without bcs renders a solution that does not corresponds to the targeted case (by the way, what are the corresponding bcs ?).
> bcs2b = {v[t, 0] == i[t, 0] , v[t, 1] == i[t, 0]};
> sol2b = NDSolve[{eq1,eq2, ics, bcs2b}//Flatten, {v, i}, {t,0,2}, {x} \[Element] region]
returns an error about "Cross-coupling of dependent variables in DirichletCondition".
> bcs3c = {
>Derivative[0,1][v][t, 0] ==-Derivative[1,0][i][t, 0] ,
>Derivative[0,1][v][t, 1] ==-Derivative[1,0][i][t, 1] };
> sol3c = NDSolve[{eq1,eq2, ics, bcs3c}//Flatten, {v, i}, {t,0,2}, {x} \[Element] region]
returns an error about too high order derivatives in boundary conditions.
How to proceed with this system of coupled first order PDEs? (note that I know how to do with a second order wave equation and Neumann values, but that's not my question). I want to express the conditions on v and i.
Thank you for your help.Denis Vion2019-03-18T19:56:07Z