Commit Graph

521 Commits

Author SHA1 Message Date
Uwe
93398ebdd9 [Fem] Elmer: change default nonlinear tolerance
- ElmerGUI uses 1e-7 as default, so we should do too
2022-08-07 04:33:21 +02:00
Uwe
c4097ede8f [FEM] Elmer: fix default for heat
- revert change from comm it commit 117d789e - "None" is the correct default. (I mixed this up with Navier-Stokes)
2022-08-07 02:45:08 +02:00
Bernd Hahnebach
e93f61081a FEM: Python pep8 code formatting 2022-08-07 01:39:52 +02:00
Uwe
0b969fbc0a [FEM] Elmer: polishing for nonlinear system
- add tooltips
- relaxation factor is usually not below 0.1 thus no expression is necessary
- sorting
2022-08-07 01:21:42 +02:00
Uwe
f7099cd43c [FEM] Elmer: fixes for electrostatics
- one needs to specify a file when calculating the capacitance matrix
- add electric flux to point filter results
- add missing parameters
- also some sorting
2022-08-07 01:11:07 +02:00
Uwe
f782c46f72 [FEM] Elmer: add missing parameters for Navier-Stokes solver 2022-08-06 23:36:40 +02:00
Bernd Hahnebach
dc05f8e9b9 FEM: Python pep8 code formatting 2022-08-06 22:29:12 +02:00
Uwe
25c33ade64 [FEM] Elmer: code improvements
- don't redefine lists twice
- also fix mistake for heat - the default is computed convection
2022-08-06 22:20:44 +02:00
Uwe
4a8e4a8429 [FEM] Elmer: output the equation-specific settings for Navier-Stokes 2022-08-06 22:01:25 +02:00
Uwe
057a19af82 [Fem] Elmer: output the equation-specific settings
- equation-specific things were not set at all. This is the first step for the heat and Stress equation
2022-08-06 21:26:23 +02:00
Bernd Hahnebach
0ed91f1b6a FEM: Python pep8 code formatting 2022-08-06 20:16:10 +02:00
Uwe
d3e920f7cd [Fem] Elmer: writer: remove unused variable 2022-08-06 20:05:23 +02:00
Uwe
40629bb2bf [Fem] Elmer: update tolerances
- update tolerances also for existing analyses to fix the bug that users see e.g. "0.001" and not the actual used tolerance
- also a fix for new stress analyses
- also a formatting fix
2022-08-06 20:01:24 +02:00
Uwe
125d2962c7 [FEM] Elmer: next step to fix eigenfrequency analysis
- add missing parameters to perform modal analyses
- set mandatory complex statement
2022-08-06 18:27:51 +02:00
Uwe
ebda764bf1 [FEM] Elmer: fix mistake with transient solving
- there is proper info, just in another Elmer manual. This unveiled my mistake - the timestepping parameters are a list
2022-08-06 16:01:55 +02:00
Bernd Hahnebach
83172137e7 FEM: Python pep8 code formatting 2022-08-06 13:33:01 +02:00
Uwe
0567a7c026 [FEM] Elmer: fixes for the simulation parameters
- output equation-specific values only if this equation is used
- use Elmer's default for BDF order as default for FC too and allow to change it
- don't hardcode to Steady State. Transient must be possible too, this way add parameters to run a transient analysis
2022-08-06 04:32:18 +02:00
Uwe
46b084e5f6 [Fem] Elmer: don't output unused parameters
- many of the new parameters don't have to be output if they are not used

