×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Easy Question -range values

Easy Question -range values

Easy Question -range values

(OP)
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

RE: Easy Question -range values

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

is one approach

TTFN

RE: Easy Question -range values

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

Wouldn't the conditional statement define the variable?

jackboot

RE: Easy Question -range values

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

TTFN

RE: Easy Question -range values

(OP)
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

RE: Easy Question -range values

@jackboot:

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

You may store your snapshot at http://www.directupload.net an post the link in the forum like this:

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

looks like:



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:

http://service.gmx.net/mc/jGpwpnQScfOkGrO14WD3kEoYL1PVnA

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

Bye,
Christian.

RE: Easy Question -range values

(OP)
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 http://http://server3.uploadit.org/files/jackboot-Torque.JPG]

RE: Easy Question -range values

Brute force numerical integration, which you can do as a summation

TTFN

RE: Easy Question -range values

Hi jackboot,

1) posting pictures: The link you used include the "http://"-expression 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.



Christian.

RE: Easy Question -range values

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

jackboot

RE: Easy Question -range values

(OP)
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?


RE: Easy Question -range values

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.

RE: Easy Question -range values

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.

RE: Easy Question -range values

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close