Commit Graph

58 Commits

Author SHA1 Message Date
Bernd Hahnebach
de9b534366 FEM: material object, move make def into make objects FEM module 2017-02-21 14:09:27 +01:00
Bernd Hahnebach
4f0f3aa4fa FEM: solver calculix object, move make def into make objects FEM module 2017-02-21 14:09:27 +01:00
Bernd Hahnebach
c63f1e7753 FEM: analysis object, move make def into make objects FEM module 2017-02-21 14:09:27 +01:00
Bernd Hahnebach
529e1418f4 FEM: unit tests, get rid of duplicate defs 2017-01-22 17:31:08 +01:00
Bernd Hahnebach
94ddfdb01f FEM: unit tests, make all FEM unit test in one directory in tmp directory 2017-01-22 17:31:08 +01:00
Bernd Hahnebach
227beac03f FEM: unit tests, fix def to update results 2017-01-22 17:31:08 +01:00
Bernd Hahnebach
cfa97b0163 FEM: unit tests, reorder paths 2017-01-22 17:31:08 +01:00
Bernd Hahnebach
4360c0b8b3 FEM: unit tests, fix some issues and save FreeCAD files of the unit tests 2017-01-14 10:44:20 +01:00
Bernd Hahnebach
6ab6603f2e FEM: fix unit tests in the regard of new material module name 2017-01-02 18:03:24 -02:00
wmayer
546656867b fix FemMesh::copyMeshData 2016-12-12 12:43:05 +01:00
wmayer
0ff231c0d4 temporarily disable failing unit test 2016-12-10 12:31:16 +01:00
Bernd Hahnebach
6e05fb0d29 FEM: change ccx solver property name
from IterationsMaximum to IterationsThermoMechMaximum and
only write if set > 0
2016-09-27 13:04:47 -03:00
Bernd Hahnebach
33b8593438 FEM: change ccx solver property name from SteadyState to TheromMechSteadyState 2016-09-27 13:04:46 -03:00
Bernd Hahnebach
c476bcfeb0 FEM: solver object is used to write the eigenmode params to input file 2016-08-08 08:03:26 +02:00
Bernd Hahnebach
f0bbbc1cef FEM: unit test: add max iterations count to thermomech solver obj 2016-08-04 17:45:04 +02:00
Bernd Hahnebach
a3d9390cc0 FEM: fix thermomech unit test analysis 2016-08-04 17:45:04 +02:00
Bernd Hahnebach
4d778390d4 FEM: code formating: trailing whitespaces, tabs at line start and flake8 2016-08-04 17:45:04 +02:00
vdwalts
5a2a73b55e FEM: Adding the FEM tests for the thermo-mechanical test problem to the TestFem.py file. To-do: Add the frd file test and the compare stats test. 2016-08-04 17:45:04 +02:00
vdwalts
140af42f9b FEM: Setting up the geometry and constraints for the cooling spine model for the thermo-mechanical test. 2016-08-04 17:45:04 +02:00
Bernd Hahnebach
2fb6d51f9f FEM: calculix solver: better handling of iterations control parameter and
add them to FEM unit test
2016-08-04 17:45:04 +02:00
Bernd Hahnebach
81e9e8b3be FEM: solver object CalculiX: add new attributes and use defaults from prefs
and fix FEM unit tests
2016-08-04 17:45:04 +02:00
Bernd Hahnebach
30baceeb61 FEM: python code formating flake8: add white space to start comment block, where missing 2016-07-21 18:40:51 -03:00
Bernd Hahnebach
251a8d4bac FEM: trailing whitespaces 2016-07-11 15:27:20 +02:00
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