next up previous index
Next: W150 TransportSecond-Order Up: CERNLIB Previous: V401 Find Compatible

V700 Volume of Intersection of a Circular Cylinder with a Sphere

Routine ID: V700
Author(s): Library: MATHLIB
Submitter: Submitted: 07.06.1992
Language: FortranRevised:

Function subprograms RVNSPC and DVNSPC calculate the volume of intersection V(r,ρ,d) of a circular cylinder of radius r ≥0 with a sphere of radius ρ≥0 , the distance from the center of the sphere to the axis of the cylinder being d ≥0 .

This volume is given by

V(r,ρ,d) = 2 ∫∫ρ2-x2-y2 dx dy,

where the integration is performed over the intersection, if any, of the two circular disks (x-d)2+ y2≤r2

and x2+ y2≤ρ2 . If r ≠0 ∧ρ≠0 ∧d < r+ρ this is equal to

V(r,ρ,d) = 4 ∫max(d-r,-ρ)min(d+r,ρ)0min( r2-(x-d)2,ρ2-x2)ρ2-x2-y2 dx dy.

Otherwise V(r,ρ,d) = 0 .

On CDC and Cray computers, the double-precision version DVNSPC is not provided.

Structure:

FUNCTION subprograms
User Entry Names: RVNSPC, DVNSPC
External References: DELI3C, DELIKC, DELIEC (C347)

Usage:

In any arithmetic expression, RVNSPC(R,RHO,D) or DVNSPC(R,RHO,D) has the value V(R,RHO,D) .

RVNSPC is if type REAL, DVNSPC is of type DOUBLE PRECISION, and R, RHO and D are of the same type as the function name.

Method:

The integral given above can be expressed in closed form in terms of complete elliptic integrals of the first, second, and third kind. For details see Ref. 1.

Notes:

Any negative sign in the parameters is ignored.

In the single-precision version RVNSPC on machines other than CDC or Cray, the complete elliptic integrals are calculated inside the subprogram. This version, faster than DVNSPC, is intended mainly for applications in experimental physics, where its limited accuracy of about 6 digits can be tolerated.

References:

  1. F. Lamarche and C. Leroy, Evaluation of the volume of intersection of a sphere with a cylinder by elliptic integrals, Computer Phys. Comm. 59 (1990) 359--369.

High Energy Physics Simulation, Kinematics, Phase Space

W150



next up previous index
Next: W150 TransportSecond-Order Up: CERNLIB Previous: V401 Find Compatible


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995