pw:: GridGlobal actions for grid entities Derives Frompw::Object Summary | Global actions for grid entities | | | | This action gets a list of file types that can export all of the given entities. | | This action checks if a list of entities are valid for the given settings. | | This action exports the list of entities to the given file. | | This action checks if importing the given file would result in missing references. | | This action imports a file into the grid. | | This action saves the entire grid in the native file format. | | This action merges connectors within a tolerance. | | This action automatically merges two connectors. | | This action gets the 3D position of the given grid coordinate. | | This action gets the position of the given grid coordinates. | | This action gets the grid entity at the given grid coordinates | | This action maps the given grid coordinate to all coords that are immediately higher than the specified coord. | | This action maps the given grid coordinate to all coords that are immediately lower than the specified coord. | | This action offsets the ijk coordinates of the given grid coordinate. | | This action calculates the offset from the given grid coordinate in the direction of the normal at the coordinate. | | This action gets a list of all grid entities. | | This action gets the number of grid entities. | | This action gets a grid entity using the name. | | This action gets the extents of the grid entities. | | This command returns the number of elements for the given type. | | This action gets the number of points in the entire grid. | | Determines if a grid mirror plane is defined. | | Undefines the grid mirror plane. | | Processes entity_list for the given plane. | | This action computes anisotropic growth parameters for a laminar boundary layer. | | This action computes anisotropic growth parameters for a turbulent boundary layer. | | This action computes the growth rate for a given layer in a boundary layer. | | This action computes the growth rate schedule from a set of growth parameters, such as those returned by the calculateLaminarGrowth or calculateTurbulentGrowth actions. | | | | This attribute is the grid point tolerance of grid entities and operations. | | This attribute is the node tolerance of grid entities and operations. | | This attribute is the connector tolerance of grid entities and operations. | | This attribute is the bending angle at which unstructured domains are split on import. | | This attribute is the flag for whether unstructured domains with more than one edge are split on import so that they will only made up of a single edge. | | This attribute is the mirroring plane applied to the grid at export. |
getExportFileTypespw::Grid getExportFileTypes ?-facesOnly? entity_list |
This action gets a list of file types that can export all of the given entities. Parameters-facesOnly | If this flag is present only the faces of blocks will be exported. | entity_list | This parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object. |
ReturnsThis action returns a list containing file type names that can be used in the export command.
checkForInvalidEntitiespw::Grid checkForInvalidEntities -type file_type ?-facesOnly? ?-invalid invalid_var? entity_list |
This action checks if a list of entities are valid for the given settings. Parameters-type file_type | This parameter is the file type of the exported file; < Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | FVUNS30 | CGNS | CGNS-STRUCT | CGNS-UNSTR >. | -facesOnly | This flag if present, indicates only the faces of blocks will be exported. | -invalid invalid_var | This parameter is a string name of the variable to receive a list of invalid pw::GridEntity objects. | entity_list | This parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object. |
ReturnsThis action returns a boolean, true if all entities are valid for given file type. InformationThe export function has more information about file types. See Alsoexport
exportpw::Grid export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-surfaces surface_style? ?-facesOnly? ?-noOverwrite? ?-report report_var? entity_list filename |
This action exports the list of entities to the given file. Parameters-type file_type | This parameter is the file type of the exported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | FVUNS30 | CGNS | CGNS-STRUCT | CGNS-UNSTR >. | -format file_format | This parameter is the file format of the exported file; < ASCII | Binary | Unformatted >. | -precision fp_precision | This parameter is the floating point precision of the exported file; < Single | Double >. | -surfaces surface_style | This parameter is the exported surface style; < Bilinear | Continuous >. | -facesOnly | If this flag is present only the faces of blocks will be exported. | -noOverwrite | If this flag is present and the file already exists, do not export the file. | -report report_var | This parameter is a string variable name to receive the low-level export details as a pre-formatted report string. | entity_list | This parameter is a list of pw::GridEntity objects, or a single pw::GridEntity object. | filename | This parameter is the full path and name of the file to export. |
ReturnsThis action returns nothing. InformationThis command supports progress updates. File TypesAutomatic | determine the file type based on the filename extension | Gridgen | Gridgen grid file format | IGES | Initial Graphics Exchange Specification v5.3 | STL | Stereo Lithography file format | GridPro | GridPro’s surface patch files | VRML | VRML 1.0 format | VRML97 | VRML 2.0/97 format | PLOT3D | 3D, multi-grid format with no i-blanking | Segment | Gridgen connector and line file format | Patran | Patran version 2.5 Neutral file format | Nastran | Nastran version 69 format, Double precision refers to the “large” Nastran format (using 16 character fields) | UCD | Advanced Visual Systems’ unstructured cell data file format | Xpatch | Xpatch unstructured data file format | FVUNS | FIELDVIEW unstructured data file format v2.4 | FVUNS30 | FIELDVIEW unstructured data file format v3.0 | CGNS | CFD General Notation System data file format | CGNS-STRUCT | CFD General Notation System data file format (structured) | CGNS-UNSTR | CFD General Notation System data file format (unstructured) |
For file_format A = ASCII, B = Binary, U = Unformatted
file_type extension file_format fp_precision valid entity types ============= =========== =========== ================ ================== Gridgen gg B Double any IGES igs,iges A Double structured 2D STL stl A|B Single unstructured 2D GridPro dat A Single|Double 2D VRML wrl,vrml A Single 2D VRML97 wrl,vrml A Single 2D PLOT3D x,xyz,p3d A|B|U Double|Single structured 2D/3D Segment dat A Double|Single 1D Patran pat A Single* 2D/3D Nastran nas A Double|Single** 2D/3D UCD ucd A Double|Single 2D/3D Xpatch facet A Double|Single 2D FVUNS uns A|B|U Single 3D FVUNS30 uns A|B|U Single 3D CGNS cgns B Double|Single 3D CGNS-STRUCT cgns B Double|Single structured 3D CGNS-UNSTR cgns B Double|Single 3D
* The Patran format uses a fixed width field giving 10 digits of precision (single = 7 digits, double = 16 digits).
** The Nastran format uses a fixed width field giving 10 digits of precision (single = 7 digits, double = 16 digits), however the precision field is used to specify the style of Nastran export, where Single will generate the small Nastran format and Double will generate the large field Nastran-L format (using 16 character fields).
checkForMissingReferencespw::Grid checkForMissingReferences ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-missing missingVar? filename |
This action checks if importing the given file would result in missing references. Parameters-type file_type | This parameter is the file type of the imported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Network | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | FVUNS30 | CGNS | CGNS-STRUCT | CGNS-UNSTR | UGRID > | -format file_format | This parameter is the file format of the imported file; < ASCII | Binary | Unformatted >. | -precision fp_precision | This parameter is the floating point precision of the imported file; < Single | Double >. | -missing missingVar | This parameter is a variable name to receive a list of names that are the missing references, if any. | filename | This parameter is the full path and name of the file to import. |
ReturnsThis action returns a boolean, which is true if there are no missing references. InformationThis command supports progress updates. File TypesSee import for information on file types.
importpw::Grid import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-report report_var? filename |
This action imports a file into the grid. Parameters-type file_type | This parameter is the file type of the exported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | PLOT3D | Network | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | CGNS | CGNS-STRUCT | CGNS-UNSTR | UGRID >. | -format file_format | This parameter is the file format of the imported file; < ASCII | Binary | Unformatted >. | -precision fp_precision | This parameter is the floating point precision of the imported file; < Single | Double >. | -report report_var | This parameter is a string variable name to receive the low-level import details as a pre-formatted report string. | filename | This parameter is the full path and name of the file to import. |
ReturnsThis action returns a list of the imported GridEntity objects. Only entities explicitly defined are returned. For example, when importing a 2D PLOT3D file, the necessary connectors will be created, but only the domain will be returned. When importing a Gridgen file, all grid entities imported will be returned since they are all explicitly defined in the file. InformationThis command supports progress updates. File TypesAutomatic | determine the file type based on the filename extension | Gridgen | Gridgen grid file format | STL | Stereo Lithography file format | GridPro | GridPro’s volume grid files | VRML | VRML 1.0 or 97 format | PLOT3D | 3D, multi-grid format with no i-blanking | Network | Gridgen structured grid and network surface file format | Segment | Gridgen connector and line file format | Patran | Patran version 2.5 Neutral file format | Nastran | Nastran version 69 format, Double precision refers to the “large” Nastran format (using 16 character fields) | UCD | Advanced Visual Systems’ unstructured cell data file format | Xpatch | Xpatch unstructured data file format | FVUNS | FIELDVIEW unstructured data file format (v2.4 or v3.0) | CGNS | CFD General Notation System data file format | CGNS-STRUCT | CFD General Notation System data file format (structured) | CGNS-UNSTR | CFD General Notation System data file format (unstructured) | UGRID | 2D/3D unstructured grid format |
For file_format A = ASCII, B = Binary, U = Unformatted
file_type extension file_format fp_precision valid entity types ============= =========== =========== ================ ================== Gridgen gg B Double any IGES igs,iges A Double structured 2D STL stl A|B Single unstructured 2D GridPro grd A Single|Double structured 3D VRML wrl,vrml A Single 2D PLOT3D x,xyz,p3d A|B|U Double|Single structured 2D/3D Network grd,net A|B|U Double|Single structured 2D/3D Segment dat A Double|Single 1D Patran pat A Single* 2D/3D Nastran nas A Double|Single** 2D/3D UCD ucd A Double|Single 2D/3D Xpatch facet A Double|Single 2D FVUNS uns A|B|U Single 3D CGNS cgns B Double|Single 3D CGNS-STRUCT cgns B Double|Single structured 3D CGNS-UNSTR cgns B Double|Single 3D UGRID ugrid A|B|U Double|Single unstructured 2D/3D
* The Patran format uses a fixed width field giving 10 digits of precision (single = 7 digits, double = 16 digits).
** The Nastran format uses a fixed width field giving 10 digits of precision (single = 7 digits, double = 16 digits), however the precision field is used to specify the style of Nastran import, where Single will generate the small Nastran format and Double will generate the large field Nastran-L format (using 16 character fields).
savepw::Grid save ?-compress level? ?-noOverwrite? filename |
This action saves the entire grid in the native file format. Parameters-compress level | This action is the level of compression to save the file with; [0, 9] where 0 = no compression, 1 = minimum, 9 = maximum; default is 0. | -noOverwrite | If this flag is present and the file already exists, do not save the file. | filename | This parameter is the full path and name of the file to save. |
ReturnsThis action returns nothing. InformationThis command supports progress updates. For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum. Higher levels of compression take longer to save.
mergeConnectorspw::Grid mergeConnectors ?-exclude topology? ?-visibleOnly? -tolerance tol |
This action merges connectors within a tolerance. Parameters-exclude topology | This optional parameter is the topology to exclude from merging; None | Manifold | NonFree. | -visibleOnly | This flag causes only visible connectors to be considered for merging. All hidden connectors are ignored. | -tolerance tol | This parameter is the tolerance that connectors and nodes must be within for merging to take place. |
ReturnsThis action returns nothing.
mergeConnectorPairpw::Grid mergeConnectorPair con1 con2 |
This action automatically merges two connectors. ParametersReturnsThis action returns nothing.
getXYZThis action gets the 3D position of the given grid coordinate. Parameterscoord | This parameter is a grid coord. |
ReturnsThis action returns an xyz vector.
getPointThis action gets the position of the given grid coordinates. Parameterscoord | This parameter is a grid coord. |
ReturnsThis action returns a point giving the position of the grid coordinate It may be in the form “u v dbentity”.
getEntityThis action gets the grid entity at the given grid coordinates Parameterscoord | This parameter is a grid coord. |
ReturnsThis action returns a pw::GridEntity object. InformationIf the given coord is not valid, an error will occur.
mapHigherThis action maps the given grid coordinate to all coords that are immediately higher than the specified coord. That is, a node based grid coord will be mapped to all connector based coords at that point (and similarly; connectors to domains, and domains to blocks). Parameterscoord | This parameter is a grid coord. |
ReturnsThis action returns a list of grid coords based on higher level grid entities that represent the same point. An empty list is returned if coord does not map to any higher level entities. ExampleThis example starts with $nod (an existing node entity) and maps it up to all unique higher level entities. Code puts "***********************************************" puts "Dumping higher coords for \{1 $nod\}" puts "***********************************************" puts ""
# prime coords array with {nodeName nodeCoord} array set coords [list [$nod getName] [list 1 $nod]] set indent ""
# keep processing as long as coords array is not empty while { [array size coords] > 0 } { array unset higherCoords ;# clear this out
# process each name coord pair in the coords array foreach { name coord } [array get coords] { set xyz [pw::Grid getXYZ $coord] puts [format "%-20.20s | %-30.30s | %-s" \ "$indent$name" "\{$coord\}" "($xyz)"]
foreach higherCoord [pw::Grid mapHigher $coord] { set higherEnt [lindex $higherCoord end] ;# get coord's entity set higherEntName [$higherEnt getName] ;# get entity name
# if higherEntName is NOT in higherCoords array if { {} == [array get higherCoords $higherEntName] } { # Use higherEntName as key to store higherCoord in the # higherCoords array set higherCoords($higherEntName) $higherCoord } } } array unset coords ;# All done with coords
# reload coords with any lower coordinates found above. array set coords [array get higherCoords]
append indent ".." ;# increase indent level string for next pass }
Output *********************************************** Dumping higher coords for {1 ::pw::Node_1} ***********************************************
Node_1 | {1 ::pw::Node_1} | (-11.0 0.0 9.0) ..conBlkLeft-12 | {3 ::pw::Connector_27} | (-11.0 0.0 9.0) ..conBlkLeft-13 | {3 ::pw::Connector_31} | (-11.0 0.0 9.0) ..conBlkLeft-15 | {1 ::pw::Connector_25} | (-11.0 0.0 9.0) ....domBlkLeft-7 | {3 3 ::pw::DomainStructured_2} | (-11.0 0.0 9.0) ....domBlkLeft-8 | {1 3 ::pw::DomainStructured_1} | (-11.0 0.0 9.0) ....domBlkLeft-10 | {1 1 ::pw::DomainStructured_3} | (-11.0 0.0 9.0) ......blk-1 | {13 ::pw::BlockUnstructured_1} | (-11.0 0.0 9.0)
mapLowerpw::Grid mapLower ?-includeNodes? coord |
This action maps the given grid coordinate to all coords that are immediately lower than the specified coord. That is, a block based grid coord will be mapped to all domain based coords at that point (and similarly; domains to connectors and connectors to nodes). Parameterscoord | This parameter is a grid coord. | -includeNodes | If this flag is present, connector endpoint grid coordinates will map down to their associated pw::Node objects. By default, mapLower will only map down to connector entities. |
ReturnsThis action returns a list of grid coords based on lower level grid entities that represent the same point. An empty list is returned if coord does not map to any lower level entities. ExampleThis example starts with $blk (an existing block entity) and maps a corner coord down to all unique lower level entities. Code puts "***********************************************" puts "Dumping lower coords for \{1 1 1 $blk\}" puts "***********************************************" puts ""
# prime coords array with {blockName blockCornerCoord} array set coords [list [$blk getName] [list 1 1 1 $blk]] set indent ""
# keep processing as long as coords array is not empty while { [array size coords] > 0 } { array unset lwrCoords ;# clear this out
# process each name coord pair in the coords array foreach { name coord } [array get coords] { set xyz [pw::Grid getXYZ $coord] puts [format "%-20.20s | %-30.30s | %-s" \ "$indent$name" "\{$coord\}" "($xyz)"]
foreach lwrCoord [pw::Grid mapLower -includeNodes $coord] { set lowerEnt [lindex $lwrCoord end] ;# get coord's entity set lowerEntName [$lowerEnt getName] ;# get entity name
# if lowerEntName is NOT in lwrCoords array if { {} == [array get lwrCoords $lowerEntName] } { # Use lowerEntName as key to store lwrCoord in the # lwrCoords array set lwrCoords($lowerEntName) $lwrCoord } } } array unset coords ;# All done with coords
# reload coords with any lower coordinates found above. array set coords [array get lwrCoords]
append indent ".." ;# increase indent level string for next pass }
Output *********************************************** Dumping lower coords for {1 1 1 ::pw::BlockExtruded_1} ***********************************************
blk-3 | {1 1 1 ::pw::BlockExtruded_1} | (0.0 0.0 -6.0) ..dom-13 | {1 1 ::pw::DomainStructured_5} | (0.0 0.0 -6.0) ..dom-9 | {1 ::pw::DomainUnstructured_1} | (0.0 0.0 -6.0) ..dom-11 | {3 1 ::pw::DomainStructured_4} | (0.0 0.0 -6.0) ....con-13 | {1 ::pw::Connector_6} | (0.0 0.0 -6.0) ....con-15 | {4 ::pw::Connector_4} | (0.0 0.0 -6.0) ....con-19 | {1 ::pw::Connector_5} | (0.0 0.0 -6.0) ......Node_1 | {1 ::pw::Node_1} | (0.0 0.0 -6.0)
offsetIJKpw::Grid offsetIJK coord < i | ij | ijk > |
This action offsets the ijk coordinates of the given grid coordinate. Parameterscoord | This parameter is a grid coord. | i | This parameter is the i amount to offset. | ij | This parameter is list with the i and j amounts to offset. | ijk | This parameter is with the i, j, and k amounts to offset. |
ReturnsThis action returns a grid coord.
offsetNormalpw::Grid offsetNormal coord distance |
This action calculates the offset from the given grid coordinate in the direction of the normal at the coordinate. Parameterscoord | This parameter is a grid coord. | distance | This parameter is the distance to offset. |
ReturnsThis action returns an xyz vector. InformationIf the normal is not defined for the given grid coordinate, an error will occur.
getAllpw::Grid getAll ?-type type_string? ?-gridgenCompatible? ?-framework framework? |
This action gets a list of all grid entities. Parameters-type type_string | If specified, this option filters the result to include only entities of the specified type. Only types derived from pw::GridEntity are valid. | -gridgenCompatible | If specified, this option filters the result to include only entities that can be exported to the Gridgen format. | -framework | If specified, this argument specifies which pw::Framework to query. If not specified, the active pw::Framework is used as the target. |
ReturnsThis action returns a list of pw::GridEntity objects.
getCountpw::Grid getCount ?-type type_string? ?-gridgenCompatible? |
This action gets the number of grid entities. Parameters-type type_string If specified, this option filters the result to include only entities of the specified type. Only types derived from pw::GridEntity are valid. -gridgenCompatible If specified, this option filters the result to include only entities that can be exported to the Gridgen format. ReturnsThis action returns an integer value.
getByNamepw::Grid getByName ?-path path? name |
This action gets a grid entity using the name. Parameters-name | This parameter is a name string. | -path path | This parameter and its argument specify the path to the framework in which the database entity resides. The path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework, start at the active framework, or start at a child of the active framework. The active framework is used as the default if this parameter is not specified. |
ReturnsThis action returns a pw::GridEntity object.
getExtentspw::Grid getExtents ?-enabledOnly? ?-visibleOnly? |
This action gets the extents of the grid entities. Parameters-enabledOnly | This flag, if present, restricts the calculations to only enabled entities, regardless of their visibility. Enabled entities in off layers are included, for example. | -visibleOnly | This flag, if present, restricts the calculations to only visible entities. |
ReturnsThis action returns a list of two vectors representing the min and max xyz points of the extents.
getElementCountpw::Grid getElementCount type ?-skip3DCells? ?-frameworks? ?entity_list? |
This command returns the number of elements for the given type. If no entities are provided, then the cell count applies to the entire grid. If entities are provided, then only elements unique to the provided entities will be counted. Parameterstype | This parameter is an element type: < Triangle | Quad | Tet | Pyramid | Prism | Hex >. | -skip3DCells | optional parameter that will prevent 3D cells from contributing to 2D cell counts. Note that this parameter only takes effect when the specified cell type is 2D. For example, hex cells will not contribute to a Quad count if this parameter is set. | -frameworks | optional parameter that will query element counts across all frameworks. entity_list is not supported when the parameter is set. | entity_list | optional list of entites to retrieve counts from |
ReturnsThis action returns an integer value. ExampleCode set domains [pw::Grid getAll -type pw::Domain] set blocks [pw::Grid getAll -type pw::Block] # Counts all quad elements of all grid entities puts [pw::Grid getElementCount Quad] # Counts only the Quad elements unique to the provided blocks. # This will count only interior elements, not the shared boundary # elements. puts [pw::Grid getElementCount Quad $blocks] # Counts only the Quad elements unique to the provided domains puts [pw::Grid getElementCount Quad $domains]
Output 36 12 24
getPointCountpw::Grid getPointCount ?<Node | Connector | Domain | Block>? |
This action gets the number of points in the entire grid. Parameterstype | This optional parameter gives a specific entity type to the get the point count of with valid values <Node | Connector | Domain | Block>. |
ReturnsThis action returns an integer value. NoteWhen specifying a type, the return value will be the sum of all points for each entity of the given type, which means shared points will be counted twice. If a unique point count is desired, do not specify the type parameter or use pw::GridEntity.getUniquePointCount.
getMirrorPlaneEntitiespw::Grid getMirrorPlaneEntities ?-partial partial_var? ?-other other_var? ?-plane plane? mirrored_var unmirrored_var ?entity_list? |
Processes entity_list for the given plane. Parameters-partial partial_var | This parameter is a string name of the variable to receive a list of pw::GridEntity objects. The owned points of these entities lie partially in and partially out of the mirror plane. For a valid export, this list should be empty. | -other other_var | This parameter is a string name of the variable to receive a list of pw::GridEntity objects. The owned points of these entities lie completely out of the mirror plane. This list will contain the top-level entities from entity_list and their appropriate lower-level entities. | -plane plane | This parameter is a mirror plane. If not specified, the current grid mirror plane is used. | mirrored_var | This parameter is a string name of the variable to receive a list of pw::GridEntity objects. These entities lie in the mirror plane and are mirrored. | unmirrored_var | This parameter is a string name of the variable to receive a list of pw::GridEntity objects. These entities lie in the mirror plane and are not mirrored. | entity_list | This optional parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object. These entities must be of type pw::Block in 3D or pw::Domain in 2D. If missing, all visible, type appropriate entities will be used. |
ReturnsThis action returns a list of lower-level entities. The owned points of these entities all lie on the plane. InformationIn 3D, the returned list contains only domains, connectors and nodes. In 2D, the returned list contains only connectors and nodes. The returned list will be empty if no entities lie on the plane or if the mirror plane is undefined. See AlsoMirrorPlane, isMirrored, clearMirrorPlane
calculateLaminarGrowthpw::Grid calculateLaminarGrowth reynoldsNumber characteristicLength initialSpacingFactor |
This action computes anisotropic growth parameters for a laminar boundary layer. The calculations are based on Blasius’s equation for a smooth flat plate, as referenced in Boundary Layer Theory, Seventh Edition, Schlichting, H., McGraw-Hill: 1979, p 142. ParametersreynoldsNumber | This parameter is the Reynolds number. | characteristicLength | This parameter is the characteristing length of the geometry. | initialSpacingFactor | This parameter is the desired initial spacing at the wall as a fraction of the total laminar boundary layer thickness. |
ReturnsThis action returns a list of values whose elements are, in order: - integer number of initial layers in which a growth rate of 1.0 and a growth acceleration of 1.0 will be applied
- integer number of layers for which the growth accleration rate will be applied after the initial layers
- float growth acceleration rate
- float initial wall spacing satisfying the initialSpacingFactor input value. Note that this spacing value will still need to be assigned to the appropriate T-Rex domains as BCs
See AlsocalculateTurbulentGrowth, calculateGrowthRateAtLayer, calculateGrowthRateSchedule
calculateTurbulentGrowthpw::Grid calculateTurbulentGrowth reynoldsNumber characteristicLength yPlus |
This action computes anisotropic growth parameters for a turbulent boundary layer. The calculations are based on turbulent boundary layers (Law of the Wall) for a smooth flat plate, as referenced in Boundary Layer Theory, Seventh Edition, Schlichting, H., McGraw-Hill: 1979, p 643. ParametersreynoldsNumber | This parameter is the Reynolds number. | characteristicLength | This parameter is the characteristic length of the geometry. | yPlus | This parameter is the desired dimensionless Y+ spacing at the wall. |
ReturnsThis action returns a list of values whose elements are, in order: - integer number of initial layers in which a growth rate of 1.0 and a growth acceleration of 1.0 will be applied
- integer number of layers for which the growth accleration rate will be applied after the initial layers
- float growth acceleration rate
- float initial wall spacing satisfying the yPlus input value. Note that this spacing value will still need to be assigned to the appropriate T-Rex domains as BCs
See AlsocalculateLaminarGrowth, calculateGrowthRateAtLayer, calculateGrowthRateSchedule
calculateGrowthRateAtLayerpw::Grid calculateGrowthRateAtLayer layer numLinearLayers numAccelerationLayers growthAcceleration defaultGrowthRate |
This action computes the growth rate for a given layer in a boundary layer. Parameterslayer | This parameter is the integer layer number at which to compute the growth rate, with the range [0, infinity). | numLinearLayers | This parameter is the integer number of layers from the wall where growth rate and acceleration are constant (1.0), with the range [0, infinity). | numAccelerationLayers | This parameter is the integer number of layers beyond numLinearLayers where growth rate increases according to the growth acceleration, with the range [0, infinity). | growthAcceleration | This parameter is the float growth acceleration rate to be applied in the growth acceleration layers, with the range [1.0, infinity). | defaultGrowthRate | Thist parameter is the float growth rate to use when no acceleration layers are requested (i.e., when numAccelerationLayers is zero), with the range [1.0, infinity). |
ReturnsThis action returns a float representing the growth rate to apply at the given layer. See Alsopw::BlockUnstructured.TRexGrowthProfile
calculateGrowthRateSchedulepw::Grid calculateGrowthRateSchedule numLinearLayers numAccelerationLayers growthAcceleration |
This action computes the growth rate schedule from a set of growth parameters, such as those returned by the calculateLaminarGrowth or calculateTurbulentGrowth actions. ParametersnumLinearLayers | This parameter is the integer number of layers from the wall where growth rate and acceleration are constant (1.0), with the range [0, infinity). | numAccelerationLayers | This parameter is the integer number of layers beyond numLinearLayers where growth rate increases according to the specfied growth acceleration rate, with the range [0, infinity). | growthAcceleration | This parameter is the float growth acceleration rate to apply in the growth acceleration layers, with the range [1.0, infinity). |
ReturnsThis action returns a list of float representing the growth rate to apply at each layer. The length of the result list is the sum of numLinearLayers and numAccelerationLayers. See Alsopw::BlockUnstructured.TRexGrowthProfile
GridPointTolerancepw::Grid get/setGridPointTolerance tolerance |
This attribute is the grid point tolerance of grid entities and operations. Typefloat (0, infinity) Default0.0000001
NodeTolerancepw::Grid get/setNodeTolerance tolerance |
This attribute is the node tolerance of grid entities and operations. Typefloat (0, infinity) Default0.0001
ConnectorTolerancepw::Grid get/setConnectorTolerance tolerance |
This attribute is the connector tolerance of grid entities and operations. Typefloat (0, infinity) Default0.0001
ImportSplitAnglepw::Grid get/setImportSplitAngle angle |
This attribute is the bending angle at which unstructured domains are split on import. Typefloat [0, 180) Default0
ImportSplitMultipleEdgespw::Grid get/setImportSplitMultipleEdges split |
This attribute is the flag for whether unstructured domains with more than one edge are split on import so that they will only made up of a single edge. Typeboolean Defaultfalse
MirrorPlanepw::Grid get/setMirrorPlane plane |
This attribute is the mirroring plane applied to the grid at export. Typeplane Defaultnone InformationSetting to an invalid plane value generates a glyph error. Getting the plane generates a glyph error if the plane is not defined. Use Use pw::Grid isMirrored to determine if calling getMirrorPlane is allowed. ExampleCode # plnDef is in the plane in coefficent form {A B C D} set plnDef [pwu::Plane set {1 0 0} {0 0 0}]
# A glyph error is generated if plnDef is invalid pw::Grid setMirrorPlane $plnDef
See AlsoisMirrored, clearMirrorPlane, getMirrorPlaneEntities
|