3.6 enforvppa – PPIC interface location for arbitrary polyhedra¶
The enforvppa routine addresses the VCE problem in 3D, specifically aiming to locate the PPIC interface within an arbitrary polyhedral cell. The PPIC interface is defined within a local reference system \((\texttt{u},\texttt{v},\texttt{f})\) as:
where the coefficient \(c_1=\texttt{c}\) is computed by the routine to ensure that the volume of liquid within the polyhedral cell matches the target volume \(\texttt{vf}\). This calculation employs an improved version of the paraboloid-polyhedral approximation procedure based on recursive local grid refinement of the polyhedral cell proposed by [14].
Fortran:
call enforvppa(c,cparab,ie,ipv,nc,nipv,ntp,nts,vf,vt,vertp, &
xns,yns,zns)
C:
enforvppa(&c,cparab,&ie,ipv,&nc,nipv,&ntp,&nts,
&vf,&vt,vertp,xns,yns,zns);
Python:
(c,ie) = voft.enforvppa(cparab,ipv,nc,nipv,ntp,nts,vf,vt,vertp,xns,yns,zns)
Arguments:
|
|
|
scalar corresponding to the coefficient \(c_1\) in Eq. (3.1), representing the conservative position of the paraboloid interface along the local \(\texttt{f}\)-axis |
|
|
|
\(12\)-component array containing: the six paraboloid coefficients defining the surface geometry (see Eq. 3.1, indices (indices |
|
|
|
integer status flag: 0 indicates successful convergence; 1 indicates failure to find a root |
|
|
|
array of dimensions |
|
|
|
scalar specifying the number of sub-cells along each coordinate axis of the superimposed Cartesian grid used for the refinement process |
|
|
|
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 |
|
|
|
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 |
|
|
|
arrays of length \(\texttt{ns}\) storing the \(x,y,z\)-components of the outward-pointing unit normal vector for each face boundary |
Note: The first component of cparab provides the initial estimate of \(c_1\). The routine returns the computed coefficient in c without modifying cparab. After checking that \(\texttt{ie}=0\), update cparab(1) in Fortran or cparab[0] in C and Python before using the reconstructed interface in subsequent calculations. The component indices in the argument description follow Fortran’s one-based indexing.
The routine assumes the original, untruncated cell geometry, with contiguous vertex indices from 1 to ntp. The subdivision parameter nc must be a positive integer. The total cell volume must satisfy \(\texttt{vt}>0\), and the target liquid volume must satisfy \(0\leq \texttt{vf}\leq \texttt{vt}\). Here, vf denotes a volume, not a volume fraction.
Always check ie before using c. If \(\texttt{ie}=1\), the routine has not obtained an acceptable solution, and c must not be used as a successfully reconstructed interface.