File Exchange

image thumbnail

FEATool Multiphysics - MATLAB FEA Physics Simulation Toolbox

version 1.11 (37.7 MB) by Precise Simulation
FEATool Multiphysics is an Easy to Use PDE, Physics, FEM and CFD MATLAB Simulation GUI Toolbox

337 Downloads

Updated 24 Jul 2019

GitHub view license on GitHub

FEATool Multiphysics - Physics Modeling and Simulation Made Easy

FEATool is a fully integrated multiphysics (www.featool.com/multiphysics) modeling and engineering simulation environment for MATLAB, featuring built-in CAD and geometry tools, preprocessing and grid generation, solvers, and postprocessing and visualization.

* Work with FEATool and multi-physics simulation in different ways:

- The graphical user interface GUI allows access to all the functionality such as grid generation, multiphysics couplings, FEM assembly, solvers, and postprocessing in a very efficient and easy to use way.

- All FEATool functionality also works on the MATLAB command line interface CLI. This allows access to all the power and functionality of MATLAB commands and toolboxes for even more possibilities.

- FEATool also supports recording the GUI modeling process which then can be saved and exported as MATLAB model m-script files. This is a great way to see and learn how to model with script files which is very useful and convenient to create parametric studies and simulation runs.

* Predefined Multiphysics Modes

Several predefined physics modes are available which easily can be combined to set up of different multiphysics simulation problems including fluid flow, heat transfer, structural stresses, electromagnetics, reaction and transport of mass and chemical species. Moreover, users can also specify their own custom equations and physics modes.

* Toolbox Features

- FEM/FEA GUI modeling and m-file scripting
- CAD and geometry modeling in 1D, 2D, and 3D (built-in, OpenCASCADE, and BRL-CAD geometry engines)
- Automatic unstructured grid generation on complex geometries with triangular and tetrahedral cells (support for external mesh generators Gmsh, Triangle, GiD)
- Linear, triangular/tetrahedral, and quadrilateral/hexahedral cells
- Constant, 1st-5th order conforming and non-conforming, vector, and bubble FEM basis functions
- Stationary and time-dependent linear and non-linear solvers
- Built-in postprocessing and visualization including boundary and subdomain integration
- Support for the OpenFOAM and FEniCS external solvers
- Direct (Umfpack/MUMPS) and interative (ILU(k) GMRES/BiCGStab) linear solvers
- Grid generation and postprocessing tools directly callable from the GUI

*) SYSTEM REQUIREMENTS

Verified to work with Windows, Mac, and Linux systems running MATLAB R2009b and later.

*) INSTALLATION

Search for and install FEATool by using the "Get More Apps" button in the MATLAB "APPS" toolbar.

Alternatively, download and extract the FEATool archive

- For MATLAB 2012b and later double click on the "FEATool Multiphysics.mlappinstall" file, or use the "Install App" button in the MATLAB "APPS" toolbar. Once the app has been installed, a corresponding icon will be available in the toolbar to start FEATool. (Note that MATLAB may not give any indication of the app installation progress or completion.)

- For MATLAB 2009b-2012a, copy the "featool.p" file to a directory accessible to MATLAB, and then enter "featool" on the MATLAB command line to start the application.

Visit https://www.featool.com or see the included README file for more information.

Cite As

