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!

Easy Question -range values 1

Status
Not open for further replies.

jackboot

Mechanical
Jun 27, 2001
151
Problem: Analyzing crank torque, load is applied for 1/2 rotation

N:=360
i:=0..N
thetai:=i
thetari:= converts thetai to radians

Now I need the following conditional statement for the compression stroke:
ag(thetar):= 1 if pi>thetar>0
0 otherwise

Po= Pp*ag(thetar)
I get an error message that states ag(theta) must be a scalar.

What am I doing wrong? I am new to Mathcad.

jackboot
 
Replies continue below

Recommended for you

thetar[i:pi*i/360
Po[i:pp*ag(thetar[i)

is one approach

TTFN
 
OK - Now I am getting ag(thetar[i) is undefined.

Wouldn't the conditional statement define the variable?

jackboot
 
did you define thetari as thetar[i? Otherwise, you have no subscripts

TTFN
 
How can I include a snap shot of my sheet?

thetar[i= theta[i*pi/180

I have a results table -but it is listed as thetar=

jackboot
 
@jackboot:

>How can I include a snap shot of my sheet?

You may store your snapshot at an post the link in the forum like this:

"[I M G http:// www .directupload.net/images/050304/EZhgiprl.gif]" (without spaces)

looks like:

EZhgiprl.gif


If you want to calculate the pressure and the froces in the crankshaft (even of more-cylinder-engines), I uploaded a 7-page-calulation in PDF. I stored it at the GMX-page:


You've to chose: "GMX Mediacenter starten" and you can download the file. Next week I will publish it at my homepage: in the section "Studium".

Bye,
Christian.
 
OK - That part is working now.

If I have a data table with two columns - when charted I get a shape that looks like two sine curves slightly off phase of one another.

I need to determine the area under the curve (integrate). I don't have an equation of curve but I have data to generate the curve.

Is there a way to determine this with Mathcad?

And I guess if it isn't a .gif if won't display?

jackboot

[I M G ]
 
Brute force numerical integration, which you can do as a summation

TTFN
 
Hi jackboot,

1) posting pictures: The link you used include the " two times; AND you wrote "I M G" with spaces, it should be "IMG" (when I copied the right part of the link, I saw your picture)

2) integrate: the first solution, posted by IRstuff (numerical integration), is the easiest one, but there is another more precise possibility: (e.g. spline) interpolation.

QiIggy9s.gif


Christian.
 
Christian - Thanks - You can't imagine how much time you just saved me.

jackboot
 
One more question:

I am getting a number for my area under the curve that doesn't seem correct. For instance, I am integrating from 0 to 360. If I change the limits to 0 to 120 - I should get 1/3 the value - but I don't. Can anyone explain what I am doing wrong?


jackboot-title1.JPG
 
The 3 curves don't look identical to me.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Hi,

I can't find a mistake in your MathCAD-sheet jet. You should get the same value for "Anum" and "O". I only noticed, that "O" ist nearly 180 times greater then "Anum" (a half cycle?).

Christian.
 
@IRstuff: OK, I see the file,
but I can't open *.xmcd-Files (only *.mcd); I've MathCAD 2001.
Christian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor