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
Posted 09.06.2017, 16:56 GMT-4 1 Reply
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!
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 09.06.2017, 18:21 GMT-4