8.2. pyafv.PhysicalParams

class PhysicalParams(r=1.0, A0=3.141592653589793, P0=4.8, KA=1.0, KP=1.0, Lambda=0.2, delta=None, seed=None)[source]

Physical parameters for the active finite Voronoi (AFV) model.

Warning

  • Frozen dataclass is used for PhysicalParams to ensure immutability of instances.

  • Do not set delta unless you know what you are doing.

Parameters:
  • r (float) – Radius (maximal) of the Voronoi cells, sometimes denoted as \(\ell\).

  • A0 (float) – Preferred area of the Voronoi cells.

  • P0 (float) – Preferred perimeter of the Voronoi cells.

  • KA (float) – Area elasticity constant.

  • KP (float) – Perimeter elasticity constant.

  • Lambda (float) – Tension difference between non-contacting edges and contacting edges.

  • delta (float | None) – Contact truncation threshold to avoid singularities in computations; if None, set to 0.45*r.

  • seed (int | None) – Random seed for reproducibility; used by get_steady_state() and with_optimal_radius() for random optimization restarts, and by FiniteVoronoiSimulator for fallback random sampling.

Attributes

r

Radius (maximal) of the Voronoi cells, sometimes denoted as \(\ell\).

A0

Preferred area of the Voronoi cells.

P0

Preferred perimeter of the Voronoi cells.

KA

Area elasticity constant.

KP

Perimeter elasticity constant.

Lambda

Tension difference between non-contacting edges and contacting edges.

delta

Contact truncation threshold to avoid singularities in computations.

seed

Random seed for reproducibility; used by get_steady_state() and with_optimal_radius() for random optimization restarts, and by FiniteVoronoiSimulator for fallback random sampling.

Methods

get_steady_state()

Search for the steady-state \((\ell,d)\) of a cell doublet for the given physical parameters (by minimizing total energy).

with_optimal_radius([digits, delta])

Returns a new instance of PhysicalParams with the maximum radius \(\ell\) (or r) updated to the steady state value \(\ell_0\) of cell doublets.

replace(**changes)

Returns a new instance of PhysicalParams with specified fields replaced by new values.