Accessing Individual Units
Functions Introduced:
Use the function
ProMdlUnitsCollect() to retrieve a set of derived units of a particular type that are available to the specified model.
The function
ProUnitInit() retrieves the unit of a particular name for a specified model.
|
Note:
|
The function is applicable only for basic units and not for derived ones.
|
The function
ProUnitNameGet() returns the name of the unit. For system generated unit, that has no user-friendly name, it returns the error
PRO_TK_NOT_DISPLAYED.
Use the function
ProUnitTypeGet() to retrieve the unit type of a particular unit.
Unit types can have any of the following values for basic units:
• PRO_UNITTYPE_LENGTH
• PRO_UNITTYPE_MASS
• PRO_UNITTYPE_FORCE
• PRO_UNITTYPE_TIME
• PRO_UNITTYPE_TEMPERATURE
• PRO_UNITTYPE_ANGLE
Unit types can have any of the following values for derived units:
• PRO_UNITTYPE_AREA
• PRO_UNITTYPE_VOLUME
• PRO_UNITTYPE_VELOCITY
• PRO_UNITTYPE_ACCELERATION
• PRO_UNITTYPE_ROTATIONAL_VELOCITY
• PRO_UNITTYPE_ROTATIONAL_ACCELERATION
• PRO_UNITTYPE_FREQUENCY
• PRO_UNITTYPE_DENSITY
• PRO_UNITTYPE_TORQUE_MOMENT
• PRO_UNITTYPE_FORCE_ALONG_CURVE
• PRO_UNITTYPE_FORCE_PER_LENGTH
• PRO_UNITTYPE_MOMENT_ALONG_CURVE
• PRO_UNITTYPE_MOMENT_PER_LENGTH
• PRO_UNITTYPE_FORCE_OVER_SURFACE
• PRO_UNITTYPE_FORCE_PER_AREA
• PRO_UNITTYPE_MOMENT_PER_VOLUME
• PRO_UNITTYPE_PRESSURE
• PRO_UNITTYPE_STRESS
• PRO_UNITTYPE_YOUNG_MODULUS
• PRO_UNITTYPE_MOMENT_OVER_SURFACE
• PRO_UNITTYPE_MOMENT_PER_AREA
• PRO_UNITTYPE_TRANSLATIONAL_STIFFNESS
• PRO_UNITTYPE_ROTATIONAL_STIFFNESS
• PRO_UNITTYPE_THERMAL_EXPANSION_COEFF
• PRO_UNITTYPE_MOMENT_OF_INERTIA_SECTION
• PRO_UNITTYPE_MOMENT_OF_INERTIA_SECTION
• PRO_UNITTYPE_MASS_MOMENT_OF_INERTIA
• PRO_UNITTYPE_ENERGY
• PRO_UNITTYPE_WORK
• PRO_UNITTYPE_HEAT
• PRO_UNITTYPE_POWER
• PRO_UNITTYPE_HEAT_TRANSFER_RATE
• PRO_UNITTYPE_TEMPERATURE_GRADIENT
• PRO_UNITTYPE_HEAT_FLUX
• PRO_UNITTYPE_HEAT_FLUX_PER_LENGTH
• PRO_UNITTYPE_THERMAL_CONDUCTIVITY
• PRO_UNITTYPE_CONVECTION_COEFF
• PRO_UNITTYPE_CONVECTION_COEFF_PER_AREA
• PRO_UNITTYPE_SPECIFIC_HEAT
• PRO_UNITTYPE_THERM_RES_FORCE
• PRO_UNITTYPE_THERM_RES_MOMENT
• PRO_UNITTYPE_WARPING_COEFFICIENT
• PRO_UNITTYPE_MASS_PER_LENGTH
• PRO_UNITTYPE_MASS_INERTIA_PER_LENGTH
• PRO_UNITTYPE_DAMPING_COEFFICIENT
• PRO_UNITTYPE_HEAT_RATE_PER_LENGTH
• PRO_UNITTYPE_DIMENSIONLESS
• PRO_UNITTYPE_MASS_PER_AREA
• PRO_UNITTYPE_ROT_DAMPING_COEFF
• PRO_UNITTYPE_VOLUME_HEAT_GEN
• PRO_UNITTYPE_TRANS_STIFF_PER_AREA
• PRO_UNITTYPE_FORCE_PER_VOLUME
• PRO_UNITTYPE_CURVATURE
• PRO_UNITTYPE_CURVATURE_SQ
• PRO_UNITTYPE_LINEAR_MOMENTUM
• PRO_UNITTYPE_ANGULAR_MOMENTUM
• PRO_UNITTYPE_INV_STRESS
• PRO_UNITTYPE_TRANS_STIFF_PER_LENGTH
• PRO_UNITTYPE_ROT_STIFF_PER_LENGTH
• PRO_UNITTYPE_DAMPING_COEFF_PER_LENGTH
• PRO_UNITTYPE_INV_VELOCITY
• PRO_UNITTYPE_CONVECTION_COEFF_PER_VOLUME
• PRO_UNITTYPE_CONVECTION_COEFF_PER_LENGTH
• PRO_UNITTYPE_CONVECTION_COEFF_PER_POINT
• PRO_UNITTYPE_RADIATION_COEFF_PER_VOLUME
• PRO_UNITTYPE_RADIATION_COEFF_PER_AREA
• PRO_UNITTYPE_RADIATION_COEFF_PER_LENGTH
• PRO_UNITTYPE_RADIATION_COEFF_PER_POINT
• PRO_UNITTYPE_ENERGY_PER_VOLUME
• PRO_UNITTYPE_ENERGY_PER_AREA
• PRO_UNITTYPE_ENERGY_PER_LENGTH
• PRO_UNITTYPE_LENGTH_SPECTDENS
• PRO_UNITTYPE_VELOCITY_SPECTDENS
• PRO_UNITTYPE_ACCELERATION_SPECTDENS
• PRO_UNITTYPE_STRESS_SPECTDENS
• PRO_UNITTYPE_STRAIN_SPECTDENS
• PRO_UNITTYPE_ROTATIONAL_VELOCITY_SPECTDENS
• PRO_UNITTYPE_ROTATIONAL_ACCELERATION_SPECTDENS
• PRO_UNITTYPE_FORCE_SPECTDENS
• PRO_UNITTYPE_MOMENT_SPECTDENS
• PRO_UNITTYPE_ROTATIONAL_LENGTH_SPECTDENS
• PRO_UNITTYPE_MASS_FLOW_RATE
• PRO_UNITTYPE_VISCOSITY
• PRO_UNITTYPE_VOLUME_FLOW
The following units have been added to the volume flow:
◦ m3/sec
◦ cm3/sec
◦ mm3/sec
◦ ft3/sec
◦ in3/sec
◦ L/sec
◦ gal/sec
◦ mL/sec
Use the function
ProUnitConversionGet() to retrieve the conversion factor for a particular unit. The output arguments of this function are:
• conversion—Specifies the conversion factor for a unit in terms of scale of the unit and an offset value.
Example - Consider the formula to convert temperature from Centigrade to Fahrenheit
F = a + (C * b)
where
F is the temperature in Fahrenheit
C is the temperature in Centigrade
a = 32 (constant signifying the offset value)
b = 9/5 (ratio signifying the scale of the unit)
|
Note:
|
scales the length dimensions of the model using the factor specified. If the scale is modified, the model is regenerated. When you scale the model, the model units are not changed. Imported geometry cannot be scaled.
|
• ref_unit— Specifies the reference unit for the conversion.
Use the function
ProUnitConversionCalculate() to calculate the conversion factor between two units. These units can belong to the same model or two different models.
Use the function
ProUnitIsStandard() to determine whether the unit is a standard unit as defined in .
uses named quantities to represent units other than the basic units (e.g. "Ilbs_stress_unit", which represents a quantity of stress in the default unit systems). Parameters and material properties which are assigned derived units will return the name in the ProUnititem structure, rather than the actual unit-based expression for the quantity.
Use the function
ProUnitExpressionGet() to retrieve the unit-based expression for a given unit name.
Use the function
ProUnitInitByExpression() to retrieve the
ProUnititem given a unit-based expression.
The function
ProUnitCreateByExpression() creates a derived or basic unit, based on expression. Use the function
ProUnitModifyByExpression() to modify a derived unit.
The function
ProUnitCreateByExpressionAndType() creates a derived unit for the specified unit-based expression and type.
Use the function
ProUnitModifyByExpressionAndType() to modify a derived unit based on the specified unit-based expression and type. The input arguments are as follows:
• unit—Unit to be modified.
• type—Type of unit specified by the enumerated data type ProUnitType.
• expression—Expression of the unit specified by the character string using the ProPath object.
The function
ProUnitInitByExpressionAndType() returns a
ProUnititem structure for the specified unit-based expression. The input arguments are as follows:
• mdl—The model that owns the units.
• type—Type of unit specified by the enumerated data type ProUnitType.
• expression—Expression of the unit specified by the character string using the ProPath object.
Parent topic