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

Click For Summary
SUMMARY

This discussion focuses on implementing piecewise time-varying electrode surface potential in COMSOL Multiphysics. The user seeks to define a linear and periodic potential function, E(t), with specific parameters: E(t) = phimin + v*t for 0 <= t < t0 and E(t) = phimax - v*(t - t0) for t0 <= t < 2*t0, where t0 = (phimax - phimin)/v. The conversation emphasizes the need for a time-dependent study using the transport of diluted species physics and suggests utilizing boolean operators and the modulo operator for implementing piecewise equations.

PREREQUISITES
  • COMSOL Multiphysics software
  • Understanding of time-dependent studies in COMSOL
  • Familiarity with piecewise functions and boolean operators
  • Knowledge of transport of diluted species physics in COMSOL
NEXT STEPS
  • Research how to implement boolean operators in COMSOL for piecewise functions
  • Learn about the transport of diluted species module in COMSOL
  • Explore the use of the modulo operator for periodic functions in COMSOL
  • Study examples of time-dependent equations in COMSOL simulations
USEFUL FOR

This discussion is beneficial for researchers and engineers working with electrochemical systems, particularly those utilizing COMSOL for modeling time-dependent electrode behaviors and transport phenomena.

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
1K
Replies
2
Views
2K
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 12 ·
Replies
12
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
Replies
8
Views
3K