Viewfactor > Overview > 2.3 Viewfactor Data and Program Flow
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
2.3 Viewfactor Data and Program Flow
This section describes in a very general manner the internal workings of the Viewfactor code. Strictly speaking, it is not necessary to know this information in order to use Viewfactor. However, by knowing something about Viewfactor’s internal data flow it is easier to understand some of the information needed in order to use Viewfactor. Therefore, while it is not necessary to dwell on the details of this section, it is good to be familiar with it. You may also wish to refer to this section from time to time to refresh your memory or to facilitate your understanding of how some detail of the viewfactor analysis fits into the overall Patran System Thermal Analysis scheme.
Description
Figure 2‑2 shows a high level abstraction of the program structure contained in Viewfactor. The program functions are described in outline form, with the level of indentation representing the level of nesting in the program. Data files are shown in ovals with arrows to the general portion of the program where the data is input or output. The file VFMSG receives output throughout the program execution and thus does not have an arrow from a specific portion of the program.
Figure 2‑2 High Level Data and Program Flow for Viewfactor
The execution of Viewfactor is controlled by parameters in the control file VFCTL. These parameters serve three general purposes:
1. Set program parameters, such as the value of the parameter used for convergence checking.
2. Specify file names other than the default names for the data files.
3. Control which parts of the Viewfactor program are executed and subsequently which input data files are required and which output data files are created.
The third function of program control is described here. All of these functions are described in more detail in Viewfactor Execution From Patran Thermal, 79.
Referring to Figure 2‑2, you should be able to identify the following program parts:
Part I
Initialize.
Part II
Calculate Viewfactors.
Part III
Make Patran Thermal Resistors.
Part IV
Exit from the Viewfactor program structure.
Parts I and IV are always executed. Through the use of a parameter in the VFCONTROL file you may cause any one of three execution modes to occur.
MODE 1
In the first mode, all of the Parts I through IV are executed. The required data input is a VFCTL file, a VFINDAT file, and a TEMPLATEDAT file. The output produced is a VFRESDAT file, a VFNODEDAT file, a VFRAWDAT file, a VFDIAG file, and a VFMSG file. This mode takes in the geometric description of the radiating surfaces and their Patran Thermal surface template data and creates as output resistor network data for Patran Thermal. Also created as output for possible later use (see the description of the third mode below) is the raw viewfactor data. Diagnostic data is also output.
MODE 2
In the second mode, only Parts I, II, and IV are executed. Part III (Make Patran Thermal Resistors) is not executed and thus no thermal network data is generated. The TEMPLATEDAT file is not required for this mode, although no harm will be caused by its presence. The required data input is a VFCTL file and a VFINDAT file. The output produced is a raw viewfactor file, VFRAWDAT, and the diagnostic files VFDIAG and VFMSG. The VFRAWDAT file produced here may be used in the third mode described in the next paragraph. The second mode is useful if you only want to generate viewfactor data and do not care about the Patran Thermal network resistors. It is also useful if you do not yet have the TEMPLATEDAT file describing the surface properties and wish to begin the viewfactor calculations. You must take care to make sure that the thermal radiation problem described in the VFINDAT file and the property data identified in the yet to be created TEMPLATEDAT file are compatible. This is described in more detail in Compatibility Requirements for Model and VFAC Templates, 65 and Introduction, 120. The intermediate file VFRAWDAT and the TEMPLATEDAT file may be combined to make the thermal network resistors at some later time by using the third mode.
MODE 3
In the third mode, only Parts I, III, and IV are executed. Part II, (Calculate Viewfactors) is not executed and thus there must already be in existence and available to the program a data file of raw viewfactor data, VFRAWDAT. This mode also requires a TEMPLATEDAT file of surface data for the Patran Thermal resistors that will be created. The VFCTL file is also input in this mode. The output created here is the thermal resistor network for the radiating surfaces, contained in the files VFRESDAT and VFNODEDAT, and the diagnostic data contained in the files VFDIAG and VFMSG.
This third mode allows you to change the surface property definition by changing the information contained in the TEMPLATEDAT file. Then run this mode of the Viewfactor program again. Note that in this way you may generate a new and different thermal resistor network simply by changing the TEMPLATEDAT file. You do not have to rerun the computationally expensive viewfactor calculations which were already performed in the first or second modes described above. This provides great savings of computer time in cases where the geometry does not change, but you wish to run two or more thermal analyses using different radiative surface properties. It is also useful for performing initial analysis using simpler material properties (e.g., constant properties). Once the analyst is satisfied that the problem is correctly modeled, the material properties may be changed to more closely represent reality (e.g., temperature dependent properties). By submitting simpler, computationally faster models for preliminary analysis the analyst can optimize the use of available computer resources and improve overall performance.
When using this mode you must take special care to define the radiating surfaces in such a way that they are capable of supporting all of the various material property definitions you plan to attach to each surface in the future. This method is described in more detail in Patran Thermal TEMPLATEDAT Files for Surface Property Description, 52 and Introduction, 120.