How to Implement Piecewise Time-Varying Electrode Surface Potential in Comsol?

Click For Summary

Discussion Overview

The discussion revolves around implementing a piecewise time-varying electrode surface potential in COMSOL, specifically focusing on how to define and apply different potentials over specified time intervals. The context includes theoretical and practical aspects of modeling in COMSOL, particularly in relation to transport phenomena.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on how to impose a linearly and periodically varying electrode surface potential defined by two equations over different time intervals.
  • Another participant questions whether the issue lies in handling different potentials for different time domains or in imposing a simple time-dependent potential.
  • A participant mentions using a reference article that describes a triangular time-dependent potential and indicates the use of a time-dependent study in COMSOL, along with the physics of transport of diluted species.
  • There is a request for clarification on implementing the piecewise function using a single time-dependent equation, with a suggestion to use boolean operators and modulo for periodic functions.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the implementation of time-dependent potentials, with some seeking clarification on specific methods while others provide suggestions. The discussion does not reach a consensus on the best approach to implement the desired functionality.

Contextual Notes

Participants have not fully resolved the mathematical steps involved in implementing the piecewise function, and there are dependencies on specific definitions and study types within COMSOL that remain unclear.

Ma94
Messages
3
Reaction score
0
Can anyone know please know how can i impose the electrode surface potential to vary lineary and periodically with time as:
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
What exactly do you have a problem with? Is it the fact that you have different potentials to impose for different time domains? Or do you have problems imposing even a simple time-dependent potential?

It would also help if you indicated what type of study you are doing (what physics and study type you have selected in COMSOL).
 
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 .In fact the reference article that I'm using is a little bit difficult ,they said that the potential is a triangle time dependent so i will use time dependent study , for the physics i will use transport of diluted species and another one that i did'nt figure it out.
 
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 .
Sorry, but this didn't answer my question. Would you know how to do it with only one time-dependent equation?

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)
Doing it for periodic functions can be implement using the modulo operator in the boolean expression.
 

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
2
Views
2K
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 12 ·
Replies
12
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
8
Views
3K