Loading [MathJax]/jax/element/mml/optable/BasicLatin.js

Monday, February 27, 2017

Derivation of Divergence in Cylindrical Coordinates

Derivation of Divergence in Cylindrical Coordinates The divergence of a vector field in Cartesian coordinates is fairly straight forward: F=Fxx+Fyy+Fzz But before we undertake this derivation, it will help to try and understand the meaning of divergence. It is tempting to just take the partial derivatives in whatever coordinate system you're using and add them together. But alas, this doesn't quite work.

First, let us consider flux.

Flux is the amount of something passing through a surface multiplied by the area of that surface. It can be a fluid, gas, electric field, or anything that can be described by a vector field. In the picture below, there are F liters/minute of water flowing in the circular pipe.

If we were to consider an imaginary surface slicing perpendicularly through the pipe (surface A), the flux through that circular surface would be F liters/minute multiplied by the area of the circle. It is important to note that that if we were to consider a surface slicing through at a bias (like surface B), the flux would be the same. Even though the elliptical area is larger than the circular one the amount of flux per unit area is less because the flux is no longer perpendicular to the surface. Flux through an area is then defined as Ψ=FA=FAcosθ where the vector area A is defined to be normal to the surface. For a surface that is open, the choice of which of the two normal vectors we mean is arbitrary (we just have to be consistent). For a closed surface, the normal is defined to point to the outside of the surface. The angle θ is the angle between the area-normal and the vector F. You can see as the angle between the flow and the surface gets closer to π2 that the flux gets smaller and smaller until it vanishes completely when the two are perpendicular.

Now, consider the volume defined by surfaces A, B and the walls of the pipe in the figure above. We can define the total flux through the volume as Ψtotal=Ψpipe+ΨA+ΨB Unless we have a leaky pipe, Ψpipe=0. Because we define the surface normal of a closed surface to point outward, the flux through surface A is negative (the flow and the normal are in opposite directions, so the dot-product is negative). The flow through B is equal in magnitude to that passing through surface B but positive. Hence, Ψtotal=0. This makes intuitive sense when dealing with conservation of mass as otherwise there would be an accumulation of mass inside the pipe (Ψtotal<0) or loss of mass (Ψtotal>0).

Divergence is the amount of flux leaving a closed surface as the volume of the closed surface approaces zero. So, we now look at the general sitution of the pipe above in cylindrical coordinates. We consider a small enough closed volume that we can consider it a cube. In order to compute the total flux, we have to do 6 integrations as there are 6 sides to a cube. But we will group them in pairs, one pair for each direction ρ,ϕ,z.

The vector field in cylindrical coordinates is given by F=Fρˆρ+Fϕˆϕ+Fzˆz We place our tiny cube-like volume in the field F at some point P=(ρ,ϕ,z).

First we consider the flux passing through the surfaces normal to the z direction (the top and bottom faces of the cube). Since the distances involved are small, we can approximate the field passing through these as Ftop=Fz(ρ,ϕ,z+Δz)Fz(ρ,ϕ,z)+Fzz(ρ,ϕ,z)Δz2 It should be noted that the other components of the field don't play a part here because they are parallel to these surfaces so nothing going in the, say, ρ direction leaves via the z direction. Similarly for the bottom surface, Fbottom=Fz(ρ,ϕ,zΔz)Fz(ρ,ϕ,z)Fzz(ρ,ϕ,z)Δz2 The areas of these surfaces are equal and independent of z. Az=ρΔϕΔρ Therefore, the flux through these z-surfaces is (remembering that the flux through the bottom surface is into the volume and so is negative) Ψz=FtopAzFbottomAz=(FtopFbottom)Az Ψz=(Fz+zFzΔz2(FzFzzΔz2))ρΔϕΔρ Ψz=FzzρΔϕΔρΔz Recognize that the term ρΔϕΔρΔz is the differential volume in cylindrical coordinates, so we can write the previous equation as Ψz=FzzΔV Where ΔV is the differential volume element. I should note that if you were to do this derivation in Cartesian coordinates, the x and y component derivations would be identical (except for the subscripts). But in cylindrical coordinates, things get a little more interesting from here on out. Looking now at the ϕ direction we consider the front and back faces of the volume. (I will omit the function arguments to the partial derivatives in the service of brevity with the understanding that we are talking about the point P=(ρ,ϕ,z)). Fback=Fϕ(ϕ+Δϕ)Fϕ+FϕϕΔϕ2 Ffront=Fϕ(ϕΔϕ)FϕFϕϕΔϕ2 Aϕ=ΔρΔz Because the positive ϕ direction is toward the back of the volume, Ψϕ=(FbackFfront)Aϕ Ψϕ=(Fϕ+FϕϕΔϕ2(FϕFϕϕΔϕ2))ΔρΔz Ψϕ=FϕϕΔϕΔρΔz The term ΔϕΔρΔz is almost the differential volume. And maybe because we know where we are headed, we bend the equation to our will Ψϕ=FϕϕΔϕΔρΔz=FϕϕρρΔϕΔρΔz Ψϕ=1ρFϕϕΔV Now we try to handle the ρ component. We need to be careful here. But first things first. The vector field is defined similarly to previous components. Fright=Fρ(ρ+Δρ)Fρ+FρρΔρ2 Fleft=Fϕ(ρΔρ)FρFρρΔρ2 Here is where it gets tricky. The area definitions are different because the two surfaces are not equal in size and so must be treated differently. Aright=(ρ+Δρ2)ΔϕΔz Aleft=(ρΔρ2)ΔϕΔz First computing the flux on the right side. Ψright=FrightAright=(Fρ+FρρΔρ2)((ρ+Δρ2)ΔϕΔz) Ψright=(Fρ+FρρΔρ2)(ρΔϕΔz+12ΔρΔϕΔz) Ψright=FρρΔϕΔz+12FρΔρΔϕΔz+12FρρρΔρΔϕΔz+14FρρΔρ2ΔϕΔz Similarly on the left hand side Ψleft=FleftAleft=(FρFρρΔρ2)((ρΔρ2)ΔϕΔz) Ψleft=(FρFρρΔρ2)(ρΔϕΔz12ΔρΔϕΔz) Ψleft=FρρΔϕΔz12FρΔρΔϕΔz12FρρρΔρΔϕΔz+14FρρΔρ2ΔϕΔz Computing Ψρ (finally, after all that algebra) by subtracting and cancelling terms Ψρ=ΨrightΨleft Ψρ=FρΔρΔϕΔz+FρρρΔρΔϕΔz We make the same modification to the first term that we did with Ψϕ and substituting ΔV Ψρ=1ρFρΔV+FρρΔV This last equation is correct but we normally don't see it written this way, so we factor out a 1ρ and invoke the reverse chain rule. Ψρ=1ρ(Fρ+ρFρρ)ΔV=1ρρ(ρFρ)ΔV And so the total flux through our tiny volume is Ψtotal=Ψρ+Ψϕ+Ψz=(1ρρ(ρFρ)+1ρFϕϕ+Fzz)ΔV The divergence is the ratio of the flux through a closed surface as the volume of that closed surface approaces 0. F=lim

The derivation of divergence in spherical coordinates procedes along similar lines as the \phi and \rho terms. It's a little more complicated because of the added \sin\theta terms.

1 comment:

  1. We’ll never advocate a website that isn’t completely safe and safe. We’ll always look out for the seal of approval from a serious regulatory physique, and 로스트아크 we also like to see video games verified by a company like eCOGRA. As with any type of tournament every participant pays the same quantity to purchase in and is given the same quantity of chips. The aim, after all, is to be the final participant standing still with chips.

    ReplyDelete