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.

Definite integrals based upon user-defined variables or functions

Please login with a confirmed email address before reporting spam

I would like to find the normal component of stress upon a curved boundary and then determine how much torque is created. Since the normal direction changes at every point, the problem seems dependent upon both the (x,y) coordinates at each point on the boundary, and the angle from (x,y) to the center of the boundary. My test case is a circle, so the length of the moment arm is always cRadius.

I do not see how to set this up when I do not know the (x,y) coordinates of the boundary -- I just want it evaluated at every point, whatever those points may be. Here are my initial thoughts:

1) Define the angle at each point:

myTheta = atan2(mass1.CMY-y),(mass1.CMX-x)

2) Integrate the normal stress across myTheta, in quadrants because the sign changes seem to necessitate that. So quadrant 1 would be:

integrate((-sin(myTheta) * cRadius * spf.T_stressx) + (cos(myTheta) * cRadius * spf.T_stressy),myTheta,0,pi/2)

But, this gives the same answer for every quadrant, which leads me to believe that it is integrating over the entire boundary no matter what range I specify.

myTheta is a variable. Perhaps it needs to be a function, but then I don't know what to put for the ranges of x and y. Or perhaps this needs to be two integrals, with myTheta being an indefinite integral (which hopefully just makes it use every point that exists) that is performed upon the results of the definite integral?

Any pointers on how to write this would be appreciated!

1 Reply Last Post 9 juin 2017, 18:21 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 9 juin 2017, 18:21 UTC−4
Updated: 7 years ago 9 juin 2017, 18:22 UTC−4
This seems to work, but since I'm not sure exactly how these operators are being evaluated, it's hard to be sure other than saying "The plot looks reasonable."

TotalShearStress = avgOp(((-sin(myTheta) * spf.T_stressx) + (cos(myTheta) * spf.T_stressy)) * cRadius)

Where a positive value means counter clockwise rotation.

I'm a bit concerned that without doing it by quadrant, forces may inappropriately cancel out due to sign. But, not doing it by quadrant allows avoidance of the whole definite integral thing.

Anyone well-versed in the theory have an opinion as to whether this is correct?
This seems to work, but since I'm not sure exactly how these operators are being evaluated, it's hard to be sure other than saying "The plot looks reasonable." TotalShearStress = avgOp(((-sin(myTheta) * spf.T_stressx) + (cos(myTheta) * spf.T_stressy)) * cRadius) Where a positive value means counter clockwise rotation. I'm a bit concerned that without doing it by quadrant, forces may inappropriately cancel out due to sign. But, not doing it by quadrant allows avoidance of the whole definite integral thing. Anyone well-versed in the theory have an opinion as to whether this is correct?

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.