# Discussion Forum

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

## Setting the derivative of a dependent variable(equal to zero) and assigning it to a boundary

Could someone give me a pointer on how I could take the derivative of a dependent variable(from a given physics interface), set it equal to zero and then assign that to a boundary?

I have tried figuring this out with no luck and also posted under this extensive post, regarding this, but received no response: www.comsol.com/community/forums/general/thread/28154/

For example, if I I have a 2D-axisymmetric model which has the electrostatic interface and I want to set the derivative of the voltage(w/r/t r) equal to zero, how do I go about that?

d(mod1.V, r) - should give the derivative of the voltage w/r/t r. Where do I define that in my model?

How do I set this equal to zero? d(mod1.V, r) = 0 - where do I put this?

Can I then assign it to a boundary or domain?

Any tips on what to look into would be greatly appreciated.

1 Reply Last Post May 7, 2012, 2:00 PM EDT
Posted: 5 years ago
Hi

the first derivatives of the dependent variables are already defined in COMSOL, check the doc, such as Vx Vy Vz and Vr in 2D-axi (you can also see them in the equation view (to turn on, see preferences options, or the view icon)

Then you need to add the additional equations to force these to "0"

study how COMSOL does it for tranditional BCs, some uses the derivatives

--
Good luck
Ivar

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.