TARANG.lib.time_advance.time_advance_mhd#
Functions#
|
Compute the right-hand side (RHS) for the magnetohydrodynamic (MHD) field. |
|
Check if the loop should be broken based on certain conditions. |
|
Perform a single time advancement step for the magnetohydrodynamic (MHD) field. |
|
Perform time advancement using the Euler method for the magnetohydrodynamic field. |
|
Perform time advancement using the second-order Runge-Kutta (RK2) method for the magnetohydrodynamic field. |
|
Compute the parts for the fourth-order Runge-Kutta (RK4) method for the magnetohydrodynamic field. |
|
Perform time advancement using the fourth-order Runge-Kutta (RK4) method for the magnetohydrodynamic field. |
Module Contents#
- TARANG.lib.time_advance.time_advance_mhd.compute_rhs_mhd(para, t, U, B, P, univ)#
Compute the right-hand side (RHS) for the magnetohydrodynamic (MHD) field.
- Parameters:
t (float) – Current time.
U (VectorField) – VectorField object representing the velocity field.
B (VectorField) – VectorField object representing the magnetic field.
P (Pressure) – Pressure object representing the pressure field.
univ (UniversalArrays) – UniversalArrays object for temporary storage.
- Return type:
None
- TARANG.lib.time_advance.time_advance_mhd.loop_breaker(para, U, B, univ)#
Check if the loop should be broken based on certain conditions.
- Parameters:
U (VectorField) – VectorField object representing the velocity field.
B (VectorField) – VectorField object representing the magnetic field.
univ (UniversalArrays) – UniversalArrays object for temporary storage.
- Returns:
True if the loop should be broken, False otherwise.
- Return type:
bool
- TARANG.lib.time_advance.time_advance_mhd.time_adv_single_step_mhd(para, a, b, c, U, B, univ)#
Perform a single time advancement step for the magnetohydrodynamic (MHD) field.
- Parameters:
a (float) – Coefficient for the time advancement scheme.
b (float) – Coefficient for the time advancement scheme.
c (float) – Coefficient for the time advancement scheme.
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.time_advance.time_advance_mhd.time_advance_Euler_mhd(para, U, B, P, univ)#
Perform time advancement using the Euler method for the magnetohydrodynamic field.
- Parameters:
U (VectorField) – VectorField object representing the velocity field.
B (VectorField) – VectorField object representing the magnetic field.
P (Pressure) – Pressure object representing the pressure field.
univ (UniversalArrays) – UniversalArrays object for temporary storage.
- Return type:
None
- TARANG.lib.time_advance.time_advance_mhd.time_advance_RK2_mhd(para, U, B, P, univ)#
Perform time advancement using the second-order Runge-Kutta (RK2) method for the magnetohydrodynamic field.
- Parameters:
U (VectorField) – VectorField object representing the velocity field.
B (VectorField) – VectorField object representing the magnetic field.
P (Pressure) – Pressure object representing the pressure field.
univ (UniversalArrays) – UniversalArrays object for temporary storage.
- Return type:
None
- TARANG.lib.time_advance.time_advance_mhd.compute_RK4_parts_mhd(para, b, factor, U, B, univ)#
Compute the parts for the fourth-order Runge-Kutta (RK4) method for the magnetohydrodynamic field.
- Parameters:
b (float) – Coefficient for the time advancement scheme.
factor (float) – Factor for the time advancement scheme.
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.time_advance.time_advance_mhd.time_advance_RK4_mhd(para, U, B, P, univ)#
Perform time advancement using the fourth-order Runge-Kutta (RK4) method for the magnetohydrodynamic field.
- Parameters:
U (VectorField) – VectorField object representing the velocity field.
B (VectorField) – VectorField object representing the magnetic field.
P (Pressure) – Pressure object representing the pressure field.
univ (UniversalArrays) – UniversalArrays object for temporary storage.
- Return type:
None