Commit Graph

1285 Commits

Author SHA1 Message Date
Uwe
dfbc6b168e [FEM] activate spring constraint
- the spring constraint is currently unused but it can be used for Elmer mechanical analyses
This PR does so and also overhaul the dialog UI.
- use the spring constraint also in an example file
2023-03-23 15:14:50 +01:00
Uwe
7fd12f8454 [FEM] improve displacement constraint
- use a Distance and Angle property to get the unit handling right
2023-03-23 00:50:40 +01:00
wmayer
b0e9c455a6 Fem: fix warning field 'dimension' will be initialized after field 'ui' [-Wreorder-ctor] 2023-03-22 20:37:29 +01:00
Uwe
97103b3bf3 [FEM] use std::unique_ptr for all dialog objects
- also fix too long line
- also further clang automatic code style changes
2023-03-22 20:08:13 +01:00
luzpaz
eb852691df Fix typos and whitespace 2023-03-22 17:10:38 +01:00
Uwe
dba00d44d0 [FEM] extend displacement constraint
- add fields to specify a formula for the displacement, this is necessary to make transient deformation analyses with Elmer
- add option to set displacement from result of flow equation
- this way also a major overhaul -> simpler dialog logic etc.
2023-03-22 15:23:32 +01:00
wmayer
db9d46e4bb C++17: remove workaround for external smesh to fix build failure on Conda 2023-03-22 13:24:21 +01:00
Uwe
2d3953f65f [FEM] Elmer add support for nonlinear elasticity solver
- adds new equation "Deformation" (this name since the stress solver got in FreeCAD the misleading name "elasticity")

- this way change icon of elastic solver to make the difference clear
2023-03-22 03:27:27 +01:00
Uwe
9007723331 [FEM] rewrite initial velocity constraint
- same as #8963 but for initial velocity

- add an example file that demonstrates the influence of the initial velocity
- some fine-tuning for the existing flow example
2023-03-20 04:58:24 +01:00
Uwe
06061e37dc [FEM] rewrite velocity constraint
- complete revision of the constraint.

This is a breaking change, meaning existing constraints won't work.

This is possible because since 2 days ago the whole flow equation did not work at all. Also the existing constraint implementation if buggy and cannot be used to do the Elmer tutorial. Also, the constraint is only used by Elmer and only be the flow equation.

Since nobody complained about the obvious wrong results, we can assume the flow equation was not yet in practical usage (and for FC 0.20 we known that it does not work at all, first with FC 0.20.1).

It is necessary since it must be possible to either input a velocity or an equation. With an equation, a velocity profile can be specified.

- update the flow examples accordingly:
-- simplify them since an initial and and output velocity is not necessary to specify
-- use a formula as input velocity for the non-turbulent example
2023-03-20 01:57:09 +01:00
Uwe
c1751bde4a [FEM] improve deletion warning
- don't popup a warning if all children of an object are selected too when deleting the object
2023-03-16 21:54:09 +01:00
marioalexis
20984f866c Fem: Remove unused member node 2023-03-16 17:50:21 +01:00
Uwe
4ecf74322c [FEM] better pipeline connection for CalculiX
- make the connection also working for frequency and buckling analysis by directly creating/updating the pipeline where the CalculiX results are loaded
2023-03-16 06:12:14 +01:00
marioalexis
b37fe66653 Fem: Remove property name comparison 2023-03-13 22:08:41 +01:00
marioalexis
2143976302 Fem: Remove property name comparison 2023-03-12 18:27:39 +01:00
Uwe
3c31007e58 [FEM] BoxWidget: fix duplicate names
- as reported: https://github.com/FreeCAD/FreeCAD/pull/8825#issuecomment-1464876840
2023-03-11 13:55:14 +01:00
Uwe
1e702cdca2 [FEM] adjust initial position of new box filter
- as discussed in #8825
2023-03-11 13:55:14 +01:00
marioalexis
191879b2c6 Fem: Remove property name comparison 2023-03-11 10:29:29 +01:00
Uwe
1dc9f5484f [FEM] [skip ci] BoxWidget.ui fix
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
2023-03-11 03:19:03 +01:00
marioalexis
a9b167ccbc Fem: Add box filter function 2023-03-11 03:13:57 +01:00
luzpaz
6802bed99d Fix various typos and whitespace 2023-03-10 14:40:46 +01:00
Uwe
1bfaa6965b [FEM] improve cylinder function
- set better initial position and size
- add misting triggering of ViewProvider
- some code style improvements (fix too long lines, consistency etc.)
2023-03-09 17:25:46 +01:00
Uwe
0d77da1c81 [FEM] [skip ci] fine-tune FEM function filter
- just for consistency use always the form "x.0"
2023-03-09 02:40:32 +01:00
Uwe
fe9ebfc4c5 [FEM] [skip ci] CylinderWidget.ui fix
- was reported and automatically fixed by Qt's Designer that the size in the file is incorrect, (the sum of the widget's widths is wider than the main widget's specified size)
2023-03-08 18:02:10 +01:00
Uwe
453b244b55 [FEM] fox compilation of new Cylinder function
- vector must be initialized and vector size requires a const int

