Skip to content

pencil.diag

Illa edited this page Feb 24, 2021 · 1 revision

pencil.diag package

Subpackages

  • pencil.diag.particle package

    • Submodules

    • pencil.diag.particle.diffusion module

    • pencil.diag.particle.dispersion_and_drift module

    • pencil.diag.particle.gas_velco_at_particle_pos module

    • pencil.diag.particle.gas_velo_at_particle_pos module

    • Module contents

Submodules

pencil.diag.fixed_points module

Find the fixed points of a given field.

class pencil.diag.fixed_points.FixedPoint()

Bases: object

FixedPoint – Holds the fixed points and additional integrated quantities.

find_fixed(datadir='data', var_file='VAR0', trace_field='bb', ti=-1, tf=-1, tracer_file_name=None)

Find the fixed points to a snapshot or existing tracer file.

call signature:

find_fixed(datadir='data', var_file='VAR0', trace_field='bb',
           ti=-1, tf=-1, tracer_file_name=None):
  • Keyword Arguments

    *datadir* – Data directory.

    var_file:

      Varfile to be read.
    

    trace_field:

      > Vector field used for the streamline tracing.
    
      *ti*:
    
          Initial VAR file index for tracer time sequences. Overrides ‘var_file’.
    
      *tf*:
    
          Final VAR file index for tracer time sequences. Overrides ‘var_file’.
    

    tracer_file_name

      Name of the tracer file to be read.
      If ‘None’ compute the tracers.
    

read(datadir='data', file_name='fixed_points.hdf5')

Read the fixed points from a file.

call signature:

read(self, datadir=’data’, file_name=’fixed_points.hdf5’)

Keyword arguments:

datadir:

Directory where the data is stored.

file_name:

File with the tracer data.

write(datadir='data', destination='fixed_points.hdf5')

Write the fixed points into a file.

call signature:

write(self, datadir=’data’, destination=’fixed_points.hdf5’)

Keyword arguments:

datadir:

Directory where the data is stored.

destination:

Destination file.

pencil.diag.gas_alpha module

pencil.diag.gas_alpha.gas_alpha(sim=False, t_range=[0, -1], OVERWRITE=False)

This calculates the global alpha-value from ts object via

alphah=(2./3.)\*(ts3.uxuym)/(ts3.rhom\*ts3.csm\*\*2)

for the lastNentries of the time series. Input:

t_range use this time range of the timeseries OVERWRITE overwrite alpha file in sim.pc_datadir/alpha_

  • Returns

    alpha dictionary

pencil.diag.tracers module

Reads the tracer files, composes a color map.

class pencil.diag.tracers.Tracers()

Bases: object

Tracers – Holds the traced tracer object with the field line integrated quantities and the mapping.

find_tracers(var_file='VAR0', datadir='data', trace_field='bb', ti=-1, tf=-1)

Trace streamlines of the vectofield ‘field’ from z = z0 to z = z1 and integrate quantities ‘int_q’ along the lines. Creates a 2d mapping as in ‘streamlines.f90’.

call signature:

find_tracers(var_file=’VAR0’, datadir=’data’, trace_field=’bb’,

ti=-1, tf=-1)

Keyword arguments:

var_file:

Varfile to be read.

datadir:

Directory where the data is stored.

trace_field:

Vector field used for the streamline tracing.

ti:

Initial VAR file index for tracer time sequences. Overrides ‘var_file’.

tf:

Final VAR file index for tracer time sequences. Overrides ‘var_file’.

read(datadir='data', file_name='tracers.hdf5')

Read the tracers from a file.

call signature:

read(self, datadir=’data’, file_name=’tracers.hdf5’)

Keyword arguments:

datadir:

Directory where the data is stored.

file_name:

File with the tracer data.

write(datadir='data', destination='tracers.hdf5')

Write the tracers into a file.

call signature:

write(self, datadir=’data’, destination=’tracers.hdf5’)

Keyword arguments:

datadir:

Directory where the data is stored.

destination:

Destination file.

class pencil.diag.tracers.TracersParameterClass()

Bases: object

__TracersParameterClass – Holds the simulation and tracing parameters.

Module contents