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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Mathcad deciphering

ColinCWare
1-Newbie

Mathcad deciphering

Hi one and all,

Mathcad has the ability to find the physical property terms following calculations. What is the Mathcad selecting process of calculating several different physical properties and attach the proper dimension; e.g. of "sec" time? What is the selecting process of all the physical properties: meter, joule, g (acceleration), pressure (newton/area), amp, atm, Hz, F (Farad), ... any combination of properties and end up with the correct combination of physical dimensions added to the answer?

Colin C eagle1@eaglmall.com
21 REPLIES 21

On 3/2/2009 8:17:36 PM, ColinCWare wrote:
>Hi one and all,
>
>Mathcad has the ability to
>find the physical property
>terms following calculations.
>What is the Mathcad selecting
>process of calculating several
>different physical properties
>and attach the proper
>dimension; e.g. of "sec" time?
>What is the selecting process
>of all the physical
>properties: meter, joule, g
>(acceleration), pressure
>(newton/area), amp, atm, Hz, F
>(Farad), ... any combination
>of properties and end up with
>the correct combination of
>physical dimensions added to
>the answer?
>
>Colin C eagle1@eaglmall.com

Not sure what you're asking. Mathcad does no analysis, per se. It simply keeps track of all the units used and dispositions them according to the operations used in the equation. It generally uses the base units, since that's what every unit, no matter how complex, is stored and expressed.

TTFN,
Eden
PhilipOakley
5-Regular Member
(To:IRstuff)

Depending on the version there is a units simplification process. This will decide if it report Hz or s^-1.

Mainly these simplify to SI base units (I think)

In more recent versions you can craft your own simplification rules. The details are in the various help files..... if you can find them.

Philip Oakley

On 3/2/2009 8:17:36 PM, ColinCWare wrote:
== What is the Mathcad selecting process of calculating several different physical properties and attach the proper dimension;

AFAIA, Mathcad converts any units to their base dimensions and internally manipulates these. When you evaluate (visually) any given quantity, Mathcad then shows either the unit expressed in terms of the selected base quantities (SI by default) or, if simplification is selected (again, default I think) then it chooses a named unit if one exists (eg, in SI, force maps to N under simplification or m.kg/s2 otherwise)

Stuart

"Simplification" is a hit or miss proposition

W/K winds up as m2kg/(K*s3)

However, without the temperature, the base unit expression will resolve to W

TTFN,
Eden

Thanks Eden, Philip, and Stuart,

Your help got me off to resolving my question, which summerized is: How does Mathcad select the dimensions to display following a calculation involving a collection of properties?

I work mostly in electromechanics. Calculations in these dimensions sometimes include "coul" Coulomb. The dimensions of coul are not displayed; henry, weber, farad, stokes, poise, joule, watt, and many other property dimensions are displayed. coul is the response to insert the unit of charge into a formula to be calculated. But charge does not have a dimension; it is a pure number of electrons or protons that make up the charge.

volt/ohm = coul/sec. So what is a coul?

Colin C eagle1@eaglmall.com

On 3/3/2009 12:56:19 PM, ColinCWare wrote:
== volt/ohm = coul/sec. So what is a coul?

The 'correct' (that is, SI) symbol for the coulomb is 'C'. Expressed in terms of base units, 'electric charge' or 'amount of electricity' is 's.A' (ie, the second-ampere).

Stuart

On 3/3/2009 12:56:19 PM, ColinCWare wrote:
>Thanks Eden, Philip, and
>Stuart,
>
>Your help got me off to
>resolving my question, which
>summerized is: How does
>Mathcad select the dimensions
>to display following a
>calculation involving a
>collection of properties?
>
>I work mostly in
>electromechanics. Calculations
>in these dimensions sometimes
>include "coul" Coulomb. The
>dimensions of coul are not
>displayed; henry, weber,
>farad, stokes, poise, joule,
>watt, and many other property
>dimensions are displayed.
>coul is the response to insert
>the unit of charge into a
>formula to be calculated. But
>charge does not have a
>dimension; it is a pure number
>of electrons or protons that
>make up the charge.
>
>volt/ohm = coul/sec. So what
>is a coul?
>
>Colin C eagle1@eaglmall.com

Coulomb IS the unit of charge, so an electron has 1.602*10-19 coulombs of charge.

Since volt/ohm is current in amperes, it can be correctly presented as coulomb/second, although, per NIST, coulomb should probably be an ampere*second: http://physics.nist.gov/cuu/Units/ampere.html

