Reference on jhuki.dissipation¶
The dissipation module takes care of setting parameters for the
dissipation thorn. The main class is Dissipation, but it is more
convenient to use helper functions to setup this object. For example, to set
up dissipation for a simulation with Lean, the simplest way is:
dis = add_gauge(add_Lean(create_dissipation_from_grid(grid, 0.3)))
where 0.3 is the value of eps_dis at the finest level.
- class jhuki.dissipation.DissPrescription(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
DissPrescription for how to set up the dissipation.
Three different prescriptions are available: -
const: set the sameeps_diseverywhere, -dtfact: seteps_disproportional to the local dtfac, -continuous: seteps_disproportional to the local grid spacingto the power of the order,
partially_continuous: constant except where levels are synced, inwhich case, use the continuous integration.
- class jhuki.dissipation.Dissipation(epsdis_per_level, order, variables)[source]¶
Class that describes the dissipation. Best used in combination with helper functions.
This class is immutable.
- Variables
epsdis_per_level – Dictionary that maps the value of the dissipation on each refinement level.
order – Order of the dissipation.
variables – List of variables to which the dissipation has to be applied.
It is your responsibility to provide meaningful eps_dis_per_level.
- Parameters
epsdis_per_level (dict) – Dictionary that maps the value of the dissipation on each refinement level.
order (int) – Order of the dissipation.
variables (list of str) – List of variables to which the dissipation has to be applied.
- property parfile_code¶
Return the code you would put in your parfile.
- jhuki.dissipation.add_to_dissipation(variables, doc)[source]¶
Return a function that adds variables to the given Dissipation.
- jhuki.dissipation.create_dissipation_from_grid(grid, eps_dis_finest, variables=None, prescription=DissPrescription.dtfact)[source]¶
Create a
Dissipationobject from a givenGrid.The order of the dissipation is deduced from the number of ghost zones.
- Parameters
grid (
Grid) – Simulation grid.epsdis_per_level (dict) – Dictionary that maps the value of the dissipation on each refinement level.
order (int) – Order of the dissipation.
variables (list of str) – List of variables to which the dissipation has to be applied.
prescription (
DissPrescription) – How to seteps_dis.
- Returns
Dissipation object.
- Return type