Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

The difference between ux and d(u,x)

Please login with a confirmed email address before reporting spam

I am trying to solve a pair of ODE in 1D using comsol. Along with 3 drichlet boundary conditions, one of the boundary conditions is a constraint equating a function of the derivatives of u,v (dependant variables) to zero.

I get a different solution when I use ux and d(u,x) and similiarly vx and d(v,x) in the constraint. Could you please explain why this happens and what is the right symbol to use for du/dx?

But when i plot the solution d(u,x) and ux give me the same graph, then why are they behaving differently when i use it in the constraint,

1 Reply Last Post 24.09.2015, 04:47 GMT-4
Hans Rullgård COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 24.09.2015, 04:47 GMT-4
One important thing to note is that variables and expressions can have different meanings on a boundary and on an adjacent domain. If instead of plotting on the interval, you make a Point Evaluation on one of the end points, you will probably see that d(u,x) is zero while ux has a nonzero value.

In general, to get a partial derivative of u on a boundary, it is easiest to use ux. An alternative is to write mean(d(u,x)), since the mean operator makes the evaluation happen on the adjacent domain instead of on the boundary.
One important thing to note is that variables and expressions can have different meanings on a boundary and on an adjacent domain. If instead of plotting on the interval, you make a Point Evaluation on one of the end points, you will probably see that d(u,x) is zero while ux has a nonzero value. In general, to get a partial derivative of u on a boundary, it is easiest to use ux. An alternative is to write mean(d(u,x)), since the mean operator makes the evaluation happen on the adjacent domain instead of on the boundary.

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.