OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
SphericalCoordinateSystem Struct Reference

Spherical coordinate system parameters. More...

Collaboration diagram for SphericalCoordinateSystem:

Public Member Functions

 SphericalCoordinateSystem (std::pair< double, double > r_range, std::pair< double, double > theta_range, std::pair< double, double > phi_range, Bool3 periodic={false, false, true})
 

Public Attributes

const double m_r_min
 Minimum radius (0 for full sphere)
 
const double m_r_max
 Maximum radius.
 
const double m_theta_min
 Min polar angle (typically 0)
 
const double m_theta_max
 Max polar angle (typically π)
 
const double m_phi_min
 Min azimuthal angle (typically 0)
 
const double m_phi_max
 Max azimuthal angle (typically 2π)
 
const Bool3 m_periodic
 Periodicity: {false, false, true} for φ
 

Detailed Description

Spherical coordinate system parameters.

Spherical coordinates (r, θ, φ) where:

  • r: radial distance from origin (r ≥ 0)
  • theta: polar angle measured from +z axis (theta in [0, pi])
  • phi: azimuthal angle in x-y plane (phi in [0, 2*pi])

Physical interpretation:

  • x = r * sin(θ) * cos(φ)
  • y = r * sin(θ) * sin(φ)
  • z = r * cos(θ)

Common use cases:

  • Planetary atmospheres (full sphere)
  • Radial growth problems (bubble, crystal)
  • Spherical shell problems (annular: r_min > 0)
Examples
/home/runner/work/OpenPFC/OpenPFC/examples/17_custom_coordinate_system.cpp, and Spherical.

The documentation for this struct was generated from the following file: