Files
create/src/Mod/Fem/test_files/frequency_analysis.inp
Przemo Firszt b25d2cd54d FEM: FemTest rework
- move test files to a separate directory
- use real life model to generate .inp files (model included)
- change format of csv node/volume files to allow direct copy&paste from .inp files
- use pre prepared real-life .dat & .frd files to test analysis results loading functions
- much more fine grained error reporting
- remove empty lines for output
- add helper function to print to console

Example run of the FEM test:

--------------- Start of FEM tests ---------------
Checking FEM new analysis...
Checking FEM new mesh...
sh: SMDS_MemoryLimit: command not found
Checking FEM new material...
Checking FEM new fixed constraint...
Checking FEM new force constraint...
Checking FEM new pressure constraint...
Checking FEM inp file prerequisites...
Checking FEM inp file write...
Setting up working directory /tmp/FEM_static
Writing /tmp/FEM_static/Mesh.inp for static analysis
Comparing /home/przemo/software/FreeCAD/build/Mod/Fem/test_files/cube_static.inp to /tmp/FEM_static/Mesh.inp
Setting up working directory to /home/przemo/software/FreeCAD/build/Mod/Fem/test_files in order to read simulated calculations
Setting base name to read test cube_static.frd file...
Checking FEM frd file read from static analysis...
Result object created as "Results"
Reading stats from result object for static analysis...
Setting analysis type to 'frequency"
Setting up working directory /tmp/FEM_frequency
Writing /tmp/FEM_frequency/Mesh.inp for frequency analysis
Comparing /home/przemo/software/FreeCAD/build/Mod/Fem/test_files/cube_frequency.inp to /tmp/FEM_frequency/Mesh.inp
Setting working directory to read simulated calculations...
Setting base name to read test cube_frequency.frd file...
Checking FEM frd file read from frequency analysis...
Last result object created as "Mode_10_results"
Reading stats from result object for frequency analysis...
--------------- End of FEM tests ---------------

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-09-21 11:16:03 -03:00

515 lines
13 KiB
Plaintext

