sarkas.tools.transport.Diffusion
sarkas.tools.transport.Diffusion#
- class sarkas.tools.transport.Diffusion[source]#
The diffusion coefficient is calculated from the Green-Kubo formula
\[D_{\alpha} = \frac{1}{3 N_{\alpha}} \sum_{i}^{N_{\alpha}} \int_0^{\tau} dt \, \langle \mathbf v^{(\alpha)}_{i}(t) \cdot \mathbf v^{(\alpha)}_{i}(0) \rangle.\]where \(\mathbf v_{i}^{(\alpha)}(t)\) is the velocity of particle \(i\) of species \(\alpha\). Notice that the diffusion coefficient is averaged over all \(N_{\alpha}\) particles.
Data is retrievable at
dataframeanddataframe_slices.Methods
Calculate the average temperature from the
sarkas.tools.observables.Thermodynamicsdata.Diffusion.compute(observable[, plot, ...])Calculate the transport coefficient from the Green-Kubo formula.
Diffusion.copy_params(params)Create paths of the filenames of the dataframes.
Diffusion.diffusion(observable[, plot, ...])Calculate the transport coefficient from the Green-Kubo formula.
Diffusion.electrical_conductivity(observable)Calculate the transport coefficient from the Green-Kubo formula.
Diffusion.get_observable_data(observable)Grab the autocorrelation function datasets by calling the observable's
parse()method.Diffusion.initialize_dataframes(observable)Grab observables autocorrelation data and initialize the dataframes where to store the data.
Diffusion.interdiffusion(observable[, plot, ...])Calculate the transport coefficient from the Green-Kubo formula
Create directories where to save the transport coefficients.
Diffusion.parse(observable)Read the HDF files containing the transport coefficients.
Diffusion.plot(observable[, display_plot])Make a dual plot comparing the ACF and the Transport Coefficient by using the
plot_tc()method.Diffusion.plot_tc(time, acf_data, tc_data, ...)Make dual plots with ACF and transport coefficient.
Print to screen the location where data is stored and other relevant information.
Save the HDF dataframes to disk in the TransportCoefficient folder.
Diffusion.setup(params, observable)- Parameters
params (
sarkas.core.Parameters) -- Simulation parameters.
Diffusion.time_stamp(message, timing)Print out to screen elapsed times.
Diffusion.viscosity(observable[, plot, ...])Calculate the transport coefficient from the Green-Kubo formula