I try to solve my equations by using NDsolve. But it does not solve my solution. Can anyone help me to check whether I used correct command or not?
eq1 = {D[Subscript[\[Theta], c][x, y], x] -
2/(Y - Y^2)*D[Subscript[\[Theta], c][x, y], y, y] == 0};
ic = {Subscript[\[Theta], c][0, y] == 1};
bc = {DirichletCondition[{Subscript[\[Theta], c][x, y] == 0}, y == 0],NeumannValue[0, y == 1]};
sol = NDSolve[{eq1, ic, bc}, {Subscript[\[Theta], c]}, {x, 0, 1}, {y,
0, 1}]
fkampas
(Frank Kampas)
2
When I copy eq1 into Mathematica, I get a message
Syntax::bktmcp: Expression "{D[Subscript[\[Theta],c][x,y],x]-2/(Y-Y^2)*D[Subscript[\[Theta],c][x,y],y,y]==0" has no closing "}".
Thanks for your help. But I checked after correction it does not give me a result.
neils
(Neil Singer)
4
Mirza,
You had several bugs/typos:
- Y and y are different variables β be careful of capitalization
- you need a list of equations β not a list of lists
- you use NeumannValue incorrectly β it is not used in the boundary conditions it is in the equation itself (even though it acts at the boundary)
- you use extra lists in places they do not belong (i.e inside of DirichletCondition, the integration variable, etc.)
this computes a solution:
eq1 = {D[Subscript[\[Theta], c][x, y], x] -
2/(y - y^2)*D[Subscript[\[Theta], c][x, y], y, y] ==
NeumannValue[0, y == 1]};
ic = {Subscript[\[Theta], c][0, y] == 1};
bc = {DirichletCondition[Subscript[\[Theta], c][x, y] == 0, y == 0]};
sol = NDSolve[Join[eq1, ic, bc],
Subscript[\[Theta], c], {x, 0, 1}, {y, 0, 1}]
Regards,
Neil
Thanks for your correction. But still, it does not give me the solution.