File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -900,6 +900,15 @@ class PolarGrid(Grid2d):
900900
901901 |<- ng guardcells->|<---- nx interior zones ----->|<- ng guardcells->|
902902
903+ ____
904+ / |
905+ / |
906+ / |
907+ / |
908+ / |
909+ /_________|
910+
911+
903912 The '*' marks the data locations.
904913 """
905914
@@ -912,10 +921,12 @@ def area_x(self):
912921 """
913922 r1 = self .xr
914923 r0 = self .xl
924+ t1 = self .yr
925+ t0 = self .yl
915926
916- # ** this is just \Delta r
927+ # ** this is just 1/2*dr*d\theta
917928
918- area = r1 - r0
929+ area = 0.5 * ( r1 - r0 ) * ( t1 - t0 )
919930 return area
920931
921932 def area_y (self ):
@@ -924,12 +935,12 @@ def area_y(self):
924935 The shape of the returned array is (ni, nj).
925936 """
926937
927- t1 = self .yr
928- t0 = self .yl
938+ r1 = self .xr
939+ r0 = self .xl
929940
930- # ** this is just \Delta \theta
941+ # ** this is just dr
931942
932- area = t1 - t0
943+ area = r1 - r0
933944 return area
934945
935946 def cell_volumes (self ):
You can’t perform that action at this time.
0 commit comments