driftlet 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types/stack.d.ts CHANGED
@@ -31,16 +31,17 @@ export function drive(d: any, path: any): any;
31
31
  */
32
32
  export function ohmic(d?: number, carriers?: string[]): any;
33
33
  /**
34
- * A bath: a neutral composition `c` (mol/m³) held at the contact, its levels referred to the
35
- * charged `reference` species (the ion a reference electrode would sense, e.g. Cl⁻ for
36
- * Ag/AgCl), which is the terminal.
34
+ * A bath: a neutral composition `c` (mol/m³) held at the contact. With a `reference`, the charged
35
+ * species a reference electrode would sense (Cl⁻ for Ag/AgCl), its levels are referred to that
36
+ * species, which is the terminal. Without one, `bath(c, drive)`, the terminal voltage is the
37
+ * bath's φ: an ideal salt bridge, the convention of membrane potentials.
37
38
  * @param {Record<string, number>} c
38
- * @param {string} reference
39
+ * @param {string | number | object} [reference] the reference species, or the drive
39
40
  * @param {number | object} [drive]
40
41
  * @param {{ offset?: number }} [opts] where the reference species sits relative to the terminal
41
42
  * voltage, V_ref = V + offset (V)
42
43
  */
43
- export function bath(c: Record<string, number>, reference: string, d?: number, { offset }?: {
44
+ export function bath(c: Record<string, number>, reference?: string | number | object, d?: number, { offset }?: {
44
45
  offset?: number;
45
46
  }): any;
46
47
  /**
package/types/types.d.ts CHANGED
@@ -264,6 +264,11 @@ export type ContactSpeciesLink = "blocked" | "equilibrium" | {
264
264
  type: "exchange";
265
265
  k: number;
266
266
  mu: number;
267
+ } | {
268
+ type: "velocity";
269
+ v: number;
270
+ offset?: number;
271
+ mu?: number;
267
272
  };
268
273
  /**
269
274
  * 'bulk': the end node is plain bulk (locally neutral, no double layer); 'neutral': no charge at