Precise Simulation (2019). FEATool Multiphysics - MATLAB FEA Physics Simulation Toolbox (https://www.github.com/precisesimulation/featool-multiphysics), GitHub. Retrieved .

Comments and Ratings (27)

Please use the FEATool user forum http://forum.featool.com for questions and technical issues.

@Shuyang Fan: Thank you for your review. FEATool does not specify specific units and can work with any system as long as you are consistent. So if you make your geometry in mm your equation/material coefficients must also be correspondingly specified/scaled to work in mm. For simplicity, if you use SI units for everything (geometry, material coefficients) you don't have to think about it.

SHUYANG FAN

what‘s the unit of the scale for the geometry? mm or m(SI unit?)?

SHUYANG FAN

very useful and advanced

To assist with troubleshooting, please use the "Report Issue..." option under the "Help" menu in the FEATool GUI to report bugs and issues. If possible, please also include instructions how to reproduce the issue and system configuration (system, OS, MATLAB version etc).

bu an

'featool testt' failed to run in the command window of MATLAB R2019a. It returns following errors:
>> featool testt
Test suite: tutorials_tests
Test suite location: C:\Users\anonymous\Documents\MATLAB\Add-Ons\Collections\FEATool Multiphysics - MATLAB FEA Physics Simulation Toolbox
Log file: C:\Users\anonymous\AppData\Local\Temp\FEATool-test.log
04-May-2019 21:52:53

tutorials_tests
1 - 01_Quickstart\01_hole_in_plate1 .................... ERROR in 1.0 seconds
错误使用 featool
Error executing UI action: ["uipushtool","Standard.NewFigure",[],"ClickedCallback",[]]

出错 featool

出错 featool

出错 featool

出错 featool
2 - 01_Quickstart\02_heat_exchanger1 ................... ERROR in 0.2 seconds
错误使用 featool
Error executing UI action: ["uipushtool","Standard.NewFigure",[],"ClickedCallback",[]]
........
........
出错 featool
Test suite: tutorials_tests ....................................... FAILED in 5.3 seconds
------------------------------------------------------------------------------------------------------------
In addition, tutorial examples return similar errors. I don't know what happens.

AJ Park

@Lledo Prades: Thank you for the issue report, there will be an update addressing this later this Spring. In the meanwhile you could try to scale your coordinates (by maybe a factor of 100 or 1000), alternatively if you upgrade and register FEATool you can manually set the grid size and have access to the advanced grid generation settings.

Hi,
I designed a 2D geometry, which is similar to the one defined in the example “Flow around a cylinder”, but with bigger dimensions (162 x 76, being X and Y dimensions for the rectangle respectively, and for the circle the center is in (22,38), with y and x radius of 12).
When I tried to mesh it, changing to the Grid menu, the mesh procedure did not start, indicating a grid size of 12 (which is impossible to change with the toolbar). Moreover, I get the following error in the Command Window of MATLAB R2016b:
Error using matlab.ui.control.UIControl/set
While setting property 'SliderStep' of class 'UIControl':
Slider step line increment must be between 0 and 1.
Error in featool
Error in featool
Error while evaluating UIControl Callback
Could you please indicate me how I have to procedure for meshing this type of geometry?
Thanks in advance.

@Jack Jonyson: Thank you for trying FEATool and your review. If possible, please provide some constructive and actual feedback, in order to help us help you and improve the toolbox.

@Xiangyuan: Thank you for your interest in FEATool Multiphysics, please visit the website https://www.featool.com/get-featool for full licensing and contact information.

Xiangyuan

Please leave contact numbers and email address for quotation and communication use. We will buy this software in the very near future. Regards.

Gabriel Hu

@Kate Xu: The equations and boundary condition are defined in the "Physics Mode" section of the FEATool User's Guide (https://www.featool.com/doc/physics.html#phys_modes).

kate xu

Hi.How can I get the control equations of fluid dynamics that are solved for different efficient models in CFDTool?

@Xiangyuan: FEATool Multiphysics is neither developed nor licensed by the Mathworks and must therefore be licensed and installed separately using the Add-On toolbar (as described above).

Xiangyuan

Hi, my university has the official MATLAB license, but as I saw from the list of toolboxes, the FEATool Multiphysics is not included there. Does it mean that I need to buy the FEATool Multiphysics separately? Or, this toolbox is hiding somewhere in the list?

@Talha Zia: With the "Flow" checkbox in the "Equation Settings" dialog box in CFDTool you can switch the pre-defined Navier-Stokes equations on and off. Then you can enter the fluid parameters density, viscosity, and volume source/body force terms.

Talha Zia

How can I use Navier Stokes Equation in CFDTool?

@Kevin Chng The FEATool Multiphysics (and CFDTool) toolboxes are completely stand-alone, and do not depend on or require any additional Matlab toolboxes.

Kevin Chng

Does it required partial differential equation toolbox?

@Eric Andreescu It looks like you have a very nonlinear problem. For these to converge you typically need a very good initial guess (init) and/or lower the nonlinear relaxation parameter (nlrlx). You might also want to start introducing the nonlinearities bit by bit, and use the previous solution as initial guesses.

Hi,
I applied FEATool v1.7.1 to conduct the heat transfer analysis recently. However, the converge cannot achieved after thousands of times of attempts. Even though I spent two weeks on error checking, no improvement is achieved. Can you give me some suggestions? The following are the codes.
Thank you
Best wishes
Eric

%% Starting new model.
fea.sdim = { 'r', 'z' };
fea.geom = struct;
fea.geom = struct;
fea = addphys( fea, {@heattransfer, 1}, { 'T' } );

%% Geometry operations.
gobj = gobj_rectangle( 0.1143, 0.1223, 0, 0.0892, 'R1' );
fea.geom.objects{1} = gobj;
fea.grid = gridgen( fea, 'hmax', 0.001, 'itmax', 800 );

%% Constants and expressions.
fea.expr = { 'omega', '314.1593';
'g', '9.8';
'Lseal', '0.0892';
'SHstator', '645';
'rhostator', '8220.93';
'Tflowin', '424.85';
'Tosflow', '225.4214';
'Tcavityend', '524.5643';
'aveTcavity', '441.7945';
'c1', '0.1';
'c2', '1/3';
'RoutersZ', '0.1223';
'RinnerbZ', '0.1143';
'RoutersY', '0.1223';
'RinnerbY', '0.1143';
'vkinematicosZ', '1.9764e-06';
'VteosZ', '0.0014259';
'PrandtlosZ', '0.71736';
'TCosZflow', '0.050733';
'Lc', '0.0892';
'Nusselt', '5852.5638';
'TCQSiflow', '0.051241';
'vkinematicosY', '3.4149e-06';
'VteosY', '0.0012475';
'PrandtlosY', '0.72558';
'TCosYflow', '0.055714';
'vkinematicos', '1.5647e-06';
'Vteos', '0.002018';
'Prandtlos', '0.70811';
'TCosflow', '0.039489'};

%% Equation settings.
fea.phys.ht.dvar = { 'T' };
fea.phys.ht.sfun = { 'sflag1' };
fea.phys.ht.eqn.coef = { 'rho_ht', 'rho', 'Density', { 'rhostator' };
'cp_ht', 'C_p', 'Heat capacity', { 'SHstator' };
'k_ht', 'k', 'Thermal conductivity', { '3.739721e-9*(T+273.15)^3-7.945898004e-6*(T+273.15)^2+0.021263470082733*(T+273.15)+5.451796181807637' };
'u_ht', 'u', 'Convection velocity in r-direction', { '0' };
'w_ht', 'w', 'Convection velocity in z-direction', { '0' };
'q_ht', 'Q', 'Heat source', { '(3.739721e-9*(T+273.15)^3-7.945898004e-6*(T+273.15)^2+0.021263470082733*(T+273.15)+5.451796181807637)/r*Tr' };
'T0_ht', 'T_0', 'Initial condition for T', { 'Tflowin' } };
fea.phys.ht.eqn.seqn = 'r*rho_ht*cp_ht*T'' - r*k_ht*(Tr_r + Tz_z) + r*rho_ht*cp_ht*(u_ht*Tr_t + w_ht*Tz_t) = r*q_ht';
fea.phys.ht.eqn.vars = { 'Temperature, T', 'T';
'Temperature gradient, T', { 'Tr', 'Tz' } };
fea.phys.ht.prop.isaxi = 1;
fea.phys.ht.prop.artstab.id = 0;
fea.phys.ht.prop.artstab.id_coef = 0.5;
fea.phys.ht.prop.artstab.sd = 0;
fea.phys.ht.prop.artstab.sd_coef = 0.25;
fea.phys.ht.prop.active = 1;

%% Boundary settings.
fea.phys.ht.bdr.sel = [ 4, 4, 4, 4 ];
fea.phys.ht.bdr.coef = { 'bcr_ht', 'T = T_0', 'Temperature', { 'T_0' }, { 1, 1, 1, 1 }, [], { 0, 0, 0, 0 };
'bcc_ht', 'n.(-kgrad T) = 0', 'Convective flux/outflow', [], { 0, 0, 0, 0 }, [], { 0, 0, 0, 0 };
'bci_ht', 'n.(-kgrad T + rhoC_puT) = 0', 'Thermal insulation/symmetry', [], { 0, 0, 0, 0 }, { 'r*rho_ht*cp_ht*(nr*u_ht+nz*w_ht)*T' }, { '0', '0', '0', '0' };
'bcf_ht', '-n.(-kgrad T + rhoC_puT) = q_0 + h*(T_inf-T) + Const*(T_amb4-T4)', 'Heat flux', { { 'q_0', 'h', 'T_inf', 'Const', 'T_amb' } }, { 0, 0, 0, 0 }, { 'r*rho_ht*cp_ht*(nr*u_ht+nz*w_ht)*T+r*(', ')+r*(', ')*((', ')-T)+r*(', ')*((', ')^4-T^4)' }, { { '0', 'c1 *(g*VteosZ*sqrt( (T-Tflowin)^2 ) *(RoutersZ-RinnerbZ)^3/(vkinematicosZ^2) *PrandtlosZ)^c2 *TCosZflow /(RoutersZ-RinnerbZ)', 'Tflowin', '0', '0' }, { '0', 'c1*(g*Vteos*sqrt(( T-Tosflow )^2)*Lseal^3 /(vkinematicos^2) *Prandtlos)^c2 *TCosflow /Lseal', 'Tosflow', '0', '0' }, { '0', 'c1 *(g*VteosY*sqrt( (T-Tcavityend)^2 ) *(RoutersY-RinnerbY)^3/(vkinematicosY^2) *PrandtlosY)^c2 *TCosYflow /(RoutersY-RinnerbY)', 'Tcavityend', '0', '0' }, { '0', 'Nusselt *TCQSiflow /Lc', 'aveTcavity', '0', '0' } } };
fea.phys.ht.bdr.vars = { 'Normal conductive heat flux, T', '-r*k_ht*(nr*Tr+nz*Tz)';
'Normal convective heat flux, T', 'r*rho_ht*cp_ht*(nr*u_ht+nz*w_ht)*T';
'Normal total heat flux, T', '-r*k_ht*(nr*Tr+nz*Tz)+r*rho_ht*cp_ht*(nr*u_ht+nz*w_ht)*T' };
fea.phys.ht.prop.isaxi = 1;
fea.phys.ht.prop.artstab.id = 0;
fea.phys.ht.prop.artstab.id_coef = 0.5;
fea.phys.ht.prop.artstab.sd = 0;
fea.phys.ht.prop.artstab.sd_coef = 0.25;
fea.phys.ht.prop.active = 1;

%% Solver call.
fea = parsephys( fea );
fea = parseprob( fea );

fea.sol.u = solvestat( fea, ...
'tstep', 0.1, ...
'icub', 2, ...
'nlrlx', 1, ...
'toldef', 1e-06, ...
'tolchg', 1e-06, ...
'reldef', 0, ...
'relchg', 1, ...
'maxnit', 50, 'init', { 'T0_ht' }, 'solcomp', 1 );

%% Postprocessing.
postplot( fea, ...
'surfexpr', 'T', ...
'colorbar', 1, ...
'solnum', 1 );

@Alberto Dear Alberto, Thank you for your comment and interest. FEATool is in the process of being updated and redesigned so please use CFDTool until FEATool v1.9 is made available. The OpenFOAM interface will also be integrated and made available in CFDTool from version 1.2, so keep an eye out for that too.

Alberto

Hi,
I downloaded the files but I can only find the file CFDTool.mlappinstall which installs CFDtool 1.0 not FEATool. I am interested in trying out for personal use FEATool 1.8, which also uses openfoam. This page says FEATool 1.8, so I am a bit confused. Can you help?
Thank you
Best
Alberto

Updates

1.11

- fluid-structure interaction (FSI) physics mode and solver
- support for OpenCASCADE and BRL-CAD 3D geometry engines
- vector and bubble finite element shape functions

1.10.0.2

- Improved (GUI) support for interior/internal boundaries

1.10.0.1

Minor update

1.10

Built-in automated multiphysics tutorials (see Changelog for other features and changes)

1.9.0.1

Added installation instructions

1.9

- New compressible Euler equations physics mode
- New swirl flow physics mode
- OpenFOAM CFD solver integration improvements
- Automatic shock capturing and stabilization
- Extended backwards compatibility to MATLAB 2009b

1.8.0.0

Update with new 3D geometry CAD engine with STL import, and new OpenFOAM MATLAB GUI interface and CFD solver integration

1.7.0.0

1.7

MATLAB Release Compatibility
Created with R2019a
Compatible with R2009b to any release
Platform Compatibility
Windows macOS Linux