# Plot a solution of Laplace equation over a rectangle?

GROUPS:
 Please, Help me to plot a graph of the solution of Equation of Laplace over the rectangle [{0.0;0.0},{0.1; 0.05}]. The following code does not work. H = DSolve[{u''[x, y] + u[x, y] == 0, u[0, y] == 0, u[x, 0] == 0, u[x, 0.05] == 0, u[0.1, y] == 100}, u[x, y], {x, y}]; 
10 months ago
7 Replies
 Frank Kampas 1 Vote
10 months ago
 Thank you, Frank. It doesn~t work, though. It is not clear , on the Help,what is the syntax to set 100 V to {x=0.1, 0
10 months ago
 Frank Kampas 2 Votes posting the code that you say doesn't work will help people figure out what went wrong
10 months ago
 You are right, Frank. Sorry for my fault. Here it goes, attached! I could not find any further information about the function DirichletCondition. I shall insist, however. Scabral Attachments:
 leqn = Laplacian[u[x, y], {x, y}] == 0; \[CapitalOmega] = Rectangle[{0, 0}, {0.1, 0.05}]; dcond = DirichletCondition[ u[x, y] == Piecewise[{{10, y == 0.00 || y == 0.0}}, 0], True]; sol = DSolveValue[{leqn, dcond}, u[x, y], {x, y} \[Element] \[CapitalOmega]] // FullSimplify \!$$TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ {"10.", RowBox[{"y", "==", "0"}]}, {"0", TagBox["True", "PiecewiseDefault", AutoDelete->True]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997], { Offset[0.84]}, Offset[0.27999999999999997]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997], { Offset[0.35]}, Offset[0.27999999999999997]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {}, "ItemsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False]$$ asol = sol /. {\[Infinity] -> 500} // Activate; Plot3D[asol // Evaluate, {x, y} \[Element] \[CapitalOmega], PlotRange -> All, PlotTheme -> "Business"] `