Read and Print Results
This example demonstrates how to read and print various types of finite element analysis results from an SDRC Universal file using the DataSource interface. We’ll explore how to access displacement data, temperature gradients, stress results, and other state data from finite element models.
Quick Navigation:
- Overview
- Step 1: Initialize and Setup
- Step 2: Open File with Options
- Step 3: Error Checking and Model Loading
- Step 4: Print Displacement Results
- Step 5: Print Temperature Gradients
- Step 6: Print Stress Results
- Complete Source Code
Overview
The example performs the following main tasks:
- Parse command line arguments and validate license
- Open the file with sparse convention
- Load the finite element model and extract mesh information
- Print displacement or temperature results
- Print temperature gradient results
- Print stress results with coordinate system transformations
- Print comprehensive results data for all states
Let’s examine each step in detail.
Step 1: Initialize and Setup
First, we include necessary headers, forward-declare helper functions, and handle command line arguments:
#include "samcpp/core/core.h"
#include "samcpp/access/access.h"
#include "sam/hoops_license.h"
#include <vector>
#include <array>
#include <stdexcept>
#include <iostream>
#include <iomanip>
static void
print_displacement(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
static void
print_temperature_gradient(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
static void
print_stress(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
static void
print_result(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
static void
print_section(cae::core::LayerPosition position, int section);
/*----------------------------------------------------------------------
Read and Print Results State Data
----------------------------------------------------------------------*/
int
main(int argc, char** argv)
{
char inputFile[cae::core::MAX_NAME_LENGTH] = {};
// Check input arguments
if (argc < 2) {
std::cerr << "Usage: " << argv[0] << " inputfile [appendfile]\n";
std::cerr << " inputfile is blank, 'cantilever.unv' is assumed\n";
strcpy(inputFile, "cantilever.unv");
}
else {
strcpy(inputFile, argv[1]);
}
cae::core::license::validate(HOOPS_LICENSE);
The program provides access to results data in the “cantilever.unv” file provided along with the SDK.
Step 2: Open File with Options
Next, we create options and a DataSource, then open the input file:
// Open file
cae::access::Options options;
options.enableConvention(cae::access::Options::Convention::SPARSE);
cae::access::DataSource dataSource;
cae::core::Status status = dataSource.openFile(inputFile, &options);
The SPARSE convention. tells the DataSource to use sparse format for the results data structures.
Step 3: Error Checking and Model Loading
After opening the file, we check for errors and load the finite element model. Multiple files may be appended to build the complete model:
// Check for error
if (!status) {
std::cerr << "Error: opening file " << inputFile << '\n';
exit(1);
}
// Look for appended file
for (int i = 2; i < argc; i++) {
status = dataSource.appendFile(argv[i]);
// Check for error
if (!status) {
std::cerr << "Error: appending file " << argv[i] << " to file " << argv[1] << '\n';
exit(1);
}
}
// Instance Model object for finite element model
cae::core::Model model;
dataSource.loadModel(&model);
// Get Mesh object created in Model
cae::core::MeshPtr mesh;
model.getMesh(mesh);
int nodesCount = 0;
int elementsCount = 0;
mesh->inquire(&nodesCount, &elementsCount);
std::cout << "number of nodes= " << nodesCount << '\n';
std::cout << "number of elems= " << elementsCount << '\n';
The loadModel() method loads the finite element model, and we query the Mesh object which
contains information about nodes and elements using getMesh().
Step 4: Print Displacement Results
The first helper function searches for and prints displacement or temperature data:
static void
print_displacement(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
{
// Allocate array for state indices
int statesCount = 0;
dataSource.getStateCount(&statesCount);
std::vector<int> stateIds(statesCount);
// Search for displacement results
int foundStates = 0;
dataSource.searchState("D.*N:*", statesCount, stateIds.data(), &foundStates);
// If no displacement, search for temperature
int thermalflag = 0;
if (foundStates == 0) {
thermalflag = 1;
dataSource.searchState("TEMP.*N:*", statesCount, stateIds.data(), &foundStates);
}
The searchState() method uses pattern matching to find states. The pattern “D.*N:” searches for
displacement results at nodes, while “TEMP.*N:” searches for temperature results at nodes.
Step 5: Print Temperature Gradients
Temperature gradient results are accessed using element-based search patterns:
static void
print_temperature_gradient(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
{
int statesCount = 0;
dataSource.getStateCount(&statesCount); /* Maximum number of states */
int foundStatesCount = 0;
std::vector<int> stateIds(statesCount);
/* search for temperature gradient results states */
dataSource.searchState("TEMP_GRAD.*E:*", statesCount, stateIds.data(), &foundStatesCount);
The pattern searches for temperature gradient results at elements.
Step 6: Print Stress Results
Stress results can exist either at element (“S.*E:”) or element nodes (“S.*EL:”):
static void
print_stress(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
{
// Determine maximum number of states
int stateCount = 0;
dataSource.getStateCount(&stateCount);
std::vector<int> stateIds(stateCount, 0);
// Search for element-node and element stress results. Concatenade ids into a single array
int foundElementNodeStates = 0, foundElementStates = 0;
dataSource.searchState("S.*EL:*", stateCount, stateIds.data(), &foundElementNodeStates);
dataSource.searchState("S.*E:*", stateCount, &stateIds[foundElementNodeStates], &foundElementStates);
foundElementStates += foundElementNodeStates;
The function handles coordinate system transformations from local to global and material coordinate systems and demonstrates how to handle complex data.
Complete Source Code
The complete source code for this example can be found at: src/sam/vdm/exam/tutorial_read_result_data.cpp
You can also view the full source here:
1#include "samcpp/core/core.h"
2#include "samcpp/access/access.h"
3#include "sam/hoops_license.h"
4#include <vector>
5#include <array>
6#include <stdexcept>
7#include <iostream>
8#include <iomanip>
9
10static void
11print_displacement(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
12static void
13print_temperature_gradient(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
14static void
15print_stress(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
16static void
17print_result(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh);
18static void
19print_section(cae::core::LayerPosition position, int section);
20
21/*----------------------------------------------------------------------
22 Read and Print Results State Data
23----------------------------------------------------------------------*/
24int
25main(int argc, char** argv)
26{
27 char inputFile[cae::core::MAX_NAME_LENGTH] = {};
28 // Check input arguments
29 if (argc < 2) {
30 std::cerr << "Usage: " << argv[0] << " inputfile [appendfile]\n";
31 std::cerr << " inputfile is blank, 'cantilever.unv' is assumed\n";
32 strcpy(inputFile, "cantilever.unv");
33 }
34 else {
35 strcpy(inputFile, argv[1]);
36 }
37
38 cae::core::license::validate(HOOPS_LICENSE);
39
40 // Open file
41 cae::access::Options options;
42 options.enableConvention(cae::access::Options::Convention::SPARSE);
43 cae::access::DataSource dataSource;
44 cae::core::Status status = dataSource.openFile(inputFile, &options);
45
46 // Check for error
47 if (!status) {
48 std::cerr << "Error: opening file " << inputFile << '\n';
49 exit(1);
50 }
51 // Look for appended file
52 for (int i = 2; i < argc; i++) {
53 status = dataSource.appendFile(argv[i]);
54 // Check for error
55 if (!status) {
56 std::cerr << "Error: appending file " << argv[i] << " to file " << argv[1] << '\n';
57 exit(1);
58 }
59 }
60
61 // Instance Model object for finite element model
62 cae::core::Model model;
63 dataSource.loadModel(&model);
64
65 // Get Mesh object created in Model
66 cae::core::MeshPtr mesh;
67 model.getMesh(mesh);
68
69 int nodesCount = 0;
70 int elementsCount = 0;
71 mesh->inquire(&nodesCount, &elementsCount);
72 std::cout << "number of nodes= " << nodesCount << '\n';
73 std::cout << "number of elems= " << elementsCount << '\n';
74
75 // Access and print displacements
76 print_displacement(dataSource, mesh);
77 // Access and print temperature gradients
78 print_temperature_gradient(dataSource, mesh);
79
80 // Access and print stresses
81 print_stress(dataSource, mesh);
82 // Access and print all results
83 print_result(dataSource, mesh);
84
85 return 0;
86}
87
88cae::core::State::DerivedType
89derivedTypeFromDataLayout(cae::core::DataLayout dataLayout)
90{
91 switch (dataLayout) {
92 case cae::core::DataLayout::SCALAR:
93 return cae::core::State::DerivedType::SCALAR;
94 case cae::core::DataLayout::VECTOR:
95 return cae::core::State::DerivedType::VECTOR;
96 case cae::core::DataLayout::TENSOR_SYMMETRIC:
97 return cae::core::State::DerivedType::TENSOR;
98 case cae::core::DataLayout::TENSOR_GENERAL:
99 return cae::core::State::DerivedType::GENERALTENSOR;
100 case cae::core::DataLayout::SIX_DOF:
101 return cae::core::State::DerivedType::SIX_DOF;
102 default:
103 throw std::invalid_argument("Unexpected data layout");
104 }
105}
106
107static void
108print_displacement(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
109{
110 // Allocate array for state indices
111 int statesCount = 0;
112 dataSource.getStateCount(&statesCount);
113 std::vector<int> stateIds(statesCount);
114
115 // Search for displacement results
116 int foundStates = 0;
117 dataSource.searchState("D.*N:*", statesCount, stateIds.data(), &foundStates);
118 // If no displacement, search for temperature
119 int thermalflag = 0;
120 if (foundStates == 0) {
121 thermalflag = 1;
122 dataSource.searchState("TEMP.*N:*", statesCount, stateIds.data(), &foundStates);
123 }
124
125 if (foundStates == 0) {
126 return;
127 }
128
129 int nodesCount = 0;
130 mesh->getEntityCount(cae::core::EntityType::NODE, &nodesCount);
131
132 // Print first, middle and last node
133 int requestedNodesCount = 3;
134 int requestedNodeIds[3] = {1, nodesCount / 2, nodesCount};
135
136 cae::core::State state;
137 char stateName[cae::core::MAX_NAME_LENGTH] = {};
138 auto previousFlags = std::cout.flags();
139 std::cout << std::scientific;
140 // Loop over displacement states
141 for (int i = 0; i < foundStates; i++) {
142 cae::core::ResultMetadata resultMetadata;
143 dataSource.getMetadata(stateIds[i], &resultMetadata);
144 long long length = 0;
145 int rowsCount = 0, columnsCount = 0;
146 cae::core::DataLayout type;
147 resultMetadata.inquire(stateName, &length, &rowsCount, &columnsCount, &type);
148
149 // Print header
150 std::cout << "\n\nState: " << stateName << '\n';
151 if (thermalflag == 0) {
152 std::cout << "\nDisplacements\n";
153 }
154 else {
155 std::cout << "\nTemperatures\n";
156 }
157
158 // Load state
159 dataSource.loadState(stateName, &state);
160 int entityCount = 0;
161 cae::core::EntityType enttype, subtype;
162 cae::core::DataLayout dataLayout;
163 state.inquire(&entityCount, &enttype, &subtype, &dataLayout);
164
165 // Loop over requested nodes
166 float values[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
167 for (int n = 0; n < requestedNodesCount; n++) {
168 if (requestedNodeIds[n] == 0) {
169 continue;
170 }
171 int nodeNumber = 0;
172 mesh->getNodeAssociation<cae::core::NodeAssociationType::USER_ID>(1, &requestedNodeIds[n], &nodeNumber);
173 std::cout << std::setw(8) << nodeNumber;
174
175 float magnitude = 0.0f;
176 if (dataLayout == cae::core::DataLayout::SCALAR) {
177 state.getData(1, &requestedNodeIds[n], values);
178 std::cout << std::setw(14) << values[0] << '\n';
179 }
180 else if (dataLayout == cae::core::DataLayout::VECTOR) {
181 // Print components
182 state.getData(1, &requestedNodeIds[n], values);
183 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14) << values[2];
184 // Print magnitude
185 state.setDerivedQuantity(cae::core::State::DerivedType::VECTOR_MAGNITUDE);
186 state.getData(1, &requestedNodeIds[n], &magnitude);
187 std::cout << " magnitude= " << std::setw(14) << magnitude << '\n';
188 }
189 else if (dataLayout == cae::core::DataLayout::SIX_DOF) {
190 // Print components
191 state.getData(1, &requestedNodeIds[n], values);
192 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14) << values[2]
193 << " " << std::setw(14) << values[3] << ' ' << std::setw(14) << values[4] << ' ' << std::setw(14)
194 << values[5];
195 // Print magnitudes
196 state.setDerivedQuantity(cae::core::State::DerivedType::SIX_DOF_TRANSLATIONAL_MAGNITUDE);
197 state.getData(1, &requestedNodeIds[n], &magnitude);
198 float rotationMagnitude;
199 state.setDerivedQuantity(cae::core::State::DerivedType::SIX_DOF_ROTATIONAL_MAGNITUDE);
200 state.getData(1, &requestedNodeIds[n], &rotationMagnitude);
201 std::cout << " magnitudes= " << std::setw(14) << magnitude << ' ' << std::setw(14) << rotationMagnitude << '\n';
202 }
203 }
204 std::cout << '\n';
205
206 // Print global components if originally local components
207 cae::core::State::System systemType;
208 state.getCoordinateSystem(&systemType);
209 if (systemType == cae::core::State::System::LOCAL_UNDEFORMED) {
210 state.transformToCoordinateSystem(cae::core::State::System::GLOBAL, NULL);
211 // Loop over requested nodes
212 cae::core::State::DerivedType derivedType = derivedTypeFromDataLayout(dataLayout);
213 state.setDerivedQuantity(derivedType);
214 std::cout << "global system\n";
215 for (int n = 0; n < requestedNodesCount; n++) {
216 if (requestedNodeIds[n] == 0) {
217 continue;
218 }
219 int nodeNumber = 0;
220 mesh->getNodeAssociation<cae::core::NodeAssociationType::USER_ID>(1, &requestedNodeIds[n], &nodeNumber);
221 std::cout << std::setw(8) << nodeNumber;
222 if (dataLayout == cae::core::DataLayout::VECTOR) {
223 state.getData(1, &requestedNodeIds[n], values);
224 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14)
225 << values[2] << '\n';
226 }
227 else if (dataLayout == cae::core::DataLayout::SIX_DOF) {
228 state.getData(1, &requestedNodeIds[n], values);
229 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14)
230 << values[2] << " " << std::setw(14) << values[3] << ' ' << std::setw(14) << values[4] << ' '
231 << std::setw(14) << values[5] << '\n';
232 }
233 }
234 std::cout << '\n';
235 }
236 /* print attributes */
237 resultMetadata.printAttributes();
238 }
239 std::cout.flags(previousFlags);
240}
241
242static void
243print_temperature_gradient(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
244{
245 int statesCount = 0;
246 dataSource.getStateCount(&statesCount); /* Maximum number of states */
247 int foundStatesCount = 0;
248 std::vector<int> stateIds(statesCount);
249 /* search for temperature gradient results states */
250 dataSource.searchState("TEMP_GRAD.*E:*", statesCount, stateIds.data(), &foundStatesCount);
251
252 if (foundStatesCount == 0) {
253 return;
254 }
255
256 int elementsCount = 0;
257 int nodesCount = 0;
258 mesh->inquire(&nodesCount, &elementsCount);
259
260 // Print first, middle and last element
261 int requestedElementsCount = 3;
262 int ids[3] = {1, elementsCount / 2, elementsCount};
263
264 // Loop over states
265 cae::core::State state;
266 auto previousFlags = std::cout.flags();
267 std::cout << std::scientific;
268 for (int i = 0; i < foundStatesCount; i++) {
269 cae::core::ResultMetadata resultMetadata;
270 dataSource.getMetadata(stateIds[i], &resultMetadata);
271 char stateName[cae::core::MAX_NAME_LENGTH];
272 long long length = 0;
273 int rowsCount = 0, columnsCount = 0;
274 cae::core::DataLayout dataLayout;
275 resultMetadata.inquire(stateName, &length, &rowsCount, &columnsCount, &dataLayout);
276
277 // Print header
278 std::cout << "\n\nState: " << stateName << '\n';
279 std::cout << "\nTemperature Gradients\n";
280
281 dataSource.loadState(stateName, &state);
282
283 // Loop over requested elements
284 float values[3] = {0.0f, 0.0f, 0.0f};
285 for (int n = 0; n < requestedElementsCount; n++) {
286 if (ids[n] == 0) {
287 continue;
288 }
289 int elementNumber = 0;
290 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &ids[n], &elementNumber);
291 std::cout << std::setw(8) << ids[n] << ' ' << std::setw(8) << elementNumber;
292 state.setDerivedQuantity(cae::core::State::DerivedType::VECTOR);
293 // Print components
294 state.getData(1, &ids[n], values);
295 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14) << values[2];
296 // Print magnitude
297 state.setDerivedQuantity(cae::core::State::DerivedType::VECTOR_MAGNITUDE);
298 float magnitude = 0.0f;
299 state.getData(1, &ids[n], &magnitude);
300 std::cout << " magnitude= " << std::setw(14) << magnitude << '\n';
301 }
302 std::cout << '\n';
303
304 // Print global components if originally local components
305 cae::core::State::System systemType;
306 state.getCoordinateSystem(&systemType);
307 if (systemType == cae::core::State::System::LOCAL_UNDEFORMED) {
308 state.transformToCoordinateSystem(cae::core::State::System::GLOBAL, NULL);
309 // Loop over requested elements
310 state.setDerivedQuantity(cae::core::State::DerivedType::VECTOR);
311 std::cout << "global system\n";
312 for (int n = 0; n < requestedElementsCount; n++) {
313 if (ids[n] == 0) {
314 continue;
315 }
316 int elementNumber = 0;
317 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &ids[n], &elementNumber);
318 std::cout << std::setw(8) << ids[n] << ' ' << std::setw(8) << elementNumber;
319 state.getData(1, &ids[n], values);
320 std::cout << std::setw(14) << values[0] << ' ' << std::setw(14) << values[1] << ' ' << std::setw(14) << values[2]
321 << '\n';
322 }
323 std::cout << '\n';
324 }
325 // Print attributes
326 resultMetadata.printAttributes();
327 }
328 std::cout.flags(previousFlags);
329}
330
331static void
332print_stress(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
333{
334 // Determine maximum number of states
335 int stateCount = 0;
336 dataSource.getStateCount(&stateCount);
337
338 std::vector<int> stateIds(stateCount, 0);
339
340 // Search for element-node and element stress results. Concatenade ids into a single array
341 int foundElementNodeStates = 0, foundElementStates = 0;
342 dataSource.searchState("S.*EL:*", stateCount, stateIds.data(), &foundElementNodeStates);
343 dataSource.searchState("S.*E:*", stateCount, &stateIds[foundElementNodeStates], &foundElementStates);
344 foundElementStates += foundElementNodeStates;
345 if (foundElementStates == 0) {
346 return;
347 }
348
349 int elementCount = 0;
350 int nodeCount = 0;
351 mesh->inquire(&nodeCount, &elementCount);
352
353 // Find maximum number of element nodes
354 int maxElementNodesCount = 0;
355 mesh->getMaxElementNodes(&maxElementNodesCount);
356
357 // Allocate array to fit maximum element node data
358 std::vector<std::array<float, 6>> values(2 * maxElementNodesCount, {0.f, 0.f, 0.f, 0.f, 0.f, 0.f});
359 auto previousFlags = std::cout.flags();
360 auto previousPrecision = std::cout.precision();
361 std::cout << std::scientific << std::setprecision(5);
362
363 // Print first, middle and last element
364 int requestedElementsCount = 3;
365 int requestedElementIds[3] = {1, elementCount / 2, elementCount};
366 // Loop over stress results
367 cae::core::State state;
368 for (int i = 0; i < foundElementStates; i++) {
369 cae::core::ResultMetadata resultMetadata;
370 dataSource.getMetadata(stateIds[i], &resultMetadata);
371 char stateName[cae::core::MAX_NAME_LENGTH];
372 long long length = 0;
373 int rowsCount = 0, columnsCount = 0;
374 cae::core::DataLayout dataLayout;
375 resultMetadata.inquire(stateName, &length, &rowsCount, &columnsCount, &dataLayout);
376 if (rowsCount != 6) {
377 continue;
378 }
379 cae::core::EntityType entityType, subEntityType;
380 resultMetadata.getEntityType(&entityType, &subEntityType);
381
382 // Print header
383 std::cout << "\nState: " << stateName << '\n';
384 std::cout << "\nStresses\n";
385
386 dataSource.loadState(stateName, &state);
387
388 // Print stress components first
389 state.setDerivedQuantity(cae::core::State::DerivedType::TENSOR);
390
391 // Loop over requested elements
392 int nodesInElement = 0;
393 cae::core::ComplexMode complexMode;
394 state.getComplexMode(&complexMode);
395 for (int n = 0; n < requestedElementsCount; n++) {
396 if (requestedElementIds[n] == 0) {
397 continue;
398 }
399 int elementNumber = 0;
400 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &requestedElementIds[n], &elementNumber);
401 std::cout << std::setw(8) << elementNumber << ", component stresses\n";
402
403 nodesInElement = 1;
404 // If result in element nodes, get number of nodes
405 if (subEntityType == cae::core::EntityType::NODE) {
406 mesh->getElementEntityCount(cae::core::EntityType::NODE, requestedElementIds[n], &nodesInElement);
407 }
408 state.getData(1, &requestedElementIds[n], (float*)values.data());
409
410 // Loop over nodes in element
411 for (int j = 0; j < nodesInElement; j++) {
412 if (complexMode == cae::core::ComplexMode::REAL) {
413 std::cout << ' ' << std::setw(12) << values[j][0] << ' ' << std::setw(12) << values[j][1] << ' '
414 << std::setw(12) << values[j][2] << ' ' << std::setw(12) << values[j][3] << ' ' << std::setw(12)
415 << values[j][4] << ' ' << std::setw(12) << values[j][5] << '\n';
416 }
417 else {
418 float (*complexValues)[12];
419 complexValues = (float (*)[12])values.data();
420 std::cout << ' ' << std::setw(12) << complexValues[j][0] << ' ' << std::setw(12) << complexValues[j][1]
421 << "(i) " << std::setw(12) << complexValues[j][2] << ' ' << std::setw(12) << complexValues[j][3]
422 << "(i) " << std::setw(12) << complexValues[j][4] << ' ' << std::setw(12) << complexValues[j][5]
423 << "(i)\n";
424 std::cout << ' ' << std::setw(12) << complexValues[j][6] << ' ' << std::setw(12) << complexValues[j][7]
425 << "(i) " << std::setw(12) << complexValues[j][8] << ' ' << std::setw(12) << complexValues[j][9]
426 << "(i) " << std::setw(12) << complexValues[j][10] << ' ' << std::setw(12) << complexValues[j][11]
427 << "(i)\n";
428 }
429 }
430 }
431 // Skip derived quantities if complex data
432 if (complexMode != cae::core::ComplexMode::REAL) {
433 continue;
434 }
435
436 // Print mean stress
437 state.setDerivedQuantity(cae::core::State::DerivedType::TENSOR_MEAN);
438
439 // Loop over requested elements
440 for (int n = 0; n < requestedElementsCount; n++) {
441 if (requestedElementIds[n] == 0) {
442 continue;
443 }
444 int elementNumber = 0;
445 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &requestedElementIds[n], &elementNumber);
446 std::cout << std::setw(8) << elementNumber << ", mean stress\n";
447
448 nodesInElement = 1;
449 // If result in element nodes, get number of nodes
450 if (subEntityType == cae::core::EntityType::NODE) {
451 mesh->getElementEntityCount(cae::core::EntityType::NODE, requestedElementIds[n], &nodesInElement);
452 }
453 std::vector<float> meanValues(maxElementNodesCount, 0.0f);
454 state.getData(1, &requestedElementIds[n], meanValues.data());
455
456 // Loop over nodes in element
457 for (int j = 0; j < nodesInElement; j++) {
458 std::cout << ' ' << std::setw(12) << meanValues[j] << '\n';
459 }
460 }
461 std::cout << '\n';
462
463 state.setDerivedQuantity(cae::core::State::DerivedType::TENSOR);
464
465 // Print stress in global system if originally in local system
466 cae::core::State::System systemType;
467 state.getCoordinateSystem(&systemType);
468 if (systemType == cae::core::State::System::LOCAL_UNDEFORMED || systemType == cae::core::State::System::LOCAL_DEFORMED) {
469 cae::core::State stateRotang;
470 if (systemType == cae::core::State::System::LOCAL_DEFORMED) {
471 char rotangStateName[cae::core::MAX_NAME_LENGTH] = {};
472 resultMetadata.getAttributeValueString("Link.RotAng", rotangStateName);
473 dataSource.loadState(rotangStateName, &stateRotang);
474 state.setLocalCoordinateSystemDirectionCosines(&stateRotang);
475 }
476 state.transformToCoordinateSystem(cae::core::State::System::GLOBAL, NULL);
477 std::cout << "global system\n";
478
479 // Loop over requested elements
480 for (int n = 0; n < requestedElementsCount; n++) {
481 if (requestedElementIds[n] == 0) {
482 continue;
483 }
484 int elementNumber = 0;
485 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &requestedElementIds[n],
486 &elementNumber);
487 std::cout << std::setw(8) << elementNumber << ", component stresses\n";
488
489 nodesInElement = 1;
490 // If result in element nodes, get number of nodes
491 if (subEntityType == cae::core::EntityType::NODE) {
492 mesh->getElementEntityCount(cae::core::EntityType::NODE, requestedElementIds[n], &nodesInElement);
493 }
494 state.getData(1, &requestedElementIds[n], (float*)values.data());
495
496 // Loop over nodes in element
497 for (int j = 0; j < nodesInElement; j++) {
498 std::cout << ' ' << std::setw(12) << values[j][0] << ' ' << std::setw(12) << values[j][1] << ' '
499 << std::setw(12) << values[j][2] << ' ' << std::setw(12) << values[j][3] << ' ' << std::setw(12)
500 << values[j][4] << ' ' << std::setw(12) << values[j][5] << '\n';
501 }
502 }
503 }
504 std::cout << '\n';
505
506 // Print in material system
507 cae::core::Status successfullyTransformedCoordinateSystem =
508 state.transformToCoordinateSystem(cae::core::State::System::MATERIAL, NULL);
509 if (!successfullyTransformedCoordinateSystem) {
510 continue;
511 }
512 // Loop over requested elements
513 std::cout << "material system\n";
514 for (int n = 0; n < requestedElementsCount; n++) {
515 if (requestedElementIds[n] == 0) {
516 continue;
517 }
518 int elementNumber = 0;
519 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &requestedElementIds[n], &elementNumber);
520 std::cout << std::setw(8) << elementNumber << ", component stresses\n";
521
522 nodesInElement = 1;
523 // If element node get number of nodes
524 if (subEntityType == cae::core::EntityType::NODE) {
525 mesh->getElementEntityCount(cae::core::EntityType::NODE, requestedElementIds[n], &nodesInElement);
526 }
527 state.getData(1, &requestedElementIds[n], (float*)values.data());
528
529 // Loop over nodes in element
530 for (int j = 0; j < nodesInElement; j++) {
531 std::cout << ' ' << std::setw(12) << values[j][0] << ' ' << std::setw(12) << values[j][1] << ' ' << std::setw(12)
532 << values[j][2] << ' ' << std::setw(12) << values[j][3] << ' ' << std::setw(12) << values[j][4] << ' '
533 << std::setw(12) << values[j][5] << '\n';
534 }
535 }
536 resultMetadata.printAttributes();
537 }
538 std::cout.flags(previousFlags);
539 std::cout.precision(previousPrecision);
540}
541
542static void
543print_result(cae::access::DataSource& dataSource, cae::core::MeshPtr& mesh)
544{
545 int maxElementNodesCount = 0;
546 mesh->getMaxElementNodes(&maxElementNodesCount);
547 std::vector<int> connectivity(maxElementNodesCount);
548
549 cae::core::State state;
550 auto previousFlags = std::cout.flags();
551 std::cout << std::scientific;
552
553 std::vector<float> resultData;
554 std::vector<cae::core::LayerPosition> position;
555 std::vector<int> layer;
556 int maxDataSize = 0;
557 int maxSectionSize = 0;
558 // Loop over states
559 cae::core::ListPtr<char> stateNames;
560 int stateCount = 0;
561 dataSource.getStateCount(&stateCount);
562 dataSource.getStateNames(stateNames);
563 for (int nameIndex = 0; nameIndex < stateCount; nameIndex++) {
564 cae::core::Pointer<char> name;
565 stateNames->get(nameIndex, name);
566
567 cae::core::ResultMetadata resultMetadata;
568 dataSource.getMetadata(name.get(), &resultMetadata);
569
570 // Get DataType attribute
571 char dataType[cae::core::MAX_NAME_LENGTH];
572 resultMetadata.getAttributeValueString("DataType", dataType);
573
574 // Get Contents attribute
575 char contents[cae::core::MAX_NAME_LENGTH];
576 resultMetadata.getAttributeValueString("Contents", contents);
577
578 // Get result physical dimensions
579 char dimensions[cae::core::MAX_NAME_LENGTH] = {};
580 resultMetadata.getDimensions(dimensions);
581
582 // Print name
583 std::cout << "\n\nState: " << name.get() << '\n';
584
585 // Print DataType, Contents and dimensions
586 std::cout << "DataType: " << dataType << '\n';
587 std::cout << "Contents: " << contents << '\n';
588 std::cout << "Dimensions: " << dimensions << '\n';
589 cae::core::EntityType entityType, subentityType;
590 resultMetadata.getEntityType(&entityType, &subentityType);
591 // Skip states with DOF entity type
592 if (entityType == cae::core::EntityType::DOF) {
593 resultMetadata.printAttributes();
594 continue;
595 }
596
597 dataSource.loadState(name.get(), &state);
598 int entitiesCount = 0;
599 cae::core::DataLayout dataLayout;
600 state.inquire(&entitiesCount, &entityType, &subentityType, &dataLayout);
601
602 // Maximum data size, number of locations and sections
603 int dataSize = 0;
604 int sectionDataSize = 0;
605 int maxLocationSize = 0;
606 state.getMaxDataCount(&dataSize, &maxLocationSize, §ionDataSize);
607 if (dataSize > maxDataSize) {
608 maxDataSize = dataSize;
609 resultData.resize(maxDataSize);
610 }
611 if (sectionDataSize > maxSectionSize) {
612 maxSectionSize = sectionDataSize;
613 position.resize(maxSectionSize);
614 layer.resize(maxSectionSize);
615 }
616
617 // Query local or global system
618 cae::core::State::System systemType;
619 state.getCoordinateSystem(&systemType);
620 if (systemType == cae::core::State::System::GLOBAL) {
621 std::cout << "system= Global\n";
622 }
623 else {
624 std::cout << "system= Local\n";
625 }
626 int engineeringStrainFlag = 0;
627 state.getEngineeringStrainFlag(&engineeringStrainFlag);
628 if (engineeringStrainFlag) {
629 std::cout << "strain= Engineering\n";
630 }
631
632 int numberOfComponents = 0;
633 state.getDerivedQuantityComponentCount(&numberOfComponents);
634
635 // Return all sections
636 state.setSection(0);
637
638 // Loop through all entities
639 for (int index = 1; index <= entitiesCount; index++) {
640 // Select entities to ignore for whatever reason
641 if (index != 1)
642 continue;
643 // Print entity id
644 int id = 0;
645 if (entityType == cae::core::EntityType::NODE) {
646 mesh->getNodeAssociation<cae::core::NodeAssociationType::USER_ID>(1, &index, &id);
647 std::cout << "node= " << id << '\n';
648 }
649 else if (entityType == cae::core::EntityType::ELEMENT || entityType == cae::core::EntityType::FACE ||
650 entityType == cae::core::EntityType::EDGE) {
651 mesh->getElementAssociation<cae::core::ElementAssociationType::USER_ID>(1, &index, &id);
652 std::cout << "elem= " << id << '\n';
653 }
654 else if (entityType == cae::core::EntityType::MODE) {
655 std::cout << "mode= " << id << '\n';
656 }
657 // Check if data defined
658 int dataStatus = 0;
659 state.getStatus(1, &index, &dataStatus);
660 if (dataStatus == 0) {
661 std::cout << " no data\n";
662 continue;
663 }
664
665 // Get results data for entity
666 state.getData(1, &index, resultData.data());
667 // Print data at nodes
668 if (entityType == cae::core::EntityType::NODE) {
669 for (int j = 0; j < numberOfComponents; j++) {
670 std::cout << ' ' << resultData[j];
671 }
672 std::cout << '\n';
673 }
674 // Print data at element faces or edges
675 else if (entityType == cae::core::EntityType::FACE || entityType == cae::core::EntityType::EDGE) {
676 int elementEntityCount = 0;
677 int elementEntities[cae::core::MAX_J] = {};
678 state.getElementEntities(index, &elementEntityCount, elementEntities);
679 // Element face or edge
680 if (subentityType == cae::core::EntityType::NONE) {
681 for (int k = 0; k < elementEntityCount; k++) {
682 std::cout << std::setw(4) << elementEntities[k];
683 for (int j = 0; j < numberOfComponents; j++) {
684 std::cout << ' ' << resultData[k * numberOfComponents + j];
685 }
686 std::cout << '\n';
687 }
688 }
689 // Element face or edge node
690 else {
691 for (int k = 0; k < elementEntityCount; k++) {
692 std::cout << std::setw(4) << elementEntities[k];
693 int nodesInElement = 0;
694 mesh->getElementEntityConnectivity(entityType, index, elementEntities[k], &nodesInElement,
695 connectivity.data());
696 for (int n = 0; n < nodesInElement; n++) {
697 std::cout << std::setw(4) << (n + 1);
698 for (int j = 0; j < numberOfComponents; j++) {
699 std::cout << ' '
700 << resultData[k * numberOfComponents * nodesInElement + n * numberOfComponents + j];
701 }
702 std::cout << '\n';
703 }
704 }
705 }
706 }
707 // Print data at elements
708 else if (entityType == cae::core::EntityType::ELEMENT) {
709 int numberOfSections = 0;
710 state.getSectionCount(1, &index, &numberOfSections);
711 // Get layer position
712 state.getLayerInformation(index, position.data(), layer.data());
713 // Element
714 if (subentityType == cae::core::EntityType::NONE) {
715 for (int k = 0; k < numberOfSections; k++) {
716 if (numberOfSections > 1) {
717 print_section(position[k], layer[k]);
718 }
719 for (int j = 0; j < numberOfComponents; j++) {
720 std::cout << ' ' << resultData[k * numberOfComponents + j];
721 }
722 std::cout << '\n';
723 }
724 }
725 // Element node
726 else {
727 int nodesInElement = 0;
728 mesh->getElementNodes(index, &nodesInElement, connectivity.data());
729 for (int k = 0; k < numberOfSections; k++) {
730 if (numberOfSections > 1) {
731 print_section(position[k], layer[k]);
732 }
733 for (int n = 0; n < nodesInElement; n++) {
734 int node = 0;
735 mesh->getNodeAssociation<cae::core::NodeAssociationType::USER_ID>(1, &connectivity[n], &node);
736 std::cout << "node= " << node << '\n';
737 for (int j = 0; j < numberOfComponents; j++) {
738 std::cout << ' '
739 << resultData[k * numberOfComponents * nodesInElement + n * numberOfComponents + j];
740 }
741 std::cout << '\n';
742 }
743 }
744 }
745 }
746 // Print data at modes
747 else if (entityType == cae::core::EntityType::MODE) {
748 for (int j = 0; j < numberOfComponents; j++) {
749 std::cout << ' ' << resultData[j];
750 }
751 std::cout << '\n';
752 }
753 }
754 resultMetadata.printAttributes();
755 }
756 std::cout.flags(previousFlags);
757}
758
759/*----------------------------------------------------------------------
760 print section and type
761----------------------------------------------------------------------*/
762static void
763print_section(cae::core::LayerPosition position, int section)
764{
765 std::cout << "section= " << section;
766 if (position == cae::core::LayerPosition::NONE) {
767 std::cout << " none";
768 }
769 else if (position == cae::core::LayerPosition::MIDDLE) {
770 std::cout << " middle";
771 }
772 else if (position == cae::core::LayerPosition::BOTTOM) {
773 std::cout << " bottom";
774 }
775 else if (position == cae::core::LayerPosition::TOP) {
776 std::cout << " top";
777 }
778 else if (position == cae::core::LayerPosition::INTEGRATION_POINT) {
779 std::cout << " eip";
780 }
781 std::cout << '\n';
782}
This example demonstrates how to read and print various types of finite element analysis results from an SDRC Universal file using the LMan (Library Manager) interface. We’ll explore how to access displacement data, temperature gradients, stress results, and other state data from finite element models.
Quick Navigation:
- Overview
- Step 1: Initialize and Setup
- Step 2: Open File with Options
- Step 3: Error Checking and Model Loading
- Step 4: Print Displacement Results
- Step 5: Print Temperature Gradients
- Step 6: Print Stress Results
Overview
The example performs the following main tasks:
- Parse command line arguments and validate license
- Open the file with sparse convention
- Load the finite element model and extract mesh information
- Print displacement or temperature results
- Print temperature gradient results
- Print stress results with coordinate system transformations
- Print comprehensive results data for all states
- Clean up resources
Let’s examine each step in detail.
Step 1: Initialize and Setup
First, we include necessary headers, forward-declare five analysis functions that will be called, and handle command line arguments:
#include <stdlib.h>
#include "sam/base/base.h"
#include "sam/vis/visdata.h"
#include "sam/vdm/vdm.h"
#include "sam/base/license.h"
#include "sam/hoops_license.h"
static void
print_displacement(vdm_LMan* lman, vis_Connect* connect);
static void
print_temperature_gradient(vdm_LMan* lman, vis_Connect* connect);
static void
print_stress(vdm_LMan* lman, vis_Connect* connect);
static void
print_result(vdm_LMan* lman, vis_Connect* connect);
static void
print_section(Vint position, Vint section);
int main(int argc, char** argv)
{
char inputFile[256];
/* check input arguments */
if (argc < 2) {
fprintf(stderr, "Usage: %s inputfile [appendfile]\n", argv[0]);
fprintf(stderr, " inputfile is blank, 'cantilever.unv' is assumed\n");
strcpy(inputFile, "cantilever.unv");
}
else {
strcpy(inputFile, argv[1]);
}
vsy_LicenseValidate(HOOPS_LICENSE);
The program provides access to results data in the “cantilever.unv” file provided along with the SDK.
The license is validated using the vsy_LicenseValidate() function.
Step 2: Open File with Options
Next, we create options and a Library Manager, then open the input file:
/* Open file */
vdm_Options* options = vdm_OptionsBegin();
vdm_OptionsAddConvention(options, VDM_CONVENTION_SPARSE);
vdm_LMan* lman = vdm_LManBegin();
vdm_LManOpenFile(lman, inputFile, options);
The VDM_CONVENTION_SPARSE option tells the Library Manager to use sparse format for the results data structures.
Step 3: Error Checking and Model Loading
After opening the file, we check for errors and load the finite element model. The finite element model might be split among several files. Multiple files may be appended to build the complete model.
/* check for error */
Vint ierr = vdm_LManError(lman);
if (ierr) {
fprintf(stderr, "Error: opening file %s\n", inputFile);
vdm_LManCloseFile(lman);
vdm_LManEnd(lman);
exit(1);
}
/* look for appended file */
for (Vint i = 2; i < argc; i++) {
vdm_LManAppend(lman, argv[i]);
/* check for error */
ierr = vdm_LManError(lman);
if (ierr) {
fprintf(stderr, "Error: appending file %s to file %s\n", argv[i], argv[1]);
exit(1);
}
}
/* instance Model object for finite element model */
vis_Model* model = vis_ModelBegin();
vdm_LManLoadModel(lman, model);
/* get Connect object created in Model */
vis_Connect* connect;
vis_ModelGetObject(model, VIS_CONNECT, (Vobject**)&connect);
Vint nodesCount = 0;
Vint elementsCount = 0;
vis_ConnectNumber(connect, SYS_NODE, &nodesCount);
vis_ConnectNumber(connect, SYS_ELEM, &elementsCount);
printf("number of nodes= %d\n", nodesCount);
printf("number of elems= %d\n", elementsCount);
The vdm_LManLoadModel() function loads the finite element model, and we query the Connect
(Finite Element Mesh) object which contains information about nodes and elements.
Now the analysis functions will be called to print results contained in the file. The following sections highlight how to query different state results. The complete analysis functions can be consulted at the end of this document.
Step 4: Print Displacement Results
The first analysis function searches for and prints displacement or temperature data:
static void
print_displacement(vdm_LMan* lman, vis_Connect* connect)
{
/* allocate array for state indices */
Vint statesCount = vdm_LManGetNumStates(lman);
Vint* stateIds = (Vint*)malloc(statesCount * sizeof(Vint));
/* search for displacement results */
Vint thermalflag = 0;
Vint foundStates = 0;
vdm_LManSearchState(lman, (Vchar*)"D.*N:*", statesCount, stateIds, &foundStates);
/* if no displacement, search for temperature */
if (foundStates == 0) {
thermalflag = 1;
vdm_LManSearchState(lman, (Vchar*)"TEMP.*N:*", statesCount, stateIds, &foundStates);
}
The vdm_LManSearchState() function uses pattern matching to find states. The pattern “D.*N:” searches for
displacement results at nodes, while “TEMP.*N:” searches for temperature results at nodes.
Step 5: Print Temperature Gradients
Temperature gradient results are accessed using element-based search patterns:
static void
print_temperature_gradient(vdm_LMan* lman, vis_Connect* connect)
{
/* allocate array for state ids */
Vint statesCount = vdm_LManGetNumStates(lman); /* Maximum number of states */
Vint foundStatesCount;
Vint* stateIds = (Vint*)malloc(statesCount * sizeof(Vint));
/* search for temp gradient results states */
vdm_LManSearchState(lman, (Vchar*)"TEMP_GRAD.*E:*", statesCount, stateIds, &foundStatesCount);
The pattern searches for temperature gradient results at elements.
Step 6: Print Stress Results
Stress results can exist either at element (“S.*E:”) or element nodes (“S.*EL:”)
{
/* determine maximum number of states */
Vint stateCount = vdm_LManGetNumStates(lman);
/* allocate array for state ids */
Vint* stateIds = (Vint*)malloc(stateCount * sizeof(Vint));
/* search for stress results */
Vint foundElementNodeStates, foundElementStates;
vdm_LManSearchState(lman, (Vchar*)"S.*EL:*", stateCount, stateIds, &foundElementNodeStates);
vdm_LManSearchState(lman, (Vchar*)"S.*E:*", stateCount, &stateIds[foundElementNodeStates], &foundElementStates);
foundElementStates += foundElementNodeStates;
Expected Output
When you run this example with a finite element results file, you’ll see output similar to:
inputfile is blank, 'cantilever.unv' is assumed
number of nodes= 54
number of elems= 16
State: D.N:1
Displacements
1 -9.230210e-06 1.306880e-05 -2.263050e-06 0.000000e+00 0.000000e+00 0.000000e+00 magnitudes= 1.615895e-05 0.000000e+00
27 1.542860e-03 0.000000e+00 2.042800e-04 0.000000e+00 0.000000e+00 0.000000e+00 magnitudes= 1.556325e-03 0.000000e+00
71 2.422690e-03 0.000000e+00 4.395600e-04 0.000000e+00 0.000000e+00 0.000000e+00 magnitudes= 2.462243e-03 0.000000e+00
Number of attributes: 8
Attribute: Contents
Displacement
Attribute: DataType
SixDof
Attribute: Title
Model Solution
Attribute: Subtitle
eal151
Attribute: Label
NONE
Attribute: Subtitle1
LOAD SET 1
Attribute: Subtitle2
The time of Analysis was 07-FEB-92 09:24:57
Attribute: DataSource
8
State: S.EL:1
Stresses
1, component stresses
-1.35003e+01 -8.38511e+00 1.12018e+03 -7.79565e+00 -2.52455e+00 1.44065e+02
-8.33268e+00 -1.07724e+00 2.55085e+00 -7.83698e+00 2.58379e+00 1.44024e+02
-8.79312e+00 -2.01625e+00 2.20099e+00 7.85502e-01 -1.72745e+00 1.30986e+02
-1.22480e+01 -7.61143e+00 1.12496e+03 8.26834e-01 1.78669e+00 1.30945e+02
1.33218e+01 2.09337e+01 1.12440e+03 3.35758e+00 -1.66821e+00 1.45778e+02
9.86690e+00 2.37418e+00 -1.84306e+00 3.39891e+00 1.72745e+00 1.45736e+02
9.90244e+00 1.60050e+00 -2.02759e+00 -5.22357e+00 -2.58379e+00 1.29274e+02
1.50700e+01 2.18728e+01 1.12936e+03 -5.26490e+00 2.64303e+00 1.29232e+02
8, component stresses
-1.33218e+01 -2.09338e+01 7.55958e+01 -3.35759e+00 -1.66821e+00 1.45778e+02
-9.86689e+00 -2.37417e+00 1.84306e+00 -3.39892e+00 1.72745e+00 1.45736e+02
-9.90243e+00 -1.60049e+00 2.02759e+00 5.22357e+00 -2.58379e+00 1.29274e+02
-1.50700e+01 -2.18728e+01 7.06423e+01 5.26490e+00 2.64303e+00 1.29232e+02
1.35003e+01 8.38512e+00 7.98244e+01 7.79566e+00 -2.52455e+00 1.44065e+02
8.33267e+00 1.07724e+00 -2.55084e+00 7.83699e+00 2.58379e+00 1.44024e+02
8.79308e+00 2.01624e+00 -2.20099e+00 -7.85498e-01 -1.72745e+00 1.30986e+02
1.22480e+01 7.61144e+00 7.50362e+01 -8.26827e-01 1.78670e+00 1.30945e+02
16, component stresses
-3.74542e+01 -4.61229e+01 1.50522e+02 -3.28346e+00 -4.59830e+00 6.63873e+01
-3.38178e+01 -2.54974e+01 7.89113e+01 -3.32260e+00 1.87741e+00 6.63482e+01
-3.46862e+01 -2.55704e+01 7.43942e+01 3.96054e+00 -1.76416e+00 5.86416e+01
-3.83330e+01 -4.62064e+01 1.45974e+02 3.99968e+00 -9.56736e-01 5.86024e+01
3.41201e+01 1.24256e+01 1.54085e+02 5.11281e+00 -4.60354e+00 6.63768e+01
3.04733e+01 1.12017e+01 7.51914e+01 5.15195e+00 1.88264e+00 6.63377e+01
3.00746e+01 1.12852e+01 7.08309e+01 -2.13119e+00 -1.75893e+00 5.86521e+01
3.37109e+01 1.24986e+01 1.49693e+02 -2.17033e+00 -9.61969e-01 5.86129e+01
1, mean stress
3.66098e+02
-2.28636e+00
-2.86946e+00
3.68367e+02
3.86219e+02
3.46601e+00
3.15845e+00
3.88768e+02
8, mean stress
1.37801e+01
-3.46600e+00
-3.15844e+00
1.12332e+01
3.39033e+01
2.28636e+00
2.86944e+00
3.16319e+01
16, mean stress
2.23150e+01
6.53203e+00
4.71253e+00
2.04782e+01
6.68769e+01
3.89555e+01
3.73969e+01
6.53008e+01
material system
1, component stresses
-1.35003e+01 -8.38511e+00 1.12018e+03 -7.79565e+00 -2.52455e+00 1.44065e+02
-8.33268e+00 -1.07724e+00 2.55085e+00 -7.83698e+00 2.58379e+00 1.44024e+02
-8.79312e+00 -2.01625e+00 2.20099e+00 7.85502e-01 -1.72745e+00 1.30986e+02
-1.22480e+01 -7.61143e+00 1.12496e+03 8.26834e-01 1.78669e+00 1.30945e+02
1.33218e+01 2.09337e+01 1.12440e+03 3.35758e+00 -1.66821e+00 1.45778e+02
9.86690e+00 2.37418e+00 -1.84306e+00 3.39891e+00 1.72745e+00 1.45736e+02
9.90244e+00 1.60050e+00 -2.02759e+00 -5.22357e+00 -2.58379e+00 1.29274e+02
1.50700e+01 2.18728e+01 1.12936e+03 -5.26490e+00 2.64303e+00 1.29232e+02
8, component stresses
-1.33218e+01 -2.09338e+01 7.55958e+01 -3.35759e+00 -1.66821e+00 1.45778e+02
-9.86689e+00 -2.37417e+00 1.84306e+00 -3.39892e+00 1.72745e+00 1.45736e+02
-9.90243e+00 -1.60049e+00 2.02759e+00 5.22357e+00 -2.58379e+00 1.29274e+02
-1.50700e+01 -2.18728e+01 7.06423e+01 5.26490e+00 2.64303e+00 1.29232e+02
1.35003e+01 8.38512e+00 7.98244e+01 7.79566e+00 -2.52455e+00 1.44065e+02
8.33267e+00 1.07724e+00 -2.55084e+00 7.83699e+00 2.58379e+00 1.44024e+02
8.79308e+00 2.01624e+00 -2.20099e+00 -7.85498e-01 -1.72745e+00 1.30986e+02
1.22480e+01 7.61144e+00 7.50362e+01 -8.26827e-01 1.78670e+00 1.30945e+02
16, component stresses
-3.74542e+01 -4.61229e+01 1.50522e+02 -3.28346e+00 -4.59830e+00 6.63873e+01
-3.38178e+01 -2.54974e+01 7.89113e+01 -3.32260e+00 1.87741e+00 6.63482e+01
-3.46862e+01 -2.55704e+01 7.43942e+01 3.96054e+00 -1.76416e+00 5.86416e+01
-3.83330e+01 -4.62064e+01 1.45974e+02 3.99968e+00 -9.56736e-01 5.86024e+01
3.41201e+01 1.24256e+01 1.54085e+02 5.11281e+00 -4.60354e+00 6.63768e+01
3.04733e+01 1.12017e+01 7.51914e+01 5.15195e+00 1.88264e+00 6.63377e+01
3.00746e+01 1.12852e+01 7.08309e+01 -2.13119e+00 -1.75893e+00 5.86521e+01
3.37109e+01 1.24986e+01 1.49693e+02 -2.17033e+00 -9.61969e-01 5.86129e+01
Number of attributes: 9
Attribute: Contents
Stress
Attribute: DataType
Tensor
Attribute: Structure
ElementNode
Attribute: Title
Model Solution
Attribute: Subtitle
eal151
Attribute: Label
NONE
Attribute: Subtitle1
LOAD SET 1
Attribute: Subtitle2
The time of Analysis was 07-FEB-92 09:24:59
Attribute: DataSource
2
State: D.N:1
DataType: SixDof
Contents: Displacement
Dimensions: L,Rad
system= Global
node= 1
-9.230210e-06 1.306880e-05 -2.263050e-06 0.000000e+00 0.000000e+00 0.000000e+00
Number of attributes: 8
Attribute: Contents
Displacement
Attribute: DataType
SixDof
Attribute: Title
Model Solution
Attribute: Subtitle
eal151
Attribute: Label
NONE
Attribute: Subtitle1
LOAD SET 1
Attribute: Subtitle2
The time of Analysis was 07-FEB-92 09:24:57
Attribute: DataSource
8
State: R.N:1
DataType: SixDof
Contents: Reaction Force
Dimensions: ML/T2,ML2/T2
system= Global
node= 1
no data
Number of attributes: 8
Attribute: Contents
Reaction Force
Attribute: DataType
SixDof
Attribute: Title
Model Solution
Attribute: Subtitle
eal151
Attribute: Label
NONE
Attribute: Subtitle1
LOAD SET 1
Attribute: Subtitle2
The time of Analysis was 07-FEB-92 09:24:58
Attribute: DataSource
9
State: S.EL:1
DataType: Tensor
Contents: Stress
Dimensions: M/LT2
system= Global
elem= 1
node= 1
-1.350030e+01 -8.385110e+00 1.120180e+03 -7.795650e+00 -2.524550e+00 1.440650e+02
node= 2
-8.332680e+00 -1.077240e+00 2.550850e+00 -7.836980e+00 2.583790e+00 1.440240e+02
node= 4
-8.793120e+00 -2.016250e+00 2.200990e+00 7.855020e-01 -1.727450e+00 1.309860e+02
node= 3
-1.224800e+01 -7.611430e+00 1.124960e+03 8.268340e-01 1.786690e+00 1.309450e+02
node= 5
1.332180e+01 2.093370e+01 1.124400e+03 3.357580e+00 -1.668210e+00 1.457780e+02
node= 6
9.866900e+00 2.374180e+00 -1.843060e+00 3.398910e+00 1.727450e+00 1.457360e+02
node= 8
9.902440e+00 1.600500e+00 -2.027590e+00 -5.223570e+00 -2.583790e+00 1.292740e+02
node= 7
1.507000e+01 2.187280e+01 1.129360e+03 -5.264900e+00 2.643030e+00 1.292320e+02
Number of attributes: 9
Attribute: Contents
Stress
Attribute: DataType
Tensor
Attribute: Structure
ElementNode
Attribute: Title
Model Solution
Attribute: Subtitle
eal151
Attribute: Label
NONE
Attribute: Subtitle1
LOAD SET 1
Attribute: Subtitle2
The time of Analysis was 07-FEB-92 09:24:59
Attribute: DataSource
2