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.
Calculating cubic roots with conditions
Posted 21 août 2017, 07:44 UTC−4 Computational Fluid Dynamics (CFD), Studies & Solvers Version 3.5a 1 Reply
Please login with a confirmed email address before reporting spam
Hello everyone
I am using Comsol 3.5a and I am trying to perform a calculation but unfortunately it seems not to work. I am using Comsol just to solve differential equations and , hence, I am using the mathematical tool that is incorporated. My domain is a square with variables x and z and side equal to 10 dimensionless units. What I want is to calculate the square root of (x^2-y^2) but only for x>y. In all other cases I want the outcome to be 0. I tryied to use absolute value (using the abs(x^2-y^2)) but it seems that in that way I also create solutions for x<y , as well.
Also I am trying to use a condition like: sqrt (x^2-y^2)*(x>y) but also is not working.
Do you have any idea what should I do?
Thank you very much
Yuri
I am using Comsol 3.5a and I am trying to perform a calculation but unfortunately it seems not to work. I am using Comsol just to solve differential equations and , hence, I am using the mathematical tool that is incorporated. My domain is a square with variables x and z and side equal to 10 dimensionless units. What I want is to calculate the square root of (x^2-y^2) but only for x>y. In all other cases I want the outcome to be 0. I tryied to use absolute value (using the abs(x^2-y^2)) but it seems that in that way I also create solutions for x<y , as well.
Also I am trying to use a condition like: sqrt (x^2-y^2)*(x>y) but also is not working.
Do you have any idea what should I do?
Thank you very much
Yuri
1 Reply Last Post 21 août 2017, 08:13 UTC−4