sarkas.tools.observables.DiffusionFlux#

class sarkas.tools.observables.DiffusionFlux[source]#

Diffusion Fluxes and their Auto-correlation functions.

The \(\alpha\) diffusion flux \(\mathbf J_{\alpha}(t)\) is calculated from eq.~(3.5) in [Zhou and Miller, 1996] which reads

\[\mathbf J_{\alpha}(t) = \frac{m_{\alpha}}{m_{\rm tot} } \sum_{\beta = 1}^{M} \left ( m_{\rm tot} \delta_{\alpha\beta} - x_{\alpha} m_{\beta} \right ) \mathbf j_{\beta} (t)\]

where \(M\) is the total number of species, \(m_{\rm tot} = \sum_{i}^M m_{i}\) is the total mass of the system, \(x_{\alpha} = N_{\alpha} / N_{\rm tot}\) is the concentration of species \(\alpha\), and

\[\mathbf j_{\alpha}(t) = \sum_{i = 1}^{N_{\alpha}} \mathbf v_{i}(t)\]

is the microscopic velocity field of species \(\alpha\).

Methods

DiffusionFlux.__init__()

DiffusionFlux.average_slices_date()

Calculate the average and standard deviation of the observable from the slices dataframe.

DiffusionFlux.calc_k_data()

Calculate and save Fourier space data.

DiffusionFlux.calc_nkt_slices_data()

Calculate n(k,t) for each slice.

DiffusionFlux.calc_slices_data()

Calculate the observable for each slice.

DiffusionFlux.calc_vkt_slices_data()

Calculate v(k,t) for each slice.

DiffusionFlux.calculate_corr_times([slices])

DiffusionFlux.compute()

Routine for computing the observable.

DiffusionFlux.compute_kt_data([nkt_flag, ...])

Calculate Time dependent Fourier space quantities.

DiffusionFlux.copy_params(params)

DiffusionFlux.create_dirs_filenames()

Create the directories and filenames where to save dataframes.

DiffusionFlux.from_dict(input_dict)

Update attributes from input dictionary.

DiffusionFlux.from_pickle()

Read the observable's info from the pickle file.

DiffusionFlux.grab_sim_data([pva])

Read in particles data into one large array.

DiffusionFlux.initialize_hdf()

DiffusionFlux.integrate_normalized_acf_squared(...)

Calculate the normalized correlation time as given by

DiffusionFlux.parse([acf_data])

Grab the pandas dataframe from the saved csv file.

DiffusionFlux.parse_acf()

DiffusionFlux.parse_k_data()

Read in the precomputed Fourier space data.

DiffusionFlux.parse_kt_data([nkt_flag, vkt_flag])

Read in the precomputed time dependent Fourier space data.

DiffusionFlux.plot([scaling, acf, figname, show])

Plot the observable by calling the pandas.DataFrame.plot() function and save the figure.

DiffusionFlux.pretty_print_msg()

Create the message with the basic information of every observable

DiffusionFlux.save_acf_hdf()

DiffusionFlux.save_hdf()

DiffusionFlux.save_kt_hdf([nkt_flag, vkt_flag])

Save the \(n(\mathbf{k},t)\) and/or \(\mathbf{v}(\mathbf{k},t)\) data of each slice to disk.

DiffusionFlux.save_pickle()

Save the observable's info into a pickle file.

DiffusionFlux.setup(params[, phase, no_slices])

Assign attributes from simulation's parameters.

DiffusionFlux.setup_init(params[, phase, ...])

Assign Observables attributes and copy the simulation's parameters.

DiffusionFlux.setup_multirun_dirs()

Set the attributes postprocessing_dir and dump_dirs_list.

DiffusionFlux.update_args(**kwargs)

Update observable specific attributes and call update_finish() to save info.

DiffusionFlux.update_finish()

Update the slice_steps, CCF's and DSF's attributes, and save pickle file with observable's info.