Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a 3D plot

Status
Not open for further replies.

CoryPad

Materials
Apr 15, 2002
5,192
I want to analyze the stress on a part. I want to vary two part dimensions through ranges:

l_k = 2, 3 ... 200 mm

D_A = 18, 19 ... 200 mm

I want to use a Finite Element Method software program to calculate the stress [σ] in the part using these two variables. Then, I would like to import the stress values into MathCAD and create a plot with l_k as the x axis, D_A as the y axis, and [σ] as the z axis. I am only a novice MathCad user, so I don't really know how to start. I have reviewed MathCad help and the MathSoft Collaboratory, but I can't understand them very well. All help is appreciated.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
Replies continue below

Recommended for you

OK, that's easy.

Read the structured data file (which in the simple case will have to be in the mathcad directory) into a matrix M, using

M:READPRN(filename)

in this case it would look for filename.prn in the current directory. space comma or tab delimited.

Then display M in a 3D plot

Go the graphics menu , click on the sort of plot you want, type M in the placeholder




Cheers

Greg Locock
 
Greg,

Thanks for the reply.

If the .prn file is a matrix of 199 columns and 183 rows (the number of elements in my variables), Mathcad will automatically recognize the number of columns and rows as vectors that I can graph? I assumed I would have to use i and j as range variables then transform i (from 1 to 199) and j (from 1 to 183) into my variables l_k (from 2 to 200) and D_A (from 18 to 200). Mathcad 8 has a 100 row/column limit to matrices - is this true for version 12?

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
I didn't know about the limit in size for matrices, so long as you are under that you don't need to worry about anything else, you DON'T need range variables for 3D plots

If you did you'd use something like i:0;rows(M)-1

Just play around with a small matrix, you'll figure it out in no time.

To be honest I'm a non fan of the Mathcad way with matrices, I want big matrices with unlimited dimensions, not 2d only.





Cheers

Greg Locock
 
Can you include your data file in your Collab posting. Your Mathcad file is useless without the data.

Thanks...

TTFN
 
I am still fine-tuning the FEM analysis, so I don't have the data yet. I was more worried about what syntax to use to display the data in Mathcad, hence my simplified 3x3 input matrix. I will post a larger raw data file to the Collab soon. Thanks.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
I assumed that the first file I posted was readable by anyone. Now I understand that you couldn't see anything, hence the "useless" comment.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
Not sure what happened during your posting, but the Collab server software does allow you to post multiple files with your posting.

TTFN
 
My first message included only the Mathcad file - I didn't think about needing to attach a raw data file. The file in the first message used only three points each for my two variables, rather than 199 and 183 (I don't have all 199*183 = 36 417 points yet). Then, I posted a new Mathcad file with 20 points for each variable, and a raw data file based on the 20*20 = 400 points (still don't have all points yet). Then I got some good help.

Regards,

Cory

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips Fora.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor