Functional Assignments > Fields Application > 1.2 Procedures for Using Fields
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
1.2 Procedures for Using Fields
Fields can be created, modified, deleted, and shown using the procedures outlined in the following sections. The hierarchy of this presentation reflects the Patran Fields form structure.
 
Caution:  
If using degree-based trigonometric functions in your PCL expression, and the angular input is to be derived from a nodal or element position, Patran will internally return such angles in radians. Therefore, you will need to include a radians-to-degrees conversion factor in your expression, i.e. instead of sind( ‘T ), you will need to use sind( ‘T * 180/3.14159 ). You can also use radian-based trigonometric functions.
Create
To create a new field, select the Patran Fields application button to display the fields form. Select the Create action (the default setting), then select the Object to be created, a Spatial, Material Property or Non-Spatial data field. Before continuing, a choice may be made between creating an all new field, or creating one like an existing field. Upon selection of the object, Patran will display any existing fields of the same object type in the Existing Fields box.
To create a new field like an existing field, select one of the displayed existing field names. All options in the appropriate fields forms will then automatically be set to those of the selected existing field, as well as the tabular data or PCL functions if applicable. After modifying the data and renaming the field as desired, select the Apply button. This will result in the creation of a new field without changing the original.
Instructions for creating a completely new field of any object type are given on the following pages.
Spatial Fields, 190
Data Tables, 192
General Fields, 195
FEM Fields, 196
 
Caution:  
When creating Fields in Cylindrical and Spherical Coordinate Frames be aware of problems associated with discontinuities present in function and angle definition. These usually occur at degrees. For example, defining a Field from 0 to 360 degrees, and applying it where the internally defined angle abruptly changes from +180 degrees to -180 during the application.
 
Caution:  
Tabular theta values must fall between and . Values outside of this range are not valid. (This restriction does not apply to complex field phase values.)
Spatial Fields
Upon selecting the object “Spatial Field,” the method of data input must be selected. The options are PCL Function or Tabular Input. A description of these methods follows:
 
PCL Function
A unique name for the field should be entered by selecting the Field Name box. The Field Type (scalar or vector) is now selected, followed by the Coordinate System Type (real or parametric). The appropriate coordinate system for the field is chosen and indicated in the Coordinate System box. For parametric, this is the parametric coordinate system of the single geometrical entity specified. Fields using parametric coordinate systems are evaluated in the parametric coordinate system of the single geometrical entity specified. The PCL function(s) defining the field is (are) now input into the scalar or vector field function box(es). Any valid PCL expression may be used to define the field values. Valid independent variables for the functions are (c1, c2, c3) for parametric fields, and (X, Y, Z), (R, T, Z) and (R, P, T) for rectangular, cylindrical and spherical real fields, respectively.
Tabular Input
A unique name for the field should be entered by selecting the Field Name box. The Field Type (scalar or vector) is not active for tabular input, as only scalar fields are permitted. The Coordinate System Type buttons (real or parametric) actually provide three types of fields: real tabular input, parametric tabular input, and endpoints only parametric tabular input. These three types are described below:
Real Tabular Input. This option permits the creation of one-, two- or three-dimensional scalar fields from tabular input. These fields are defined over the real space defined by the selected coordinate system. The dimensionality is determined by the Active Independent Variables selected. Independent variables are entered in the first row and column as well as an additional databox depending on the dimensionality of the table. The options button opens a form to specify the maximum number of entries into the table. (The default value is 30.) The operation of the data table forms is described in more detail in Data Tables, 192.
Parametric Tabular Input. This option is very similar to Real Tabular Input described above, except that the space is determined by the parametric directions of the single geometrical entity specified. The dimensionality of the field defines the geometric entity required (i.e., a two-dimensional field is applied to a patch). This option is available only when the Endpoints Only button at the bottom of the fields form is not selected.
Endpoints Only Parametric Tabular Input. This is the default spatial parametric field type. This field supplies a linear variation between values applied to the points c = 0 and c = 1 of the single geometrical entity specified. The dimensionality of the field defines the geometric entity required (i.e., a two-dimensional field is applied to a patch).
General Field
See General Fields, 195 for detailed description.
FEM
There are two types.
1. Continuous FEM Fields can be evaluated on any point in space over which they are defined.
2. Discrete FEM Fields can only be evaluated at defined points in space.
A unique name for the field should be entered by selecting the Field Name box.
For a Continuous FEM field, select the “Continuous” FEM Field Definition switch. The Field Type (scalar or vector) is now selected. Select the group containing the mesh which defines the field. Note that the desired result (scalar or vector) must be displayed on the mesh. A vector field is created from vector markers plotted on the mesh, while a scalar field is created from a fringe plot of the scalar value. The “Options” form allows definition of the extrapolation option (used when the field is evaluated at a point outside the mesh region), and the 2D to 3D extrapolation feature. 2D to 3D extrapolation will set the value of the field constant along a given axis.
For a Discrete FEM Field, select the “Discrete” FEM Field Definition switch. The Field Type (scalar or vector) is now selected. Select the “Entity Type” (Node or Element) next and the “Input Data” button. The spreadsheet widget requires the creation of a table of node or element ids and values. Nodes or elements may be selected or typed in, and may not be combined in a single field. The values must be typed in, and will be automatically formatted to scalar or vector form.
Data Tables
Once the dimensionality of the field is determined by the number of Active Independent Variables selected, the data table form of appropriate dimension is opened with the Input Data button. The Options button allows the user to set the number of independent variables and the extrapolation procedure to be used for the field. Below are general rules for using the data table forms throughout the Fields function. Rules are given for each table dimensionality. Valid independent variables for all Spatial tables are (c1, c2, c3) for parametric fields, and (X, Y, Z), (R, T, Z), and (R, T, P) for rectangular, cylindrical and spherical real fields respectively.
 
1D Table
The left-hand column of the table contains the independent variable. It is labeled with its parametric or real spatial axis. Data is entered by selecting the desired cell, which automatically activates the Input databox. Data typed into the box is stored in the cell when return is pressed, and the cell below is then automatically selected. Any other cell may be selected with the mouse. Numbers larger than the cell display will be entered in exponential format.
2D Table
The left-hand column of the table contains the first independent variable, while the top row contains the second. Both are labeled with the corresponding parametric or real spatial axis. The top left cell naturally accepts no input. Data is entered by selecting the desired cell, which automatically activates the Input databox. Data typed into the box is stored in a cell when <return> is pressed, and the cell below is then automatically selected. Any other cell may be selected with the mouse. Numbers larger than the cell display will be entered in exponential format.
3D Table
The left-hand column of the table contains the first independent variable, while the top row contains the second. The third independent variable is shown and controlled via the databox below the table; it defines the layers of tabular data. The row, column and databox are all labeled with the corresponding parametric or real spatial axis. As in the 2D case, the top left cells accept no input. The first two independent variables are entered by selecting the desired cell, which automatically activates the Input databox. Data typed into the box is stored in a cell when return is pressed, and the cell below is then automatically selected. Any other cell may be selected with the mouse. Numbers larger than the cell display will be entered in exponential format. The third independent variable is entered by selecting the databox at the bottom of the form. Different values may be entered for each layer of data. Layers are controlled by the two arrow buttons.
Material Property Fields: Upon selecting the object Material Property, the material property create form will be displayed. Any existing material property fields will be displayed in the Existing Fields box. The Method box will contain a choice of Tabular Input or General, set the method to Tabular Input. A descriptive name may be entered in the Field Name box. The appropriate Active Independent Variables for the field must now be chosen. A tabular material property field may be a function of one, two or three of the independent variables temperature, strain, or strain rate. It may also be a single variable function of either time or frequency. The Options button allows the user to set the number of independent variables and the extrapolation procedure to be used for the field. The rules for data entry into material property fields are specified above in Data Tables. The OK button must be selected after entering data to create and store the field defined.
Non-Spatial Fields: Upon selecting the object Non-Spatial, the non-spatial create form will be displayed. Any existing non-spatial fields will be displayed in the Existing Fields box. The Method box will contain a choice of Tabular Input, General or Discrete FEM(SAMCEF only).
 
