cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

10-Marble

## Help needed in plotting parallel lines within fixed boundaries (discontinuities)

Hi,

I am trying to do solve a pde using method of characteristics. I am able to solve it. But I am not sure how to plot characteristic lines which are parallel in a certain z range. Also, characteristics should not cross the boundaries associated with constant flux (discontinuities). Kindly check plot 4 in the attached mathcad file and I want it to look like the pic pasted below it. Here z(t), z1(t) and zc(t) are the boundaries and z2(t), z3(t) and z4(t) are the characteristics. I think it may need some programming. Really appreciate the help.

Regards.

5 REPLIES 5
23-Emerald III
(To:arnair81)

Maybe this helps:

Play with (change value of) i, to see what happens.

Success!
Luc

The attached Prime4 file contains an improvement of the above.

10-Marble
(To:LucMeekes)

Hi Luc,

Thanks for the quick reply. I have a doubt. In your program changing i, will result in shifting say z2_(t) upwards or downwards (it lies between z_(t) and z1_(t) when i is changed, which is good). But in this case i may need to have multiple z2_ (t) lines  with i changed to i/2, i/4 ,3i/4 etc to fill out the particular boundary region. Is there any way I can have say 30 lines (with a particular slope) filling up that particular region. 60 parallel lines filling up the region z<0  and 100 parallel line filling up the region z>L (Just an example), so that I don't have to manually do it. Thank you

Regards

23-Emerald III
(To:arnair81)

I tried defining i as a range, like i:=0,1...20

But then plot refuses, you can try that out yourself...

Do you just want to hatch it (in which case there may be examples of hatching with Prime on this forum), or do the slopes of the lines actually have meaning?

Luc

10-Marble
(To:LucMeekes)

Hi Luc,

The slopes of the characteristics (corresponds to same volume fraction) within a boundary ( say 0<z<L) should be the same. I just wanted to plot a few lines with the same slope and different intercept so that it fills out the boundary area (see pic I pasted below plot 4). I was able to fill out an area using your code (please see attachment). My question was, instead of me writing z1_(t) to z14_(t), is there any way one could plot parallel lines using a program.

Regards.

23-Emerald III
(To:arnair81)

As I said, If you just want to hatch, there are examples on this forum, like: https://community.ptc.com/t5/PTC-Mathcad/Hatch-zip/m-p/448192

Success!
Luc

Announcements
Top Tags