6:42 PM
This is a chatroom about my investigations about "how to make disappear the artificial boundary phi=0" when solving a Laplace equation in polar coordinate. These are investigations are a my way to understand how to impose continuity of flux of heat (or electric field, it's exactly the same problem) in a "internal" boundary
First a solution that respects the continuity of the potential only (and does not respect flux continuity) :
solCyl10 = NDSolveValue[ { laplacianCil == 0, boundaryConditionCil, PeriodicBoundaryCondition[V[r,p],p==2 Pi,Function[x,x+{0,-2 Pi}]] }, V, {r, r1, R}, {p, 0, 2 Pi}, MaxSteps -> Infinity]; potentialSquareRepresentation=ContourPlot[solCyl10[r, p], {r,p} \[Element] solCyl10["ElementMesh"] , ColorFunction -> "Temperature" ,Contours-> 20 , PlotLegends -> Automatic ]; potentialCylindricalRepresentation=Show[ potentialSquareRepresentation /. GraphicsComplex[array1_, rest___] :> GraphicsComplex[(#[[1]] {Cos[#[[2]]],Sin[#[[2]]]})& /@ array1, rest],
solCyl11 = NDSolveValue[ { laplacianCil == 0, boundaryConditionCil, PeriodicBoundaryCondition[(*.5 +*) V[r,p],p==0 && 0<r<1,Function[x,x+{0, 2 Pi}]] }, V, {r, r1, R}, {p, 0, 2 Pi}, MaxSteps -> Infinity]; potentialSquareRepresentation=ContourPlot[solCyl11[r, p], {r,p} \[Element] solCyl10["ElementMesh"] , ColorFunction -> "Temperature" ,Contours-> 20 , PlotLegends -> Automatic ]; potentialCylindricalRepresentation=Show[ potentialSquareRepresentation /. GraphicsComplex[array1_, rest___] :> GraphicsComplex[(#[[1]] {Cos[#[[2]]],Sin[#[[2]]]})& /@ array1, rest],
Indeed, the documentation of
PeriodicBoundaryCondition[...]
(item "possible issues") explains that there is a notion of "Source" and "Target" boundaries. This imposes a "direction of propagation" to the solution. Between the two examples above I have simply inverted the target and the source boundaries.
(In the first case the source boundary is upper side of horizontal line and the target is the other side. Note that compromises are possible, one can invert the target/source at the half of the line for example, hence my text :"and there are other ones" above)
potentialSquareRepresentation=ContourPlot[functionPot00[r, p], {r,p} \[Element] solCyl10["ElementMesh"] , ColorFunction -> "Temperature" ,Contours-> 20 , PlotLegends -> Automatic ]; potentialCylindricalRepresentation=Show[ potentialSquareRepresentation /. GraphicsComplex[array1_, rest___] :> GraphicsComplex[(#[[1]] {Cos[#[[2]]],Sin[#[[2]]]})& /@ array1, rest], PlotRange -> Automatic ]; functionGivingAPair12={Derivative[1,0][functionPot00][#1,#2],1/#1 Derivative[0,1][functionPot00][#1,#2]}&;
One has the feeling that this solution is not far from the real solution, the one that respects continuity of potential and flux. (Note that in this problem the real solution is symetric with regard to the diagonal).
7:42 PM
8:10 PM
next day → last day (27 days later) »
Transcript for
Jun '187
Jun8
Laplace in polar coordinates
reflexion about [my answer](mathematica.stackexchange.com/a/17...