Message Boards Message Boards

GROUPS:

NDSolve two coupled first order PDEs with specific boundary conditions?

Posted 4 months ago
249 Views
|
0 Replies
|
0 Total Likes
|

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: calling

sol2 = NDSolve[{eq1,eq2, ics}//Flatten, {v, i}, {t,0,2}, {x} [Element] region]

without bcs renders a solution that does not correspond to the targeted case (by the way, which default bcs are assumed in this case?). Using v= Z i with Z=1 the wave and load impedence, i.e.

bcs2b = {v[t, 0] == i[t, 0] , v[t, 1] == i[t, 1]};

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.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract