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, opt_enable_boundary_treatment_none=None, opt_acc_balance_pressure=None, boundary_treatment=None, pow_val=None, phi=None, acc_usm_gap_a_widening=None, _max_allowed_lateral_gap_widening_nondim=None, dep_top_gap_deviation_nondim=None, acc_top_gap_deviation_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+1rows ranging from 0 (most downstream) toNp(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 to2*gap_wifgap_wis available.If
gap_aandpitch_aare not given, they are set equal to their lateral counterparts, i.e.,gap_wandpitch_w, respectively.If both
gap_aandpitch_aare 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 desiredgap_aandpitch_a.- If only one of
gap_aandpitch_ais 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_ais provided,gap_awill be set equal togap_w+pitch_a-pitch_wIf
gap_ais provided,pitch_awill be set equal topitch_w-gap_w+gap_a
- If only one of
Important
(For developers)
core.DLDstores the information related to the full set of entities of DLD core, i.e.,Np+1rows ranging from 0 toNp. RowNpprovides some useful information for child classes aiming at producing complex DLD devices. However, rowNpshould not be included when arraying a DLD core. To produce a DLD device with a periodicity ofNp, onlyNprows (0 toNp-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
Nwis calculated as ceiling ofwidth/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
- opt_enable_boundary_treatment_nonebool, optional
The code automatically applies a boundary treatment approach to mitigate the issues associated with dep. and acc. sidewalls disturbing the nearby fluid flow. In the case that no special boundary treatment is needed, this parameter can be used: if
True, andboundary_treatment=None: No special boundary treatment needed; ifFalse, andboundary_treatment=None: a boundary treatment approach is automatically selected; by default False.- opt_acc_balance_pressurebool, optional
This parameter enables the local pressure balance at the upstream- most row of accumulation sidewall. The local pressure balance feature is applied for the
3dboundary treatment by default. Other boundary treatment approaches can also adopt this feature by passingopt_acc_balance_pressure=Truein conjunction with an optional value forphiin the case that the default value ofphimay need an adjustment. In order to disable this feature, passopt_acc_balance_pressure=False; by default True.- 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; it can override the automatic gap widening value that would otherwise be applied to satisfy the resistance ratio related to the
phivalue, 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.
- dep_top_gap_deviation_nondimlist or tuple or NoneType, optional
Deviation of lateral gap at the most upstream row of depletion lane(s) from the normal lateral gap (
gap_w) non-dimensionalized bygap_w; a negative value denotes decreasing gap; number of depletion lanes equals the lenght of list/tuple; relevant ifboundary_treatmentis set to ‘mlb’; by default None- acc_top_gap_deviation_nondimlist or tuple or NoneType, optional
Deviation of lateral gap at the most upstream row of accumulation lane(s) from the normal lateral gap (
gap_w) non-dimensionalized bygap_w; a negative value denotes decreasing gap; number of accumulation lanes equals the lenght of list/tuple; relevant ifboundary_treatmentis set to ‘mlb’; by default None
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_llof child classes, e.g,block.DLD, by default (0, 0)
- dots_core_row(row)
Returns the coordinates of entities in row number
rowof 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-1referring to the most upstream one.
Returns
- Numpy array
Array of positions of entities residing on row
rowexcluding those related to accumulation and depletion lanes.
- get_acc_gaps()
Get the acc. boundary gaps.
- get_boundary_gaps()
Get the dep. and acc. boundary gaps.
Returns
dict
- static get_dc(Np, gap_w, pitch_w=None, pitch_a=None)
Returning the critical diameter.
- get_dep_gaps()
Get the dep. boundary gaps.
- 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-tolare 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).