Commit Graph

584 Commits

Author SHA1 Message Date
Uwe
aa4700f12b [FEM] Elmer: magneto 2D use magnetization
- take magnetization into account for the magnetodynamic2D equation
2023-02-09 07:27:44 +01:00
Uwe
ac694dea1e [FEM] [skip ci] Elmer write: move a check function 2023-02-08 17:04:37 +01:00
luzpaz
30e3abde15 Fix trailing newlines 2023-02-08 15:08:42 +01:00
Uwe
23e240e017 [FEM] Elmer writer: correct copyrights 2023-02-07 11:52:18 +01:00
Uwe
d5ac0758cf [FEM] Elmer: add support for 2D magnetodynamics
- adds the corresponding Elmer equation (it is now possible to do Elmer's tutorial example no. 16)
2023-02-07 11:06:22 +01:00
Uwe
c8e25bf4d4 [FEM] Elmer writer: sort out elasticity equation
- sort out elasticity equation - last step to refactor writer.py
2023-02-07 04:33:20 +01:00
Uwe
bc275eb772 [FEM] Elmer writer: sort out electricforce equation
- sort out electricforce equation - next step to refactor writer.py
2023-02-07 03:59:59 +01:00
Uwe
8d0d38911f [FEM] Elmer writer: sort out flow equation
- sort out flow equation - next step to refactor writer.py
2023-02-07 03:21:25 +01:00
Uwe
53452cfec3 [FEM] Elmer writer: sort out flux equation
- sort out flux equation - next step to refactor writer.py
2023-02-07 02:40:59 +01:00
Uwe
5b2f99c5ea [FEM] Elmer writer: sort out heat equation
- sort out heat equation - next step to refactor writer.py
2023-02-07 02:03:53 +01:00
Uwe
e90102ba4f [FEM] Elmer electrostatic improvements
- output only a reasonable number of digits for vacuum permittivity
- output the FC label of potential constraints as comment (helps a lot when having several constraints)
2023-02-07 00:38:50 +01:00
Uwe
3d3313546a [FEM] Elmer: refactor writer for electrostatics
- the writer.py is to large to keep the overview, thus sort out the handling of the different equations (also since more equations will be added)
- This PR sorts out the electrostatic equation handling as first step (more equations will follow once this is merged)
2023-02-07 00:38:50 +01:00
Uwe
41bafb2bc0 [FEM] Elmer: add permeability of vacuum 2023-02-07 00:16:52 +01:00
Uwe
68d478aa6e [FEM] [skip ci] Elmer write: some cleanup
- fix also a typo
2023-02-05 03:20:56 +01:00
Uwe
d2ec8a85cc [FEM] Elmer output material name
- when looking at the Elmer input file 'case.sif' it is extremely helpful to thee also the name of the material
  Since the name is only form info, this does not change the actual simulation
2023-02-04 22:11:30 +01:00
luzpaz
a38b2ffbf7 Fix various trailing newlines, typos and grammar 2023-02-04 18:29:07 +01:00
Uwe
1a51e03b2f [FEM] Elmer: revert wrong change from #8336
- I mixed the normal stress solver with the elastic stress solver. For the normal stress solver plane stress is possible in all coordinate systems
2023-02-03 18:41:06 +01:00
Uwe
28c8addf5a [FEM] Elmer: don't hardcode the coordinate system
- Elmer allows for all currently supported equations several coordinate systems
- also remove an unused variable
2023-02-03 17:49:58 +01:00
Uwe
51185e1c06 [FEM] Elmer: fix error on wrong material settings
- if user set no material for a body, we must raise an error
- also fix annoying output of permittivity in case.sif file
2023-02-03 15:45:25 +01:00
Uwe
f14dea3226 [FEM] solver_taskpanel: fix bug with Edit button
- when an error occurred during the Write process, the Edit button must not be enabled
  In this case the machine state is still at femsolver.run.PREPARE. If no error occurred it went one step up.
2023-02-02 18:58:07 +01:00
Uwe
802a220d2d [FEM] equationbase: sort equations alphabetically
- to ease readability a bit
2023-02-02 06:30:22 +01:00
Uwe
37dc6e8a29 [FEM] sort equations alphabetically
- to ease readability a bit
2023-02-02 05:35:15 +01:00
Uwe
a346884c90 [skip CI] [FEM] equation.py: fix a tooltip
- the highest priority is computed first, the Wiki page is already correct
2022-10-24 15:21:54 +02:00
Bernd Hahnebach
c5d9b8e4ed FEM: get LGTM silent 2022-10-23 21:43:04 +02:00
Bernd Hahnebach
062f9f6616 FEM: Python pep8 code formatting 2022-10-22 23:05:51 +02:00
Uwe
876b4ebb8e [FEM] Elmer: fix flux equation
- the Flux solver must be executed before Heat and Electrostatic
- the analysis can have multiple Flux equations -> write a unique solver name to case.sif
- the Flux equation can currently only take 2 possible values. Therefore provide them as enum
2022-08-16 03:49:26 +02:00
Uwe
040f86c4d5 [FEM] fix body heat source constraint
- as the name implies, it must be possible to set the heat to different bodies
- for this a selection dialog is necessary
- check that heat is not zero
2022-08-15 02:47:01 +02:00
Uwe
a598398a0b [FEM] [skip CI] Elmer writer: fix indentation mistake
- found by Pylint checker
2022-08-14 20:41:29 +02:00
Uwe
27f50ad131 [FEM] add initial pressure constraint (#7364)
* [FEM] add initial pressure constraint

- this is needed for fluids
2022-08-14 20:00:36 +02:00
Uwe
9db5dff744 [FEM] fix handling of vacuum permittivity
- fix message that permittivity object was not handled
- set an expression, otherwise the user gets only "0.000" for the default of 8.8e-12
- use as unit the common "F/m" (this is also more user-friendly than "s^4*A^2 / (m^3*kg)")
- fix a ToDo
2022-08-14 17:59:42 +02:00
Uwe
e0585a328b [FEM] Elmer: writer: get rid of unnecessary function
- fixes the ToDo
- also remove unnecessary comment
2022-08-14 17:12:48 +02:00
Uwe
dce15245fa [FEM] Elmer: handle pressure for fluids
- Elmer allows external pressure on fluid boundaries as well as for solids
2022-08-14 16:08:14 +02:00
Uwe
dd370b9643 [FEM] Elmer: fix initial flow velocity
- we must allow must be several velocities because there can be several fluid bodies
- don't output flow velocity for solid bodies
2022-08-14 04:39:43 +02:00
Uwe
d7d49aa1a0 [FEM] [skip CI] Elmer: add copyright
-  heavily edited these files so I am to blame now too ;-)
2022-08-14 03:46:49 +02:00
Uwe
08f02885a4 [FEM] Elmer: sort solver methods for better overview 2022-08-14 03:18:35 +02:00
Uwe
d8784b7ac9 [FEM] Elmer: fix for the Idrs method
- while adding support for the IDRS method I forgot to implement its mandatory parameter
2022-08-14 01:48:20 +02:00
Uwe
a2e473c5b7 [FEM] Elmer: set constraints for solver systems
- set constraints according to the Elmer docs (no conversion necessary, existing properties just stay integers)
2022-08-14 01:45:34 +02:00
Uwe
d985525893 [FEM] Elmer: just sorting to keep the overview 2022-08-14 01:07:11 +02:00
luz paz
0beefe7c5d [FEM] Substitute underscore for whitespace in CalculiX solver output
Fixes #7360  
Forum thread: forum.freecadweb.org/viewtopic.php?p=617376#p617376
2022-08-13 16:41:59 +02:00
Uwe
b6cb5ffe4a [FEM] Elmer: fixes for multi-threading
- load the results depending on the used cores, not always the multi-thread results
- avoid unnecessary console output - this info is already output in tasks.py
- handle number of cores as int to save in total 2 conversions
2022-08-13 16:27:56 +02:00
Uwe
128877a7b7 [FEM] Elmer: only output a property if necessary 2022-08-13 14:39:06 +02:00
Uwe
08af39c1a8 [FEM] Elmer: fix heat flux handling
- the heat flux in the temperature constraint is not the heat flux from the heatflux constraint. The latter is in W/m² while the first one is W/mesh node
2022-08-13 05:54:34 +02:00
Uwe
2edf6abb2f [FEM] Elmer: add support to turn off solvers
- with this property the linear solver is turned off. As consequence one can this way also disable the execution of an equation without the need to delete the equation object

- also add missing preconditioners
2022-08-13 05:51:26 +02:00
Uwe
278598083d [FEM] Elmer: add tooltips 2022-08-13 03:45:42 +02:00
Uwe
b716644e27 [FEM] Elmer: fix handling if fluids + solid materials
- as already reported in the forum, it was not possible to make a flow simulation when there is also solid material.
2022-08-12 05:29:42 +02:00
Uwe
ed3625a0e0 [FEM] Elmer: allow lower relaxation factor
- despite the Elmer docs say 0.01 is the lover limit, for fluids like water, one might need down to 1e-4
2022-08-12 05:24:55 +02:00
Uwe
20047c94cd [FEM] [skip CI] formatting fix for potential 2022-08-10 13:42:29 +02:00
Uwe
ad2042e3cb [FEM] electric Potential: add missing conversion
- add missing conversion of property change that was already done before FC 0.20
2022-08-10 13:32:32 +02:00
Uwe
c219134a1e [FEM] Elmer: fix material bug and improve material handling
- for fluid material writing the elasticity solver failed with unknown Young Modulus
- fix regression with checking for fluid material. Checking the material of the bodies is not sufficient. One can e.g. have a solid without bodies defined, then it applied to all bodies and there might be a fluid defined for only one body. Checking the body's material would then deliver there is no fluid
2022-08-10 06:16:38 +02:00
Uwe
baaa5f8dd1 [FEM] Elmer: set constraints for relaxation factor
- the relaxation factor is crucial for nonlinear systems thus help the user by setting constraints and convenient steps.
Since the property stays a float no update is necessary, existing properties just stay a normal float
2022-08-10 04:10:47 +02:00