Commit Graph

35 Commits

Author SHA1 Message Date
Jean-Marie Verdun
47f21309dd FEM: Make FEM compatible with SMESH7 2016-06-15 22:34:10 +02:00
Bernd Hahnebach
f1858cfdbf FEM: multiple solver are possible in one analysis, use the selected for calculation run 2016-06-03 07:29:29 +02:00
Bernd Hahnebach
fca5cd99bb FEM: add preference setting to keep results on rerun an analysis 2016-05-29 12:02:29 -03:00
Bernd Hahnebach
610b4b2bba FEM: add module FemToolsCcx.py and make use of it
- move construktor from FemTools to FemToolsCcx
- FemComands and his childs, use the new FemToolsCcx class instead of super class FemTools
- TestFem, use new FemToolsCcx class instead of supper class FemTools
2016-05-16 13:22:54 +02:00
Bernd Hahnebach
eca76c3781 FEM: unit test, add some helper to create result files 2016-03-14 20:38:41 +01:00
Bernd Hahnebach
0ffb412aaf FEM: unit test, change load and pressure to some more reasonable values 2016-03-14 20:38:40 +01:00
Bernd Hahnebach
592e26fc41 FEM: replace Calculix with CalculiX in strings 2015-11-28 20:04:22 -02:00
Bernd Hahnebach
9d2d92336e FEM: rename modul MechanicalAnalysis to FemAnalysis 2015-11-28 20:04:22 -02:00
Bernd Hahnebach
42913ca0cf FEM: fix test frame work 2015-11-28 20:04:22 -02:00
Przemo Firszt
fe522bc66b FEM, Tests: Fix line end problem in compare_inp_files
Add new function to force unix line ends and use it in compare_inp_files
and compare_stats.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-19 10:26:24 +01:00
Przemo Firszt
dee8809454 FEM, Tests: Force unix line ends for comparing calculation stats
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-16 19:15:44 -02:00
Przemo Firszt
b0fbd60835 FEM: Use format to avoid error is the message is not pure string
Traceback (most recent call last):
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
229, in test_new_analysis
    ret = self.compare_stats(fea, static_expected_values)
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
147, in compare_stats
    fcc_print(sf_content)
  File "/home/przemo/software/FreeCAD/build/Mod/Fem/TestFem.py", line
55, in fcc_print
    FreeCAD.Console.PrintMessage(message + '\n')
TypeError: can only concatenate list (not "str") to list

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-11-14 14:53:36 +01:00
Bernd Hahnebach
c542a88e5e FEM: move CalculiX test files to test_files/ccx directory 2015-11-07 17:23:31 +01:00
Przemo Firszt
6ab7a434ac FEM, Tests: Make sure eigenmode parameters are always the same.
The parameters were taken from FEM prefs, so the test could fail.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-25 12:46:23 +01:00
Przemo Firszt
26d18db2d3 FEM: Make sure ccx working dir is set
Also TestFem and check_prerequisities are corrected

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-19 21:28:04 +02:00
Przemo Firszt
ac0f3a650d FEM: Test ccx binary before use
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-19 21:27:54 +02:00
Przemo Firszt
a0d8042bff FEM, Tests: Add setting static analysis
The tests from GUI were failing if FEM prefs were set to frequency analysis

Debugged by: sgrogan

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-17 12:20:48 -03:00
Przemo Firszt
b4352a18d1 FEM, Tests: Include detailed information in test report after failure
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-17 12:20:48 -03:00
Przemo Firszt
7554d2a8a8 FEM, Tests: Close files as soon as possible
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-10-17 12:20:48 -03:00
Bernd Hahnebach
41852c4c50 FEM: use MechanicalMaterial instead App::MaterialObjectPython in TestFem 2015-10-09 08:19:24 +02:00
Bernd Hahnebach
f411000a0f FEM: add calculiX input file comment lines to FemTest input file diff 2015-10-05 18:33:01 +02:00
Przemo Firszt
ee7beea983 FEM: Fix file paths + tidy up naming
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-09-22 20:09:53 -03:00
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
Bernd Hahnebach
b553d9895d FEM: TestFem, use no space in materialname 2015-09-15 15:13:28 +02:00
Przemo Firszt
32c96b4267 Tests, FEM: Add test for frequency analysis
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-09-09 12:17:12 -03:00
Przemo Firszt
5e3dc0c2c9 Tests, FEM: Fix inp file writing test
It's a compare line-by-line without comment lines now instead of
previously used md5 sum comparison.

inp pre filtering method suggested by Far-Zer
File location fixes by wmayer

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-18 13:44:28 +01:00
wmayer
13bf1a9cf5 + make FEM unittest more platform independent 2015-08-05 11:31:14 +02:00
Przemo Firszt
f395f38d09 Tests, FEM: Add missing Density and update md5 of standard inp file
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-08-05 11:02:37 +02:00
Przemo Firszt
5f4f6047e3 Tests, FEM: Add inp file writing test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-29 10:58:19 -03:00
Przemo Firszt
1de29d0ffa Test, FEM: Refactor existing tests as preparation for full analysis test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-29 10:58:19 -03:00
Przemo Firszt
cc7fa5b28c Test, FEM: Add pressure constraint test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-27 16:25:01 -03:00
Przemo Firszt
3ef54f66bb Test, FEM: Add force constraint test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-27 16:25:01 -03:00
Przemo Firszt
32ebdf8e6f Test, FEM: Add fixed constraint test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-27 16:25:01 -03:00
Przemo Firszt
0bfe92e83e Test, FEM: Add mesh test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-27 14:03:44 +01:00
Przemo Firszt
632a554802 Test, FEM: Add new analysis test
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
2015-07-27 14:03:44 +01:00