In the Properties window of the ICE Solver Setup cell select Yes from the KeyGrid drop-down list.

An additional option is now seen under , . As this is enabled by default, it will reset the KeyGrid mesh if it fails and to generate it again. The Crank Angles property is now displayed. Click Select KeyGrid Angles to open the Crank Angle Selection dialog box.

contains a list of crank angles which will be considered for update. These will be the ones you have set for keygrid. The list displays the information about the crank angle:
Description: One crank angle will be added by default, Initial. You can edit the Description of the other crank angles you add.
Status: This column shows the current status of the crank angle. For example, it could be Mesh Generated, Not Generated, Geometry Failed, or Mesh Failed.
Skewness displays the skewness of the mesh.
No of Elements displays the number of elements of the generated mesh.
contains a list of crank angles which have been removed from the list of Active Angles with the help of the arrow buttons.
will open the Add Angle dialog box.

To add a single angle select from the drop-down list. Multiple angles can be added by selecting .
When you select you can enter the specific angle in the text box.
When you select from the drop-down list, the multiple angles will be created by entering values for , and .
You can edit the Description.
You can select for ICE topology, or for single zone topology, from the drop-down list. This will generate meshes with your choice of topology in KeyGrid. Default choice will be the topology of the default angle.
You can select , , or . For more information see chapter Cold Flow Simulation: Preparing the Geometry.
You can choose , , or from the drop-down list.
You can edit the value. This will change the other dependent mesh control parameters.
You can edit the default value.
This is set to by default. You can change this if required.
This option will be present only when spark is defined in a combustion simulation. This option will be disabled if is chosen from the drop-down list. The default selection will be only if the crank angle is between IVC and (TDC+10). You can select or from the drop-down list. Spark refinement for the mesh will only be done if is selected for .
By default this value is set to 3.3 X Reference Size.
will open the Browse Mesh dialog box.

Here enter the angle for which you would like to read and replace the mesh. Click to open the browser window where you can select the mesh. While selecting the mesh, ensure that it meets the minimum zone requirement as required by the IC Engine system. For more information about the IC Engine supported mesh topologies go to Supported Mesh Topologies.
Note: While browsing the mesh ensure that the order of selection of vales while decomposition is the same as for the mesh you are browsing. The valve names and zone names must be consistent with the upstream data.
will remove the selected angle from the Active Angles list.
will clear the mesh and other backup data of the selected angle from the Active Angles list.
When this option is enabled, and you click , a new system is created in the Workbench window.

If large number of crank angles are included in KeyGrid, substantial amount of time (over few hours if frequent keygrids are used) is required to complete the meshing before you can start the solver. However, the solver will not need these meshes immediately.
An option to run the solver while meshes are being generated is therefore highly desirable and will greatly expedite the workflow. This feature of creating a new system, will run mesh generation and solution simultaneously to save time.
The new system is a duplicate system of the original system and will be named as . This slave or duplicate system will have the cells only till . This system will update the KeyGrid meshes. In the meanwhile you can do solver setting changes and run the Fluent solution. You can check the status of mesh generation anytime by clicking on which opens the dialog box.
Once the KeyGrid duplicate or slave system is created, dialog box will point to the data in the slave system only. Any changes made in the dialog box like add, remove, reset angle, set new default, etc. will be affected in the slave system only.
In the solver for each of the KeyGrids defined in the duplicate system, separate mesh-replace event will be created. So even if you insert new KeyGrid in the duplicate system while the solver run is going on, then also dynamic event of mesh replace will be created for that newly inserted KeyGrid. If during the foreground solver run, the KeyGrid mesh file is not found due to mesh failure or the Keygrid being not generated as yet, then the solver will stop at that event for user input. A dialog box will pop up which will have two options —
— Clicking this, the solver will search for the mesh file in ../ICE/Keygrids directory and in the current working directory. If it finds the mesh in either place mesh replacement is done. If it cannot find the mesh then the same dialog box will pop up again.
— On clicking this option, the solver will proceed without mesh replacement.
If the solver is running in the background mode and if the mesh file is not found then this dialog box will not pop up and the solution will continue without mesh replacement.
will update the mesh for all those crank angles in the Active Angles list, whose status is other than Mesh Generated.
After Update Keygrid is clicked you will get a message of closing the mesh and geometry editors.

Ensure that all the windows are closed and click .
The button is now replaced with the button. Also a progress bar and current update status are displayed.

Once update starts, a
backup will be taken of the project and mesh files. Mesh files will be saved in the
KeyGrids folder. The other files will be saved in the
BackupFiles\Crank Angle folders. If you click the update process is terminated after completing the current geometry or
mesh generation. After update is finished or terminated, keygrid.txt
file is written which contains a list of the angles for a which a mesh is successfully
generated.
The first time the Crank Angle Selection dialog box opens the Initial Angle will be the default angle. This angle will be highlighted. To change the default angle right-click on the angle of your choice from the list of Active Angles and click on Set default angle. You will be asked to confirm if you would like to set the selected angle as the default angle. After you click the angle chosen to be default will be highlighted.
Important: When the option of is enabled, then in slave system if you change the default angle it will not be reflected in the original system.
Before the mesh in generated you can edit the properties of the added angle. Right-click on the angle of your choice from the list of Active Angles and click on . Other than the and options others can be edited.

In the list of Active Angles you will see the crank angles. If you do not want to update the mesh for any of the crank angles in the list, select it and move it to the Inactive Angles list. You can always add these angles later to the list of Active Angles. If you would like to update the mesh for an additional angle, click Add Angle and enter the angle of interest. You can remove a selected angle by selecting and clicking Delete Angle. After you click Update, the mesh is updated for all the Active Angles. Fluent automatically:
Replaces mesh.
Creates required interface.
Creates events for mesh replacement.

Following is an example of a KeyGrid mesh replace event:
(wb-ice-mesh-replace "../ICE/KeyGrids/CA-300-eygrid.msh" "program-controlled" '(fluid-ch fluid-exvalve-1-port fluid-invalve-1-port) '(wb_ice_only_smoothing? #f) '(kg-wait-seconds 600))
Here
the argument '(kg-wait-seconds 600) is set to 600 by default. So the
event waits for 600 seconds or 10 minutes to find the mesh. If the mesh file is not found,
then a message will be printed for '(kg-wait-seconds 600)/10 times.
So if you are not monitoring the run then a message will popup 60 times, which is every 10
seconds for 10 minutes. You can change the default waiting period.
Interpolates data.
By default, data is interpolated between matching zone pairs. That is, between the zones with the same names in both the current mesh and the replacement mesh. A keygrid event of enabling interpolate across zones option is created in Fluent.

The command in the event will be something similar to :
(wb-ice-mesh-replace "../ICE/KeyGrids/CA-7-ICE-5.msh" "program-controlled"
(fluid-ch fluid-piston fluid-crevice))
In the command you can enable or disable the interpolate across zones option.
When this option is set to yes then the solution data will be
interpolated across the zones.
When it is set to no then the solution data will not be
interpolated across the zones but will be interpolated from each zone to the corresponding
zone in the replaced/new mesh.
When this option is set to program-controlled, then number
of fluid zones in keygrid mesh will be extracted from keygrid.txt file
present in /ICE/Keygrids directory. So, if you are running the solution in stand alone
Fluent (instead of Workbench) with different directory structure, then you should copy
keygrid.txt in present- working directory. If all the fluid zones in
the existing mesh are not present in the new replacement mesh then the option will be set
to yes. If the fluid zones in both meshes match then the option
will be set to no.
You can change the program-controlled option in the
dialog box.
Note: Global conservation of data is not enforced when the Interpolate Data Across Zones option is enabled, so it should only be used when absolutely necessary. For best data interpolation, the zone boundaries of the replacement mesh should be coincident with those of the current mesh.
For more information see Replacing the Mesh.
Continues solution for the requested number of time steps.
This is how you can set up the simulation using KeyGrids.