Skip to content

Nuclear quadrupole vibrations

The quadrupole vibrations of a nuclear surface.

  • Class: NuclearQuadrupoleSystem
  • Import: from skcomplex.systems.physics.nonlinear_oscillators import NuclearQuadrupoleSystem
  • Field: physics/nonlinear_oscillators
  • Topics: chaos, ode, hamiltonian, nuclear physics
  • References:
    • Baran and Raduta 1998
    • Datseris and Parlitz 2022

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.physics.nonlinear_oscillators import NuclearQuadrupoleSystem

trajectory = NuclearQuadrupoleSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
q1 0.0
q2 1.0
p1 0.5
p2 0.0
B 0.5
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class NuclearQuadrupoleSystem(BaseSystem):
    """The quadrupole vibrations of a nuclear surface.

    The vibrations are a Hamiltonian system of two degrees of freedom.

    The deformation coordinates `q = (q1, q2)` and their momenta `p` move under the Hamiltonian `H = (q² + p²) / 2 + B
    q1 (3 q2² - q1²) / √2 + q⁴ / 8`, which is conserved. The cubic term has the threefold symmetry of the Hénon-Heiles
    potential, and the quartic term keeps every orbit bounded, so the motion is regular at low and high energies and
    largely chaotic in between. The system has the coordinates `nucleus.q1` and `nucleus.q2`, their momenta `nucleus.p1`
    and `nucleus.p2`, and the observable `nucleus.energy`.

    Args:
        q1:
            The initial first coordinate.

        q2:
            The initial second coordinate.

        p1:
            The initial first momentum.

        p2:
            The initial second momentum.

        B:
            The strength of the cubic term.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.physics.nonlinear_oscillators import NuclearQuadrupoleSystem
        >>> NuclearQuadrupoleSystem(B=0.3).prepare().system_.elements[0].B
        0.3
    """

    field = 'physics/nonlinear_oscillators'
    topics = ('chaos', 'ode', 'hamiltonian', 'nuclear physics')
    references = ('Baran and Raduta 1998', 'Datseris and Parlitz 2022')
    until = 200.0
    dt = 0.05
    invariants: ClassVar[Mapping[str, float]] = {'nucleus.energy': 1e-6}
    observables = (Observable('energy', _get_quadrupole_energy, element='nucleus'),)

    def __init__(
        self,
        q1: float = 0.0,
        q2: float = 1.0,
        p1: float = 0.5,
        p2: float = 0.0,
        *,
        B: float = 0.5,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label, solver=solver, backend=backend)
        self.q1 = q1
        self.q2 = q2
        self.p1 = p1
        self.p2 = p2
        self.B = B

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of the quadrupole vibrations of a nuclear surface.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        nucleus = QuadrupoleElement('nucleus', q1=self.q1, q2=self.q2, p1=self.p1, p2=self.p2, B=self.B)
        motion = QuadrupoleMotionInteraction('motion', target='nucleus')
        self.system_ = System(self.label, elements=[nucleus], interactions=[motion], solver=Yoshida4Solver(dt=0.01))

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

  • QuadrupoleMotionInteraction, from Interaction
class QuadrupoleElement(Element):
    """Surface of a nucleus in the quartic quadrupole potential.

    The surface has the coordinates `q1, q2` and momenta `p1, p2`.

    The quadrupole deformation of the nuclear surface moves under the Hamiltonian
    `H = (q² + p²) / 2 + B q1 (3 q2² - q1²) / √2 + q⁴ / 8`, with `q² = q1² + q2²`, which `QuadrupoleMotionInteraction`
    turns into the equations of motion. The cubic term of strength `B` breaks the rotational symmetry and makes the
    motion chaotic at intermediate energies, while the quartic term keeps it bounded at every energy.

    Args:
        label:
            The label of the nucleus.

        q1:
            The initial first coordinate.

        q2:
            The initial second coordinate.

        p1:
            The initial first momentum.

        p2:
            The initial second momentum.

        B:
            The strength of the cubic term.

    Examples:
        >>> from skcomplex.systems.physics.nonlinear_oscillators import QuadrupoleElement
        >>> QuadrupoleElement('nucleus').B
        0.5
    """

    visual = VisualSpec('bodies', {'positions': ('q1', 'q2'), 'trail': None})

    def __init__(
        self,
        label: str,
        *,
        q1: float = 0.0,
        q2: float = 1.0,
        p1: float = 0.5,
        p2: float = 0.0,
        B: float = 0.5,
    ) -> None:
        super().__init__(label)
        self.q1 = q1
        self.q2 = q2
        self.p1 = p1
        self.p2 = p2
        self.B = B

class QuadrupoleMotionInteraction(Interaction):
    """Motion of the surface of a nucleus in the quartic quadrupole potential.

    The coordinates `(q1, q2)` and the momenta `(p1, p2)` of the target follow Hamilton's equations `q' = dH/dp` and
    `p' = -dH/dq` of `H = (q² + p²) / 2 + B q1 (3 q2² - q1²) / √2 + q⁴ / 8`, with the strength `B` of the target.

    Args:
        label:
            The label of the interaction.

        target:
            The path of the nucleus.

    Examples:
        >>> from skcomplex.systems.physics.nonlinear_oscillators import QuadrupoleMotionInteraction
        >>> QuadrupoleMotionInteraction('motion', target='nucleus').target
        'nucleus'
    """

    law_classes = (RateLaw,)

    def __init__(self, label: str, *, target: Role) -> None:
        super().__init__(label)
        self.target = target

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the rates of the coordinates and the momenta of the nucleus.

        Args:
            context:
                The namespace of the nucleus and the time `t`.
        """
        super()._prepare(context)
        nucleus = context.target
        names = ('q1', 'q2', 'p1', 'p2')
        values = [getattr(nucleus, name) for name in names]
        symbols = [SR.symbol(f'_{name}') for name in names]
        q1, q2, p1, p2 = symbols
        hamiltonian = _get_quadrupole_energy(SimpleNamespace(q1=q1, q2=q2, p1=p1, p2=p2, B=nucleus.B))
        back = dict(zip(symbols, values, strict=True))
        rates = [hamiltonian.diff(p1), hamiltonian.diff(p2), -hamiltonian.diff(q1), -hamiltonian.diff(q2)]
        self.laws_ = [
            RateLaw(value.diff(context.t), rate.subs(back)) for value, rate in zip(values, rates, strict=True)
        ]

Equations

The equations are those that symbolic returns for the system with its default parameters.

nucleus.q1: diff(q1_nucleus(t), t) == p1_nucleus(t)
nucleus.q2: diff(q2_nucleus(t), t) == p2_nucleus(t)
nucleus.p1: diff(p1_nucleus(t), t) == sqrt(2)*B_nucleus*q1_nucleus(t)^2 + 1/2*sqrt(2)*(q1_nucleus(t)^2 - 3*q2_nucleus(t)^2)*B_nucleus - 1/2*(q1_nucleus(t)^2 + q2_nucleus(t)^2)*q1_nucleus(t) - q1_nucleus(t)
nucleus.p2: diff(p2_nucleus(t), t) == -3*sqrt(2)*B_nucleus*q1_nucleus(t)*q2_nucleus(t) - 1/2*(q1_nucleus(t)^2 + q2_nucleus(t)^2)*q2_nucleus(t) - q2_nucleus(t)