Electric potential in Comsol

  • Thread starter Ma94
  • Start date
5
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
 

DrClaude

Mentor
6,807
2,922
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).
 
5
0
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.
 

DrClaude

Mentor
6,807
2,922
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.
 

Want to reply to this thread?

"Electric potential in Comsol" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top