### 3.4.1. Interpolating from a Single File

This section describes how the CFX-Interpolator deals with the most common case, where the results from a single source file are interpolated onto the target file.

The CFX-Interpolator can be run in two different modes: "Initial Guess" mode and "Run Continuation" mode. The aim of Run Continuation mode is to provide the cleanest restart possible, when starting the run defined in the target file using the results in the source file. The aim of Initial Guess mode is to provide a basic initial condition for the principal (solved) variables. The differences between these are discussed in detail in Continuing the History. If the Continue History From check box is selected, then the CFX-Interpolator is run in Run Continuation mode when it is called as part of the run setup. If Continue History From check box is cleared, then the CFX-Interpolator is run in Initial Guess mode.

The basic outline of the interpolation process (conceptually) is as follows, when the CFX-Interpolator is run in Run Continuation mode.

- For each domain (which is not of type Immersed Solid) in the target file:

  1. Same Mesh Check.

     Check to see if any appropriate domain in the source file has the same mesh as the target domain under consideration. (See Mapping Data from the Source File to the Target File for a discussion of which types of domain can be used to interpolate onto any particular domain, and what is meant by "same mesh".) If it has, then copy all the data from that domain to the target domain, including vertex values, faceset values and element-set values. No more processing needs to be performed for this target domain.

  2. Determine mapped nodes.

     1. Find the relevant domain in the source file that has the largest bounding box overlap with the target domain under consideration. For each node in the target domain, determine whether it can be mapped to an element in the source file domain under consideration.

     2. Repeat the above step for the remaining relevant domains in the source file, in order of descending bounding box overlap.

     3. If a node can be mapped to more than one source domain, then choose to map that node to the element in the source domain with most mapped destination nodes.

     4. For all the target nodes that can be mapped to a source element, calculate the interpolated nodal values for the vertex variables (for example, `Pressure` or `Velocity`). These nodes need no further consideration.

  3. Project unmapped target nodes that are only just outside the source geometry.

     If `Simulation Control` command language is used to set the bounding box tolerance (as described in Adjusting the Bounding Box Tolerance), and, if any unmapped target nodes are within the bounding box tolerance of any source elements, then map these nodes to the nearest face/element/node of the appropriate source element. Calculate interpolated nodal values for the vertex variables appropriately; these nodes need no further consideration. This situation applies to target nodes that are only just outside the source elements, perhaps because of numerical precision issues, or because of mesh faceting of curved geometric faces.

  4. Extrapolate any remaining unmapped nodes.

     If any target nodes are still unmapped, then use extrapolation from the nearest mapped target nodes to provide nodal values for the vertex variables. These nodes are reported as being "unmapped" in the CFX-Interpolator diagnostic output. When unmapped nodes remain in the target domain, the interpolation will write a new variable `Interpolation Source Domain` onto the target file and you can plot this variable in CFD-Post to visualize the location of the unmapped nodes. The value of `Interpolation Source Domain` is zero on unmapped nodes and, otherwise, a real number corresponding to a solver-internal domain number.

  5. All nodes in the target domain should now have appropriate vertex values.

- For each immersed solid domain in the target file:

  If there is an immersed solid domain in the source file with the same name as the target immersed solid domain, then copy the domain motion data from the source file to the target immersed solid domain.

- For each rigid body object in the target file:

  If there is a rigid body object in the source file with the same name as the target rigid body then copy the rigid body motion, force, torque, and convergence data from the source file to the target rigid body object.

- For each particle type in the target file:

  If the same particle type exists in the source file, then copy the appropriate particle data, as described in Using an Initial Values File that Contains Particles. For details on what is regarded as the "same" particle type, refer to Mapping Data from the Source File to the Target File.

- For each Generalized Grid Interface (GGI) in the target file:

  If there exists an identical GGI interface in the source file, then copy the GGI data from that GGI onto the target file GGI. The criteria used to determine whether or not the GGIs are identical are discussed below in Mapping Data from the Source File to the Target File.

