FEM Решатель Mystran
|
|
| Menu location |
|---|
| Solve → Solver Mystran |
| Workbenches |
| FEM |
| Default shortcut |
| S M |
| Introduced in version |
| 0.20 |
| See also |
| FEM tutorial |
Описание
The SolverMystran command enables usage of the MYSTRAN solver. It may be used for:
- Setting analysis parameters.
- Selecting working directory.
- Running the MYSTRAN solver.
Installation
Windows
You can get the Mystran executable here. Put the folder where you place mystran.exe (the executable must have this exact name - remove the remaining part of the default name) in the Windows PATH variable or just place the file in the FreeCAD\bin folder. If necessary, specify it under Preferences → FEM → Mystran.
The SolverMystran also needs two other packages:
- pyNastran - to write out case file.
- hfcMystran - to read in Mystran's NEU result file.
pyNastran can be installed through pip:
- Open a Command terminal in your FreeCAD\bin folder.
- Enter:
python -m pip install pyNastran - It will be installed in the FreeCAD\bin\lib\site-packages folder.
hfcMystran can be downloaded from its github site as a zip file (Code → Download ZIP). Unzip it and place it in the FreeCAD\Mod folder.
Linux
Linux installation procedure is similar but there are some differences.
After downloading the Mystran executable, rename it as explained above, allow it to be executed (right-click → Properties → Permissions → Allow executing file as program) and put it in the usr/bin directory of FreeCAD.
To install pyNastran, enter the following commands in the Python Console in FreeCAD:
import subprocess
subprocess.run(['pip', 'install', 'pyNastran'])
Finally, download and unpack hfcMystran and put it in the usr/Mod directory of FreeCAD.
Quick test
After installation you can select Utilities → Open FEM examples in the FEM Workbench. Under Solver → Mystran you can find some working Mystran examples.
Применение
- Create an
Analysis container.
- There are several ways to invoke the command:
- Double-click the
SolverMystran object.
- Press the Write button.
- Press the Run button.
Limitations
- Currently, only displacements are available as contour plots from analyses with this solver. To see the stresses, switch to hfcMystran workbench, open your case and its F06 file. pyNastran GUI can be used to plot all the results.
- Only the following element types are currently supported: first and second order tetrahedrons, first order triangular and quadrilateral shells and first order beams. If different elements are generated with Gmsh, the Mystran solver will show an error.
File function
Under Mod\Fem\femsolver\mystran, there are these files:
add_con_displacement.py
add_con_fixed.py
add_con_force.py
add_femelement_geometry.py
add_femelement_material.py
add_mesh.py
add_solver_control.py
writer.py
solver.py
tasks.py
The function of each file are:
writer.py - main control file
model = BDF()
model = add_solver_control.add_solver_control(pynasf, model, self)
model = add_femelement_geometry.add_femelement_geometry(pynasf, model, self)
model = add_mesh.add_mesh(pynasf, model, self)
model = add_femelement_material.add_femelement_material(pynasf, model, self)
model = add_con_fixed.add_con_fixed(pynasf, model, self)
model = add_con_displacement.add_con_displacement(pynasf, model, self)
model = add_con_force.add_con_force(pynasf, model, self)
BDF() - Create empty case file.
$pyNastran: version=msc
$pyNastran: punch=False
$pyNastran: encoding=utf-8
$pyNastran: nnodes=0
$pyNastran: nelements=0
ENDDATA
add_solver_control.py - Adding EXECUTIVE CONTROL DECK and CASE CONTROL DECK.
$EXECUTIVE CONTROL DECK
SOL 101
CEND
$CASE CONTROL DECK
ECHO = NONE
TITLE = pyNastran for generating solverinput for for Mystran
SUBCASE 1
DISPLACEMENT(SORT1,REAL) = ALL
LOAD = 1
SPC = 1
SPCFORCES(SORT1,REAL) = ALL
STRESS(SORT1,REAL,VONMISES,BILIN) = ALL
SUBTITLE = Default
BEGIN BULK
$PARAMS
PARAM POST -1
add_femelement_geometry.py - Adding GRID cards
add_mesh.py - Adding element cards
add_femelement_material.py - Adding MAT1 card
add_con_fixed.py - Adding SPCADD and SPC1 cards
add_con_displacement.py - Adding SPCADD and SPC1 cards
add_con_force.py - Adding FORCE cards
- Materials: Solid Material, Fluid Material, Non-Linear Mechanical Material, Reinforced Material (Concrete); Material Editor
- Element Geometry: Beam Cross Section, Beam Rotation, Shell Plate Thickness, Fluid Section for 1D Flow
- Electromagnetic Boundary Conditions: Electrostatic Potential Boundary Condition, Current Density Boundary Condition, Magnetization Boundary Condition, Electric Charge Density
- Fluid Boundary Conditions: Initial Flow Velocity Condition, Initial Pressure Condition, Flow Velocity Boundary Condition
- Geometrical Analysis Features: Plane Multi-Point Constraint, Section Print Feature, Local Coordinate System
- Mechanical Boundary Conditions and Loads: Fixed Boundary Condition, Rigid Body Constraint, Displacement Boundary Condition, Contact Constraint, Tie Constraint, Spring Boundary Condition, Force Load, Pressure Load, Centrifugal Load, Gravity Load
- Thermal Boundary Conditions and Loads: Initial Temperature, Heat Flux Load, Temperature Boundary Condition, Body Heat Source
- Overwrite Constants: Constant Vacuum Permittivity
- Mesh: Mesh From Shape by Netgen, Mesh From Shape by Gmsh, Mesh Boundary Layer, Mesh Refinement, Mesh Group, Erase Elements, FEM Mesh to Mesh
- Solve: Solver CalculiX, Solver Elmer, Solver Mystran, Solver Z88; Mechanical Equations: Elasticity Equation, Deformation Equation; Electromagnetic Equations: Electrostatic Equation, Electricforce Equation, Magnetodynamic Equation, Magnetodynamic 2D Equation, Static Current Equation; Flow Equation, Flux Equation, Heat Equation, Solver Job Control, Run Solver
- Results: Purge Results, Show Result, Apply Changes to Pipeline, Post Pipeline From Result, Pipeline Branch, Warp Filter, Scalar Clip Filter, Function Cut Filter, Region Clip Filter, Contours Filter, Glyph Filter, Line Clip Filter, Stress Linearization Plot, Data at Point Clip Filter, Calculator Filter; Filter Functions: Plane, Sphere, Cylinder, Box; Data Visualizations: Create Lineplot, Create Histogram, Create Table
- Utilities: Clipping Plane on Face, Remove All Clipping Planes, FEM Examples; Clear FEM Mesh, Display Mesh Info
- Additional: Preferences; FEM Install, FEM Mesh, FEM Solver, FEM CalculiX, FEM Concrete; FEM Element Types
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework