Author |
Message |
amy peterson (amy_peterson)
New member Username: amy_peterson
Post Number: 1 Registered: 12-2004
| Posted on Tuesday, December 07, 2004 - 04:53 pm: | |
Hi, I have a question regarding integrals. Consider a 2-d rect. bar. I would like to take the integral at diff values of x wrt to y down the length of the bar (x = horizontal y = vertical) and then plot these values. How would I write this? thanks Amy |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 274 Registered: 06-2003
| Posted on Tuesday, December 07, 2004 - 09:35 pm: | |
Define a new variable, say G, and specify its equation as dy(G)=<expression> Specify Value(G)=0 as the boundary condition on Y=Ymin. Then plot G on the top surface.
|
amy peterson (amy_peterson)
New member Username: amy_peterson
Post Number: 2 Registered: 12-2004
| Posted on Thursday, December 09, 2004 - 05:01 pm: | |
For the 2-d rect bar I am solving the equation: div(-k*grad(phi))=0 and I want to integrate Phi wrt to y at x=1,2,.... I then want to export these values to plot the curve. |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 281 Registered: 06-2003
| Posted on Thursday, December 09, 2004 - 06:50 pm: | |
Here's what I said last time: VARIABLES Phi G EQUATIONS div(-k*grad(phi))=0 dy(g) = phi BOUNDARIES REGION 1 START(0,0) VALUE(G)=0 LINE TO (L,0) TO (L,H) TO (0,H) TO FINISH PLOTS ELEVATION(G) FROM (0,H) TO (L,H) Notice that if dy(G)=phi, then G=integral(phi*dy). If you insist on exporting, then draw some features: FEATURE START "F1" (1,ymin) LINE TO (1,ymax) FEATURE START "F2" (2,ymin) LINE TO (2,ymax) ... Then plot the values along these lines: SUMMARY EXPORT FILE="Integrals" REPORT LINE_INTEGRAL(phi,"F1") REPORT LINE_INTEGRAL(phi,"F2") ...
|
|