If the CFX-Interpolator is run in Initial Guess mode, then some of these steps are skipped: only the principal (solved) variables, derived variables, and material properties are copied/interpolated from the source file to the target file; the other data (such as variables relating to immersed solids, GGI interfaces and particle tracking, non-derived dependent variables, and monitor data) is not considered at all (except that the particle sources to the fluids' equations are copied/interpolated).

When using the interpolator for cases involving mesh motion or remeshing, note that:

- When the CFX-Interpolator is run in Run Continuation mode, the same mesh check is performed by comparing the initial meshes from the source with the mesh in the target domains. This is done so that mesh morphing restarts are smooth. If the meshes are the same, the CFX-Interpolator will copy the mesh displacements and the latest mesh coordinates from the source domains.

- When the CFX-Interpolator is run in Initial Guess mode, the same mesh check is performed by comparing the latest meshes from the source with mesh in the target domains. Even if the meshes are the same, the CFX-Interpolator will ignore the mesh displacements and the mesh coordinates from the source domains. This is done for backwards-compatibility with releases prior to Release 12.0.

- If the meshes are different, the node mapping is performed using the mesh in the source file at the latest time.

#### 3.4.1.1. Mapping Data from the Source File to the Target File

The CFX-Interpolator has to read the objects defined in the target file (for example, particle types, fluids, domains, and GGI interfaces) to determine what the corresponding objects in the source file are, in order to copy or interpolate the correct data. The criteria listed in the table below are used.

Table 3.1: Data-mapping Criteria

Object | Criteria to determine which is the corresponding object in the source file (if any)
--- | ---
Fluid and Porous domains | Data from Fluid and Porous domains in the source file can be interpolated or copied only to domains defined as being either `Fluid` or `Porous` in the target file. Domains which have a Domain Motion set to `Rotating` will only be used to interpolate onto other rotating domains, and domains that have the Domain Motion set to `Stationary` will only be used to interpolate onto other stationary domains (note that data in one rotating domain can be interpolated onto a domain that has a different rotation rate: you must determine whether or not this will give a sensible result given your problem setup and how you are using the CFX-Interpolator). There is no requirement for Fluid and Porous domains to have the same name, mesh or geometry between the source and target files; only the geometrical overlap between the domains is important.
Solid domains | Data from a Solid domain in the source file can only be interpolated or copied to a domain of type Solid in the target file. There is no requirement for Solid domains to have the same name, mesh or geometry between the source and target files, only the geometrical overlap between the domains is important.
Immersed Solid domains | Immersed Solid domains are considered to be the same if they have the same name. There is no requirement to have the same mesh.

Same Mesh check

A domain in the source file is considered to have the same mesh as a domain in the target file if the following criteria are all met:

- The bounding box volumes of the domains must be the same (to within a very small tolerance).

- The topology of the domain meshes must be the same.

- The mesh coordinates for each node must be the same (to within a very small tolerance) in order to copy the nodal solution data.

  This implies that meshes will not be considered to be the same if:

  - Node re-ordering has been used to change the order of the nodes (for instance, node 1 in one mesh does not have the same coordinates as node 1 in the other mesh)

  - The same boundary conditions (with the same boundary condition names) have not been defined on each mesh.

If the CFX-Interpolator is run in Run Continuation mode, then:

- The element-set data will be copied if the corresponding source element set is mapped to a target element set.

- The faceset data will be copied if the corresponding source face set is mapped to a target face set.

- The boundary condition data will be copied if the corresponding source boundary is mapped to a target boundary.

Note that in some circumstances, the faceset order in the source file may not match that in the target file, even if the mesh is expected to be identical. This change in order may occur when:

- CFX-Pre has imported a Solver Input File or Results File when creating the target file from the source file (rather than reading data from a .cfx file)

- The mesh data in the source or target files was created with CFX-Pre from a release prior to Release 12.1.

In this circumstance, the meshes are regarded as being the same, but the CFX-Interpolator will not copy any faceset data. If this data is important to obtain a smooth restart, then you may be able to select Use Mesh From > Initial Values to retain it; see Using the Mesh from the Initial Values File for information on when this option can be used.

Fluid

Where the source file and the target file each have a single fluid, then all variables that are stored on a per-fluid basis (such as `Velocity`) will be interpolated so that the fluid in the target file uses the results for the fluid in the source as initial conditions, regardless of the Fluid Definition name or material.

If either of the source file or target file has two or more fluids, then the CFX-Interpolator has to ensure that fluid-specific variables in the source file (such as `Water.Velocity`) are applied to the appropriate fluid in the target file (so `Water.Velocity` in the source file is used to provide the initial condition for `Water` in the target file, and not `Air`, for example). The CFX-Interpolator will regard two fluids as being the same if they have the same Fluid Definition name. If the fluids do not have the same Fluid Definition names, then they will not be regarded as being the same. For example, if the source file contains `Air` and `Water`, and the target file contains `Fluid Definition 1` and `Fluid Definition 2`, then no fluid-specific variables will be interpolated from the source file to the target file; only the variables not specific to a fluid (such as `Pressure`) will be used to provide initial conditions.

There is one exception to this. As a special case, when there is only one fluid defined in the source file, but there is more than one fluid defined in the target file, the CFX-Interpolator will check to see if the fluid defined in the source file has the same name as any fluid defined in the target file. If there is no match, then the CFX-Interpolator will apply the initial conditions from the single fluid in the source file to the first (alphabetically) fluid in the target file. Note that material names are not considered; only fluid names are considered.

Solid | The logic for determining which Solid variables (for example, `Copper.Temperature`) in the source file should be mapped to which Solid variables in the target file is exactly the same as for Fluid variables, as described above (using the Solid Definition name instead of the Fluid Definition name).
Particle Data | The logic for determining which particle data in the source file should be mapped to which particle data in the target file is exactly the same as for Fluid variables, as described above.
Fluid Component | If a fluid is defined as a Variable Composition Mixture (for details, see Multicomponent Flow) in the source file, and the CFX-Interpolator determines that this fluid should provide the initial conditions for a Variable Composition Mixture fluid in the target file, then the CFX-Interpolator needs to determine which component data from the source file should provide the initial conditions for each component in the target file. The components are considered the same if they have the same name. If a component in the fluid from the target file does not have the same name as a component in the corresponding fluid in the source file, then it will not pick up initial conditions from any results in the source file.

Generalized Grid Interfaces (GGIs)

The CFX-Interpolator will only copy GGI data from the source file to the target file if it finds an Interface in the source file that is identical to the interface in the target file. For the GGI interface to be considered identical, the following criteria must all be met:

- The source and destination domain interfaces are both GGIs.

- Both GGIs have the same physics type (for example, Fluid Fluid, or Fluid Porous).

- Both GGIs have the same frame change model (for example, Frozen Rotor). Both the rotational offsets must be the same if the Frozen Rotor model is set for the GGI.

- Both the associated domains have the same mesh (and boundary topology) in the target and source files.

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