pyopensn.source.VolumetricSource

class pyopensn.source.VolumetricSource

Multi-group isotropic volumetric sources.

A source object stores the cells it applies to on the mesh of the problem (or response evaluator) it was most recently added to. Sharing it between problems on the same mesh is safe; for problems on different meshes, create a separate source object for each mesh.

Wrapper of opensn::VolumetricSource.

__init__(self: pyopensn.source.VolumetricSource, **kwargs) → None

Construct a multi-group isotropic volumetric sources.

Parameters:
  • block_ids (List[int]) – An array of block IDs the volumetric source is present within.

  • logical_volume (pyopensn.logvol.LogicalVolume) – Logical volume that the volumetric source is defined within.

  • group_strength (List[float]) – An array of multi-group source strength values. Note that this is only used when a function is not provided.

  • func (pyopensn.math.VectorSpatialFunction) – Function to be used to define the source.

  • strength_function (Callable) – Callable that returns the source strength for a given group (and optionally time). It must accept either (group, time) for transient problems or just (group) for steady-state. If strength_function is provided, do not specify start_time/end_time; implement any time dependence inside the callback instead.