coconut_tools.pyTDM.core_td.myconfig¶
Configuration module for pyTDm-Coconut coupling.
This module provides functions to create and read .ini config files used to define and control the injection of a flux rope (TDm or RBSL) into a COCONUT simulation. The configuration includes spatial parameters, numerical resolutions, and solver settings.
- Typical usage example:
createconfig(path_file=…, …) nb_proc, nb_r, nb_th, nb_phi, eps = readconfig_coconut(‘myconfig.ini’)
Functions
|
Create a configuration file for pyTDm and COCONUT simulations. |
|
Read geometry and position parameters from a config file. |
|
Read COCONUT-specific parameters from a config file. |
|
Read path and general solver information from a config file. |
|
Read RBSL-specific parameters from a config file. |
- coconut_tools.pyTDM.core_td.myconfig.createconfig(path_file, path_tdm, path_save, name, theta, phi, alpha, D, A, R, delta, zeta, case_tdm, geometry, solver, flux, nb_proc=108, nb_r=200, nb_th=200, nb_phi=200, eps=0.01, nfr=100, xc=0.5, xh=0.5, hh_fr=120, ll_fr=35, F_flx=20)[source]¶
Create a configuration file for pyTDm and COCONUT simulations.
- Parameters:
path_file (str) – Path to the input data.
path_tdm (str) – Path to save the TDM output.
path_save (str) – Directory where the config file will be saved.
name (str) – Case name.
theta (float) – Colatitude of the flux rope.
phi (float) – Longitude of the flux rope.
alpha (float) – Tilt angle.
D (float) – Distance from the solar surface.
A (float) – Small radius of the flux rope.
R (float) – Large radius of the flux rope.
delta (float) – Twist parameter.
zeta (float) – Instability parameter.
case_tdm (str) – Case identifier.
geometry (str) – Coordinate system (‘spherical’ or ‘cartesian’).
solver (str) – Solver used (‘COCONUT’ or ‘pluto’).
flux (str) – Type of flux rope (‘Tdm’ or ‘RBSL’).
nb_proc (int) – Number of processors.
nb_r (int) – Radial resolution.
nb_th (int) – Colatitude resolution.
nb_phi (int) – Longitude resolution.
eps (float) – Smoothing parameter.
nfr (int) – Number of flux rope field lines.
xc (float) – Center x-coordinate (RBSL).
xh (float) – Half-width (RBSL).
hh_fr (float) – Height of flux rope (RBSL).
ll_fr (float) – Footpoint length (RBSL).
F_flx (float) – Total flux (RBSL).
- Return type:
None- Returns:
None
- coconut_tools.pyTDM.core_td.myconfig.readconfig(path)[source]¶
Read geometry and position parameters from a config file.
- Return type:
Tuple[float,float,float,float,float,float,float,float,str,str]- Parameters:
path (str)
- coconut_tools.pyTDM.core_td.myconfig.readconfig_coconut(path)[source]¶
Read COCONUT-specific parameters from a config file.
- Return type:
Tuple[int,int,int,int,float]- Parameters:
path (str)