STAR-CD How to specify inflow/outflow or pressure boundary using es-ice command script

2023-01-26T01:41:59.000-0500
STAR-CD

Summary

Briefly describe the article. The summary is used in search results to help users find relevant articles. You can improve the accuracy of search results by including phrases that your customers use to describe this issue or topic.es-ice provides all the necessary tools for its users to automate their processes. This article shows the steps needed to assign a pressure boundary and automate the steps via es-ice scripting.


Details

The tutorial trim mesh model will be used in this article to lay out the steps needed to assign intake pressure boundary in es-ice. All meshing pipelines have been completed up to a point in which the user needs to specify a pressure boundary condition in the Star controls panel of es-ice. The picture below illustrates the issue that we are trying to resolve.

User-added image

Using the GUI "Define" button, we can re-assign patch 85 from "Port wall regions" to "Extra regions" as illustrated in the picture by red boxes and the red arrow. If we want to script this process, one can execute the following series of es-ice commands:

1. Parameters, StarControls, BoundaryConditions, GridRegion, "Port and Valve 1"
Comment: this command activates "Star controls > Boundary conditions > Port and Valve 1" panel as shown in the picture above. 

2. IceTemplate, Controls, Regions, Tool, 1, 1, Wall
Comment: this command lists the patch IDs that correspond to "Port wall regions" (the option "Wall") of Valve 1 and of Cylinder 1. The port patches shown on the right-bottom corner of the picture above shows the result after executing this command.

3. Pset, Delete, List, 85
Comment: this command removes patch ID 85 from the current PSet of the Controls workspace

4. IceTemplate, Controls, Regions, Tool, Define
Comment: this command update the patch IDs for the currently active regions, in this case "Port wall regions" of "Port and Valve 1". So the box that corresponds to "Port wall regions" will now only have two patch IDs (patch ID 102 and 103). 

5. IceTemplate, Controls, Regions, Tool, Close

6. IceTemplate, Controls, Regions, Tool, 1, 1, Extra, 1
Comment: this command lists the patch IDs that corresponds to Extra region 1 of Valve 1. There should not be any patches under this region because this region was just freshly created.

7. Pset, News, List, 85
IceTemplate, Controls, Regions, Tool, Define
IceTemplate, Controls, Regions, Tool, Close
Comment: the above series of three es-ice commands will do the following: 1) place patch ID 85 into the current PSet of the Controls workspace, 2) define the patch IDs in the current PSet (in this case patch ID 85) into the currently active regions (in this case the active region is "Extra regions 1").

In summary the above script commands re-assigns patch ID 85 from region "Port wall regions" to "Extra regions 1". 

Unfortunately we cannot generalize this process for other engine models because the patch ID numbers will be different from model to model. To generalize these steps, the above script must not depend on patch ID number of the pressure boundary. To generalize the above script, es-ice command "Patch, Geometry..." can be used to instruct es-ice to find patch IDs that correspond to a set of geometry faces defined in the Geometry window. The followings are the steps:

A) execute the following series of es-ice commands before executing any of of the above commands:
Geometry
cset,news,name,intake (assuming the intake boundary geometry shells are labeled "intake" during surface preparation in STAR-CCM+)
cset,save,11
Comment: these series of es-ice commands saves the geometry shells of the intake boundary into cell set 11 of the Geometry.
 
workspace,controls
cset,all
pclear,all
patch,geometry,11
vset,news,pset
pclear,all
yes
Comment: these series of es-ice commands gathers vertices on the Star controls model that are associated with the pressure boundary geometry shells stored in cell set 11 of the Geometry. 
  
B) execute the es-ice commands from step #1 to step #7, except you need to replace the following commands:

in step #3 "PSet, Delete, List, 85" with "PSet, Delete, VSet, All"
in step #7 "PSet, News, List, 85" with "PSet, News, VSet, All"

Patch ID 85 is obtained using the vertices obtained from step #A.

An es-ice tutorial model file has been attached into this article so that you can apply the knowledge you learn into this example model.

See also:
Meshing strategy on how to apply two level spark plug refinement for gasoline internal combustion engine within es-ice

KB Article ID# KB000073628_EN_US

Contents

SummaryDetails

Associated Components

DARS STAR-CD es-ice pro-STAR