*Node, NSET=Nall
1, 0, 0, 0
2, 0, 0, 10
3, 0, 10, 0
4, 0, 10, 10
5, 10, 0, 0
6, 10, 0, 10
7, 10, 10, 0
8, 10, 10, 10
9, 0, 0, 5
10, 0, 0, 2.5
11, 0, 0, 7.5
12, 0, 5, 0
13, 0, 2.5, 0
14, 0, 7.5, 0
15, 0, 10, 5
16, 0, 10, 2.5
17, 0, 10, 7.5
18, 0, 5, 10
19, 0, 2.5, 10
20, 0, 7.5, 10
21, 10, 0, 5
22, 10, 0, 2.5
23, 10, 0, 7.5
24, 10, 5, 0
25, 10, 2.5, 0
26, 10, 7.5, 0
27, 10, 10, 5
28, 10, 10, 2.5
29, 10, 10, 7.5
30, 10, 5, 10
31, 10, 2.5, 10
32, 10, 7.5, 10
33, 5, 0, 0
34, 2.5, 0, 0
35, 7.5, 0, 0
36, 5, 0, 10
37, 2.5, 0, 10
38, 7.5, 0, 10
39, 5, 10, 0
40, 2.5, 10, 0
41, 7.5, 10, 0
42, 5, 10, 10
43, 2.5, 10, 10
44, 7.5, 10, 10
45, 0, 5, 5
46, 0, 2.5, 2.5
47, 0, 2.5, 7.5
48, 0, 7.5, 2.5
49, 0, 7.5, 7.5
50, 0, 1.25, 3.75
51, 0, 1.25, 1.25
52, 0, 1.25, 6.25
53, 0, 2.5, 5
54, 0, 1.25, 8.75
55, 0, 6.25, 1.25
56, 0, 3.75, 1.25
57, 0, 5, 2.5
58, 0, 8.75, 1.25
59, 0, 7.5, 5
60, 0, 6.25, 3.75
61, 0, 6.25, 6.25
62, 0, 8.75, 3.75
63, 0, 8.75, 6.25
64, 0, 3.75, 3.75
65, 0, 5, 7.5
66, 0, 3.75, 6.25
67, 0, 6.25, 8.75
68, 0, 3.75, 8.75
69, 0, 8.75, 8.75
70, 10, 5, 5
71, 10, 2.5, 2.5
72, 10, 2.5, 7.5
73, 10, 7.5, 7.5
74, 10, 7.5, 2.5
75, 10, 6.25, 3.75
76, 10, 7.5, 5
77, 10, 6.25, 6.25
78, 10, 8.75, 3.75
79, 10, 8.75, 6.25
80, 10, 3.75, 1.25
81, 10, 6.25, 1.25
82, 10, 5, 2.5
83, 10, 3.75, 3.75
84, 10, 8.75, 1.25
85, 10, 5, 7.5
86, 10, 6.25, 8.75
87, 10, 3.75, 8.75
88, 10, 3.75, 6.25
89, 10, 2.5, 5
90, 10, 1.25, 6.25
91, 10, 1.25, 3.75
92, 10, 1.25, 8.75
93, 10, 8.75, 8.75
94, 10, 1.25, 1.25
95, 5, 0, 5
96, 7.5, 0, 2.5
97, 7.5, 0, 7.5
98, 2.5, 0, 2.5
99, 2.5, 0, 7.5
100, 1.25, 0, 1.25
101, 1.25, 0, 3.75
102, 1.25, 0, 6.25
103, 2.5, 0, 5
104, 1.25, 0, 8.75
105, 6.25, 0, 8.75
106, 8.75, 0, 8.75
107, 3.75, 0, 8.75
108, 5, 0, 7.5
109, 8.75, 0, 6.25
110, 6.25, 0, 3.75
111, 7.5, 0, 5
112, 6.25, 0, 6.25
113, 8.75, 0, 3.75
114, 3.75, 0, 6.25
115, 3.75, 0, 1.25
116, 8.75, 0, 1.25
117, 6.25, 0, 1.25
118, 3.75, 0, 3.75
119, 5, 0, 2.5
120, 5, 10, 5
121, 2.5, 10, 2.5
122, 7.5, 10, 2.5
123, 7.5, 10, 7.5
124, 2.5, 10, 7.5
125, 3.75, 10, 8.75
126, 6.25, 10, 8.75
127, 5, 10, 7.5
128, 1.25, 10, 8.75
129, 8.75, 10, 8.75
130, 6.25, 10, 6.25
131, 3.75, 10, 6.25
132, 1.25, 10, 6.25
133, 2.5, 10, 5
134, 3.75, 10, 3.75
135, 1.25, 10, 3.75
136, 6.25, 10, 1.25
137, 8.75, 10, 1.25
138, 3.75, 10, 1.25
139, 5, 10, 2.5
140, 1.25, 10, 1.25
141, 8.75, 10, 3.75
142, 7.5, 10, 5
143, 6.25, 10, 3.75
144, 8.75, 10, 6.25
145, 5, 5, 0
146, 2.5, 7.5, 0
147, 7.5, 7.5, 0
148, 2.5, 2.5, 0
149, 7.5, 2.5, 0
150, 1.25, 3.75, 0
151, 1.25, 1.25, 0
152, 1.25, 6.25, 0
153, 2.5, 5, 0
154, 1.25, 8.75, 0
155, 6.25, 6.25, 0
156, 7.5, 5, 0
157, 6.25, 3.75, 0
158, 3.75, 6.25, 0
159, 5, 7.5, 0
160, 8.75, 8.75, 0
161, 6.25, 8.75, 0
162, 3.75, 8.75, 0
163, 8.75, 6.25, 0
164, 8.75, 3.75, 0
165, 5, 2.5, 0
166, 3.75, 3.75, 0
167, 3.75, 1.25, 0
168, 6.25, 1.25, 0
169, 8.75, 1.25, 0
170, 5, 5, 10
171, 2.5, 7.5, 10
172, 7.5, 7.5, 10
173, 2.5, 2.5, 10
174, 7.5, 2.5, 10
175, 3.75, 1.25, 10
176, 6.25, 1.25, 10
177, 5, 2.5, 10
178, 6.25, 3.75, 10
179, 3.75, 3.75, 10
180, 8.75, 1.25, 10
181, 7.5, 5, 10
182, 6.25, 6.25, 10
183, 8.75, 3.75, 10
184, 8.75, 6.25, 10
185, 6.25, 8.75, 10
186, 3.75, 8.75, 10
187, 5, 7.5, 10
188, 8.75, 8.75, 10
189, 1.25, 8.75, 10
190, 1.25, 1.25, 10
191, 2.5, 5, 10
192, 3.75, 6.25, 10
193, 1.25, 6.25, 10
194, 1.25, 3.75, 10
195, 5, 5, 5
196, 5, 1.25, 8.75
197, 7.5, 1.25, 8.75
198, 6.25, 1.25, 7.5
199, 8.75, 8.75, 7.5
200, 7.5, 8.75, 6.25
201, 8.75, 8.75, 5
202, 7.5, 8.75, 3.75
203, 8.75, 8.75, 2.5
204, 2.5, 8.75, 1.25
205, 5, 8.75, 1.25
206, 3.75, 7.5, 1.25
207, 1.25, 1.25, 2.5
208, 2.5, 1.25, 3.75
209, 1.25, 1.25, 5
210, 7.5, 8.75, 8.75
211, 5, 8.75, 8.75
212, 6.25, 8.75, 7.5
213, 8.75, 1.25, 7.5
214, 7.5, 1.25, 6.25
215, 8.75, 1.25, 5
216, 2.5, 1.25, 1.25
217, 3.75, 1.25, 2.5
218, 5, 1.25, 1.25
219, 6.25, 2.5, 1.25
220, 7.5, 1.25, 1.25
221, 2.5, 1.25, 8.75
222, 2.5, 8.75, 8.75
223, 1.25, 5, 1.25
224, 1.25, 2.5, 1.25
225, 7.5, 8.75, 1.25
226, 8.75, 1.25, 2.5
227, 1.25, 1.25, 7.5
228, 1.25, 7.5, 1.25
229, 1.25, 2.5, 8.75
230, 3.75, 3.75, 7.5
231, 2.5, 3.75, 6.25
232, 3.75, 2.5, 6.25
233, 1.25, 8.75, 7.5
234, 1.25, 7.5, 8.75
235, 2.5, 6.25, 6.25
236, 3.75, 6.25, 7.5
237, 3.75, 7.5, 6.25
238, 1.25, 8.75, 2.5
239, 8.75, 7.5, 8.75
240, 8.75, 2.5, 8.75
241, 8.75, 7.5, 1.25
242, 8.75, 2.5, 1.25
243, 3.75, 3.75, 2.5
244, 6.25, 2.5, 3.75
245, 5, 2.5, 5
246, 5, 5, 2.5
247, 7.5, 3.75, 3.75
248, 7.5, 6.25, 3.75
249, 7.5, 5, 5
250, 2.5, 3.75, 3.75
251, 6.25, 3.75, 7.5
252, 5, 5, 7.5
253, 6.25, 6.25, 7.5
254, 5, 7.5, 5
255, 7.5, 6.25, 6.25
256, 7.5, 3.75, 6.25
257, 3.75, 7.5, 3.75
258, 2.5, 5, 5
259, 2.5, 6.25, 1.25
260, 2.5, 6.25, 3.75
261, 7.5, 3.75, 1.25
262, 6.25, 8.75, 2.5
263, 8.75, 5, 1.25
264, 2.5, 7.5, 5
265, 7.5, 5, 7.5
266, 2.5, 5, 7.5
267, 6.25, 6.25, 2.5
*Element, TYPE=C3D10, ELSET=Eall
1, 97, 174, 99, 95, 197, 196, 108, 112, 198, 114,
2, 123, 120, 73, 74, 130, 200, 199, 201, 202, 76,
3, 123, 122, 120, 74, 142, 143, 130, 201, 203, 202,
4, 121, 147, 146, 145, 205, 159, 204, 206, 155, 158,
5, 98, 95, 99, 46, 118, 114, 103, 207, 208, 209,
6, 124, 172, 123, 120, 211, 210, 127, 131, 212, 130,
7, 72, 95, 97, 96, 214, 112, 213, 215, 110, 111,
8, 98, 95, 148, 96, 118, 217, 216, 119, 110, 218,
9, 145, 149, 148, 96, 157, 165, 166, 219, 220, 218,
10, 99, 36, 173, 174, 107, 175, 221, 196, 176, 177,
11, 148, 149, 33, 96, 165, 168, 167, 218, 220, 117,
12, 97, 36, 99, 174, 105, 107, 108, 197, 176, 196,
13, 172, 42, 171, 124, 185, 186, 187, 211, 125, 222,
14, 98, 46, 99, 9, 207, 209, 103, 101, 50, 102,
15, 124, 42, 123, 172, 125, 126, 127, 211, 185, 210,
16, 48, 12, 46, 148, 55, 56, 57, 223, 150, 224,
17, 146, 147, 121, 39, 159, 205, 204, 162, 161, 138,
18, 122, 39, 121, 147, 136, 138, 139, 225, 161, 205,
19, 123, 27, 122, 74, 144, 141, 142, 201, 78, 203,
20, 73, 27, 123, 74, 79, 144, 199, 76, 78, 201,
21, 72, 96, 21, 71, 215, 113, 90, 89, 226, 91,
22, 46, 9, 47, 99, 50, 52, 53, 209, 102, 227,
23, 146, 48, 148, 12, 228, 223, 153, 152, 55, 150,
24, 97, 21, 72, 96, 109, 90, 213, 111, 113, 215,
25, 148, 33, 98, 96, 167, 115, 216, 218, 117, 119,
26, 173, 47, 99, 195, 229, 227, 221, 230, 231, 232,
27, 49, 171, 124, 195, 234, 222, 233, 235, 236, 237,
28, 124, 4, 49, 15, 128, 69, 233, 132, 17, 63,
29, 46, 1, 148, 12, 51, 151, 224, 56, 13, 150,
30, 12, 146, 48, 3, 152, 228, 55, 14, 154, 58,
31, 47, 18, 173, 2, 68, 194, 229, 54, 19, 190,
32, 48, 3, 121, 15, 58, 140, 238, 62, 16, 135,
33, 47, 2, 99, 9, 54, 104, 227, 52, 11, 102,
34, 122, 39, 147, 7, 136, 161, 225, 137, 41, 160,
35, 99, 2, 173, 36, 104, 190, 221, 107, 37, 175,
36, 4, 171, 49, 18, 189, 234, 69, 20, 193, 67,
37, 21, 96, 5, 71, 113, 116, 22, 91, 226, 94,
38, 98, 1, 46, 9, 100, 51, 207, 101, 10, 50,
39, 36, 174, 97, 6, 176, 197, 105, 38, 180, 106,
40, 124, 171, 4, 42, 222, 189, 128, 125, 186, 43,
41, 149, 5, 33, 96, 169, 35, 168, 220, 116, 117,
42, 6, 72, 97, 21, 92, 213, 106, 23, 90, 109,
43, 8, 30, 73, 172, 32, 86, 93, 188, 184, 239,
44, 174, 72, 6, 30, 240, 92, 180, 183, 87, 31,
45, 8, 123, 42, 172, 129, 126, 44, 188, 210, 185,
46, 8, 123, 73, 27, 129, 199, 93, 29, 144, 79,
47, 147, 74, 7, 24, 241, 84, 160, 163, 81, 26,
48, 148, 1, 98, 33, 151, 100, 216, 167, 34, 115,
49, 121, 3, 146, 39, 140, 154, 204, 138, 40, 162,
50, 27, 7, 122, 74, 28, 137, 141, 78, 84, 203,
51, 24, 5, 149, 71, 25, 169, 164, 80, 94, 242,
52, 146, 121, 48, 3, 204, 238, 228, 154, 140, 58,
53, 49, 4, 124, 171, 69, 128, 233, 234, 189, 222,
54, 99, 47, 173, 2, 227, 229, 221, 104, 54, 190,
55, 122, 7, 147, 74, 137, 160, 225, 203, 84, 241,
56, 97, 6, 174, 72, 106, 180, 197, 213, 92, 240,
57, 73, 123, 8, 172, 199, 129, 93, 239, 210, 188,
58, 5, 96, 149, 71, 116, 220, 169, 94, 226, 242,
59, 98, 148, 46, 1, 216, 224, 207, 100, 151, 51,
60, 195, 96, 148, 95, 244, 218, 243, 245, 110, 217,
61, 195, 148, 96, 145, 243, 218, 244, 246, 166, 219,
62, 195, 74, 71, 70, 248, 82, 247, 249, 75, 83,
63, 195, 46, 99, 95, 250, 209, 232, 245, 208, 114,
64, 195, 174, 173, 170, 251, 177, 230, 252, 178, 179,
65, 195, 172, 124, 120, 253, 211, 237, 254, 212, 131,
66, 195, 74, 73, 120, 248, 76, 255, 254, 202, 200,
67, 195, 73, 74, 70, 255, 76, 248, 249, 77, 75,
68, 71, 72, 195, 70, 89, 256, 247, 83, 88, 249,
69, 148, 46, 95, 98, 224, 208, 217, 216, 207, 118,
70, 148, 95, 46, 195, 217, 208, 224, 243, 245, 250,
71, 124, 121, 195, 120, 133, 257, 237, 131, 134, 254,
72, 49, 47, 195, 45, 65, 231, 235, 61, 66, 258,
73, 47, 46, 195, 45, 53, 250, 231, 66, 64, 258,
74, 46, 47, 195, 99, 53, 231, 250, 209, 227, 232,
75, 121, 48, 145, 146, 238, 259, 206, 204, 228, 158,
76, 121, 145, 48, 195, 206, 259, 238, 257, 246, 260,
77, 48, 148, 145, 146, 223, 166, 259, 228, 153, 158,
78, 48, 145, 148, 195, 259, 166, 223, 260, 246, 243,
79, 195, 48, 46, 148, 260, 57, 250, 243, 223, 224,
80, 195, 46, 48, 45, 250, 57, 260, 258, 64, 60,
81, 48, 49, 195, 45, 59, 235, 260, 60, 61, 258,
82, 120, 73, 172, 123, 200, 239, 212, 130, 199, 210,
83, 120, 172, 73, 195, 212, 239, 200, 254, 253, 255,
84, 195, 172, 174, 170, 253, 181, 251, 252, 182, 178,
85, 173, 171, 195, 170, 191, 236, 230, 179, 192, 252,
86, 195, 172, 171, 124, 253, 187, 236, 237, 211, 222,
87, 195, 171, 172, 170, 236, 187, 253, 252, 192, 182,
88, 195, 174, 99, 173, 251, 196, 232, 230, 177, 221,
89, 195, 99, 174, 95, 232, 196, 251, 245, 114, 198,
90, 145, 96, 71, 149, 219, 226, 261, 157, 220, 242,
91, 145, 71, 96, 195, 261, 226, 219, 246, 247, 244,
92, 195, 72, 96, 95, 256, 215, 244, 245, 214, 110,
93, 195, 96, 72, 71, 244, 215, 256, 247, 226, 89,
94, 195, 72, 73, 70, 256, 85, 255, 249, 88, 77,
95, 95, 174, 72, 97, 198, 240, 214, 112, 197, 213,
96, 95, 72, 174, 195, 214, 240, 198, 245, 256, 251,
97, 120, 147, 74, 122, 262, 241, 202, 143, 225, 203,
98, 120, 121, 147, 122, 134, 205, 262, 143, 139, 225,
99, 71, 147, 145, 149, 263, 155, 261, 242, 156, 157,
100, 147, 24, 71, 74, 163, 80, 263, 241, 81, 82,
101, 24, 147, 71, 149, 163, 263, 80, 164, 156, 242,
102, 49, 195, 15, 48, 235, 264, 63, 59, 260, 62,
103, 195, 49, 15, 124, 235, 63, 264, 237, 233, 132,
104, 15, 195, 121, 48, 264, 257, 135, 62, 260, 238,
105, 195, 15, 121, 124, 264, 135, 257, 237, 132, 133,
106, 172, 195, 30, 73, 253, 265, 184, 239, 255, 86,
107, 172, 30, 195, 174, 184, 265, 253, 181, 183, 251,
108, 195, 72, 30, 73, 256, 87, 265, 255, 85, 86,
109, 195, 30, 72, 174, 265, 87, 256, 251, 183, 240,
110, 18, 195, 47, 173, 266, 231, 68, 194, 230, 229,
111, 18, 47, 195, 49, 68, 231, 266, 67, 65, 235,
112, 171, 195, 18, 173, 236, 266, 193, 191, 230, 194,
113, 171, 18, 195, 49, 193, 266, 236, 234, 67, 235,
114, 147, 195, 71, 145, 267, 247, 263, 155, 246, 261,
115, 195, 147, 71, 74, 267, 263, 247, 248, 241, 82,
116, 120, 147, 195, 74, 262, 267, 254, 202, 241, 248,
117, 121, 147, 195, 120, 205, 267, 257, 134, 262, 254,
118, 147, 121, 195, 145, 205, 257, 267, 155, 206, 246,
***********************************************************
** Element sets for materials and FEM element type (solid, shell, beam)
** written by write_element_sets_material_and_femelement_type function
*ELSET,ELSET=MaterialSolidElements
Eall
***********************************************************
** Node set for fixed constraint
** written by write_node_sets_constraints_fixed function
*NSET,NSET=FemConstraintFixed
1,
2,
3,
4,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
***********************************************************
** Node sets for loads
** written by write_node_sets_constraints_force function
*NSET,NSET=FemConstraintForce
***********************************************************
** Materials
** written by write_materials function
** Young's modulus unit is MPa = N/mm2
*MATERIAL, NAME=TestMaterial
*ELASTIC
20000 ,
0.360
*DENSITY
1.000e-09,
*SOLID SECTION, ELSET=MaterialSolidElements, MATERIAL=TestMaterial
***********************************************************
** One step is needed to calculate the mechanical analysis of FreeCAD
** loads are applied quasi-static, means without involving the time dimension
** written by write_step_begin function
*STEP
*STATIC
***********************************************************
** Constaints
** written by write_constraints_fixed function
*BOUNDARY
FemConstraintFixed,1
FemConstraintFixed,2
FemConstraintFixed,3
***********************************************************
** Frequency analysis
** written by write_frequency function
*FREQUENCY
10,0.0,1000000.0
***********************************************************
** Outputs --> frd file
** written by write_outputs_types function
*NODE FILE
U
*EL FILE
S, E
** outputs --> dat file
*NODE PRINT , NSET=Nall
U
*EL PRINT , ELSET=Eall
S
***********************************************************
** written by write_step_end function
*END STEP
***********************************************************
** CalculiX Input file
** written by write_footer function
** written by --> FreeCAD 0.16.5527 (Git)
** written on --> Mon Sep 14 08:41:37 2015
** file name -->
** analysis name --> MechanicalAnalysis
**
**
**
** Units
**
** Geometry (mesh data) --> mm
** Materials (Young's modulus) --> N/mm2 = MPa
** Loads (nodal loads) --> N
**