×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• 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.

# 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

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

### 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?

"[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

### 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.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

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:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!