Core

The core of a DLD system is a single DLD unit. The class DLD from mnflow.mfda.cad.dld.theme.core (core.DLD) aims at configuring the core of a DLD system: the entities (pillars) of each DLD unit. The DLD unit can be arrayed later in child classes, e.g., mnflow.mfda.cad.dld.theme.block.DLD, to make more complex designs and/or full DLD devices.

class mnflow.mfda.cad.dld.theme.core.DLD(Np=None, d_c=None, width=None, Nw=None, gap_w=None, gap_a=None, pitch_w=None, pitch_a=None, height=None, boundary_treatment=None, pow_val=None, phi=None, acc_usm_gap_a_widening=None, _max_allowed_lateral_gap_widening_nondim=None, ll=None)

DLD core entities (posts/pillars). It can be used as a building block by child classes to make more complex designs, and ultimately a whole DLD device.

A full set of DLD core entities consists of:
  • Np+1 rows ranging from 0 (most downstream) to Np (most upstream).

  • Three regions:
    • core: bulk of DLD entities residing on a tilted grid/matrix.

    • depletion: boundary wherein the particles larger than critical diameter are depleted.

    • accumulation: boundary wherein the particles larger than critical diameter are accumulated.

The entities on depletion (dep.) and accumulation (acc.) lanes are configured based on the specified boundary treatment approach (boundary_treatment). Categorizing the DLD core entities in this manner should enable a convenient framework for developing new boundary treatment strategies in the future.

Note

  • All length dimensions are in micron.

  • The parameters are attempted to be assigned automatically for a specific standardized design, also called base design herein, so that a user can conveniently configure the DLD entities. For the cases deviating from the base design, the corresponding parameters can be explicitly set by passing appropriate values to the constructor. For example:
    • If no value is passed for pitch_w, it will be set equal to 2*gap_w if gap_w is available.

    • If gap_a and pitch_a are not given, they are set equal to their lateral counterparts, i.e., gap_w and pitch_w, respectively.

    • If both gap_a and pitch_a are provided, the axial length of entity is adjusted so that both provided arguments are met. As a result, for example, an ellipse with various major axis to minor axis ratios can be configured by passing desired gap_a and pitch_a.

    • If only one of gap_a and pitch_a is provided, the entity is assumed to have an aspect ratio of 1. The provided argument is used to evaluate the appropriate value for the missing parameter:
      • If pitch_a is provided, gap_a will be set equal to gap_w+pitch_a-pitch_w

      • If gap_a is provided, pitch_a will be set equal to pitch_w-gap_w+gap_a

Important

(For developers) core.DLD stores the information related to the full set of entities of DLD core, i.e., Np+1 rows ranging from 0 to Np. Row Np provides some useful information for child classes aiming at producing complex DLD devices. However, row Np should not be included when arraying a DLD core. To produce a DLD device with a periodicity of Np, only Np rows (0 to Np-1) should be arrayed.

Constructor

Parameters

Core Geometry

Npint or NoneType, optional

Periodicity of DLD, which is equal to the number of rows of entities in a DLD core, by default None

widthint or NoneType, optional

Desired width of core.DLD unit; Note that the actual width may be larger as Nw is calculated as ceiling of width/pitch_w, by default None

Nwint or NoneType, optional

Number of fluidic lanes (columns), which is equal to the number of entities per row minus one, by default None

gap_wfloat or NoneType, optional

Spacing/gap between entities along the width of channel, also called lateral direction (normal to channel axis), by default None

gap_afloat or NoneType, optional

Spacing/gap between entities along the axis of channel (axial flow direction), by default None

pitch_wfloat or NoneType, optional

Pitch of entities along the width of channel (lateral direction), by default None

pitch_afloat or NoneType, optional

Pitch of entities along the axis of channel (axial flow direction), by default None

heightfloat, optional

Pillars height; important when using ‘3d’ type of boundary_treatment, by default None.

Boundary

boundary_treatmentstr or NoneType, optional; by default ‘pow_3’
Type of boundary treatment; available options are:
  • None : no special treatment.

  • ‘pow’ : generic power relation between flux and gap as in Ebadi et. al. (2019). A value to be provided for pow_val; otherwise a default value of 2.463 is used as reported in the original work.

  • ‘pow_2’ : (special case of ‘pow’) flux through a gap is assumed to be proportional to the square of the gap width. Not exactly the same layout but using the square root dependency of gap as in Inglis (2009).

  • ‘pow_3’ : (special case of ‘pow’) flux through a gap is assumed to be proportional to the cube of the gap width. Not exactly the same layout but using the cube root dependency of gap for high aspect-ratio entities as pointed to in Feng et. al. (2017).

  • ‘3d’ : flux through a gap is evaluated from a computationally-curated dataset by Inglis et. al. (2020), which takes into account the 3-dimensional geometrical configuratin of DLD system, e.g., diameter, hight, and axial and lateral pitch.

pow_valfloat, optional

Power value when using ‘pow’ type of boundary_treatment, by default 2.463.

phifloat, optional

Ratio of lateral resistance to axial resistance of unit cell close to accumulation sidewall on \(N^{th}\) row, when using ‘3d’ type of boundary_treatment, by default None.

acc_usm_gap_a_wideningfloat, optional

(usm: up.stream.most) Gap widening magnitude for the upstreammost entity on acc. sidewall, by default None.

_max_allowed_lateral_gap_widening_nondimfloat, optional

Maximum allowed lateral gap nondimensionalized by axial sidelength of entity, a value in the range of [0,2) is expected, by default 1.5.

Misc.

lltuple or list, optional

Stands for ‘lower-leftmost’: Coordinates of lower-leftmost entity amongst the core entities of DLD core not considering the depletion and accumulation boundary lanes, can be superseded by target_ll of child classes, e.g, block.DLD, by default (0, 0)

dots_core_row(row)

Returns the coordinates of entities in row number row of the core of DLD core, i.e., excluding those related to the depletion and accumulation lanes.

Parameters

rowint

Number/Index of row with 0 referring to the most downstream row and Np-1 referring to the most upstream one.

Returns

Numpy array

Array of positions of entities residing on row row excluding those related to accumulation and depletion lanes.

static get_dc(Np, gap_w, pitch_w=None, pitch_a=None)

Returning the critical diameter.

static get_geom_config_auto(Np=None, d_c=None, width=None, Nw=None, gap_w=None, gap_a=None, pitch_w=None, pitch_a=None, height=None)

Get a full set of geometrical attributes after applying any configurations that may be needed automatically.

mirror(dots: list | tuple | ndarray, x_mirror=None, tol=1e-10)

Mirroring a set of entities wrt. a given mirror axis.

Parameters

dotsUnion[list, tuple, np.ndarray]

Entities to be mirrored

x_mirrorfloat or NoneType, optional

Mirror axis x=x_mirror, by default None

tolfloat, optional

Tolerance: entities on the right side of x=x_mirror-tol are ignored, by default 1e-10

Returns

np.ndarray

Mirrored entities.

plot(fname=None, opt_mirror=False, **kwargs)

Plotting the entities.

Parameters

fnamestr or NoneType, optional

A (png) filename with extension (can include a path), by default None

opt_mirrorbool, optional

Whether to plot the entities together with their mirrored ones, by default False

write(fname)

Writing coordinates of entities to a file.

Parameters

fnamestr

A (csv) filename with extension (can include a path).