Tabular Input
A unique descriptive name for the field should be entered by selecting the Field Name box. The Active Independent Variable for the field must now be chosen. A tabular non-spatial real-valued field may be a function of time, frequency, temperature, displacement, velocity, or a user-defined variable. A tabular non-spatial complex-valued field must be a function of frequency.
Selecting the Input Data button displays the tabular input data form. The data entry rules for real-valued non-spatial fields are similar to those for the 1D case explained above in Data Tables, except that a PCL function may also be used to fill the data table. If PCL function input is desired, select the Map Function to Table button and the PCL function form will open. Any valid PCL function may be entered into the PCL Expression box. Note that the independent variable (“t “, “f “, “T”, “u”, “v”, or “UD”) in this expression must always be preceded by a “' “. Filling in the Start, End and Number of Points boxes will define points uniformly spaced with respect to the independent variable. Selecting the Use Existing...Points button will cause the function to be evaluated at all points previously entered in the table. Selecting Apply in the Map Function to Table form causes the function values to be mapped to the table. The data entry rules for complex-valued non-spatial fields differ from those of real-valued non-spatial fields in the following respects: first, you have the option to select the complex data format. It may be Real-Imaginary, Magnitude-Phase (degrees), or Magnitude-Phase (radians). Second, you (obviously) need to define two ordinate values instead of one. Spreadsheet data entry via the input databox works as it does for real-valued fields, but you also have the option (if cells from both complex component columns have been selected) to enter two values, or a complex expression, so that both columns may be loaded simultaneously. Finally, the Map Function To Table form that is displayed for complex fields is used to load one ordinate spreadsheet column at a time because PCL does not recognize complex expressions.
The Options button allows the user to set the number of independent variables and the extrapolation procedure to be used for the field. The Apply button in the Fields form must be selected after entering data to create and store the field defined.
Discrete FEM (SAMCEF Only)
A unique descriptive name for the field should be entered by selecting the Field Name box. Select the “Entity Type” (Node or Element). Select the “Active Dynamic Variable” of “Time(t)” or “Frequency(f)”.
Select the “Input Data” button to enter the field data into the spreadsheet. The spreadsheet widget requires the creation of a table of node or element ids and values. Nodes, elements, element faces, element edges or element vertices may be selected or typed in. Nodes and elements may not be combined in a single field. The values must be typed in. Presently, only scalar values are allowed.
The spreadsheet data is entered by layers. Each layer represents a different time or frequency value. Time or frequency must increase or stay the same with increasing layer numbers before the “Apply” button is selected on the main Fields form. If layer data is entered out of order, the “Sort Layers in Ascending Order” button may be used before selecting “Apply”.
Layers or rows may be added or deleted by using the other button options on the spreadsheet form.
General Fields
The General Field can be used to create a field of any object type. The data are described by a mathematical function composed in PCL. The function expression is composed of terms which can be PCL Functions, Constants or Independent Variables, related by mathematical operators. The expression is composed in a text box by selecting terms from option menus, or by simply typing a PCL expression. Unlike other fields methods which strictly limit the available independent variables, the General Field allows access to nearly any independent variable for any field. It is up to the user to create functions with appropriate arguments for the intended application.
The General Field for this release will be of limited utility. It is restricted to scalar fields of up to three variables, is not defined in parametric space, and analysis code translators will not evaluate general field functions for material properties. The primary use of General Fields in this release will be for accessing custom PCL functions and forms.
To create a General Field, select the “General” method for any field object. This will display the General Field Create form. Any existing fields of the current object will be displayed in the Existing Fields box. A descriptive name may be entered in the Field Name box. Selecting the Input Data button displays the General Fields Input Data form. This form, identical for all field objects, is used to compose function terms and to display the function expression.
The Input Data form presents two option menus, enabling the user to select the next term “type” and “subtype.” The types currently available are “Patran Functions” and “Independent Variables.” By default, there are no subtypes available under “Patran Functions” except with the Patran Thermal analysis preference. Any custom functions added will allow the user to specify a subtype. There are no subtypes for independent variables. Upon specifying a term type (and subtype), the listbox will fill with available selections for the next term. If an independent variable is selected, it will be appended to the function expression. If a function is selected, another form will be displayed to accept the function input arguments.
Function input arguments may be specified in a custom PCL form created for the custom function, or in a simple “Generic Input” form which is part of General Fields. The use of a custom input form will be helpful for complicated or specialized functions. The incorporation of a custom form into General Fields is a simple step beyond custom PCL form programming. See Adding Custom General Field Functions (p. 579) in the PCL and Customization. The Generic form will be displayed if no custom form is created. The Generic form displays only the function name, a data box for each argument, and a label indicating the data type expected for that argument. Because of the limited information presented on the Generic form, it is best used only for simple functions. When entering data or expressions into the argument databoxes, proper PCL syntax must be maintained, and any independent variables in the expression must be preceded by a  “' “. Upon selecting “OK” in the function input form, the argument data will be stored, and the function name, complete with integer prefix and independent variable list, will be appended to the function expression text box. (The prefix is an ID used to associate the function’s argument data with the particular term of the function expression.)
 
