sarkas.tools.transport.Viscosity#

class sarkas.tools.transport.Viscosity[source]#

Viscosisty coefficients class.

The shear viscosity is obtained from the Green-Kubo formula

\[\eta = \frac{\beta V}{6} \sum_{\alpha} \sum_{\gamma \neq \alpha} \int_0^{\tau} dt \, \left \langle \mathcal P_{\alpha\gamma}(t) \mathcal P_{\alpha\gamma}(0) \right \rangle\]

where \(\beta = 1/k_B T\), \(\alpha,\gamma = {x, y, z}\) and \(\mathcal P_{\alpha\gamma}(t)\) is the element of the Pressure Tensor calculated with sarkas.tools.observables.PressureTensor.

The bulk viscosity is obtained from

\[\eta_V = \beta V \int_0^{\tau}dt \, \left \langle \delta \mathcal P(t) \delta \mathcal P(0) \right \rangle,\]

where

\[\delta \mathcal P(t) = \mathcal P(t) - \left \langle \mathcal P \right \rangle\]

is the deviation of the scalar pressure.

Data is retrievable at dataframe and dataframe_slices.

Methods

Viscosity.__init__()

Viscosity.calculate_average_temperature(params)

Calculate the average temperature from the sarkas.tools.observables.Thermodynamics data.

Viscosity.compute(observable[, plot, ...])

Calculate the transport coefficient from the Green-Kubo formula.

Viscosity.copy_params(params)

Viscosity.create_df_filenames()

Create paths of the filenames of the dataframes.

Viscosity.diffusion(observable[, plot, ...])

Calculate the transport coefficient from the Green-Kubo formula.

Viscosity.electrical_conductivity(observable)

Calculate the transport coefficient from the Green-Kubo formula.

Viscosity.get_observable_data(observable)

Grab the autocorrelation function datasets by calling the observable's parse() method.

Viscosity.initialize_dataframes(observable)

Grab observables autocorrelation data and initialize the dataframes where to store the data.

Viscosity.interdiffusion(observable[, plot, ...])

Calculate the transport coefficient from the Green-Kubo formula

Viscosity.make_directories()

Create directories where to save the transport coefficients.

Viscosity.parse(observable)

Read the HDF files containing the transport coefficients.

Viscosity.plot(observable[, display_plot])

Make a dual plot comparing the ACF and the Transport Coefficient by using the plot_tc() method.

Viscosity.plot_tc(time, acf_data, tc_data, ...)

Make dual plots with ACF and transport coefficient.

Viscosity.pretty_print()

Viscosity.pretty_print_msg()

Print to screen the location where data is stored and other relevant information.

Viscosity.save_hdf()

Save the HDF dataframes to disk in the TransportCoefficient folder.

Viscosity.setup(params, observable)

Parameters

Viscosity.time_stamp(message, timing)

Print out to screen elapsed times.

Viscosity.viscosity(observable[, plot, ...])

Calculate the transport coefficient from the Green-Kubo formula