TARANG.lib.io.io_mhd#

Functions#

initial_mhd(para, U, B)

Initialize the magnetohydrodynamic (MHD) field based on the input parameters.

output_mhd(para, t, U, B, univ)

Output the MHD field and global quantities.

output_field_mhd(para, t, U, B, univ)

Output the MHD field.

output_glob_mhd(para, t, U, B, univ)

Output the global MHD quantities.

output_modes_mhd(para, t, U, B, univ)

Output the modes of the MHD field.

output_ekTk_mhd(para, t, U, B, univ)

Output the energy and transfer spectra of the MHD field.

init_save_mhd(para, U, B)

Initialize files for saving energy and transfer spectra, global hydrodynamic quantities,

file_save_mhd(para, U, B, univ)

Save the energy and transfer spectra, global magnetohydrodynamic quantities, field save times,

Module Contents#

TARANG.lib.io.io_mhd.initial_mhd(para, U, B)#

Initialize the magnetohydrodynamic (MHD) field based on the input parameters.

Parameters:
  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

Return type:

None

TARANG.lib.io.io_mhd.output_mhd(para, t, U, B, univ)#

Output the MHD field and global quantities.

Parameters:
  • t (float) – Current time.

  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage.

Return type:

None

TARANG.lib.io.io_mhd.output_field_mhd(para, t, U, B, univ)#

Output the MHD field.

Parameters:
  • t (float) – Current time.

  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage.

Return type:

None

TARANG.lib.io.io_mhd.output_glob_mhd(para, t, U, B, univ)#

Output the global MHD quantities.

Parameters:
  • t (float) – Current time.

  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage.

Return type:

None

TARANG.lib.io.io_mhd.output_modes_mhd(para, t, U, B, univ)#

Output the modes of the MHD field.

Parameters:
  • t (float) – Current time.

  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage.

Return type:

None

TARANG.lib.io.io_mhd.output_ekTk_mhd(para, t, U, B, univ)#

Output the energy and transfer spectra of the MHD field.

Parameters:
  • t (float) – Current time.

  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage.

Return type:

None

TARANG.lib.io.io_mhd.init_save_mhd(para, U, B)#

Initialize files for saving energy and transfer spectra, global hydrodynamic quantities, field save times, time steps, and specific modes of the hydrodynamic field.

Parameters:
  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

Return type:

None

TARANG.lib.io.io_mhd.file_save_mhd(para, U, B, univ)#

Save the energy and transfer spectra, global magnetohydrodynamic quantities, field save times, time steps, and specific modes of the magnetohydrodynamic field to their respective files.

Parameters:
  • U (VectorField) – VectorField object representing the velocity field.

  • B (VectorField) – VectorField object representing the magnetic field.

  • univ (UniversalArrays) – UniversalArrays object for temporary storage and global quantities.

Return type:

None