Important:  
While the function expression may be entered into the textbox, or edited via the keyboard, editing of a PCL function term will result in an error. A PCL function term (a term with an integer prefix) has argument data associated with it. Because of this, the modification of a function term must be done with the Modify Highlighted Function button. To modify a PCL function term, first highlight the desired term (double clicking the term will do). Selecting the Modify Highlighted Function button will display the corresponding form and any current data. Modifications will be stored when “OK” is selected.
FEM Fields
A FEM Field is a field which is associated to a finite element model. There are two kinds of FEM Field, Continuous and Discrete. Both are created with the Fields, Spatial User Interface, using the “FEM” method. The Continuous FEM Field is created from data associated to a finite element mesh. The connectivity provided by this mesh allows interpolation of data to any point within the space defined. This field is most often used to map data from one analysis to another.
The Discrete FEM Field (formerly known as the LBC Field) is simply a table of data associated to a list of nodes or elements. This field cannot be interpolated, as no connectivity is defined.
Creating a Continuous FEM Field
Perform the following steps to create a Continuous FEM field. A finite element mesh and associated results must be imported. It is recommended that a new viewport with a new current group be used. This segregates the results model from the current model, permitting easy manipulation.
1. Import analysis results (and the associated model if not in the current database).
2. Display the desired results or loads on the mesh. If they are scalar, display them as a fringe plot. If they are vector use any available vector display method. The plot must be displayed while creating the FEM field to ensure the correct data is used. See Fields Create (Spatial, Continuous FEM), 262.
3. Create the field with the user interface.
 
Note:  
Once created, a Continuous FEM field can be used like any other spatial field and will be evaluated on any point in space over which it is defined. The evaluation process automatically invokes an interpolator.
 
Important:  
The FEM field group/results should not be deleted before evaluation has taken place, as the field has no means of interpolation without the mesh.
Creating a Discrete FEM Field
One way to create a Discrete FEM field is to import a PATRAN 2.5 Neutral File finite element mesh with loads on it. Another way is to utilize the user interface in the Fields application or from within client applications (i.e. Element Properties or Loads/BCs) to explicitly define values associated with existing FEM entities. Note that a Discrete FEM field is defined only at the FEM entities listed. No interpolation is available.
Modify a Field
To modify an existing field, select the Modify action in the fields form. Then select the object to be modified, a Spatial, Material Property or Non-Spatial field. The “Select Fields to Modify” box will then display the names of all existing fields of the specified object type. Upon selecting one of the displayed names, all settings in the form will automatically be changed to reflect the parameters of the selected field, and filled data tables or PCL functions (as appropriate) will also be displayed. After changing any of the parameters or data as desired, selecting the Apply button will result in the creation of a modified field.
Discrete FEM Fields can also be modified from within client applications (i.e. Element Properties or Loads/BCs) by using the Access DFEM Fields button usually located on the input data form. The action of the client application must also be set to Modify. For more information see Input LBCs Set Data (Static Load Case), 30 or Typical Element Properties Input Menu, 64.
 
Important:  
The original field will be deleted in all cases. To create a new field without deleting the old, refer to Create, 189.
Common Spreadsheet Functionality
All Fields spreadsheet input forms have the following common functionality. All Fields spreadsheet input forms have an "Import/Export..." button in the upper right.
 
