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.

Dependent variable at a point

Please login with a confirmed email address before reporting spam

Hi,

I am wondering if COMSOL allow us to calculate the value of a dependent variable at a point at which I calculated the maximum value of another variable. For example I created a maximum operator (maxop1) and I calculated the position of the maximum value of the height1 (h1) in my domain by applying: maxop1(h1,x). Then, I want to find the value of h1 and of another height, specifically h2 at the above position (x), but I do not know how to do that in COMSOL.

Thanks, Alexandra


2 Replies Last Post 4 mar 2022, 08:38 GMT-5
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 4 mar 2022, 07:53 GMT-5
Updated: 2 years ago 4 mar 2022, 07:54 GMT-5

Hi Alexandra,

One way of doing this, is to add a Cut Point 2D (in 2D) or Cut Point 3D (in 3D) dataset and define that cut point (in 3D, as an example) using the following x, y, and z coordinate values:

maxop1(h1,x)
maxop1(h1,y)
maxop1(h1,z)

Then add a Point Evaluation node, and in its settings, choose the Cut Point 2D or Cut Point 3D dataset as the dataset to use, and then enter h2 in the Expression column to evaluate it at that point.

Best regards,

Magnus

Hi Alexandra, One way of doing this, is to add a **Cut Point 2D** (in 2D) or **Cut Point 3D** (in 3D) dataset and define that cut point (in 3D, as an example) using the following *x*, *y*, and *z* coordinate values: maxop1(h1,x) maxop1(h1,y) maxop1(h1,z) Then add a **Point Evaluation** node, and in its settings, choose the Cut Point 2D or Cut Point 3D dataset as the dataset to use, and then enter `h2` in the **Expression** column to evaluate it at that point. Best regards, Magnus

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 4 mar 2022, 08:38 GMT-5

Hello Magnus,

Thank you very much for the answer!

Still I have a problem, because the position (x) where h1 is maximum changes over time and by adding a Cut Point 1D (because h1 and h2 depend only on x-coordinate) COMSOL calculates h1 and h2 at a specific point. I want to calculate my two variables, h1 and h2, at the point where maxop1(h1,x) applies, which position changes over time.

Thanks,

Alexandra

Hello Magnus, Thank you very much for the answer! Still I have a problem, because the position (x) where h1 is maximum changes over time and by adding a Cut Point 1D (because h1 and h2 depend only on x-coordinate) COMSOL calculates h1 and h2 at a specific point. I want to calculate my two variables, h1 and h2, at the point where maxop1(h1,x) applies, which position changes over time. Thanks, Alexandra

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.