Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/sections/subsections/models-all.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Full-orbit Vlasov
:undoc-members:
:show-inheritance:

.. autoclass:: struphy.models.VlasovPoissonElectrostaticAdiabatic
.. autoclass:: struphy.models.VlasovPoissonAdiabatic
:members: doc_pde, doc_scalar_quantities, doc_normalization, doc_discretization, doc_long_description, doc_examples, doc_use_cases, doc_cannot_be_used_for
:undoc-members:
:show-inheritance:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Kinetic drift wave in a slab with drift-kinetic ions and adiabatic electrons (DriftKineticElectrostaticAdiabatic);
the same setup as examples/VlasovPoissonElectrostaticAdiabatic/slab_drift_wave, for comparison with full-orbit ions."""
the same setup as examples/VlasovPoissonAdiabatic/slab_drift_wave, for comparison with full-orbit ions."""

# -----------------------------
# Description of the simulation
Expand All @@ -9,7 +9,7 @@
description = """
Drift wave in a slab with a density gradient, with drift-kinetic (guiding-center, 5D) ions and adiabatic electrons
(DriftKineticElectrostaticAdiabatic). The physical setup is the one of the slab_drift_wave example of the full-orbit
model VlasovPoissonElectrostaticAdiabatic, so that the two models can be compared directly.
model VlasovPoissonAdiabatic, so that the two models can be compared directly.

Physics. The guiding-center distribution f(X, v_par, mu, t) is advected by the parallel streaming, the E x B drift and
the parallel acceleration by E_par (uniform B0 = e_z, no curvature). The potential follows from the quasi-neutrality
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
the flags must be those of the run. The figures are written into ``<sim_folder>/results`` (``--show`` shows them
instead): the amplitude and phase of the initial (k_y, k_z) mode against time with the measured and predicted
frequencies, the field energy, and phi in the (x, y) plane at the first, middle and last saved time. With
``--compare FOLDER``, the output folder of a run of examples/VlasovPoissonElectrostaticAdiabatic/slab_drift_wave
``--compare FOLDER``, the output folder of a run of examples/VlasovPoissonAdiabatic/slab_drift_wave
(same physical setup), the mode of the full-orbit run is overlaid.
"""

Expand Down Expand Up @@ -152,7 +152,7 @@ def main(path_out=DEFAULT_OUTPUT, save_figs=True, compare=None):
parser.add_argument(
"--compare",
default=None,
help="Output folder of a run of examples/VlasovPoissonElectrostaticAdiabatic/slab_drift_wave to overlay.",
help="Output folder of a run of examples/VlasovPoissonAdiabatic/slab_drift_wave to overlay.",
)
parser.add_argument("--show", action="store_true", help="Show the figures instead of saving them.")
args = parser.parse_args(other_flags)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""Kinetic drift wave in a slab with full-orbit ions and adiabatic electrons
(VlasovPoissonElectrostaticAdiabatic); the full-orbit counterpart of the drift-kinetic model
(VlasovPoissonAdiabatic); the full-orbit counterpart of the drift-kinetic model
DriftKineticElectrostaticAdiabatic."""

# -----------------------------
# Description of the simulation
# -----------------------------

name = "Slab drift wave (VlasovPoissonElectrostaticAdiabatic)"
name = "Slab drift wave (VlasovPoissonAdiabatic)"
description = """
Drift wave in a slab with a density gradient, with full-orbit (6D) ions and adiabatic electrons
(VlasovPoissonElectrostaticAdiabatic).
(VlasovPoissonAdiabatic).

Physics. The ions follow full Lorentz-force orbits,
dx/dt = v, dv/dt = (1/epsilon) (-grad phi + v x B0),
Expand Down Expand Up @@ -105,7 +105,7 @@
maxwellians,
)
from struphy.initial.base import GenericPerturbation
from struphy.models import VlasovPoissonElectrostaticAdiabatic
from struphy.models import VlasovPoissonAdiabatic

# ---------------------
# Physical parameters (also used by the pproc)
Expand All @@ -124,7 +124,7 @@
# ---------------------

base_units = BaseUnits(kBT=1.0)
model = VlasovPoissonElectrostaticAdiabatic(base_units=base_units, epsilon=epsilon)
model = VlasovPoissonAdiabatic(base_units=base_units, epsilon=epsilon)

model.em_fields.phi.save_data = True
model.kinetic_ions.var.save_data = False
Expand Down
4 changes: 2 additions & 2 deletions src/struphy/api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
from struphy.models.vlasov import Vlasov
from struphy.models.vlasov_ampere_one_species import VlasovAmpereOneSpecies
from struphy.models.vlasov_maxwell_one_species import VlasovMaxwellOneSpecies
from struphy.models.vlasov_poisson_electrostatic_adiabatic import VlasovPoissonElectrostaticAdiabatic
from struphy.models.vlasov_poisson_adiabatic import VlasovPoissonAdiabatic

__all__ = [
"ColdPlasma",
Expand Down Expand Up @@ -91,5 +91,5 @@
"Vlasov",
"VlasovAmpereOneSpecies",
"VlasovMaxwellOneSpecies",
"VlasovPoissonElectrostaticAdiabatic",
"VlasovPoissonAdiabatic",
]
6 changes: 3 additions & 3 deletions src/struphy/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"Vlasov": "struphy.models.vlasov",
"VlasovAmpereOneSpecies": "struphy.models.vlasov_ampere_one_species",
"VlasovMaxwellOneSpecies": "struphy.models.vlasov_maxwell_one_species",
"VlasovPoissonElectrostaticAdiabatic": "struphy.models.vlasov_poisson_electrostatic_adiabatic",
"VlasovPoissonAdiabatic": "struphy.models.vlasov_poisson_adiabatic",
}

if TYPE_CHECKING: # static analysis and IDEs see the eager imports
Expand Down Expand Up @@ -93,7 +93,7 @@
from struphy.models.vlasov import Vlasov
from struphy.models.vlasov_ampere_one_species import VlasovAmpereOneSpecies
from struphy.models.vlasov_maxwell_one_species import VlasovMaxwellOneSpecies
from struphy.models.vlasov_poisson_electrostatic_adiabatic import VlasovPoissonElectrostaticAdiabatic
from struphy.models.vlasov_poisson_adiabatic import VlasovPoissonAdiabatic

__all__ = [
"ColdPlasma",
Expand Down Expand Up @@ -136,7 +136,7 @@
"Vlasov",
"VlasovAmpereOneSpecies",
"VlasovMaxwellOneSpecies",
"VlasovPoissonElectrostaticAdiabatic",
"VlasovPoissonAdiabatic",
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
maxwellians,
perturbations,
)
from struphy.models import VlasovPoissonElectrostaticAdiabatic
from struphy.models import VlasovPoissonAdiabatic
from struphy.propagators.base import Propagator

logger = logging.getLogger("struphy")
Expand All @@ -48,11 +48,11 @@ def test_ion_acoustic_Landau(quasi_neutral: bool, do_plot: bool = False, exit_be
:math:`\gamma = -0.1936`.
"""
# light-weight model instance (alpha only matters with the vacuum term, epsilon drops out for k parallel to B0)
model = VlasovPoissonElectrostaticAdiabatic(alpha=2.0, epsilon=1.0)
model = VlasovPoissonAdiabatic(alpha=2.0, epsilon=1.0)

# environment options
test_folder = os.path.join(os.getcwd(), "struphy_verification_tests")
out_folders = os.path.join(test_folder, "VlasovPoissonElectrostaticAdiabatic")
out_folders = os.path.join(test_folder, "VlasovPoissonAdiabatic")
env = EnvironmentOptions(out_folders=out_folders, sim_folder=f"ion_acoustic_qn_{quasi_neutral}")

# time stepping
Expand Down Expand Up @@ -164,10 +164,10 @@ def test_neutral_full_f_background():
ion density; the charge number is part of the source coefficient, not of the background. A background
:math:`Z n_0` would give :math:`\phi = -Z (Z - 1) \varepsilon T_0`, here :math:`-2`, everywhere.
"""
model = VlasovPoissonElectrostaticAdiabatic(charge_number=2, mass_number=4.0, alpha=1.0, epsilon=1.0)
model = VlasovPoissonAdiabatic(charge_number=2, mass_number=4.0, alpha=1.0, epsilon=1.0)

test_folder = os.path.join(os.getcwd(), "struphy_verification_tests")
out_folders = os.path.join(test_folder, "VlasovPoissonElectrostaticAdiabatic")
out_folders = os.path.join(test_folder, "VlasovPoissonAdiabatic")
env = EnvironmentOptions(out_folders=out_folders, sim_folder="neutral_full_f")

# n0 = 1 and T_e = p / n0 = beta |B0|^2 / 2 = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
logger = logging.getLogger("struphy")


class VlasovPoissonElectrostaticAdiabatic(StruphyModel):
class VlasovPoissonAdiabatic(StruphyModel):
r"""Electrostatic full-orbit (6D) model for a single ion species with adiabatic electrons.

The full-orbit counterpart of :class:`~struphy.models.DriftKineticElectrostaticAdiabatic`:
Expand Down Expand Up @@ -321,9 +321,9 @@ def doc_examples(cls):

.. code-block:: python

from struphy.models import VlasovPoissonElectrostaticAdiabatic
from struphy.models import VlasovPoissonAdiabatic

model = VlasovPoissonElectrostaticAdiabatic()
model = VlasovPoissonAdiabatic()
model.em_fields.phi
model.kinetic_ions.var

Expand Down
Loading