TTFN,
Eden

>Since volt/ohm is current in amperes, it can be correctly presented as coulomb/second, although, per NIST, coulomb should probably be an ampere*second: <<br> ________________________

Coulomb is the cumulative integral of the function ampere*second.
That's the way it seems defined, is it ?
Coulomb/second, simply a rate of charge.

jmG

The ampere is the fundamental SI unit, as is the second. Therefore, coulomb is a derivative, convenience unit, and has the dimensions of ampere*sec.


TTFN,
Eden

Thanks jmG, Stuart, Eden,

All your answers are well received, but are not answers to my question.

What is the processing method Mathcad uses to select the physical dimensions after an equation is calculated? The failure of "coul" not being dimensioned while all else are dimensioned in MKS (the set I normally use) dimensions. So, I ask the question: Just how does Mathcad handle the dimensioning of any, or all, of the given properties listed in "Insert" unit list? I am sure that all the dimensions of the elements of a constructed equation are reduced to the single MKS dimensions and tacked on the numerical answer. For my work, this function is well suited for me. Just how is this accomplished?

Colin C eagle1@eaglmall.com

On 3/4/2009 1:13:39 PM, ColinCWare wrote:
>What is the processing method Mathcad uses to select the physical dimensions after an equation is calculated?
>The failure of "coul" not being dimensioned while all else are dimensioned in MKS (the set I normally use) dimensions.

== But charge does not have a dimension; it is a pure number of electrons or protons that make up the charge.
== volt/ohm = coul/sec. So what is a coul?

