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.

Derivative of "z" with respect to "r" in cylindrical coordinates (2D axisymmetric model)

Please login with a confirmed email address before reporting spam

Hi,

I am working with a 2D axisymmetric model and I needed to calculate the derivative of the z coordinate (height), with respect to the horizontal distance to a curve or r coordinate.

I use the command d(z,r) but the result is "0". Could someone tell me if this operation can be done and how.

Thank you very much for your help.

Best, Andres


4 Replies Last Post 19 janv. 2023, 13:41 UTC−5
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 13 déc. 2022, 10:46 UTC−5

z and r are simply coordinates. They do not depend on one another. If you compute something that has an actual dependence on a coordinate, then you may then be able to compute its derivative with respect to that coordinate. {Note: You may be able to get some useful help here if you are willing to explain the physical nature of the problem you are trying to solve, which presumably led you to this question.}

-------------------
Scientific Applications & Research Associates (SARA) Inc.
www.comsol.com/partners-consultants/certified-consultants/sara
*z* and *r* are simply coordinates. They do not depend on one another. If you compute something that has an actual dependence on a coordinate, then you may then be able to compute its derivative with respect to that coordinate. {Note: You may be able to get some useful help here if you are willing to explain the physical nature of the problem you are trying to solve, which presumably led you to this question.}

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 14 déc. 2022, 11:50 UTC−5
Updated: 2 years ago 14 déc. 2022, 11:53 UTC−5

Dear Mr. Koslover,

Yes, of course I can explain the problem. It is the one described in another forum thread in which you have already answered me :) : volume 2D axi model

My idea, since I am not able to calculate the volume of a hole with axisymmetric 2D geometry, is to use the line integral to calculate the volume by applying the Divergence Theorem or Gauss's Theorem. This theorem can be rewritten mathematically for cylindrical coordinates (2D axisymmetric model) if the COMSOL integral operator can only be applied to line integrals the theorem is rewritten as follows (I omit the mathematical development):

In this volume calculation, dS is the arc differential, and z(r) is the cylindrical coordinate as a function of radius for the curve that is shaded blue in the attached pic.

Can I know the "z" coordinate as a function of "r" for a given boundary in COMSOL ?

Thank you very much for your attention again,

Kind Regards, Andres

Dear Mr. Koslover, Yes, of course I can explain the problem. It is the one described in another forum thread in which you have already answered me :) : [volume 2D axi model](http://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T16:35:01Z) My idea, since I am not able to calculate the volume of a hole with axisymmetric 2D geometry, is to use the line integral to calculate the volume by applying the Divergence Theorem or Gauss's Theorem. This theorem can be rewritten mathematically for cylindrical coordinates (2D axisymmetric model) if the COMSOL integral operator can only be applied to line integrals the theorem is rewritten as follows (I omit the mathematical development): V=\int{pi*r^2*\frac{dz(r)}{dr}*\frac{1}{\sqrt{1+\frac{dz(r)^2}{dr}}}}*dS} In this volume calculation, dS is the arc differential, and z(r) is the cylindrical coordinate as a function of radius for the curve that is shaded blue in the attached pic. Can I know the "z" coordinate as a function of "r" for a given boundary in COMSOL ? Thank you very much for your attention again, Kind Regards, Andres


Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 14 déc. 2022, 17:31 UTC−5

Hello Andres,

You're on the right track! See my post in your other thread: https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z

Best,

Jeff

-------------------
Jeff Hiller
Hello Andres, You're on the right track! See my post in your other thread: [https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z](https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z) Best, Jeff

Please login with a confirmed email address before reporting spam

Posted: 1 year ago 19 janv. 2023, 13:41 UTC−5

Hello Andres,

You're on the right track! See my post in your other thread: https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z

Best,

Jeff

Thank you very much Jeff!

Best, Andres

>Hello Andres, > >You're on the right track! See my post in your other thread: [https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z](https://www.comsol.com/forum/thread/317481/how-to-calculate-the-volume-of-a-hole-inside-an-axisymmetric-2d-domain?last=2022-12-14T18:20:44Z) > >Best, > >Jeff Thank you very much Jeff! Best, Andres

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.