Input Data Databox
The Input Data databox is used to enter data into the spreadsheet. First one or more cells must be selected, and then data is entered into the databox. The keyboard “Enter” key causes the data to be copied into the cells. When a single cell is selected, the contents of the cell are copied to the databox. By default, if more than one cell is selected, the databox is cleared. Users who prefer that the upper leftmost selected cell contents be copied to the databox may do so by adding the following to their settings.pcl file:
pref_env_set_logical("fields_spreadsheet_multicell", TRUE )
Auto Highlight Toggle
This toggle controls the behavior of the Input Data databox when a spreadsheet cell is selected. It is off by default. When a cell is selected, the contents of the cell are placed into the Input Data databox. If the toggle is off, it is not highlighted (selected) in the databox. If the toggle is on, it is. Users who prefer to default the toggle on may do so by adding the following to their settings.pcl file:
pref_env_set_logical( "fields_spreadsheet_auto_highlight", TRUE )
Import/Export Button
Allows import and export of comma separated value (CSV) files. This provides compatibility with popular spreadsheet programs such as Microsoft Excel. See below for details.
Undo Button
This button will undo the last change made to the spreadsheet. There is no limit to the number of undo-s that can be done. Closing the form, selecting an existing field from the main form or using Import cannot be undone and reset the undo level to zero.
Selecting it gives you a file form and the option to Import or Export CSV (comma separated value) files.
An options menu allows you to set the separator (comma is default) and whether to read the first line for Import or write column headings for Export.
Import completely replaces what is in the current spreadsheet. Export writes everything in the current spreadsheet.
Some Fields spreadsheets require the spreadsheet to be fully populated. This means there must be a dependent value specified for every combination of independent variables. The Options form from the Fields/Create and Modify forms has a frame for specifying an “Incomplete Data Action”. This tells Patran what you want it to do if there are missing values in an imported CSV file. “Abort” is the default. If it is set, and a CSV file is imported with any missing values, the import will abort with a warning message. “Set to Zero” and “Set to User Specified Value” can also be chosen. If they are, and a CSV file is imported with any missing values, they will be set to the value specified.
 
For example, if your CSV file looks like this:
X,Y,Value
 1.0000000E+000, 1.0000000E+001, 9.1000000E+001
 1.0000000E+000, 2.0000000E+001, 9.4000000E+001
 2.0000000E+000, 1.0000000E+001, 9.2000000E+001
 2.0000000E+000, 2.0000000E+001, 9.5000000E+001
 3.0000000E+000, 1.0000000E+001, 9.3000000E+001
 3.0000000E+000, 2.0000000E+001, 9.6000000E+001
 3.0000000E+000, 4.0000000E+001, 9.8000000E+001
the value for x = 1, y = 40 and x = 2 and y = 40 are missing. They will be set to the value specified on import.
Delete a Field
Deletion of an existing field is accomplished by selecting the Delete action, and the Object to be deleted (Spatial, Material Property or Non-Spatial). When the desired object type has been selected, the Existing Fields box will display all fields of that type. All fields selected for deletion will be displayed in the Fields To Be Deleted box. Selecting the Apply button will cause the fields to be deleted.
After selecting Apply in the Delete form, wait for the name(s) of the field(s) selected to be removed from the Existing Fields listbox. Verify the correct Fields were deleted. If an error is made, select the Undo icon.
Show a Field
The data in any field may be reviewed by selecting the Show action. The Show form contains a scroll box which displays all existing fields. Upon selecting a field to show, the corresponding independent variables will be displayed in the Select Independent Variable box directly below. Any one independent variable at a time may be selected for display. Data is displayed in both graphical and tabular format. For one dimensional data, a single curve over the range will be displayed. multidimensional data will be displayed as a family of curves, each curve at some fixed value of the other independent variable(s). Selecting the Specify Range button enables a precise definition of the range over which the variable will be displayed, and also allows control of the fixed variable values.
If a Discrete FEM field is selected, the data is displayed only in Tabular format.
 
Note:  
Currently, Show is not enabled for the General Field.