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"]