summaryrefslogtreecommitdiff
path: root/Dragon/src/XELPSC.f
blob: 7a30c6b04a9787e4501b1caf7cfecc7a86fa56e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
*DECK XELPSC
      FUNCTION XELPSC(RANN,PLANE)
*
*-----------------------------------------------------------------------
*
*Purpose:
* Compute annular surface below Cartesian plane.
*
*Copyright:
* Copyright (C) 1997 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
* RANN    annular radius.
* PLANE   Cartesian plane location.
*
*Parameters: output
* XELPSC  annular surface below plane.
*
*-----------------------------------------------------------------------
*
      IMPLICIT          NONE
      DOUBLE PRECISION  XELPSC,RANN,PLANE
*----
*  LOCAL VARIABLES
*----
      DOUBLE PRECISION  RANN2,PLANE2,ALPHA
*----
*  METHOD
*  1) FIND HALF-ANGLE COVERED BY THE TWO INTERSECTION POINTS
*     BETWEEN PLANE AND ANNULAR REGION
*     -- ALPHA=ACOS(-PLANE/RANN)
*  2) COMPUTED ANNULAR SURFACE COVERED BY THIS HALF-ANGLE
*     -- 0.5*RANN2*ALPHA
*  3) ADD SURFACE COVERED BY INTERNAL RECTANGLE IN THIS HALF-ANGLE
*     -- 0.5*PLANE*SQRT(RANN2-PLANE2)
*  4) DOULBLE SURFACE FOR FULL ANGLE
*----
      RANN2=RANN*RANN
      PLANE2=PLANE*PLANE
      ALPHA=ACOS(-PLANE/RANN)
      XELPSC=RANN2*ALPHA+PLANE*SQRT(RANN2-PLANE2)
      RETURN
      END