*DECK NXTIAA FUNCTION NXTIAA(POSANN ,POSPIN,VOLINT) * *---------- * *Purpose: * Compute the volume of intersection between * a 2--D annular region and an annular pin. * *Copyright: * Copyright (C) 2005 Ecole Polytechnique de Montreal * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * *Author(s): G. Marleau. * *Parameters: input * POSANN spatial description of the annular region with * POSANN(0) the radius, POSANN(1) the $X$ position * of center and POSANN(2) the $Y$ position * of center. * POSPIN spatial description of the annular pin region with * POSPIN(0) the radius, POSPIN(1) the $X$ position * of center and POSPIN(2) the $Y$ position * of center. * *Parameters: output * NXTIAA type of intersection between annular region and * annular pin, where: * = 0 means that there is no intersection * between the two regions; * = 1 means that the annular region * is all located inside the annular pin; * = 2 means that the annular pin * is all located inside the annular region; * =-1 means that the intersection between * the annular region and the annular pin is partial. * VOLINT 2-D volume of intersection (area) between annular region and * annular pin. * *Reference: * G. Marleau, * New Geometries Processing in DRAGON: The NXT: Module, * Report IGE-260, Polytechnique Montreal, * Montreal, 2005. * *---- * IMPLICIT NONE *---- * Subroutine arguments *---- INTEGER NXTIAA DOUBLE PRECISION POSANN(0:2),POSPIN(0:2) DOUBLE PRECISION VOLINT *---- * Local parameters *---- INTEGER IOUT CHARACTER NAMSBR*6 PARAMETER (IOUT=6,NAMSBR='NXTIAA') INTEGER IPRINT PARAMETER (IPRINT=100) DOUBLE PRECISION DCUTOF PARAMETER (DCUTOF=1.0D-8) DOUBLE PRECISION DZERO PARAMETER (DZERO=0.0D0) *---- * Functions *---- DOUBLE PRECISION XDRCST,PI *---- * Local variables *---- INTEGER IFACE DOUBLE PRECISION PX,PY,PX2,PY2,RA2,RP2,DAP2,DAP,XINT,YINT, > ANGLEP,ANGLEA,SP,SA,VOLANN,VOLPIN,ACARG DOUBLE PRECISION DT1,DT2,DT3 *---- * Initialize NXTIAA and VOLINT *---- IF(IPRINT .GE. 200) THEN WRITE(IOUT,6000) NAMSBR WRITE(IOUT,6010) (POSANN(IFACE),IFACE=0,2) WRITE(IOUT,6011) (POSPIN(IFACE),IFACE=0,2) ENDIF PI=XDRCST('Pi',' ') NXTIAA=0 VOLINT=DZERO *---- * Find distance from center of annulus to pin center * $d=\sqrt(y^{2}+y^{2})$ * annular region/pin intersection if $d