charge is a base quantity within the Mathcad version of the MKS system of quantities. (don't ask me why; AFAIA, strict MKS only has length, mass and time and the standard extension uses the Ampere (MKSA system of quantities)).

So Mathcad will internally convert 'coul' to dimension 'Q' (standard charge unit) rather than treating it as dimensionless. This will always result in Mathcad displaying 'coul' if charge forms part of the dimension of a calculated quantity. You could try redefining coul to be 1 at the start of your worksheets.

Stuart

Hi Stuart,

The phrase you used "So Mathcad will internally convert 'coul' to dimension..." gives me the description of what I am looking for. Just how does Mathcad "internally convert" coul or any other otherwise not MKS dimensioned unit?

Colin C eagle1@eaglmall.com

On 3/4/2009 2:00:07 PM, ColinCWare wrote:
>>The phrase you used "So Mathcad will internally convert 'coul' to dimension..." gives me the description of what I am looking for. Just how does Mathcad "internally convert" coul or any other otherwise not MKS dimensioned unit?

Look up table, effectively. 'coul', for example, will be defined somewhere as being to equivalent to '1Q', 'm' to '1L', etc. If you look in the back of the Mathcad 11 User Guide, you will see a list of the definitions under each of the supported systems of quantity.

At the end of each calculation, the result will have a dimension expressed in terms of the appropriate base dimensions, each of which Mathcad will convert to the appropriate unit. If simplification is on, then Mathcad will use another lookup table to see if the dimension of the resultant quantity is in a table of quantities that have a single unit name (eg, power maps to watt in SI).

Stuart

Mathcad converts all input units into the base system. In the case of coulomb, the base system is A*s. If the result is coulomb by itself, Mathcad will "simplify" to "C". However, if you input C/m, Mathcad displays A*s/m, demonstrating that it's base units are SI, and that it converts C to A*s.


TTFN,
Eden

Colin,

I do not "know" how Mathcad does it, but here is how I would code it:
1. Keep a separate administration for units with every variable. This can be done fairly simply, like use an array where e.g. the first position is for metre, the second position is for kilogram, the third position is for second, etc. Now all that needs to be stored is the power that each of the base units has.
2. Whenever a variable is defined, break up its units in the standard set of base units (for Mathcad that is its implementation of the SI units), using a look-up table for the defined units. So if a variable is defined with a value of 1 Newton, store it as 1 kg^1*m^1*s^-2. Another variable defined as 1 Pascal would be stored as 1 kg^1*m^-1*s^-2.
3. whenever a calculation of two dimensioned numbers is carried out, the units are subject to the same operations as the numbers.
So if the two variables above are divided 1N/1Pa, the result is (kg^1*m^1*s^-2)/(kg^1*m^-1*s^-2) which is subsequently simplified to kg^0*m^2*s^0.
4. Now check the unit system that the user has selected. Find in there the unit (if any) that translates exactly to the simplified result unit.
If found, display that as the unit of the result.
If not found, display the simplified result unit.

Luc

Pretty close. Mathcad does keep a vector of the powers of the dimensions as a part of any value. When values are added or subtracted, these vectors must be identical (otherwise you get an incompatible units error). When values are multiplied or divided the vectors are added or subtracted. Raising to a power multiplies the vector by a scalar (the exponent). Most other operations require that the vector be all zeros.

But there is no need to "break up" an input unit. You cannot actually specify any compound unit. And almost never directly specify a simple unit. A direct specification of a simple unit would be a dimension suffix, such a 1L for a one meter length (in MKS or SI). What is normally used is a set of predefined variables whose values are the various units. Thus N is not actually a newton, but rather a variable whos value is one newton. That value is one kilogram meter per second per second. Mathcad has no notation for inputting any quantities other the base units for the dimensions. Just as it has no notatin for inputing a complex number, only pure reals and pure imaginaries, other complex numbers have to be written as expressions that evaluate to the desired number.
__________________
� � � � Tom Gutman

On 3/4/2009 1:13:39 PM, ColinCWare wrote:
>Thanks jmG, Stuart, Eden,
>
>All your answers are well
>received, but are not answers
>to my question.
>
>What is the processing method
>Mathcad uses to select the
>physical dimensions after an
>equation is calculated?
...
>Colin C eagle1@eaglmall.com
____________________________

When numbers are multiplied, i.e: qualified by the unit in the base and coherent system of units, Mathcad carries a separate literal unit algebra, then the result is decorated with that resulting algebra and the appropriate symbol. Please open a manual about units and see what "literal algebra" means. If the unit result symbol does not exist or is not as you want, then define in the utilities region at the top of the sheet.

C�:=1 ,,,, 1.23456789*1=1.23456789C�

"UnitLiteralAlgebra" = "Dimension" in literature.

jmG



Mathcad does not sele a physical dimensions after a calculation is done, rather it does the calculation in terms of physical dimensions. When you display a value, those dimensions are shown. You have some options as to exactly how they are shown. Simplification is very simplistic -- if the particular dimensions match a defined unit, that unit is used. Otherwise the dimensions are expressed in terms of the base units.

Coulombs is a particular case, as there are three different ways of handling electrical quantities. CGS dispenses with any special base unit (dimension) for those, and just expressed electrical and magnetic quantities in terms of the ordinary dimensions (mass, length, time). MKS uses the coulomb (charge) as a base unit (dimension), and the ampere is just one coulomb per second. SI uses the ampere (current) as the base unit (dimension) and the coulomb becomes a derived unit, the ampere second.

Mathcad uses seven dimensions -- mass, length, time, charge or current (depending on unit system), temperature, luminosity, and substance. Associated with each dimension is a name. The default name is usually the same as the dimension type, with the singular exception of electrical quantity, which is always named charge, whether the dimension is charge or current. These names are not normally used by Mathcad, but if you choose to show them you can change the names to suite yourself.

Also associated with each dimension is a suffix letter. This suffix allows you to enter quantities of any of the dimensions, independently of what the base units are for each dimension. For example, Q (note case sensitive) is the suffix for electic quantit, and you can write 1Q for one unit of electric quantity. Depending on the unit system in use that could represent one coulomb or it could represent one ampere. Similarly 1L (a unit length) could be one meter or one centimeter or one foot.

Also associated with each dimension is a base unit. Normally dimensions are shown in terms of these base units. Note that the base unit for each dimension varies with the unit system chosen. Also note an anomaly in the CGS system -- charge has the base unit coulomb (1Q is one coulomb), but the coulomb is not defined using that dimension but in terms of mass-length-time.
__________________
� � � � Tom Gutman

...



jmG

Tom, Luc, jmG, Eden,

Thank you for all the help. I see I have much work to do deciphering Mathcad units tool.

Eden, what is "the base system is A*s"? This one I am not familiar with.

Colin C eagle1@eaglmall.com

On 3/6/2009 10:22:26 AM, ColinCWare wrote:
>Tom, Luc, jmG, Eden,
>
>Thank you for all the help. I
>see I have much work to do
>deciphering Mathcad units
>tool.
>
>Eden, what is "the base system
>is A*s"? This one I am not
>familiar with.
>
>Colin C eagle1@eaglmall.com
____________________________

You need to study "unit systems", mostly SI.
A = Amp�re ... s = second (time).

jmG




Top Tags