FEM Install/pl: Difference between revisions
(Created page with "Jeśli solver jest poprawnie zainstalowany, możesz uruchomić pojedynczą komendę {{incode|ccx}} w wierszu poleceń aby uzyskać krótką odpowiedź:") |
(Created page with "Jeśli solver jest zainstalowany, upewnij się, że środowisko pracy MES może znaleźć jego plik wykonywalny - przejdź do {{MenuCommand|Edycja → Preferencke → MES → CalculiX → Szukaj w znanych katalogach bin}}. Jeśli sam skompilowałeś solver, odznacz tę opcję i podaj prawidłową ścieżkę do pliku wykonywalnego. Informacje dotyczące innych solverów, które mogą być używane z FreeCAD, można znaleźć na stronie MES: Solver.") |
||
Line 24: | Line 24: | ||
}} |
}} |
||
Jeśli solver jest zainstalowany, upewnij się, że środowisko pracy MES może znaleźć jego plik wykonywalny - przejdź do {{MenuCommand|Edycja → Preferencke → MES → CalculiX → Szukaj w znanych katalogach bin}}. Jeśli sam skompilowałeś solver, odznacz tę opcję i podaj prawidłową ścieżkę do pliku wykonywalnego. Informacje dotyczące innych solverów, które mogą być używane z FreeCAD, można znaleźć na stronie [[FEM_Solver/pl|MES: Solver]]. |
|||
<span id="FEM_mesh_generator"></span> |
<span id="FEM_mesh_generator"></span> |
Revision as of 16:46, 1 January 2024
Wprowadzenie
Aby móc przeprowadzić analizę metodą elementów skończonych (MES) w ramach środowiska pracy MES, FreeCAD korzysta z dwóch zewnętrznych programów: jeden służy do generowania siatek, a drugi do numerycznego rozwiązywania właściwej analizy. Możesz sprawdzić, czy Twoja instalacja FreeCAD jest gotowa do przeprowadzenia analizy metodą elementów skończonych, uruchamiając przykład MES CalculiX - wspornik 3D, który jest dołączany do każdej instalacji FreeCAD od wersji 0.17.
Przepływ pracy w środowisku MES. Środowisko to wywołuje dwa zewnętrzne środowiska w celu wykonania siatkowania obiektu bryłowego oraz rozwiązania problemu metodą elementów skończonych.
Solver MES
Domyślny solver do symulacji MES to CalculiX, prosty solver do analiz strukturalnych. FreeCAD zapisuje plik wejściowy CalculiX'a, uruchamia solver i odczytuje wyniki, które mogą być zaprezentowane graficznie w rzutni programu. Oznacza to, że plik wykonywalny solvera CalculiX jest niezależny od programu FreeCAD. Ponieważ istnieje wiele programów do generowania siatek, zalecane jest najpierw zainstalowanie solvera i upewnienie się, że działa prawidłowo.
Jeśli solver jest poprawnie zainstalowany, możesz uruchomić pojedynczą komendę ccx
w wierszu poleceń aby uzyskać krótką odpowiedź:
User@PC:~$ ccx
Usage: CalculiX.exe -i jobname
Jeśli solver jest zainstalowany, upewnij się, że środowisko pracy MES może znaleźć jego plik wykonywalny - przejdź do Edycja → Preferencke → MES → CalculiX → Szukaj w znanych katalogach bin. Jeśli sam skompilowałeś solver, odznacz tę opcję i podaj prawidłową ścieżkę do pliku wykonywalnego. Informacje dotyczące innych solverów, które mogą być używane z FreeCAD, można znaleźć na stronie MES: Solver.
Generowanie siatki MES
In order to create a FEM Mesh, FreeCAD uses Gmsh as the default mesher. Depending on your operating system and your FreeCAD installation Gmsh may be bundled with the FreeCAD installation binaries. If it is not, you can install it separately from FreeCAD and then use the menu Edit → Preferences → FEM → Gmsh to set the path to the gmsh.exe.
If the program is correctly installed, you may run the command gmsh
in the terminal to launch the graphical interface of the program. This interface is not used by FreeCAD but demonstrates that the program is installed.
User@PC:~$ gmsh -info
Version : 3.0.6
License : GNU General Public License
Build OS : Linux64
Build date : 20171107
Build host : lgw01-amd64-034
Build options : 64Bit Ann Bamg Bfgs Blas(Generic) Blossom C++11 Cgns Chaco DIntegration Dlopen Fltk Gmm Jpeg Kbipack Lapack(Generic) LinuxJoystick MPI MathEx Med Mesh Mmg3d Mpeg NativeFileChooser Netgen ONELAB ONELABMetamodel OpenCASCADE OpenGL OptHom Parser Plugins Png Post Python Solver TetGen/BR Tetgen Voro3D Zlib
FLTK version : 1.3.4
OCC version : 6.9.1
MED version : 3.0.6
Packaged by : buildd
Web site : http://gmsh.info
Mailing list : gmsh@onelab.info
If the mesher is installed, make sure the FEM Workbench is able to find the binary; go to Edit → Preferences → FEM → Gmsh → Search in known binary directories. If you compiled the mesher yourself, untick the option, and give the correct path to the binary. See FEM Mesh for various possibilities of obtaining a valid mesh for analysis.
Netgen
In order to create a FEM Mesh, you can use Netgen as an alternative to Gmsh. Depending on your operating system and your FreeCAD installation Netgen may be bundled with the FreeCAD installation binaries.
If the program is correctly installed, you can run the command netgen
in the terminal under Linux to launch the graphical interface of the program.
User@PC:~$ netgen -V
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
Run parallel Netgen with 'mpirun -np xy netgen'
NETGENDIR = .
Tcl header version = 8.6.8
Tcl runtime version = 8.6.8
using internal Tcl-script
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
Instalacja w środowisku Windows
The FreeCAD packages available from the download page already include Netgen and CalculiX, so no additional software needs to be installed. Some links where to get a better Calculix executable than included in FreeCAD can be found here alternative ccx executables
Instalacja w środowisku Linux
Linux distributions have different ways of installing software. Many distributions have software repositories and package managers; before compiling source code, look in your package manager for netgen
, gmsh
, calculix-ccx
or ccx
, and install them following the instructions of your own distribution.
Instalacja w środowisku Ubuntu PPA
The freecad-stable and freecad-daily personal package archives (PPA) provide a more recent version of FreeCAD than is available in the official Ubuntu repositories. These PPAs include the most recent netgen
, gmsh
, and calculix-ccx
packages as well. See Installing on Linux for more information on setting up the repositories.
If a PPA is already added to your system, install the packages as follows
sudo apt-get install netgen
sudo apt-get install gmsh
sudo apt-get install calculix-ccx
The freecad-community PPA also provides netgen
, gmsh
, and calculix-ccx
packages for testing. If they are stable enough, they may be added to the daily or stable repositories. The binaries for ccx 2.14 work on Debian Stretch, but not on Debian Buster due to dependency problems.
Note: the thread Ubuntu Repository discusses the creation of the Ubuntu PPA packages. At the time it was written, CalculiX was not included in the Debian repositories, so there were several personal packages in Launchpad. Only one package should be installed.
Instalacja w środowisku Arch Linux
Get the CalculiX package from the AUR repository.
Instalacja w środowisku Debian
- Debian 9 Buster: the packages in the repository are outdated, but you can use the packages from the Ubuntu PPA (
freecad-community
). See Gmsh 4 package available for testing in Community Extras PPA (forum post). - Debian 8 Stretch: the packages in the repository are outdated, but you can use the packages from the Ubuntu PPA (
freecad-community
). See Gmsh 4 package available for testing in Community Extras PPA (forum post). - Debian 7 Jessie: install the packages from Debian 8 Stretch using
dpkg
. See Debian source package for Calculix (forum post).
Instalacja w środowisku openSUSE
- openSUSE:Science Math
- netgen Automatic 3D tetrahedral mesh generator
- gmsh A three-dimensional finite element mesh generator
- ccx An open source finite element package
Additional packages are typically installed with YAST (abbr. Yet another Setup Tool) the Linux operating system setup and configuration tool, or in any terminal/console (root rights required) with:
zypper install netgen zypper install gmsh zypper install ccx
Binaria CalculiX
The CalculiX authors provide a pre-compiled Linux binary of the solver; it can be downloaded from the authors' website. However, since different Linux distributions have different library paths, most likely this binary will not work without making some adjustments.
To use the binary with Fedora 21, see the thread Making FEM run on linux fedora 21. For newer Fedora versions, you should compile CalculiX yourself.
If you use this binary, check that the binary is executable, that it is in the executable $PATH
of your system, and that you have the necessary version of the libraries (libgfortran
, liblapack
, libblas
, etc.) against which it was compiled. This is mentioned in the forum post FEM WB.
Use the command ldd
to see the libraries that are linked by the binary. Install any missing dependency.
User@PC:~$ ldd /usr/bin/ccx
linux-vdso.so.1 (0x00007fffbabdc000)
libspooles.so.2.2 => /usr/lib/x86_64-linux-gnu/libspooles.so.2.2 (0x00007fe9bd042000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe9bce23000)
libarpack.so.2 => /usr/lib/x86_64-linux-gnu/libarpack.so.2 (0x00007fe9bcbd9000)
liblapack.so.3 => /usr/lib/x86_64-linux-gnu/liblapack.so.3 (0x00007fe9bc353000)
libgfortran.so.4 => /usr/lib/x86_64-linux-gnu/libgfortran.so.4 (0x00007fe9bbf74000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe9bbbd6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe9bb7e5000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe9bb5cd000)
libmpi.so.20 => /usr/lib/x86_64-linux-gnu/libmpi.so.20 (0x00007fe9bb2db000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe9bdaa9000)
libblas.so.3 => /usr/lib/x86_64-linux-gnu/libblas.so.3 (0x00007fe9bb080000)
libopenblas.so.0 => /usr/lib/x86_64-linux-gnu/libopenblas.so.0 (0x00007fe9b8dda000)
libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007fe9b8b9a000)
libopen-rte.so.20 => /usr/lib/x86_64-linux-gnu/libopen-rte.so.20 (0x00007fe9b8912000)
libopen-pal.so.20 => /usr/lib/x86_64-linux-gnu/libopen-pal.so.20 (0x00007fe9b8660000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe9b8458000)
libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007fe9b821b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe9b8017000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fe9b7e14000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007fe9b7c09000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007fe9b79ff000)
Kompilacja CalculiX
Since CalculiX is a standalone application, you can either install a binary packaged for your distribution, or compile it yourself. Any CalculiX version from 2.7.x onwards should work with FreeCAD, and since the code hasn't changed much in years, lower versions than 2.7.x may work as well.
Compiling CalculiX is a task for experienced users, requiring editing the Makefiles and build options in different platforms. See the following information:
- Debian: Debian source package for Calculix, Gmsh 4 package available for testing in Community Extras PPA, Compiling CalculiX ccx on fedora, ubuntu and debian.
- Fedora 27, 28, 29: Compiling CalculiX ccx on fedora, ubuntu and debian.
- There is a CMake version of the source package in a github repository, but at the FreeCAD forums no one has reported if this package works.
Kompilacja Netgen
Netgen was originally linked by FreeCAD when FreeCAD used OCE, the community fork of OpenCascade (OCCT). As OCE lagged in development behind OCCT, FreeCAD switched back to OCCT. This broke the linking of Netgen, which could only link against OCCT 6.9 or OCE 0.18 and below. As OCCT 7.x versions improved the core funcitonality of FreeCAD, it was decided to drop Netgen support in favor of Gmsh.
Since then some success has been achieved patching and linking newer versions of Netgen against OCCT 7.x. Nevertheless, the inclusion of Netgen with FreeCAD is still problematic.
Instalacja w środowisku MacOSX
The OSX development packages of FreeCAD may include Netgen but may not include CalculiX.
See this forum post FEM on Mac OSX for information on installing CalculiX, and an updated post for more recent information.
CalculiX:
The following posts may be outdated:
Informacje dodatkowe
The FEM Workbench is under constant development. The most recent information is found in the FreeCAD forum.
If you have problems installing Netgen, Gmsh, or CalculiX, or another external tool, please search the forum first:
- Materiał: Bryła, Ciecz, Nieliniowy materiał mechaniczny, Materiał zbrojony (beton), Edytor materiału
- Geometria elementu: Geometria elementu, Obrót w okół osi, Geometria elementu 2D, Element przepływu
Wiązania
- Elektromagnetyczne: Potencjał elektryczny, Gęstość prądu, Magnetyzacja
- Geometryczne: Obrót w płaszczyźnie, Zapis wyników z przekroju, Zdefiniuj odkształcenie
- Mechaniczne: Zdefiniuj przytwierdzenie, Zdefiniuj przemieszczenie, Zdefiniuj kontakt, Zdefiniuj powiązanie, Wiązanie sprężyny, Zdefiniuj siłę, Zdefiniuj obciążenie ciśnieniem, Zdefiniuj siłę odśrodkową, Zdefiniuj obciążenie ciężarem własnym
- Termiczne: Warunek początkowy temperatury, Zdefiniuj strumień ciepła, Zdefiniuj temperaturę, Zdefiniuj objętościowe źródło ciepła
- Zmieniające wiązania: Zdefiniuj przenikalność elektryczną próżni
- Siatki: Siatka Netgen, Siatka GMSH, Warstwa graniczna siatki, Obszar siatki, Grupa siatki, Utwórz zestaw węzłów, Siatka MES na obiekt środowiska Siatka
- Solver: Narzędzia CalculiX, Elmer, Mystran, Z88; Równania: Elastyczności, Elektrostatyczne, Siły elektrostatycznej, Magnetodynamiczne, RMagnetodynamiczne 2D, Przepływu, Strumienia, Ciepła; Solver: Kontrola pracy solvera, Uruchom solver
- Wyniki: Oczyszczanie z wyników, Prezentacja wyników; Postprocessing: Zastosuj zmiany, Prezentacja graficzna, Filtr rozpraszający, Skalarny filtr obcinający, Filtr odcięcia funkcji, Filtr odcięcia obszaru, Filtr konturów, Filtr danych wzdłuż linii, Wykres liniowości naprężeń, Filtr obcinania danych w punkcie, Utwórz funkcję, Filtr funkcji płaszczyzny, Filtr funkcji sfery, Filtr funkcji walca, Filtr funkcji prostopadłościanu
- Dodatkowe: Konfiguracja, Instalacja środowiska MES, Siatka, FEM Solver, CalculiX, Beton, Rodzaje elementów
- Jak zacząć
- Instalacja: Pobieranie programu, Windows, Linux, Mac, Dodatkowych komponentów, Docker, AppImage, Ubuntu Snap
- Podstawy: Informacje na temat FreeCAD, Interfejs użytkownika, Profil nawigacji myszką, Metody wyboru, Nazwa obiektu, Edytor ustawień, Środowiska pracy, Struktura dokumentu, Właściwości, Pomóż w rozwoju FreeCAD, Dotacje
- Pomoc: Poradniki, Wideo poradniki
- Środowiska pracy: Strona Startowa, Architektura, Assembly, CAM, Rysunek Roboczy, MES, Inspekcja, Siatka, OpenSCAD, Część, Projekt Części, Punkty, Inżynieria Wsteczna, Robot, Szkicownik, Arkusz Kalkulacyjny, Powierzchnia 3D, Rysunek Techniczny, Test Framework