- also some sorting
2022-08-06 04:06:10 +02:00
Uwe
fce9a2fcfb [FEM] Elmer: add missing parameters for flux equation
- also add tooltips
2022-08-05 05:09:54 +02:00
Uwe
a046c1aaa6 [Fem] Elmer: add missing settings for the stress solver
- the usually mandatory setting DisplaceMesh was missing leading to imprecise results. Now the calculated faceload is almost the exact same as with CCX
- also add most of the other settings Elmer 9 provides
- also add tooltips
2022-08-05 04:17:39 +02:00
Uwe
ddd7fb77c1 [FEM] Elmer: push mesh scaled to Elmer
- reverts commit 73fba1b7 - the scaling it correct
- there is a bug in Elmer that the heat source is not aware of the scaling
- write the scaling directly to the solver, not to the mesh itself. (make in principal no difference but we are closer to the solver)
2022-08-05 02:13:04 +02:00
Uwe
d53714bc84 [FEM] fix enable editing for all solvers
- currently for Z88 nothing happens when clicking the Edit button in the solver task dialog. The reason is that opening *.txt files was never implemented
- also do this for Elmer
- for Z88 we need to open several file for a proper editing because the solver info is distributed over these files
2022-08-04 04:19:55 +02:00
Uwe
34e45fbcac [FEM] Elmer: more work on Stabilize
- it turned out that despite not mentioned in the manual, ElmerGUI adds the Stabilize setting for all setups
-> bring "Stabilize" back for all equations
(for "Bubbles" it is correct that this is an equation-specific setting)
2022-08-04 03:57:46 +02:00
Uwe
bf09d0679d [FEM] Elmer: setup new pipelines like we do for CCX
and manually new created ones
2022-08-04 03:25:26 +02:00
Uwe
e4d1cb66e9 [FEM] Elmer: use different default linear solver
- BiCGStabl is as robust as BiCGStab but in all tested cases it converges faster
2022-08-04 03:24:03 +02:00
Uwe
5d1b25f130 [FEM] Elmer: use direct solving as default for stresses
- direct solving is sometimes even 10 times faster (as fast as CCX) and as accurate as CCX
2022-08-04 03:22:07 +02:00
Uwe
bbc21b336a [FEM] Elmer: fix solver stabilize settings
- according to https://www.nic.funet.fi/index/elmer/doc/ElmerModelsManual.pdf
the stabilization methods are equation-specific and only available for some solvers
This commits changes these settings according to the manual
2022-08-03 02:32:01 +02:00
Uwe
a6288fdabe [FEM] Elmer: Flux: add missing settings
- enable the disabled options. They work and are according to the Elmer manual. The user is free to use them or not and since they are all False by default, existing analyses won't be affected.
- add two missing settings
- for new equations, enable at least one calculation, otherwise nothing will happen when an inexperienced user uses the default
2022-08-03 01:50:12 +02:00
Uwe
ea8e13dfa0 [FEM] Elmer: don't push mesh scaled to Elmer
- the mesh scaling was a hack to work around the fact that FC's mesh is in mm while all input units are in SI. It turned out that this made more problems than it solved because Elmer checks the length unit and makes internal recalculations. So the mesh must not be scaled when send to Elmer (despite the ElmerGrid docs doesn't state this).
forum thread: https://forum.freecadweb.org/viewtopic.php?p=614162#p614162
2022-08-01 03:58:09 +02:00
Uwe
927cecc742 [FEM] Elmer: set sensible defaults for elasticity equation
- for BiCGstabl the minimal degree is 2, but 3 is recommended
- when adding the equation, it should do something, therefore enable the calculation of the principal stresses (as it was, nothing was calculated except of the displacement)
2022-08-01 03:42:57 +02:00
Bernd Hahnebach
5d4b753940 FEM: python code formatting 2022-07-31 23:47:45 +02:00
Uwe
bb667b516f [FEM] Elmer: fix small number property handling
- use an expression as discussed: https://forum.freecadweb.org/viewtopic.php?p=613897#p613897
2022-07-31 05:19:45 +02:00
Uwe
5107590917 [FEM] add missing eigenfrequcy calculation for Elmer
- while for CCX we output the eigenfrequency, for Elmer the user had to perform the calculation of a sqrt of the complex result.
This is inconvenient and error-prone and also requires the knowledge where the result is output by Elmer and in what format. (cast me more than an hour to find this out)
Therefore perform the calculation for the user and output the result.
2022-07-31 02:31:26 +02:00
Uwe
52b2bc6e38 [FEM] Elmer: add missing direct variant MUMPS
- also use capitalized wording to Umfpack as Elmer does
2022-07-30 14:40:10 +02:00
Uwe
2b6f351880 [FEM] Elmer: a fix for keywords
- according to the Elmer solver manual, check keywords have to be quoted
2022-07-27 01:48:10 +02:00
Uwe
f0d633eb4b [FEM] Elmer writer: fix errors on missing material properties
- we must in this case raise an error and stop the writer script
2022-07-26 03:37:55 +02:00
Uwe
ae33ad545f [FEM] Elmer: fix python error when solver failed
we must then stop the execution of the script
2022-07-25 02:54:12 +02:00
Uwe
e76fbe6998 [FEM] fix CCX (new framework) binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message to the status info so that user gets feedback also when report view console is not shown
2022-07-17 01:28:54 +02:00
Uwe
1ba44fb1ca [FEM] fix Z88 binary handling
- when the binary was not found, the function called the non-existing binary
- also push error message for Elmer and Z88 to the status info so that user gets feedback also when report view console is not shown
- uniform wording to 'binary'
- avoid unnecessary console output
2022-07-17 01:18:21 +02:00
Uwe
7346ee4073 [FEM] [skip CI] inform user about used CPU cores for Elmer
Since the number of used cores can for Elmer have the impact that a solver run converges or not, output this info prominently
2022-07-16 19:46:46 +02:00
Uwe
c4416e00ca [FEM] [skip CI] tell user when Elmer write succeeded
At the moment the user gets no feedback, while for Z88 and CCX he gets a result
2022-07-16 19:41:43 +02:00
Uwe
bcacab1988 [FEM] [skip CI] fix a typo 2022-07-16 19:21:25 +02:00
Uwe
826a903281 [FEM] [skip CI] fix a string 2022-07-16 18:54:11 +02:00
Uwe
5bbf136174 [FEM] [skip CI] fix a typo 2022-07-16 16:01:38 +02:00
Uwe
eec258ab37 [FEM] enable to run Elmer multi-threaded
- this needs proper testing, especially on a non-Windows system

- note that for some tasks multi-threading requires non-standard additional solvers like MUMPS. Ideally the user should be informed about this, depending on the equations he uses. But this should not block this PR, meaning to use multi-threading in general.
2022-07-16 14:59:25 +02:00
Marshal Horn
3a3a20da46 Replaced python2 usage of next()
iterator.next() is deprecated in python3.
next(iterator) is the direct replacement.
In some cases a for() loop makes more sense
2022-07-14 01:28:10 +02:00
Bernd Hahnebach
02fef68c8b FEM: Python code formatting 2022-07-13 12:04:52 +02:00
Uwe
33a769a426 [FEM] fix solver console bugs
- for Elmer and Z88 on Windows several windows pop up (console windows). This is maybe annoying and the user is wondering what is going on, but the main problem is that when you close them, you break the solving process.
Therefore, on Windows only, hide the empty popup windows.
2022-07-13 02:51:31 +02:00
Bernd Hahnebach
41a8ed83af FEM: python code formatting 2022-07-12 15:04:26 +02:00
Bernd Hahnebach
90b0d3253e FEM: elmer solver writer, add some comment in the regard of units 2022-07-12 11:35:45 +02:00