aboutsummaryrefslogtreecommitdiff
path: root/fullswof-utils
diff options
context:
space:
mode:
Diffstat (limited to 'fullswof-utils')
-rwxr-xr-xfullswof-utils/makeBoundary11
1 files changed, 6 insertions, 5 deletions
diff --git a/fullswof-utils/makeBoundary b/fullswof-utils/makeBoundary
index 097ae9e..512a968 100755
--- a/fullswof-utils/makeBoundary
+++ b/fullswof-utils/makeBoundary
@@ -175,7 +175,8 @@ xmax = (xtp[0]+xtp[-1]) # domain extent in x-direction
ymax = (ytp[0]+ytp[-1]) # domain extent in y-direction
ncols = int(math.sqrt(len(xtp)*xmax/ymax)) # number of cells in x-direction
nrows = int(len(xtp)/ncols) # number of cells in y-direction
-dX = xmax/ncols # cell size
+dX = xmax/ncols # cell size in x-direction
+dY = dX # for uniform grid
print('cell size, dX (/m) =', dX)
#print(ncols, nrows)
@@ -184,12 +185,12 @@ print('cell size, dX (/m) =', dX)
# blocks, with nrows lines per block.
if args.location == 'top':
xin = xtp[nrows-1:len(xtp):nrows]
- yin = 2*ytp[nrows-1:len(xtp):nrows] - ytp[nrows-2:len(xtp):nrows]
- zin = 2*ztp[nrows-1:len(xtp):nrows] - ztp[nrows-2:len(xtp):nrows]
+ yin = ytp[nrows-1:len(xtp):nrows] + dY
+ zin = ztp[nrows-1:len(xtp):nrows] + dY*slope
elif args.location == 'bottom':
xin = xtp[0:len(xtp):nrows]
- yin = 2*ytp[0:len(xtp):nrows] - ytp[1:len(xtp):nrows]
- zin = 2*ztp[0:len(xtp):nrows] - ztp[1:len(xtp):nrows]
+ yin = ytp[0:len(xtp):nrows] - dY
+ zin = ztp[0:len(xtp):nrows] - dY*slope
elif args.location == 'left':
xin = 2*xtp[:nrows] - xtp[nrows:2*nrows]
yin = ytp[:nrows]