Commit Graph

604 Commits

Author SHA1 Message Date
Uwe
5a0f8436c2 [FEM] don't add CCX solver by default for new analyses
- if there are other solvers found, we should handle all solvers equally
- also reduce amount of console output on every analysis run
2023-03-24 03:25:02 +01:00
Uwe
4c9afb4546 [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
45743d4fbd [FEM] improve displacement constraint
- use a Distance and Angle property to get the unit handling right
2023-03-23 00:50:40 +01:00
Uwe
c9cb01531f [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
Uwe
14c88f41fb [FEM] several Elmer fixes
- fix whitespace in the SIF writer
- Elmer GUI uses only 20 nonlinear iterations, so we should do the same (500 were also not sensible)
- don't restrict nonlinear-Newton iterations to 100, 500 might be necessary for turbulent flow
- update author
2023-03-22 07:27:20 +01:00
Uwe
333cf5fdd7 [FEM] fixes for deformation equation
- deformation is a nonlinear equation
- use the default that Elmer GUI uses for this equation
2023-03-22 07:20:51 +01:00
Uwe
0fcea8b3bb [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
f1799f27b0 [FEM] fine-tune flow examples
- use a more sensible velocity distribution
- change inlet temperature for 2 examples

- also change step size for nonlinear iterations for more convenience for practical usage
2023-03-20 07:17:11 +01:00
Uwe
866ea2551d [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
b496a41cd1 [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
715472a991 [FEM] Elmer: support for variable strings
- Elmer offers the "Variable" calls do define variables via math equations. These are for example used to define as constraint a certain velocity profile
2023-03-20 01:14:34 +01:00
Uwe
17e3c70c3f [FEM] improve check for fluid material
- it is sufficient if there is a dynamic viscosity defined
2023-03-17 17:56:41 +01:00
Uwe
14b5c95f06 [FEM] Elmer: add new default coordinate system
- for new versions of Elmer the default coordinate system is "Cartesian". (if 2D or 3D is determined by the "Variable" setting for the equation)
2023-03-17 16:03:23 +01:00
Uwe
2759105469 [FEM] fix flow equation
- the density must be output using the correct units. Due to this bug also the viscosity was written with wrong units-
- if there is a dynamic viscosity given for a material, use it directly
2023-03-17 03:55:23 +01:00
luzpaz
d844255685 FEM: fix trailing newlines 2023-02-13 15:41:31 +01:00
Uwe
4013c12b60 [FEM] add missing registration of magnetodynamics equation 2023-02-13 14:12:43 +01:00
Uwe
3b653b78f9 [FEM] Elmer: add support for 3D magnetodynamics
- adds the corresponding Elmer equation (it is now possible to do Elmer's tutorial example no. 14)
2023-02-10 19:48:31 +01:00
Uwe
a14efad44c [FEM] Elmer: fixes for Magneto2D writer
- assure a 2D coordinate system is used
- get rid of annoying numerical artifacts
2023-02-10 02:21:21 +01:00
Uwe
2cc8c49d49 [FEM] use extended current density constraint for 2D
-also a fix bug that for 2D there is no z-component of magnetization
2023-02-10 01:30:14 +01:00
Uwe
a2ffadcb59 [FEM] use magnetization constraint for 2D
- uses the constraint for 2D magnetodynamics to perform e.g. Elmer's tutorial non. 15

- modify the Material manager to get rid of magnetization but keep the vectorial functionality because in future there will be support for e.g. birefringence materials etc.
2023-02-09 15:43:42 +01:00
Uwe
bdfe5e764c [FEM] Elmer: magneto 2D use magnetization
- take magnetization into account for the magnetodynamic2D equation
2023-02-09 07:27:44 +01:00
Uwe
e96c796477 [FEM] [skip ci] Elmer write: move a check function 2023-02-08 17:04:37 +01:00
luzpaz
a40a5dcad2 Fix trailing newlines 2023-02-08 15:08:42 +01:00
Uwe
3e7334b7a8 [FEM] Elmer writer: correct copyrights 2023-02-07 11:52:18 +01:00
Uwe
ca05213e2e [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
a5e0ac5949 [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
bd0f39e7c9 [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
a26ac3249d [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
5d12dcf1ed [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
240e2aa816 [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
177fdcd02b [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
4ac2f8fe1a [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
e0fa255920 [FEM] Elmer: add permeability of vacuum 2023-02-07 00:16:52 +01:00
Uwe
5417abaa04 [FEM] [skip ci] Elmer write: some cleanup
- fix also a typo
2023-02-05 03:20:56 +01:00
Uwe
b8ce56b5e6 [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
1b43baa418 Fix various trailing newlines, typos and grammar 2023-02-04 18:29:07 +01:00
Uwe
1ab36e21e8 [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
9e9c7c3428 [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
9923b13b16 [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
5d1bc93147 [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
faa50f59f3 [FEM] equationbase: sort equations alphabetically
- to ease readability a bit
2023-02-02 06:30:22 +01:00
Uwe
b46c1c5ff9 [FEM] sort equations alphabetically
- to ease readability a bit
2023-02-02 05:35:15 +01:00
Uwe
f5339093b3 [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
e77bf30a8e FEM: get LGTM silent 2022-10-23 21:43:04 +02:00
Bernd Hahnebach
f46ed721c6 FEM: Python pep8 code formatting 2022-10-22 23:05:51 +02:00
Uwe
212a058c2f [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
d0ee6a46a0 [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
9fb77d5caa [FEM] [skip CI] Elmer writer: fix indentation mistake
- found by Pylint checker
2022-08-14 20:41:29 +02:00
Uwe
25a829bd0c [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
865481fcf4 [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