hallmd.models
All models are specified as callable functions in hallmd.models
. Currently supported models are based on
a three-component feedforward system for a Hall thruster:
- Cathode - Accounts for interactions of the cathode plasma with the main discharge.
- Thruster - The primary simulation of the Hall thruster channel discharge and near-field.
- Plume - Models the far-field expansion of the plasma plume in the vacuum chamber.
Fig 1. The three-component feedforward Hall thruster model (Eckels et al 2024).
Examples of integrated predictive engineering models (PEM) are included in the scripts folder.
cathode_coupling(inputs)
Computes cathode coupling voltage dependence on background pressure.
PARAMETER | DESCRIPTION |
---|---|
inputs
|
input arrays -
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dataset
|
output arrays - |
Source code in src/hallmd/models/cathode.py
current_density(inputs, sweep_radius=1.0)
Compute the semi-empirical ion current density (\(j_{ion}\)) plume model over a 90 deg sweep, with 0 deg at
thruster centerline. Also compute the plume divergence angle. Will return the ion current density at 91 points,
from 0 to 90 deg in 1 deg increments. The angular locations are returned as j_ion_coords
in radians.
PARAMETER | DESCRIPTION |
---|---|
inputs
|
input arrays -
TYPE:
|
sweep_radius
|
the location(s) at which to compute the ion current density 90 deg sweep, in units of radial distance (m) from the thruster exit plane. If multiple locations are provided, then the returned \(j_{ion}\) array's last dimension will match the length of
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
output arrays - |
Source code in src/hallmd/models/plume.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
|
hallthruster_jl(thruster_inputs=None, thruster='SPT-100', config=None, simulation=None, postprocess=None, model_fidelity=(2, 2), output_path=None, version=HALLTHRUSTER_VERSION_DEFAULT, pem_to_julia='default', fidelity_function='default', julia_script=None, run_kwargs='default', shock_threshold=None)
Run a single HallThruster.jl
simulation for a given set of inputs. This function will write a temporary
input file to disk, call HallThruster.run_simulation()
in Julia, and read the output file back into Python. Will
return time-averaged performance metrics and ion velocity for use with the PEM.
Note that the specific inputs and outputs described here can be configured using the pem_to_julia
dict.
Required configuration
You must specify a thruster, a domain, a mass flow rate, and a discharge voltage to run the simulation. The
thruster must be defined in the hallmd.devices
directory or as a dictionary with the required fields.
The mass flow rate and discharge voltage are specified in thruster_inputs
as mdot_a
(kg/s) and
V_a
(V), respectively. The domain is specified as a list [left_bound, right_bound]
in the
config
dictionary. See the
HallThruster.jl docs for more details.
PARAMETER | DESCRIPTION |
---|---|
thruster_inputs
|
named key-value pairs of thruster inputs:
TYPE:
|
thruster
|
the name of the thruster to simulate (must be importable from
TYPE:
|
config
|
dictionary of configs for
TYPE:
|
simulation
|
dictionary of simulation parameters for
TYPE:
|
postprocess
|
dictionary of post-processing parameters for
TYPE:
|
model_fidelity
|
tuple of integers that determine the number of cells and the number of charge states to use via
TYPE:
|
output_path
|
base path to save output files, will write to current directory if not specified
TYPE:
|
version
|
version of HallThruster.jl to use; will search for a global
TYPE:
|
pem_to_julia
|
a
TYPE:
|
fidelity_function
|
a callable that takes a tuple of integers and returns a dictionary of simulation parameters. Defaults to
TYPE:
|
julia_script
|
path to a custom Julia script to run. The script should accept the input json file path as a command line argument. Defaults to just calling
TYPE:
|
run_kwargs
|
additional keyword arguments to pass to
TYPE:
|
shock_threshold
|
if provided, an error will be raised if the ion velocity reaches a maximum before this threshold axial location (in m) - used to detect and filter unwanted "shock-like" behavior, for example by providing a threshold of half the domain length. If not provided, then no filtering is performed (default).
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dataset
|
|
Source code in src/hallmd/models/thruster.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|