### 4.1.2. Remeshing with Automatic Geometry Extraction

In some analyses involving mesh deformation, the motion of various boundaries and sub-domains is not known beforehand and the key-frame remeshing strategy presented above is not applicable. In these analyses, geometrical information must be extracted from the most recent analysis results and applied in the remeshing process.

In such cases, the analysis definition is modified to include one or more control conditions that will interrupt the solver when, for example, mesh quality deteriorates significantly. A configuration is subsequently defined (unless this has already been done), and a remeshing definition is created with the following settings:

- Set Option to User Defined.

- Set the Activation Condition(s) to the previously created interrupt control condition(s).

- Set the Location to the mesh region that will be replaced.

- Set the External Command to the command that will be used to generate the replacement mesh file.

- Set the Replacement File to the name of the file that will be generated by the external command.

The External Command is typically a shell script or batch file that completes the following tasks:

- Extract geometry data from the most recent solution of the analysis, and either update or replace the original geometry. This may be done using mesh-to-geometry conversion tools available in software such as ANSYS ICEM CFD, or by extracting monitor point data values (for example, the Total Centroid Displacement variable) using the `cfx5mondata` executable. For details, see Exporting Monitor Data from the Command Line in the CFX-Solver Manager User's Guide.

- Create a replacement mesh file using the updated or newly generated geometry. This may be done in any suitable mesh generation application.

Note that some mesh-to-geometry conversion tools are unable to extract the latest mesh coordinates from the most recent CFX-Solver Results file. If this is the case, then introduce a call to CFX-Pre (within the External Command) that executes a session file that simply loads the latest CFX-Solver Results file and writes a new CFX-Solver Input file. That CFX-Solver Input file will contain the required, latest mesh coordinates.

Release 18.2 - © ANSYS, Inc. All rights reserved.