3.4.2. Interpolating from Multiple Files

The CFX-Interpolator can be used with more than one source file. When this might be useful is described in Using Multiple Files to Provide Initial Conditions. Interpolation proceeds in a very similar manner to that described in Interpolating from a Single File, but searching all the source files for matching domain or other data.

For each Fluid, Porous or Solid domain in the target file, the following checks are made to determine which source file and which domain the initial conditions are taken from:

  • Check to see if any of the source files has a domain that has the same mesh as the target domain under consideration. If it has, then copy all the data from that domain to the target domain, including vertex values, face set values and element set values. No more processing needs to be performed for this target domain. If more than one source file contains a domain with the same mesh as the target domain, then the CFX-Interpolator will choose one of matching domains to provide the initial conditions, depending upon the order in which the source files were specified, and it will note which domain was used in the diagnostic information (in the CFX-Solver Output file if the interpolation is being done as part of a solver run).

  • If there is no domain that passes the same mesh check, the CFX-Interpolator will do a "100% overlap check". If one of the source files has a domain that leads to no unmapped nodes, then the CFX-Interpolator will use only that domain to interpolate from. If more than one source file contains a domain that passes the 100% overlap check, then the CFX-Interpolator will choose one of matching domains to provide the initial conditions, depending upon the order in which the source files were specified, and it will note which domain was used in the diagnostic information.

  • If none of the source domains pass the "100% overlap check", the CFX-Interpolator will identify which domains overlap, extract a list of variables that are common to those domains, and interpolate only those variables. The diagnostic information gives the node mapping information, and the list of common variables is also given. The same rules described in Mapping Data from the Source File to the Target File apply in determining which data in the sources files maps to which data in the target file.

It is recommended that where practical, the domains in the target file are set up so that each will overlap only with domains from one source file. This will enable more flexibility in the variables available in the target file. For example, consider the situation where the target file contains Water and Air. One source file also contains Air and Water but the other source file contains just Water:

  • If the target file contains just one large domain (covering all the domains from both source files), then the CFX-Interpolator will interpolate only variables like Water.Velocity and Pressure onto the target file, missing all the variables relating to Air (for example, Air.Velocity and Air.Volume Fraction) as well as Water.Volume Fraction even in regions where these would exist. This is because the CFX-Interpolator will only interpolate variables common to both source files onto this single domain. The CFX-Solver will then just provide initial conditions for the missing variables from the Initialization set in CFX-Pre. So there will be no use made of any volume fraction results or any variables relating to Air from the source files at all.

  • However, if the target file contained two domains, one covering the region of space occupied by one source file and the other covering the region of space occupied by the other source file, then the CFX Interpolation will produce better results. In the domain that corresponds to the region of the source file that contains Water and Air, it will interpolate all the variables like Air.Velocity and Water.Volume Fraction onto the target file, rather than just the variables relating to Water and the variables that are not fluid-specific. All the information provided by the two source files will be used to set the initial conditions.

When there are multiple source files, containing (between them) multiple fluids, and a target file that may also contain multiple fluids, then it is not always possible for the CFX-Interpolator to be able to match the correct fluids in the source files with the correct fluid in the target files, unless consistent Fluid Definition names are maintained across all the source and target files. It is recommended that you always keep the Fluid Definitions (and Solid Definitions) consistent. If you do have to change the Fluid Definition names, then it is recommend that you always inspect the initial conditions used by the solver to check that the correct initial conditions are being used. This can best be done by visualizing (in CFD-Post) a transient or backup file written before the first timestep/iteration of the new run.

The following extra information on how the CFX-Interpolator determines whether fluids (or solids or particles) are the same applies when multiple source files are present:

  • If each source file contains just a single fluid, then the fluid in second and subsequent source files will be treated the same as the fluid in the first source file, regardless of the Fluid Definition names. (You can override this behavior, and have the fluid from each source file mapped to the appropriate target file fluid using its Fluid Definition name, by turning on the Enforce Strict Name Mapping for Phases setting, which is described in Interpolator Tab in the CFX-Pre User's Guide.)

  • If each source file contains just a single fluid, then the fluid in second and subsequent source files will be treated the same as the fluid in the first source file, regardless of the Fluid Definition names.

  • If the first source file has more than one fluid, and the second or subsequent source file has only one, the fluid in the second source file will be treated as the same as the first fluid in the first source file, if no Fluid Definition names match.

  • In contrast, if the first source file has only one fluid, and a second or subsequent source file has more than one fluid, then only fluids that have the same Fluid Definition name will be considered equivalent by the CFX-Interpolator.

The "first source file" will always be the one selected in Continue History From (or the equivalent command line argument), if this is selected. If the Continue History From check box is cleared, then the first source file is the one which appears first in the CFX Command Language (CCL) for the run, or is given first on the command line if the CFX-Interpolator is being run outside of a run definition. The "first fluid" is the one that appears first in the CCL for the run.

If any of the above cases apply, you should carefully check the diagnostic output and visualize the initial conditions using CFD-Post to determine that the fluids have been used as expected.