OpenImpala
Image-based parallel transport property solver
Loading...
Searching...
No Matches
OpenImpala::SpecificSurfaceArea Class Reference

Computes the specific surface area between two phases in an iMultiFab. More...

#include <SpecificSurfaceArea.H>

Public Member Functions

void directionFaceCounts (amrex::Array< long long, 3 > &dir_faces, long long &total_count, bool local=false) const
 Compute interface face counts along each coordinate direction and total cells.
SpecificSurfaceArea & operator= (const SpecificSurfaceArea &)=delete
SpecificSurfaceArea & operator= (SpecificSurfaceArea &&)=default
 SpecificSurfaceArea (const amrex::Geometry &geom, const amrex::iMultiFab &fm, int phase_a=0, int phase_b=1, int comp=0, int boundary_padding=0)
 Construct a SpecificSurfaceArea calculator.
 SpecificSurfaceArea (const SpecificSurfaceArea &)=delete
 SpecificSurfaceArea (SpecificSurfaceArea &&)=default
void value (long long &face_count, long long &total_count, bool local=false) const
 Compute the raw interface face count and total cell count.
amrex::Real value_corrected (bool local=false) const
 Corrected SSA = (2/3) * raw SSA (Cauchy-Crofton correction).
amrex::Real value_physical (bool local=false) const
 Physical specific surface area accounting for potentially anisotropic cell sizes: SSA_raw = (1 / total_count) * sum_d (dir_faces[d] / dx[d]).
amrex::Real value_physical_corrected (bool local=false) const
 Cauchy-Crofton (2/3) corrected physical specific surface area.
amrex::Real value_ssa (bool local=false) const
 Raw SSA = face_count / total_count (no stereological correction).
virtual ~SpecificSurfaceArea ()=default

Detailed Description

Computes the specific surface area between two phases in an iMultiFab.

Counts voxel faces where adjacent cells belong to different specified phases. Raw SSA = total_interface_faces / total_cells. With unit voxel spacing each face has area 1 and each cell has volume 1.

The raw face count systematically overestimates the true geometric surface area because curved/diagonal interfaces are represented as axis-aligned staircases on the voxel grid (the "laddering effect"). The corrected SSA applies the Cauchy-Crofton factor of 2/3, which is exact for isotropic surfaces (Ohser & Muecklich, 2000).

An optional boundary padding parameter excludes the outermost N voxel layers from the computation, mitigating artifacts from truncated features at domain boundaries.

Note
The iMultiFab must have at least 1 ghost cell filled with valid phase data, since the face counting reads neighbor cells across MFIter box boundaries.
Warning
The iMultiFab must remain valid for the lifetime of this object.

Constructor & Destructor Documentation

◆ SpecificSurfaceArea() [1/3]

OpenImpala::SpecificSurfaceArea::SpecificSurfaceArea ( const amrex::Geometry & geom,
const amrex::iMultiFab & fm,
int phase_a = 0,
int phase_b = 1,
int comp = 0,
int boundary_padding = 0 )

Construct a SpecificSurfaceArea calculator.

Parameters
geomAMReX Geometry describing the domain.
fmiMultiFab containing phase IDs.
phase_aFirst phase ID (default 0).
phase_bSecond phase ID (default 1).
compComponent index within fm (default 0).
boundary_paddingNumber of voxel layers to exclude from all domain faces (default 0). Both face counting and cell counting are restricted to the interior padded region.

◆ SpecificSurfaceArea() [2/3]

OpenImpala::SpecificSurfaceArea::SpecificSurfaceArea ( const SpecificSurfaceArea & )
delete

◆ SpecificSurfaceArea() [3/3]

OpenImpala::SpecificSurfaceArea::SpecificSurfaceArea ( SpecificSurfaceArea && )
default

◆ ~SpecificSurfaceArea()

virtual OpenImpala::SpecificSurfaceArea::~SpecificSurfaceArea ( )
virtualdefault

Member Function Documentation

◆ directionFaceCounts()

void OpenImpala::SpecificSurfaceArea::directionFaceCounts ( amrex::Array< long long, 3 > & dir_faces,
long long & total_count,
bool local = false ) const

Compute interface face counts along each coordinate direction and total cells.

Parameters
[out]dir_facesNumber of interface faces normal to each direction (X=0, Y=1, Z=2).
[out]total_countTotal number of cells in the (padded) domain.
[in]localIf true, skip MPI reduction (default false).

◆ operator=() [1/2]

SpecificSurfaceArea & OpenImpala::SpecificSurfaceArea::operator= ( const SpecificSurfaceArea & )
delete

◆ operator=() [2/2]

SpecificSurfaceArea & OpenImpala::SpecificSurfaceArea::operator= ( SpecificSurfaceArea && )
default

◆ value()

void OpenImpala::SpecificSurfaceArea::value ( long long & face_count,
long long & total_count,
bool local = false ) const

Compute the raw interface face count and total cell count.

Both counts are restricted to the padded interior region if boundary_padding > 0.

Parameters
[out]face_countNumber of faces at the phase_a/phase_b interface.
[out]total_countTotal number of cells in the (padded) domain.
[in]localIf true, skip MPI reduction (default false).

◆ value_corrected()

amrex::Real OpenImpala::SpecificSurfaceArea::value_corrected ( bool local = false) const
inline

Corrected SSA = (2/3) * raw SSA (Cauchy-Crofton correction).

For a surface with isotropic orientation distribution, the expected number of axis-aligned voxel face intersections is 3/2 times the true surface area per unit volume. The 2/3 factor corrects for this bias.

Parameters
localIf true, compute locally (default false).

◆ value_physical()

amrex::Real OpenImpala::SpecificSurfaceArea::value_physical ( bool local = false) const

Physical specific surface area accounting for potentially anisotropic cell sizes: SSA_raw = (1 / total_count) * sum_d (dir_faces[d] / dx[d]).

◆ value_physical_corrected()

amrex::Real OpenImpala::SpecificSurfaceArea::value_physical_corrected ( bool local = false) const
inline

Cauchy-Crofton (2/3) corrected physical specific surface area.

◆ value_ssa()

amrex::Real OpenImpala::SpecificSurfaceArea::value_ssa ( bool local = false) const
inline

Raw SSA = face_count / total_count (no stereological correction).

This value is exact for axis-aligned planar interfaces but overestimates for curved or diagonal surfaces due to the voxel laddering effect.

Parameters
localIf true, compute locally (default false).

The documentation for this class was generated from the following files: