- #1

- 4

- 0

E(t)= phimin+v*t for 0<=t<t0

phimax-v*(t-t0) for t0<=t<2*t0

with t0=(phimax-phimin)/v

v=scan rate in V/s

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Ma94
- Start date

In summary, the user is seeking assistance in implementing a time-dependent potential for an electrode surface with two different potentials for two different time domains. The potential is described by a triangular function and the user is using a time-dependent study with the physics of transport of diluted species. The user is also asking for clarification on how to implement piecewise equations using boolean operators and the modulo operator for periodic functions.

- #1

- 4

- 0

E(t)= phimin+v*t for 0<=t<t0

phimax-v*(t-t0) for t0<=t<2*t0

with t0=(phimax-phimin)/v

v=scan rate in V/s

Engineering news on Phys.org

- #2

Mentor

- 8,338

- 5,345

It would also help if you indicated what type of study you are doing (what physics and study type you have selected in COMSOL).

- #3

- 4

- 0

- #4

Mentor

- 8,338

- 5,345

Sorry, but this didn't answer my question. Would you know how to do it with only one time-dependent equation?Ma94 said:Thanks for your reply .As you said first i need to implant 2 différent potenials in the surface of an electrode for 2 different time domains .

I am just trying to gauge the level of the difficulty. Otherwise, my answer might be rather unhelpful.

In any case, to implement piecewise equations, you need to use boolean operators. For instance, to implement

$$

\left\{

\begin{array}{cl}

1 & x < 0 \\

x^2 + 1 & x \ge 0

\end{array}

\right.

$$

you would write

Code:

`1 * (x < 0) + (x^2+1) * (x >= 0)`

Share:

- Replies
- 1

- Views
- 993

- Replies
- 1

- Views
- 2K

- Replies
- 1

- Views
- 2K

- Replies
- 6

- Views
- 536

- Replies
- 1

- Views
- 3K

- Replies
- 2

- Views
- 1K

- Replies
- 1

- Views
- 1K

- Replies
- 1

- Views
- 3K

- Replies
- 4

- Views
- 1K

- Replies
- 3

- Views
- 2K