3.4 enforv3d – PLIC interface location for arbitrary polyhedra¶
The enforv3d routine addresses the VCE problem in 3D, specifically aiming to locate the PLIC interface within a polyhedral cell. The subroutine can be invoked in Fortran, C, and Python as follows:
Fortran:
call enforv3d(c,ipv,nipv,ntp,nts,ntv,v,vt,vertp,xnc,xns, &
ync,yns,znc,zns)
C:
enforv3d(&c,ipv,nipv,&ntp,&nts,&ntv,&v,&vt,vertp,&xnc,xns,
&ync,yns,&znc,zns);
Python:
c = voft.enforv3d(ipv,nipv,ntp,nts,ntv,v,vt,vertp,xnc,xns,
ync,yns,znc,zns)
Arguments:
|
|
|
scalar representing the signed distance from the PLIC interface to the origin along the normal vector \(\boldsymbol{n}\) |
|
|
|
array of dimensions |
|
|
|
array of length \(\texttt{ns}\) storing the number of vertices per face boundary |
|
|
|
maximum vertex index in the connectivity list |
|
|
|
total number of face boundaries |
|
|
|
total number of vertices |
|
|
|
scalar representing the target liquid volume within the cell |
|
|
|
scalar representing the total volume of the polyhedron |
|
|
|
array of dimensions \(({nv},3)\) storing the \(x,y,z\)-coordinates of each vertex |
|
|
|
\(x,y,z\)-components of the unit-length vector \(\boldsymbol{n}\) normal to the PLIC interface pointing towards the liquid phase |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vector for each face boundary |
Note: This routine is intended for the original, untruncated cell geometry, with (\(\texttt{ntp}=\texttt{ntv}\)). The total cell volume must satisfy \(\texttt{vt}>0\), and the target liquid volume must satisfy \(0\leq \texttt{v}\leq \texttt{vt}\). The argument \(\texttt{v}\) is a volume, not a volume fraction; for a prescribed liquid volume fraction \(\alpha\), use \(\texttt{v}=\alpha\,\texttt{vt}\).
If \(\texttt{vt}\leq0\) or \(\texttt{ntp}>\texttt{ntv}\), the routine prints a diagnostic message and returns without assigning a valid value to c.