SimiLie
Loading...
Searching...
No Matches
resistive_magnetodynamics.hpp
1// SPDX-FileCopyrightText: 2026 Baptiste Legouix
2// SPDX-License-Identifier: AGPL-3.0-or-later
3// AI-GENERATED
4
5#pragma once
6#include <similie/physics/magnetodynamics/magnetodynamics.hpp>
7
16class ResistiveMagnetodynamics : public Magnetodynamics
17{
18public:
19 double const resistivity;
20 KOKKOS_FUNCTION ResistiveMagnetodynamics(
21 double magnetic_permeability,
22 double electrical_resistivity)
23 : Magnetodynamics(magnetic_permeability)
24 , resistivity(electrical_resistivity)
25 {
26 KOKKOS_ASSERT(resistivity >= 0);
27 }
28 KOKKOS_FUNCTION Vector
29 ohm_electric_field(Vector const& velocity, Vector const& induction, Vector const& current) const
30 {
31 Vector result = Magnetodynamics::ohm_electric_field(velocity, induction, current);
32 for (int a = 0; a < 3; ++a)
33 result[a] += resistivity * current[a];
34 return result;
35 }
36 KOKKOS_FUNCTION Scalar ohmic_heating(Vector const& current) const
37 {
38 return Scalar(resistivity * dot(current, current));
39 }
40 KOKKOS_FUNCTION double magnetic_diffusivity() const
41 {
42 return resistivity / permeability;
43 }
44};
45
47} // namespace similie::physics::magnetodynamics
Dissipative Ohm-law extension of the Hamiltonian magnetic sector.
KOKKOS_FUNCTION Vector ohm_electric_field(Vector const &velocity, Vector const &induction, Vector const &current) const
KOKKOS_FUNCTION ResistiveMagnetodynamics(double magnetic_permeability, double electrical_resistivity)
KOKKOS_FUNCTION Scalar ohmic_heating(Vector const &current) const