For certain projects, it may be required to use the results of an analysis, such as pressures from a CFD analysis or temperatures from a Thermal analysis, to create loading conditions on a structural model. If the output from the other analysis exists in FEMAP, this can be accomplished by creating an “Output Map Data Surface” from the desired output, then referencing the Data Surface when creating a nodal or elemental load. If the output data exists in some other format outside of FEMAP, such as comma-separated values in text file (CSV File) or Excel spreadsheet, it is better to use an “Arbitrary 3-D Data Surface”.
Often, CFD or Thermal analysis is transient, leading to unique results being created for each time step. In this case, it may be necessary to create an individual “Output Map Data Surface” or “Arbitrary 3-D Data Surface” and corresponding load set for each time step, which can be time consuming for anything more than a few time steps.
This API was created to provide an example of how to automate creating load sets using CFD data. In this case, the CFD data is saved in a CSV file where the first 3 columns represent x, y, and z coordinate locations and each additional column contains the pressure value at that location for each output set (time step). See the table below for format.
Results Set 1
Results Set 2
Results Set 3
The overall structure of the API:
The user is prompted to select a csv file from the windows browser.
The user then enters the number of result sets to read, which corresponds to the number load sets which will be created.
Next, the user selects the surfaces where pressure loads should be applied.
At this point, the API reads the data in the csv file and creates an “Arbitrary 3-D Data Surface” for each result set.
The program now creates new load sets containing “mapped” pressure loads, with each load set corresponding to one of the newly generated “Arbitrary 3-D Data Surface”.
Finally, an output set is created for each newly created load set, which serves as visual representation of the pressure load distribution.
The model, csv and API files are attached below. Note that the API is just an example of what can be done. This script can be modified or edited in various ways to achieve different functionality. For example, additional code can be added to automate creating an analysis set with 3 subcases for each of the load sets.