Commit Graph

4075 Commits

Author SHA1 Message Date
wmayer
e205daa43d Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 16:21:46 +02:00
berniev
6953310116 Mod: Single arg ctors must be explicit 2022-08-24 16:55:20 +02:00
luz paz
1a7ddfdc24 Fix typos and whitespace
Found via `codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,anormal,apoints,ba,beginn,behaviour,bloaded,bottome,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childrens,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,inout,ist,itsel,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oce,oder,ontop,orgin,orginx,orginy,ot,pard,parm,parms,pres,programm,que,rady,recurrance,ro,rougly,seperator,serie,sinc,siz,strack,substraction,te,technic,thist,thru,tread,uint,unter,uptodate,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./src/Base/StackWalker.cpp,./build/doc/SourceDocu`
2022-08-23 18:49:47 +02:00
Uwe
0e24ed6342 [FEM] pipelines: distinguish stresses (#7246)
- it seems using the same Field name for a vector and a scalar result causes problems with ParaView, see https://forum.freecadweb.org/viewtopic.php?p=601775#p601775
 therefore rename the vectors
2022-08-23 02:22:52 +05:00
wmayer
5014bab534 Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
Uwe
ee68391bc8 [FEM] point filter: add units for flux results 2022-08-17 00:10:22 +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
baf294a5a6 [FEM] initial pressure: bind expression to QuantitySpinBox 2022-08-15 11:54:33 +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
0a18346767 [FEM] potential constraint: change default value
- in practice one wants to apply potentials to faces via this constraint, therefore enable to set a potential by default, also assure that the initial unit is V
2022-08-15 02:41:35 +02:00
Uwe
9b56412856 [FEM] potential constraint: allow to set expression for value 2022-08-15 01:33:35 +02:00
Uwe
26c04ab136 [FEM] [skip CI] sorting in Fem.qrc 2022-08-14 23:02:05 +02:00
Uwe
f7c3989a2f [FEM] move initial pressure to fluid constraints group
- this is a fluid-specific constraint
2022-08-14 22:32:29 +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
32d7663e46 [FEM] permittivity: improve code
- in commit 9db5dff7 I hard-coded the permittivity incorrectly
2022-08-14 19:12:59 +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
e2636b2926 [FEM] Elmer example: remove wrong permittivity
- a permittivity of 1 F/m is not physical, also not for testing. In fact overwriting a constant is not good practice for an example
2022-08-14 17:54:15 +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
52b3c75eb4 [FEM] change default pressure
- a default of 1 GPa for a pressure onto a face is not suitable. use 1 bar (100 kPa) instead
2022-08-14 07:16:25 +02:00
Uwe
335196a468 [FEM] [skip CI] remove an obsolete comment
- since a while there is no green hook but a QuantitySpinBox
2022-08-14 05:46:17 +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
5779040107 [FEM] [skip CI] fix non-Unicode character
- made problems with text editors -> change file to UTF-8
2022-08-14 03:44:28 +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
5a72f2d1fa [FEM] Flow constraints: fix wrong tooltips 2022-08-13 03:35:22 +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
bd796c9197 [FEM] Selection: fix error for 2D shapes
- 2D shapes have no "Shape" attribute. This attribute was accessed before checked it it exists
2022-08-12 05:26:56 +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
7910bd14e6 [FEM] update a bimetal testfile 2022-08-10 04:26:19 +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
Uwe
48a206e3e4 [FEM] Elmer: notify users about missing fluid material
- it was often unclear when no flow equation was written to the case.sif (was a regression FC0.20)
2022-08-10 03:29:34 +02:00
Uwe
5cd06b6148 [FEM] fix bimetall example
- add missing density
- set a second temperature to make the heat solver actually working
- adapt to new defaults
2022-08-10 02:27:27 +02:00
Uwe
69efa37e49 [FEM] Elmer: automatic update for BiCGstablDegree
- up to last week we used the invalid BiCGstablDegree 0 thus update to the default of 2
2022-08-10 01:50:19 +02:00
Uwe
4b2a486d51 [FEM] fix selection issues with flow velocity constraint
- same fix as commit 7e071623 for flow velocity constraint
- the used selection widget did not highlight the selected faces. This made it very hard to work with when one has an existing document where e.g. 5 faces have a certain velocity and you cannot figure out which ones.
To fix this use another selection widget
2022-08-10 01:17:53 +02:00
wmayer
2062f9ce87 clang: fix warnings [-Winconsistent-missing-override] 2022-08-09 17:36:25 +02:00
berniev
ddafb98813 Mod: Use override etc 2 2022-08-09 12:52:26 +02:00