3.13 ``intpv3dpa`` – Intersection volume between paraboloid and arbitrary polyhedron ==================================================================================== The ``intpv3dpa`` routine computes the volume of the intersection between a pa­ra­bo­loi­dal fluid region and an arbitrary polyhedron. This calculation employs an improved version of the approximate procedure based on recursive local grid refinement of the polyhedron proposed by [\ :ref:`14 `\ ]. **Fortran:** .. code:: fortran call intpv3dpa(cparab,ipv,nc,nipv,ntp,nts,ntv,vertp,vf,xns,yns,zns) **C:** .. code:: c intpv3dpa(cparab,ipv,&nc,nipv,&ntp,&nts,&ntv,vertp,&vf,xns,yns,zns); **Python:** .. code:: python vf=voft.intpv3dpa(cparab,ipv,nc,nipv,ntp,nts,ntv,vertp,xns,yns,zns) **Arguments:** +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``cparab`` | ``IN`` | ``W_P`` | :math:`12`-component array containing: the six paraboloid coefficients defining the surface geometry (see Eq. \ :ref:`3.1 `\ , indices ``1--6``); the three components of the unit vector along the local ``f``-axis, expressed in global coordinates (indices ``7-9``); and the three coordinates of the local origin in global coordinates (indices ``10--12``). The component indices in the argument description follow Fortran’s one-based indexing. | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``ipv`` | ``IN`` | ``I_P`` | array of dimensions ``(ns,nv)`` storing the vertex indices defining each face boundary of the polyhedron | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``nc`` | ``IN`` | ``I_P`` | scalar specifying the number of sub-cells along each coordinate axis of the superimposed Cartesian grid used for the refinement process | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``nipv`` | ``IN`` | ``I_P`` | array of length :math:`\texttt{ns}` storing the number of vertices per face boundary | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``ntp`` | ``IN`` | ``I_P`` | maximum vertex index in the connectivity list | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``nts`` | ``IN`` | ``I_P`` | total number of face boundaries of the polyhedron | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``ntv`` | ``IN`` | ``I_P`` | total number of vertices in the polyhedron | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``vertp`` | ``IN`` | ``W_P`` | array of dimensions :math:`({nv},3)` storing the :math:`x,y,z`-coordinates of each vertex | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``vf`` | ``OUT`` | ``W_P`` | scalar representing the volume of the portion of the polyhedron lying within the paraboloid (i.e., the liquid volume) | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``xns, yns, zns`` | ``IN`` | ``W_P`` | arrays of length :math:`\texttt{ns}` storing the :math:`x,y,z`-components of the outward-pointing unit normal vector for each face boundary | +-------------------+---------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Note:** Unlike PLIC methods based on planar interfaces, this routine uses a quadratic interface representation. The intersection volume is computed approximately, and its accuracy depends on the interface representation and the spatial refinement used in the calculation. Despite its name, ``vf`` is the computed intersection volume, not a volume fraction. For a cell of positive total volume ``vt``, the corresponding liquid volume fraction is :math:`\texttt{vf}/\texttt{vt}`. The subdivision parameter ``nc`` must be a positive integer.