- also some sorting
- also some formatting changes to be consistent (either always "x." or "x.0")
2023-03-08 18:02:10 +01:00
marioalexis
b1e8de58ea FEM: Add cylinder filter function 2023-03-08 17:16:41 +01:00
xtemp09
27c4b52688 [FEM] Replacement of hardware_concurrency() with idealThreadCount()
I encountered problems with std::thread::hardware_concurrency() with mingw-w64 < v8.1.

QThread::idealThreadCount() is a better alternative.
2023-03-07 17:41:35 +01:00
Yorik van Havre
46653420a6 merged crowdin translations 2023-02-27 16:01:15 +01:00
Yorik van Havre
3ad0e233d5 updated ts files 2023-02-27 15:35:51 +01:00
Uwe
a8a646f165 [FEM] improve pvtu file filtering
- catch case of only 2D objects
- use vtkDataSet as input for all filters
2023-02-24 03:46:47 +01:00
luzpaz
57b365f18f Fix misc. typos and whitespace 2023-02-22 23:46:18 +01:00
Uwe
b6d186ef73 [FEM] [skip ci] Command.cpp: fix loo long line 2023-02-20 03:13:19 +01:00
Uwe
60e089d52a [FEM] fix typo in command
- to be uniform as all other commands begin with "CmdFem..."
2023-02-20 02:45:14 +01:00
Uwe
2bf7ccab68 [FEM] fix reported typos and inconsistencies 2023-02-20 02:07:33 +01:00
Uwe
902566c6ce [FEM] improve pvtu file filtering
- only filter when necessary
- avoid unnecessary function calls
- fix bug that objects were not made visible but invisible
2023-02-19 17:37:11 +01:00
Uwe
8a16e01e39 [FEM] fix material dialog logic
- when the option "use this task panel" is not checked the edit fields must be disabled.
  This also fixes the often hard to understand issue that while scrolling to the end of the dialog the material suddenly changes to "_transient" because the scroll wheel can trigger to change the edit fields.
2023-02-19 04:44:07 +01:00
Uwe
a7c5fde0e3 [FEM] fix analysis activation issue
- after activating an analysis the FEM toolbar buttons did not become active
2023-02-18 22:28:35 +01:00
Uwe
7534c6748c [FEM] fix possible crash on changing the VectorMode
- if pvtu file filtering is on, there is by design not on every call of WriteColorData() data
  (on other occasions of GetArray(array) the result is checked, for two calls is was forgotten)

- also some automatic code formatting according to our current clang file
2023-02-17 02:32:54 +01:00
Uwe
4639283b45 [FEM] make pvtu file filtering optional
- it is sensible to filter by default, however, it turned out that on some complex models Elmer fails to compute if the mesh volume regions are too small (in most cases) or at a certain mesh region. By disabling the filtering, one gets at least for the latter case a visual feedback where the mesh volume of the different CPU are (by also setting a transparency to the result pipeline).
2023-02-16 02:32:40 +01:00
Yorik van Havre
39f4b8c091 Merge pull request #8495 from luzpaz/fem-trailing-newlines
FEM: fix trailing newlines
2023-02-15 17:02:16 +01:00
wmayer
a2928cf0f6 Fem: fixes #8485: transparency of pipeline objects is visually lost 2023-02-15 14:52:44 +01:00
luzpaz
d4796dd1d4 FEM: fix trailing newlines 2023-02-15 13:41:38 +00:00
Uwe
b0e50b8eb2 [FEM] Contours: disable keyboard tracking
- otherwise the contour creating algorithm would be invoked on every keystroke
- also improve a code comment
2023-02-15 14:31:10 +01:00
Uwe
a84d6d19e6 [FEM] improve visualization of pvtu files
- To speed up analyses one calculates on several CPU cores. The result is a partial VTU file.
Unfortunately when applying a transparency the boundaries of the volumes computed by each CPU core are always visible. This makes it often unusable for visualizations.
The solution is to filter the results the same way a clip filter does.
2023-02-15 14:22:45 +01:00
Uwe
99a7262e60 [FEM] improve checks for datasets
- check if datasets exists before we access them
- speed up the check for the datatype by testing after the downcast
2023-02-15 10:54:45 +01:00
Uwe
ee59d2ce58 [FEM] [skip ci] add missing header for precompiled headers 2023-02-15 00:42:54 +01:00
Uwe
a6d1dc7fc0 [FEM] Contours: fix task panel logic
- the ViewProvider sorting of the field can be different from the sorting in the dialog

- also hide a Contours property (I forgot this when the contours filter was added)
2023-02-14 13:30:58 +01:00
Uwe
592da198c5 [FEM] sort code of result filters
- sort the functions alphabetically to know where to scroll to - eases the reading at least a bit
- some automatic reformatting according to our current clang file
- split too long lines
2023-02-13 19:52:54 +01:00
Uwe
fa780e8b5b [FEM] add new filter to display iso contours
- very valuable to display for example electromagnetic field lines
2023-02-13 16:53:21 +01:00
Yorik van Havre
50fb6d6b46 merged crowdin translations 2023-02-13 15:45:26 +01:00