Professional Documents
Culture Documents
ANSYS AIM includes the ability to utilize expressions and other operations in your simulation
processes.
Expresiones y otras operaciones
ANSYS AIM incluye la capacidad de utilizar expresiones y otras operaciones en sus procesos de
simulacin.
Expresiones
En su forma bsica, una expresin es una cadena de caracteres utilizada para definir alguna
cantidad de inters que podra ser utilizada para algn propsito en un anlisis. Estas cantidades
pueden ser constantes, expresiones que evalan a constantes, expresiones que evalan a valores
individuales o expresiones que se evalan a campos que varan sobre regiones fsicas.
Constantes dimensionales
Variables de campo escalares
Funciones matemticas intrnsecas
Funciones de cantidad integrada
Cualquier combinacin matemtica dimensionalmente consistente de lo anterior
Las expresiones se pueden utilizar para definir muchas propiedades reales en ANSYS AIM,
incluyendo:
Creating Expressions
Enter an expression in the form of an operand followed optionally by operators and additional
operands. Names used in expressions (variable names, function names, and so on) are case-
sensitive.
For example, If Pressure1 and Pressure2 are properties of existing objects in the simulation, you
can set a property field to:
Pressure1 + 3 * Pressure2
AIM expression and mathematical function evaluation is based on the Python programming
language (www.python.org). The AIM expression parser supports:
Standard mathematics functions and operators. For example:
cos(b)
2*Average(Pressure,GetBoundary("@Inlet1"),"Area")
Pressure/(pi*radius**2)
Units for quantities. Dimensional quantities are defined in units that can be a combination of
one or more base units. For example:
10[m]
Standard arithmetic operators including constants and trigonometric functions, among
others. Mathematical Operators and Functions has the complete list of arithmetic operators.
Conditional statements. For example:
500 [N] if P1 == 15 [mm] else 250 [N]
2 if P1 >= 8 else 2.25 if P1 == 7 else 2.5 if P1 == 6 else 3
An expression should be entered in the form of an operand followed optionally by operators and
additional operands. For example, you can set a property field to Pressure1 + 3 * Pressure2, given
that Pressure1 and Pressure2 are properties of existing objects in the simulation. Names used in
expressions (variable names, function names, and so on) are case sensitive.
Use the list and decimal separators defined in your locale settings. For example, if a
comma is defined as a decimal separator and a semicolon defined as a list separator, use these
when you type in an expression.
If the expression has units, you must type in the units rather than relying on auto-
completion.
Expressions that involve quantities must be dimensionally consistent. The + and - operators
require that the two operands have compatible units. For example, you cannot add an Area
parameter to a Length parameter (both units must be Length or both units must be Area). The * and
/ operators do not have this limitation; they allow one operand to be a quantity with a unit and the
other operand to be a dimensionless factor or they allow both operands to be quantities with units
where the result is a different quantity type. For example, Length/Time results in a quantity with a
Velocity unit.
You can assign a name to an expression or expression value so it can be easily referenced from
elsewhere in the Study. For more information, see Reusing Expressions and Values.
Creacin de expresiones
Introduzca una expresin en la forma de un operando seguido opcionalmente por operadores y
operandos adicionales. Los nombres utilizados en las expresiones (nombres de variables, nombres
de funciones, etc.) distinguen entre maysculas y minsculas.
Presin1 + 3 * Presin2
La expresin de AIM y la evaluacin de la funcin matemtica se basa en el lenguaje de
programacin Python (www.python.org). El analizador de expresiones AIM admite:
Al introducir expresiones:
Utilice la lista y los separadores decimales definidos en la configuracin regional. Por ejemplo, si
una coma se define como un separador decimal y un punto y coma definido como un separador de
listas, utilcelo cuando escriba una expresin.
Si la expresin tiene unidades, debe escribir las unidades en lugar de confiar en la finalizacin
automtica.
Las expresiones que involucran cantidades deben ser coherentes dimensionalmente. Los
operadores + y - requieren que los dos operandos tengan unidades compatibles. Por ejemplo, no
puede agregar un parmetro Area a un parmetro Longitud (ambas unidades deben ser Longitud o
ambas unidades deben ser rea). Los operadores * y / no tienen esta limitacin; Permiten que un
operando sea una cantidad con una unidad y el otro operando sea un factor adimensional o
permitan que ambos operandos sean cantidades con unidades donde el resultado es un tipo de
cantidad diferente. Por ejemplo, Longitud / Tiempo da como resultado una cantidad con una unidad
de Velocidad.
Puede asignar un nombre a un valor de expresin o de expresin para que pueda referenciarse
fcilmente desde cualquier lugar del estudio. Para obtener ms informacin, consulte Reutilizacin
de expresiones y valores.
Mathematical Constants
These are the mathematical constants that you can use in AIM expressions:
Constantes matemticas
Estas son las constantes matemticas que puede utilizar en las expresiones AIM:
Variables
The real power of expressions is to be able to perform operations with calculated data from a solver
or other service in the system. Typical examples include performing quantitative calculations on
solved field data or using a value from a solution as an input to some physics setup (this could
include non-solver services where data from a solver may be used in mesh generation, or mesh
information might be used to control physics setup).
ANSYS variables provide a way to reference calculated data in a consistent manner across all
services, with the flexibility to access a wide range of variables in different contexts.
Variables
El poder real de las expresiones es poder realizar operaciones con datos calculados a partir de un
solver u otro servicio en el sistema. Ejemplos tpicos incluyen realizar clculos cuantitativos en
datos de campo resueltos o usar un valor de una solucin como entrada a alguna configuracin
fsica (esto podra incluir servicios no solucionados donde los datos de un solver se pueden usar en
la generacin de malla o informacin de malla podra ser usada Para controlar la configuracin
fsica).
Las variables ANSYS proporcionan una forma de hacer referencia a los datos calculados de
manera coherente en todos los servicios, con la flexibilidad de acceder a una amplia gama de
variables en diferentes contextos.
Vector Variables
To access the vector components of a variable, enter the variable name followed by a '.' (dot/period)
and the vector component name.
Example:
Velocity.x
Velocity.y
Velocity.z
Variables vectoriales
Para acceder a los componentes del vector de una variable, escriba el nombre de la variable
seguido de un '.' (Punto / perodo) y el nombre del componente vectorial.
Ejemplo:
Para referirse a los componentes cartesianos de la variable de campo vectorial Velocity:
Velocity.x
Velocity.y
Velocity.z
Tensor Variables
To access the tensor components of a variable, enter the variable name followed by a '.' (dot/period)
and the tensor component name.
Example:
To refer to the Cartesian components of the tensor field variable Stress:
Stress.xx
Stress.yy
Stress.zz
Stress.xy
Stress.yz
Stress.zx
Variables tensoras
Para acceder a los componentes tensores de una variable, escriba el nombre de la variable
seguido de un '.' (Punto / perodo) y el nombre del componente tensor.
Ejemplo:
Para referirse a los componentes cartesianos de la variable de campo tensor Stress:
Stress.xx
Stress.yy
Stress.zz
Stress.xy
Stress.yz
Stress.zx
The Position Vector
The position vector Position is provided to allow the referencing of coordinates in space:
Position = Position(x,y,z)
Example:
In the same way as for other field vectors, the components can be accessed as:
Position.x
Position.y
Position.z
El vector de posicin
El vector de posicin Posicin se proporciona para permitir la referencia de coordenadas en el
espacio:
Posicin = posicin (x, y, z)
Ejemplo:
De la misma manera que para otros vectores de campo, los componentes se pueden acceder
como:
Position.x
Posicin.y
Position.z
Units
Units for numerical quantities are declared within square brackets after any number (with or without
a space between the brackets and the number). Expressions that contain field variables will also
have implied units dependent on the variable(s) being used and the unit system employed. Units
can be specified after any number in an expression, but cannot be specified after a character (since
any character string entered should have implied units).
Units can be specified in any valid unit system.
Unidades
Las unidades para cantidades numricas se declaran entre corchetes despus de cualquier
nmero (con o sin un espacio entre los corchetes y el nmero). Las expresiones que contienen
variables de campo tambin tendrn dependencias implcitas dependiendo de la variable o
variables que se estn utilizando y del sistema de unidad empleado. Las unidades se pueden
especificar despus de cualquier nmero en una expresin, pero no se puede especificar despus
de un carcter (ya que cualquier cadena de caracteres introducida debe tener unidades implcitas).
Las unidades se pueden especificar en cualquier sistema de unidad vlido.
Units in Expressions
Expressions that involve quantities must be dimensionally consistent. The + and - operators require
that the two operands have compatible units. For example, you cannot add an Area parameter to a
Length parameter; both units must be Length or both units must be Area. However, you can add or
subtract two dissimilar units that are of the same dimensionality: 1 [m] + 1 [ft] is a valid expression
since both units are Length.
The * and / operators do not have this limitation. They allow one operand to be a quantity with a unit
and the other operand to be a dimensionless factor. Or, they allow both operands to be quantities
with units where the result is a different quantity type. For example, Length/Time results in a
quantity with a Velocity unit.
The resulting units for arguments to a trigonometric function may be dimensionless or resolve to an
angle.
If the argument is a number or dimensionless, the value is interpreted as radians (in other words, 1
[] = 1 [rad]; a radian is a dimensionless quantity equal to unity (as defined by ISO 80000-1:2009,
Quantities and units -- Part 1: General).
If the argument is a quantity, the units must resolve to type Angle (for example, 1 [rev] = 360 [deg] =
pi * 2 [rad])
You can include units, assuming the unit makes sense in context of the expression. For example,
P2+3[mm]*P3 is valid if mm is a valid unit expression for P2 and P3 (for example, if P2 has units of
torque and P3 has units of force, or if P2 is in units of area and P3 is in units of length).
You can apply a unit to a whole expression by multiplying it by a dimensional constant. For
example:
sin(0.1) * 1 [N]
Note that sin(0.1) [N] does not work because the syntax is ambiguous in Python.
The project unit system is used to evaluate the expressions. For temperatures, absolute
temperature values are used in expression evaluation. All quantity values in an expression are
converted to the project unit system.
Unidades en expresiones
Las expresiones que involucran cantidades deben ser coherentes dimensionalmente. Los
operadores + y - requieren que los dos operandos tengan unidades compatibles. Por ejemplo, no
puede agregar un parmetro Area a un parmetro Length; Ambas unidades deben ser Longitud o
ambas unidades deben ser Area. Sin embargo, puede sumar o restar dos unidades dismiles que
son de la misma dimensionalidad: 1 [m] + 1 [ft] es una expresin vlida ya que ambas unidades
son Longitud.
Los operadores * y / no tienen esta limitacin. Permiten que un operando sea una cantidad con una
unidad y que el otro operando sea un factor adimensional. O, permiten que ambos operandos sean
cantidades con unidades donde el resultado es un tipo de cantidad diferente. Por ejemplo, Longitud
/ Tiempo da como resultado una cantidad con una unidad de Velocidad.
Las unidades resultantes para argumentos a una funcin trigonomtrica pueden ser
adimensionales o resolver a un ngulo.
Si el argumento es un nmero o adimensional, el valor se interpreta como radianes (es decir, 1 [] =
1 [rad]; un radian es una cantidad adimensional igual a la unidad (como se define en ISO 80000-1:
2009, Quantities Y unidades - Parte 1: General).
Si el argumento es una cantidad, las unidades deben resolver para escribir Angle (por ejemplo, 1
[rev] = 360 [deg] = pi * 2 [rad])
Puede incluir unidades, asumiendo que la unidad tiene sentido en el contexto de la expresin. Por
ejemplo, P2 + 3 [mm] * P3 es vlido si mm es una expresin de unidad vlida para P2 y P3 (por
ejemplo, si P2 tiene unidades de par y P3 tiene unidades de fuerza o si P2 est en unidades de
rea y P3 est en unidades de longitud).
Puede aplicar una unidad a una expresin completa multiplicndola por una constante dimensional.
Por ejemplo:
Sin (0,1) * 1 [N]
Tenga en cuenta que sin (0.1) [N] no funciona porque la sintaxis es ambigua en Python.
El sistema de unidad de proyecto se utiliza para evaluar las expresiones. Para temperaturas, se
usan valores de temperatura absolutos en la evaluacin de la expresin. Todos los valores de
cantidad en una expresin se convierten en el sistema de unidad de proyecto.
Unit Multipliers
The general units syntax in ANSYS Workbench is defined as [multiplier|unit|^power],
where multiplier is a multiplying quantity or its abbreviation (for example, mega (M), pico (p), and so
on), unit is the unit string or abbreviation (for example, gram (g), pound (lb) foot (ft), meter (m), and
so on), and power is the power to which the unit is raised.
Multiplicadores de unidad
La sintaxis general de unidades en ANSYS Workbench se define
como [multiplier | unit | ^ power], donde multiplicador es una cantidad
multiplicadora o su abreviatura (por ejemplo, mega (M), pico (p), etc.
Unidad de cadena o abreviatura (por ejemplo, gramo (g), libra (lb) pie
(pie), metro (m), y as sucesivamente), y la potencia es la potencia a la
que se eleva la unidad.
Nota: Si crea una expresin que se ajuste a cualquiera de estos escenarios, AIM mostrar un
mensaje informativo que indica cmo se manejarn las unidades de temperatura.
The result of an expression can be a single value or an entire field of values. While many settings in
a study could be set using a multi-valued expression (that is, one that changes over the specified
location), some settings require that at a particular time/timestep or loadstep only a single-valued
expression can be entered. Examples of this are the Mass Flow type boundary condition, Angular
Velocity/Rotation Speed for rotating domains, and Iteration values.
Other single valued variables may also be available depending on the physics of the case.
Solution field dependent expressions can be used to set boundary conditions. Expressions can
depend directly on the field variables as well as Quantity Functions (Average, Minimum, Maximum,
etc.):
Field variables are referenced using the standard naming syntax also used for
postprocessing.
Quantity functions are called using the syntax <function_name>(<argument1>,
<argument2>, ...) where the arguments can be variables, locations, and other options depending on
the specific function. Quantity Functions return single values.
Some properties such as Mass Flow or Heat Flow through a boundary are single valued. An
expression for these properties can depend on field values, but the result must be reduced to a
single value by, for example, using a Quantity Function. An error message will appear if the
expression does not evaluate to a single valued result.
Depending on what variables are used in your expression, the solver may not be able to
evaluate the expression. This is due to the availability of data in the solver at run time. If this
happens then the physics task update will fail and you may see an error message in the fluids
solver transcript.
A location can take the form of any object that resolves to a location in space. This could be a
Boundary, a Physics Region, a selection of geometric/topological entities in the graphical view
(named or unnamed), or it could be an analytic or results-based object, such as a point, line, or
isosurface.
You can also use location functions in expressions to specify the location of a group of objects such
as those defined by a selection set. These functions return lists of entities that can used as input to
other functions. There are several different types of location functions:
Basic functions retrieve the specified geometric entities from your model.
Set functions add or remove entities from location lists.
Criteria functions change the contents of an entity list based on entity criteria.
Note: If an expression in the Variable field of a Contour or Vector result contains a location, the
location within the expression is ignored and the whole expression is evaluated on the location
specified in the result object's Location property.
Ubicacin Referencias
Es posible que deba especificar una ubicacin en una expresin; Por ejemplo, podra tener una
expresin que calcula una cantidad basada en el valor de una variable en una ubicacin
determinada.
Una ubicacin puede tomar la forma de cualquier objeto que se resuelve a una ubicacin en el
espacio. Esto podra ser un Lmite, una Regin de Fsica, una seleccin de entidades geomtricas /
topolgicas en la vista grfica (nombrada o sin nombre), o podra ser un objeto analtico o basado
en resultados, como un punto, una lnea o una isosuperficie.
Tambin puede utilizar las funciones de ubicacin en expresiones para especificar la ubicacin de
un grupo de objetos como los definidos por un conjunto de seleccin. Estas funciones devuelven
las listas de entidades que pueden utilizarse como entrada para otras funciones. Hay varios tipos
diferentes de funciones de ubicacin:
Al especificar el objeto:
Debe incluir el nombre del objeto entre comillas.
La forma del nombre del objeto puede ser:
El nombre nico (y el tipo, para la funcin GetItem) del objeto. Puede encontrar esto
movindose sobre el icono a la izquierda del nombre de visualizacin del objeto en su
panel de datos.
The display name of the object, either provided by default or entered by you,
preceded by the @ symbol.
Example:
The following are examples of using object location references as function arguments.
To get the area at a 2D location that has the display name "out", use:
Area(GetBoundary("@out"))
To get the massflow at a 2D location that has the display name "in1", use:
Sum(MassFlow,GetBoundary("@in1"), "Simple")
Average(Pressure,[GetBoundary("@inlet1"),GetIsosurface("@Iso1")],"Area")
El nombre de visualizacin del objeto, proporcionado por defecto o introducido por usted,
precedido por el smbolo @.
Ejemplo:
Los siguientes son ejemplos de uso de referencias de ubicacin de objeto como argumentos de
funcin.
Para obtener el rea en una ubicacin 2D que tiene el nombre de visualizacin "out", utilice:
rea (GetBoundary ("@ out"))
Para obtener el flujo de masas en una ubicacin 2D que tiene el nombre de visualizacin "in1",
utilice:
Sum (MassFlow, GetBoundary ("@ in1"), "Simple")
Para hacer referencia a listas de ubicaciones en expresiones, incluya una lista separada por comas
entre corchetes. Por ejemplo:
Promedio (Presin, [GetBoundary ("@ inlet1"), GetIsosurface ("@ Iso1")], "Area")
A selection set is a named groups of objects in your model. You can use a selection set to specify
locations in an expression. For example, in a fluid flow simulation of an exhaust manifold, you might
specify all of the inlets as a selection set.
You use the function GetSelectionSet to get the location for the selection set. The syntax of the
function can be either:
GetSelectionSet("<internal_name>")
or
GetSelectionSet("@<display_name>")
Example:
The following shows the selection set AllInlets used as the location in a function:
Ejemplo:
A continuacin se muestra el conjunto de seleccin AllInlets utilizado como ubicacin en una
funcin:
Promedio (Presin, GetSelectionSet ("@ AllInlets"), "rea")
About Location Functions
You can use location functions in expressions to set the Location property of an object such as a
boundary condition or a selection set. These functions return lists of entities that can used as input
to other functions. There are several different types of selection criteria functions. Basic functions
simply retrieve geometric entities from your model. Set functions can add or remove entities from
location lists. Criteria functions change the contents of an entity list based on entity criteria.
Note: If an expression in the Variable field of a Contour or Vector result contains a location, the
location within the expression is ignored and the whole expression is evaluated on the location
specified in the result's Location property.
Nota: Si una expresin del campo Variable de un contorno o Vector contiene una ubicacin, la
ubicacin dentro de la expresin se ignora y la expresin completa se evala en la ubicacin
especificada en la propiedad Ubicacin del resultado.
Example:
AllBodies() returns a list of all bodies based on the current task's input model.
AllBodiesIn(SelectionSet1) returns a list of all of the bodies in the specified selection set.
Ejemplo:
AllBodies () devuelve una lista de todos los cuerpos en funcin del modelo de entrada de la tarea
actual.
AllBodiesIn (SelectionSet1) devuelve una lista de todos los cuerpos en el conjunto de seleccin
especificado.
The table below lists location functions that perform set operations on the input location lists.
Example:
To create list of all faces and edges:
Add(AllFaces(),AllEdges())
To find all entities that are not in the selection set "SelectionSet 1":
Para encontrar todas las entidades que no estn en el conjunto de seleccin "SelectionSet 1":
Invert(GetSelectionSet("@SelectionSet 1"))
The following functions are available to retrieve the specified objects. When specifying the object:
Las siguientes funciones estn disponibles para recuperar los objetos especificados. Al especificar
el objeto:
Debe incluir el nombre del objeto entre comillas.
o The display name of the object, either provided by default or entered by you, preceded by
the @ symbol.
O El nombre de visualizacin del objeto, proporcionado por defecto o introducido por usted,
precedido por el smbolo @.
You use the function GetSelectionSet to get the location for the selection set. The syntax of the
function can be either:
GetSelectionSet("<internal_name>")
or
GetSelectionSet("@<display_name>")
Example:
The following shows the selection set AllInlets used as the location in a function:
Ejemplo:
A continuacin se muestra el conjunto de seleccin AllInlets utilizado como ubicacin en una
funcin:
Promedio (Presin, GetSelectionSet ("@ AllInlets"), "rea")
Each of the basic entity types (bodies, faces, edges, and vertices) from Location Basic
Functions and Location Set Operation Functions have attributes that are available for use within
location criteria functions.
Below is a list of attributes that are available for each entity type. When using these attributes and
values in functions, case does not matter. See Units for more information on how to write different
quantity types.
X Cantidad
Y Cantidad
Z Cantidad
Faces Area Cantidad
Type Plane
Cylinder
Cone
Torus
Sphere
Spline
Radius Cantidad
X Cantidad
Y Cantidad
Z Cantidad
Edges Length Cantidad
Type
Arc1
Line
Radius Circle2
X
Y Spline
Z Cantidad
Vertices X Cantidad
Y Cantidad
Z Cantidad
Cantidad
Cantidad
Cantidad
The following location criteria functions return lists of entities based on the criteria applied to the
input entity list.
Las siguientes funciones de criterios de ubicacin devuelven las listas de entidades segn los
criterios aplicados a la lista de entidades de entrada.
Example:
Find all bodies where x is less than or equal to 1.25 cm:
Smallest(AllFaces(),"area")
1
Arc returns partial circles.
2
Circle returns edges that make a complete circle.
Ejemplo:
Encuentre todos los cuerpos donde x es menor o igual a 1,25 cm:
Threshold (AllBodies (), "x", "<=", "1.25 [cm]")
Encuentra todas las caras con el rea ms pequea:
Menor (AllFaces (), "rea")
1 El arco devuelve crculos parciales.
2 El crculo devuelve bordes que forman un crculo completo.
The Convert location criteria function enables you to convert "all" or "any" of the supplied entities to
a new entity type.
To illustrate this, assume you have a rectangular body and you want to select all the vertices with
the largest X coordinate and convert them to edges. The set of vertices that will be used during the
conversion are shown below.
Figure 1. Largest(AllVertices(),"x")
Figure 1. Largest(AllVertices(),"x")
Al realizar una conversin a los bordes, se examinarn todos los bordes del modelo, observando
los vrtices que estn asociados con cada borde.
Figure 2. Convert(Largest(AllVertices(),"x"),"edges","all")
If "any" is the selected option, all edges that contain any vertex that is part of the set input
as the location will be included.
Si "any" es la opcin seleccionada, todos los bordes que contienen cualquier vrtice que
forma parte de la entrada de ajuste como la ubicacin sern incluidos.
Figure 3. Convert(Largest(AllVertices(),"x"),"edges","any")
Expression Composition
Expressions can be entered into any property field that requires direct user input. After you finish
editing the property and press the Enter key, the expression is committed, and evaluated. The
evaluated expression value is then displayed in the property box. If the expression cannot be
evaluated, the expression text is shown instead. Where these properties are quantities, the units
form part of the expression; for example, "10 [m s^-1]". These units are therefore used in the
evaluation of the expression and are represented in the expression value.
The expression property boxes provide auto-completion of the expression components as they are
entered.
Auto-Completion of Parentheses
Parentheses are automatically added to the expression in order to assist in evaluation order when
using binary operators (+-*/). When you enter a binary operator, under circumstances where there is
a left operand and it is appropriate to do so, parentheses will be added to the expression text. The
added parentheses are initially ghosted, to signify a temporary state; you can decide to disregard
these. Pressing the Delete key removes the parentheses from the expression text. Any other key
entry or movement of the cursor will accept the parentheses and remove the ghosted effect.
Composicin de expresin
Las expresiones se pueden introducir en cualquier campo de propiedad que requiera la entrada
directa del usuario. Despus de terminar de editar la propiedad y presionar la tecla Intro, la
expresin se confirma y se evala. El valor de expresin evaluado se muestra en el cuadro de
propiedades. Si la expresin no puede ser evaluada, en su lugar se muestra el texto de la
expresin. Cuando estas propiedades son cantidades, las unidades forman parte de la expresin;
Por ejemplo, "10 [m s ^ -1]". Por lo tanto, estas unidades se utilizan en la evaluacin de la
expresin y se representan en el valor de expresin.
Auto-finalizacin de parntesis
Los parntesis se aaden automticamente a la expresin para ayudar en el orden de evaluacin
cuando se utilizan operadores binarios (+ - * /). Cuando se introduce un operador binario, en
circunstancias en las que hay un operando izquierdo y es apropiado hacerlo, los parntesis se
aadirn al texto de la expresin. Los parntesis aadidos son inicialmente fantasmas, para
significar un estado temporal; Usted puede decidir no tener en cuenta estos. Al presionar la tecla
Eliminar se eliminan los parntesis del texto de la expresin. Cualquier otra entrada de clave o
movimiento del cursor acepta los parntesis y elimina el efecto fantasma.
Auto-Completion of Units
Units are automatically added to the expression when entering a new expression. When you enter
an expression that requires a quantity, there must be appropriate units declared at the end of the
expression text. If you overwrite the entire expression text, then ghosted units are automatically
appended to the end, in the form of " [m s^-1] ", or " * 1 [m s^-1] " if the value is not a numeric literal.
The ghosted units that are appended to the end of the expression text are the default user units for
the particular property. You may change the units manually. The ghosted highlight of the auto
complete units signify that it is in a temporary state. You can accept these units by committing the
expression in its current state. If you press the Delete key while the cursor is to the left of the
ghosted units, you remove the auto completed units and must enter them manually.
Note: In some instances the legend in the Graphics view will not display units associated with an
expression being used with a variable. If this occurs, edit the expression and type the units in
manually, rather than use auto-completion.
If you enter a unit string character ("["), then the ghosted completion disappears. A dropdown list will
appear with an alphabetical list of units appropriate for this quantity type. Additionally if you enter a
letter after the unit start, then not only will the units for this quantity type be suggested, but all units
beginning with the partially entered string will be suggested.
The dropdown list will be scrollable if there are many suggestions available in the list. You can use
the mouse to scroll through the list. Pressing the Esc key closes the dropdown list.
As you move your cursor down the list, the entry under the cursor is highlighted and becomes
active. Click an active entry to select it. This will update the current expression input with the active
suggestion, and close the dropdown list.
Auto-finalizacin de unidades
Las unidades se aaden automticamente a la expresin cuando se introduce una nueva
expresin. Cuando se introduce una expresin que requiere una cantidad, debe haber unidades
apropiadas declaradas al final del texto de la expresin. Si sobrescribe todo el texto de la
expresin, las unidades fantasmas se aaden automticamente al final, en forma de "[ms ^ -1]" o "*
1 [ms ^ -1]" si el valor no es un literal numrico.
Las unidades fantasmas que se aaden al final del texto de expresin son las unidades de usuario
predeterminadas para la propiedad en particular. Puede cambiar las unidades manualmente. El
punto culminante fantasma de las unidades completas automticas significa que est en un estado
temporal. Puede aceptar estas unidades al confirmar la expresin en su estado actual. Si pulsa la
tecla Suprimir mientras el cursor est a la izquierda de las unidades fantasmas, elimina las
unidades completadas automticamente y debe introducirlas manualmente.
Nota: En algunos casos, la leyenda de la vista Grficos no mostrar las unidades asociadas a una
expresin que se utilice con una variable. Si esto ocurre, edite la expresin y escriba las unidades
manualmente, en lugar de utilizar la autocomplecin.
La lista desplegable ser desplazable si hay muchas sugerencias disponibles en la lista. Puede
utilizar el ratn para desplazarse por la lista. Al presionar la tecla Esc se cierra la lista desplegable.
A medida que se mueve el cursor hacia abajo en la lista, la entrada bajo el cursor se resalta y se
activa. Haga clic en una entrada activa para seleccionarla. Esto actualizar la entrada de expresin
actual con la sugerencia activa y cerrar la lista desplegable.
As you enter a string in an expression, if you pause typing for a short time, a dropdown list is
displayed containing a list of suggestions appropriate for any partial string prior to the current cursor
position. The list of suggestions will be populated with those symbols available for the property
being edited, including constants, variables, functions, parameters, named expressions, field
variables, and field functions. Note that names of the expression components (variables, functions,
and so on) are case sensitive.
The dropdown list will be scrollable if there are many suggestions available in the list. You can use
the mouse to scroll through the list. Pressing the Esc key closes the dropdown list.
As you move your cursor down the list, the entry under the cursor is highlighted and becomes
active. To select the active entry, click it or press the Enter key. This will update the current
expression input with the active suggestion, and close the dropdown list. If the active suggestion
selected is a function, then the cursor position is placed within the parentheses of the function ready
for input again.
The suggestions listed in dropdown list and the expression properties have syntax highlighting
applied to them as described in the following table:
La lista desplegable ser desplazable si hay muchas sugerencias disponibles en la lista. Puede
utilizar el ratn para desplazarse por la lista. Al presionar la tecla Esc se cierra la lista desplegable.
A medida que se mueve el cursor hacia abajo en la lista, la entrada bajo el cursor se resalta y se
activa. Para seleccionar la entrada activa, haga clic en ella o presione la tecla Intro. Esto
actualizar la entrada de expresin actual con la sugerencia activa y cerrar la lista desplegable. Si
la sugerencia activa seleccionada es una funcin, la posicin del cursor se coloca entre parntesis
de la funcin lista para la entrada de nuevo.
Las sugerencias listadas en la lista desplegable y las propiedades de expresin tienen resaltado de
sintaxis aplicado a ellas como se describe en la siguiente tabla:
Los nombres sugeridos aparecen en texto en cursiva si el elemento tiene un alcance para el
anlisis actual o texto no en cursiva si tienen un alcance general.
Reusing Expressions and Values
You can make an expression (or its value) reusable by giving it a name. You can then reference that
named expression or named value when defining another expression.
Note: You can parameterize the value of an object by using the P icon on its fly-out menu:
Si el valor del objeto es una entrada o se le asigna una expresin constante tal como 12
[mm] o 2 * 12 [mm], entonces se parametriza como parmetro de entrada.
Si el valor del objeto es una salida o est definido por una expresin con dependencias de
expresiones con nombre o valores nombrados, entonces se parametriza como parmetro de salida.
Named Value
If you assign a name to the value of a property, that named value becomes an independent object
you can reference in the definition of another expression. For example, in a fluid flow simulation
process you need to create an inlet boundary condition. Select Physics > Fluid Flow
Conditions > Inlet, then for the Velocity magnitude at Inlet 1 you can enter:
5 [m s^-1]
Using the fly-out menu you can create a named value (for example v_in1). This named value can
be used in a named expression.
To change v_in1, go to the Related Objects and Tasks > Related Objects > Named Expressions
/ Values > Named Expressions > v_in1 panel.
Valor Nombrado
Si asigna un nombre al valor de una propiedad, ese valor denominado se convierte en un objeto
independiente al que puede hacer referencia en la definicin de otra expresin. Por ejemplo, en un
proceso de simulacin de flujo de fluido es necesario crear una condicin de lmite de entrada.
Seleccione Physics> Fluid Flow Conditions> Inlet, entonces para la magnitud de Velocidad en Inlet
1 puede ingresar:
5 [m ^ {- 1}]
Utilizando el men fly-out puede crear un valor con nombre (por ejemplo v_in1). Este valor
nombrado se puede utilizar en una expresin con nombre.
Para cambiar v_in1, vaya al panel Objetos relacionados y tareas> Objetos relacionados>
Expresiones / valores con nombre> Expresiones con nombre> v_in1.
Named Expression
If you assign a name to an expression, that named expression becomes an independent object you
can reference in the definition of another expression. For example, say that in your fluid flow
simulation process you need to create two inlet boundary conditions, and that the value of the first
affects the value of the second.
1. Select Physics > Fluid Flow Conditions > Inlet, then for the Velocity magnitude at Inlet
1 enter:
v_in1 = 5 [m s^-1]
The Velocity magnitude displays as f = 5 [m s^-1]. To see the named value v_in1, from any
data panel select Related Objects and Tasks > Related Objects > Named Expressions /
Values > Named Expressions.
2. Select Physics > Fluid Flow Conditions > Inlet, then for the Velocity magnitude at Inlet
2 enter:
v_in2 = 2 * v_in1
To change v_in1, go to the Related Objects and Tasks > Related Objects > Named Expressions
/ Values > Named Expressions > v_in1 panel.
Expresin Nombrada
Si asigna un nombre a una expresin, dicha expresin se convierte en un objeto independiente que
puede hacer referencia en la definicin de otra expresin. Por ejemplo, digamos que en su proceso
de simulacin de flujo de fluido necesita crear dos condiciones de lmite de entrada y que el valor
de la primera afecta al valor de la segunda.
1. Seleccione Fsica> Condiciones de Flujo de Flujo> Entrada, luego para la magnitud de Velocidad
en Entrada 1 introduzca:
V_in1 = 5 [m s ^ -1]
La magnitud de la velocidad se muestra como f = 5 [m s ^ -1]. Para ver el valor nombrado v_in1,
desde cualquier panel de datos seleccione Objetos relacionados y Tareas> Objetos relacionados>
Expresiones / valores con nombre> Expresiones con nombre.
2. Seleccione Fsica> Condiciones Flujo de Flujo> Inlet, luego para la magnitud de Velocidad en
Inlet 2 ingrese:
V_in2 = 2 * v_in1
Para cambiar v_in1, vaya al panel Objetos relacionados y tareas> Objetos relacionados>
Expresiones / valores con nombre> Expresiones con nombre> v_in1.
You can view named expression and named values in panels, their associated grid views, or at the
property level.
From the Simulation Process, task, or object panels, you can view all the named expressions and
named values used in that part of the study.
If both named expressions and named values exist, the bottom of the panel shows the total number
defined. If you expand Named Expressions/Values, you can see a breakdown of how many have
been defined of each.
You can click the links to navigate to the associated grid.
Desde el proceso de simulacin, la tarea o los paneles de objetos, puede ver todas las expresiones
con nombre y valores nombrados que se usan en esa parte del estudio.
Si existen expresiones con nombre y valores nombrados, la parte inferior del panel muestra el
nmero total definido. Si expande Expresiones / valores con nombre, puede ver un desglose de
cuntos se han definido de cada uno.
You can view a grid containing named expressions, named values, or both. These grids can be
accessed at the panel level, by clicking the associated links at the bottom.
If accessed from the Study panel, the grid shows all named expressions and/or named
valued defined (though not necessarily used) in the study.
If accessed from the Simulation Process, task, or object panel, the grid shows all the
named expressions and/or named values defined and in use for that part of the study.
The Named Values grid can also be accessed at the property level by clicking the icon next to a
property that has been assigned a name.
For each named expression, you can view the Name, the current Expression, and the Value
of the expression. You can click Name to open the named expression object. When one or
more named expressions are selected, toolbar icons enable you to duplicate or delete the
selected expressions.
For each named value, you can view the Name, the Property with which the named value is
associated, and the current Value of the property. You can click Property to navigate to the
property being referenced. When one or more named values are selected, a toolbar icon
enables you to delete the selected values.
In the Named Expressions/Values grid, both named expressions and named values are
shown. A dropdown menu enables you to display the named expressions and named
expressions grouped separately, or all in a single list.
Si se accede desde el panel Estudio, la cuadrcula muestra todas las expresiones nombradas y /
o nombradas valoradas definidas (aunque no necesariamente usadas) en el estudio.
Si se accede desde el proceso de Simulacin, la tarea o el panel de objetos, la cuadrcula
muestra todas las expresiones con nombre y / o valores nombrados definidos y en uso para esa
parte del estudio.
Tambin se puede acceder a la cuadrcula Valores con nombre al nivel de la propiedad haciendo
clic en el icono junto a una propiedad a la que se ha asignado un nombre.
Para cada expresin nombrada, puede ver el Nombre, la Expresin actual y el Valor de la
expresin. Puede hacer clic en Nombre para abrir el objeto de expresin con nombre. Cuando se
seleccionan una o ms expresiones con nombre, los iconos de la barra de herramientas permiten
duplicar o eliminar las expresiones seleccionadas.
Para cada valor nombrado, puede ver el Nombre, la Propiedad con la que est asociado el valor
con nombre y el Valor actual de la propiedad. Puede hacer clic en Propiedades para navegar hasta
la propiedad a la que se hace referencia. Cuando se seleccionan uno o ms valores con nombre,
un icono de barra de herramientas le permite eliminar los valores seleccionados.
En la cuadrcula Valores / expresiones con nombre, se muestran las expresiones con nombre y
los valores con nombre. Un men desplegable le permite mostrar las expresiones con nombre y las
expresiones con nombre agrupadas por separado, o todas en una sola lista.
Desde una propiedad con nombre, puede navegar hasta su valor denominado.
Named values can be created at the property level via the flyout menu to the right of the field.
At the property level either via the flyout menu or by typing inline
Via the Add and Add Named Expressions dropdown menus
Via the + or Duplicate icon of a named expression object
Creacin de expresiones con nombre y valores con nombre
Los valores nombrados se pueden crear en el nivel de propiedad a travs del men desplegable a
la derecha del campo.
Las expresiones nombradas pueden definirse:
A nivel de la propiedad, ya sea a travs del men desplegable o escribiendo en lnea
A travs de los mens desplegables Aadir y Aadir expresiones con nombre
A travs del icono "+" o Duplicar de un objeto de expresin con nombre
Creating a Named Expression or Named Value via Menu at the Property Level
To create a named expression or named value via menu at the property level:
1. Open the propertys flyout menu by clicking on the right arrow to the right of the field.
2. Click the Create named expression/value icon.
3. Select Expression or Calculated Value.
4. Enter the expression or value name.
5. Click Create.
Creacin de una expresin con nombre o valor con nombre mediante men en el nivel de
propiedad
Para crear una expresin con nombre o un valor con nombre a travs del men en el nivel de
propiedad:
1. Abra el men desplegable de la propiedad haciendo clic en la flecha derecha a la derecha del
campo.
2. Haga clic en el icono Crear expresin / valor denominado.
3. Seleccione Expresin o Valor calculado.
4. Introduzca el nombre de la expresin o valor.
5. Haga clic en Crear.
The Add and Add Named Expression menus allow you to create a named expression either by
adding a new named expression or duplicating an existing one.
The Add menu displays next to the Named Expressions link at the bottom of the Study
page and in the Named Expressions/Values grid when entries are organized by type.
The Add Named Expression menu displays in the Named Expressions grid and the
Named Expressions/Values grid.
El men Aadir aparece junto al enlace Expresiones con nombre en la parte inferior de la pgina
de estudio y en la cuadrcula de expresiones / valores asignados cuando las entradas estn
organizadas por tipo.
El men Aadir expresin con nombre aparece en la cuadrcula de expresiones con nombre y en
la cuadrcula de expresiones / valores con nombre.
Para agregar una nueva expresin con nombre a travs de cualquiera de los mens:
1. Haga clic en el men.
2. Especifique si desea crear una nueva expresin o duplicar una existente.
Para crear nuevo: Seleccione Expresin con nombre.
Para duplicar existente: Primero seleccione Duplicar de y, a continuacin, seleccione la expresin
con nombre a duplicar.
3. En el objeto de expresin que se abre, puede hacer clic en el nombre para editarlo.
4. En el campo Expresin, escriba la expresin.
They must start with a letter (A-Z, or, a-z), or an underscore (_), followed by zero or more
letters, underscores, and digits (0-9).
They cannot be the same as reserved keywords in Python.
They cannot be the same as system variable names, system function names, or the names
of solver variables.
They cannot contain spaces.
They are case-sensitive.
The name of the expression or the value of the expressions is now on the clipboard. You can
use Ctrl+v to paste the name (and therefore the expression) or the value into another data field, or
into any Windows application.
You can duplicate a named expression from its object, from Named Expressions/Values or the
Named Expressions grid, or the Study panel.
The new named expression will have the default name Copyof<namedexpression>.
Once a named expression or named value has been created, you can use it to construct other
expressions. As you type in a new expression into a property field, existing named expressions and
named values become available as auto-completion options.
Prior to selection, auto-complete options for named expressions are displayed in purple text; auto-
complete options named values are displayed in pink text.
The tables below list the mathematical operators and functions that can be used in expressions.
Some of the functions may not be available depending on the task (Physics, Results, and so on),
and physics region (Structural, Fluid Flow, and so on) in which they (or the location they reference)
are being used. The syntax shown in the tables uses x and y to indicate operands, and [a] and [b] to
indicate units for the operands.
Availability of the operators and functions is indicated in the tables using the following notation:
Las tablas a continuacin enumeran los operadores matemticos y las funciones que se pueden
utilizar en las expresiones. Algunas de las funciones pueden no estar disponibles dependiendo de
la tarea (Fsica, Resultados, etc.), y la regin de la fsica (Flujo estructural, fluido, etc.) en la que se
utilizan (o la ubicacin que hacen referencia). La sintaxis mostrada en las tablas usa xey para
indicar operandos, y [a] y [b] para indicar unidades para los operandos.
UI
Not physics-specific, available for all expressions
FS
Available for expressions relating to regions of fluid flow physics
SS
Available for expressions relating to regions of structural, thermal or electric conduction
physics
FP
Available for expressions used when calculating results involving fluid flow physics
SP
Available for expressions used when calculating results involving structural, thermal or
electric conduction physics
UI
No especfico de la fsica, disponible para todas las expresiones
FS
Disponible para expresiones relacionadas con las regiones de fluidos fsicos
SS
Disponible para expresiones relacionadas con regiones de fsica de conduccin estructural, trmica
o elctrica
FP
Disponible para expresiones utilizadas al calcular resultados que involucran la fsica del flujo de
fluidos
SP
Disponible para expresiones utilizadas en el clculo de resultados que involucran fsica de
conduccin estructural, trmica o elctrica.
Tabla 1. Operadores Matemticos Bsicos
Quantity functions return single values (with units) from specific locations. For example, you might
get the average value of a variable at an inlet.
You can use quantity functions to define conditions, model parameters, sources, monitor points, and
other aspects of the simulation or its results. The functions enable quantities evaluated on non-local
regions to be applied elsewhere in the model.
Functions that have a weighting as an argument allow the other arguments to be weighted by
another quantity. This is often required to get physically meaningful results from functions which
operate across non-uniform grids and/or fields which vary in density, temperature, and so on.
Funciones de cantidad
Las funciones de cantidad devuelven valores nicos (con unidades) desde ubicaciones especficas.
Por ejemplo, puede obtener el valor promedio de una variable en una entrada.
Puede utilizar funciones de cantidad para definir condiciones, parmetros de modelo, fuentes,
puntos de monitorizacin y otros aspectos de la simulacin o sus resultados. Las funciones
permiten que las cantidades evaluadas en regiones no locales se apliquen en otras partes del
modelo.
Las funciones que tienen una ponderacin como argumento permiten que los otros argumentos
sean ponderados por otra cantidad. Esto a menudo se requiere para obtener resultados
fsicamente significativos de funciones que operan a travs de grids y / o campos no uniformes que
varan en densidad, temperatura, etc.
Los valores de peso tienen el siguiente significado:
Note: For functions used in structural analyses, only the Simple weighting type is allowed.
The table below lists the quantitative functions that can be used in expressions.
Some of the functions may not be available depending on the task (Physics or Results) and the
physics region (Fluid Flow or Structural) in which they or the location they reference are used. The
availability of the functions is indicated in the table by using the following notation:
FS (Fluid Solve)
Available for expressions relating to regions of fluid flow physics.
FP (Fluid Postprocessing)
Available for expressions used when calculating results involving fluid flow physics.
SP (Structural Postprocessing)
Available for expressions used when calculating results involving structural, thermal, or
electric-conduction physics.
Nota: Para funciones utilizadas en anlisis estructurales, solo se permite el tipo de ponderacin
Simple.
La siguiente tabla muestra las funciones cuantitativas que se pueden utilizar en las expresiones.
Algunas de las funciones pueden no estar disponibles dependiendo de la tarea (Fsica o
Resultados) y de la regin fsica (Flujo Fluido o Estructural) en la que ellos o la ubicacin a la que
se refieren se utilizan. La disponibilidad de las funciones se indica en la tabla utilizando la siguiente
notacin:
FS (solucin de lquido)
Disponible para expresiones relacionadas con las regiones de la fsica del flujo de fluidos.
FP (postprocesamiento de fluidos)
Disponible para las expresiones usadas al calcular los resultados que implican la fsica del flujo de
fluido.
SP (Procesamiento Estructural)
Disponible para expresiones utilizadas al calcular resultados que involucran fsica estructural,
trmica o de conduccin elctrica.
Example:
To set the named expression myExpr to be the area-weighted average of Pressure on the location
defined by Inlet1, use:
myExpr = Average(Pressure,GetBoundary("@Inlet1"),"Area")
Ejemplo:
Para establecer la expresin denominada myExpr como el promedio ponderado de la presin en la
ubicacin definida por Inlet1, utilice:
MyExpr = Promedio (Presin, GetBoundary ("@ Inlet1"), "Area")
o The display name of the object, either provided by default or entered by you, preceded by the @
symbol.
El nombre de visualizacin del objeto, proporcionado por defecto o introducido por usted,
precedido por el smbolo @.
GetPhysicsRegion("<unique_name>")
GetPhysicsRegion("@<display_name>")
Regin de la fsica
GetSelectionSet("<unique_name>")
A selection set is a named groups of objects in your model. You can use a selection set to specify
locations in an expression. For example, in a fluid flow simulation of an exhaust manifold, you might
specify all of the inlets as a selection set.
You use the function GetSelectionSet to get the location for the selection set. The syntax of the
function can be either:
GetSelectionSet("<internal_name>")
or
GetSelectionSet("@<display_name>")
Example:
The following shows the selection set AllInlets used as the location in a function:
Ejemplo:
A continuacin se muestra el conjunto de seleccin AllInlets utilizado como ubicacin en una
funcin:
Promedio (Presin, GetSelectionSet ("@ AllInlets"), "rea")
Fluid Variables
The tables below lists the variable that can be accessed from the Fluid solver. These variables can
be entered into data fields as part of an expression wherever access to the Fluid solver data is
permitted. The variable names shown in the tables are the versions that are used in expressions.
You may see more "user friendly" versions of the variable names used as labels or in dropdown lists
(for example, Absolute Pressure vs. AbsolutePressure, or X Velocity vs. Velocity.x)
Variable availability can be model and model option dependent (for example,
TurbulenceEddyFrequency is only available when using omega based models).
Fluid Variables
The tables below lists the variable that can be accessed from the Fluid solver. These variables can
be entered into data fields as part of an expression wherever access to the Fluid solver data is
permitted. The variable names shown in the tables are the versions that are used in expressions.
You may see more "user friendly" versions of the variable names used as labels or in dropdown lists
(for example, Absolute Pressure vs. AbsolutePressure, or X Velocity vs. Velocity.x)
Variable availability can be model and model option dependent (for example,
TurbulenceEddyFrequency is only available when using omega based models).
1/ 2
U 2 U y 2 U 2
2 x
y z
z
x
StrainRate
U x U y 2
U x U z
2
U y U
2
z
y x z x z y
Velocity Vector The fluid velocity field (rate of change of fluid position vs. time at a fixed point, using an
Eulerian formulation).
Structural Variables
The table below lists the variables that can be accessed from the Structural solver. These variables can be entered into data
fields as part of an expression wherever access to the Structural solver data is permitted. The variable names shown in the
tables are the versions that are used in expressions. You may see more user-friendly versions of the variable names used as
labels or in dropdown lists (for example, Absolute Pressure vs. AbsolutePressure, or Velocity X vs. Velocity.x).
This is essentially the sum of all the forces acting through the pretension
cut. This result is only applicable for load steps when the load is defined by
either Locked or Factor.