FEM EquationFlow: Difference between revisions

From FreeCAD Documentation
(add basic info)
mNo edit summary
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}}
<translate>
<translate>


<!--T:4-->
<!--T:4-->
{{Docnav
{{Docnav
|[[FEM_EquationElectrostatic|Electrostatic equation]]
|[[FEM_EquationMagnetodynamic2D|Magnetodynamic 2D equation]]
|[[FEM_EquationFlux|Flux equation]]
|[[FEM_EquationFlux|Flux equation]]
|[[FEM_Workbench|FEM]]
|[[FEM_Workbench|FEM]]
|IconL=FEM_EquationElectrostatic.svg
|IconL=FEM_EquationMagnetodynamic2D.svg
|IconR=FEM_EquationFlux.svg
|IconR=FEM_EquationFlux.svg
|IconC=Workbench_FEM.svg
|IconC=Workbench_FEM.svg
Line 18: Line 17:
|MenuLocation= Solve → Flow equation
|MenuLocation= Solve → Flow equation
|Workbenches=[[FEM_Workbench|FEM]]
|Workbenches=[[FEM_Workbench|FEM]]
|Version=0.19
|Version=0.17
|SeeAlso=
|SeeAlso=
}}
}}
Line 25: Line 24:
This equation calculate viscous fluid flows using the [https://en.wikipedia.org/wiki/Navier-Stokes_Equations Navier-Stokes equations].
This equation calculate viscous fluid flows using the [https://en.wikipedia.org/wiki/Navier-Stokes_Equations Navier-Stokes equations].


<!--T:10-->
For info about the math of the equation, see the [http://www.elmerfem.org/blog/documentation/ Elmer models manual], section ''Navier-Stokes Equations''.
For info about the math of the equation, see the [http://www.elmerfem.org/blog/documentation/ Elmer models manual], section ''Navier-Stokes Equations''.


==Usage==
==Usage== <!--T:11-->


<!--T:12-->
# After adding an Elmer solver as described [[FEM_SolverElmer#Equations|here]], select it in the [[Tree_view|tree view]].
# After adding an Elmer solver as described [[FEM_SolverElmer#Equations|here]], select it in the [[Tree_view|tree view]].
# Now either use the toolbar button [[Image:FEM_EquationFlow.svg|32px]] or the menu {{MenuCommand|Solve → Flow equation}}.
# Now either use the toolbar button [[Image:FEM_EquationFlow.svg|24px]] or the menu {{MenuCommand|Solve → Flow equation}}.
# Change the [[#Solver_Settings|equation's solver settings]] or the [[FEM_SolverElmer_SolverSettings|general solver settings]] if necessary.
# Change the [[#Solver_Settings|equation's solver settings]] or the [[FEM_SolverElmer_SolverSettings|general solver settings]] if necessary.


==Solver Settings==
==Solver Settings== <!--T:13-->


<!--T:14-->
For the general solver settings, see the [[FEM_SolverElmer_SolverSettings|Elmer solver settings]].
For the general solver settings, see the [[FEM_SolverElmer_SolverSettings|Elmer solver settings]].


<!--T:15-->
The flow equation provides these special settings:
The flow equation provides these special settings:
* {{PropertyData|Div Discretization}}: To be set to ''true'' for incompressible flow for more stable discretization when the [https://en.wikipedia.org/wiki/Reynolds_number Reynolds number] increases.
* {{PropertyData|Flow Model}}: The flow model that should be used. The default ''Full'' includes convection and time derivative terms in the model. ''No convection'' switches off the convection terms and the ''Stokes'' model switches off the convection terms and the (explicit) time derivative terms.
* {{PropertyData|Gradp Discretization}}: If set to ''true'' pressure [https://en.wikipedia.org/wiki/Dirichlet_boundary_condition Dirichlet boundary conditions] can be used. Also the mass flux is available as a natural boundary condition.
* {{PropertyData|Variable}}: Optional only for calculations in 2D: You can change the default of ''3'' to ''2''.</br>'''Note''': In this case none of the flow velocity boundary conditions can have a specified z-component.

<!--T:21-->
Equation:
* {{PropertyData|Convection}}: The type of convection to be used in the [[Image:FEM_EquationHeat.svg|24px]] [[FEM_EquationHeat|Heat equation]].</br>'''Note''': For thermal flows it must be set to ''Computed'' (the default).
* {{PropertyData|Magnetic Induction}}: If set to ''true'' the magnetic induction equation will be solved along with the [https://en.wikipedia.org/wiki/Navier%E2%80%93Stokes_equations Navier-Stokes equations].

===Notes for Convergence=== <!--T:24-->

<!--T:25-->
If the solver results do not converge, you can try these things (in the given order):
# Reduce the {{PropertyData|Relaxation Factor}}, see the [[FEM_SolverElmer_SolverSettings#Relaxation_Factor|nonlinear system settings]].
# Increase the value for {{PropertyData|Nonlinear Newton After Iterations}}, see the [[FEM_SolverElmer_SolverSettings#Nonlinear_System|nonlinear system settings]].
# Reduce the number of CPU cores used, see the [[FEM_Preferences#Elmer|FEM preferences]].
# Increase the mesh density (make it more fine).

==Analysis Feature Information== <!--T:16-->

<!--T:17-->
The flow equation takes the following analysis features into account if they are set:

<!--T:18-->
* [[Image:FEM_ConstraintFlowVelocity.svg|32px]] [[FEM_ConstraintFlowVelocity|Flow velocity boundary condition]]
* [[Image:FEM_ConstraintInitialFlowVelocity.svg|32px]] [[FEM_ConstraintInitialFlowVelocity|Initial flow velocity condition]]
* [[Image:FEM_ConstraintPressure.svg|32px]] [[FEM_ConstraintPressure|Pressure load]]
* [[Image:FEM_ConstraintInitialPressure.svg|32px]] [[FEM_ConstraintInitialPressure|Initial pressure condition]] ({{Version|0.21}})

===Notes=== <!--T:19-->

<!--T:20-->
* Except for calculations in 2D, for all above boundary conditions it is important that they act on a face or body. Boundary conditions for 3D set to lines or vertices are not recognized by the Elmer solver.
* Since [[Image:FEM_ConstraintPressure.svg|24px]] [[FEM_ConstraintPressure|Pressure load]] can only be set to faces, pressure loads cannot be used for calculations in 2D.
* If there is no [[Image:FEM_ConstraintPressure.svg|24px]] [[FEM_ConstraintPressure|Pressure load]] set, [[Image:FEM_ConstraintInitialPressure.svg|24px]] [[FEM_ConstraintInitialPressure|Initial pressure condition]] will only be taken into account if {{PropertyData|Gradp Discretization}} is set to ''true''.

==Results== <!--T:22-->

<!--T:23-->
The results are the velocity in <math>\rm m/s</math> and the pressure in <math>\rm Pa</math>. If there is no [[Image:FEM_ConstraintInitialPressure.svg|24px]] [[FEM_ConstraintInitialPressure|Initial pressure condition]] and [[Image:FEM_ConstraintPressure.svg|24px]] [[FEM_ConstraintPressure|Pressure load]] given, the resulting pressure will be relative not absolute. Since pressure must act on a face, absolute pressure results cannot be obtained in 2D simulations.




<!--T:5-->
<!--T:5-->
{{Docnav
{{Docnav
|[[FEM_EquationElectrostatic|Electrostatic equation]]
|[[FEM_EquationMagnetodynamic2D|Magnetodynamic 2D equation]]
|[[FEM_EquationFlux|Flux equation]]
|[[FEM_EquationFlux|Flux equation]]
|[[FEM_Workbench|FEM]]
|[[FEM_Workbench|FEM]]
|IconL=FEM_EquationElectrostatic.svg
|IconL=FEM_EquationMagnetodynamic2D.svg
|IconR=FEM_EquationFlux.svg
|IconR=FEM_EquationFlux.svg
|IconC=Workbench_FEM.svg
|IconC=Workbench_FEM.svg
Line 53: Line 97:
{{FEM Tools navi{{#translation:}}}}
{{FEM Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 13:30, 22 November 2023

FEM EquationFlow

Menu location
Solve → Flow equation
Workbenches
FEM
Default shortcut
None
Introduced in version
0.17
See also
None

This equation calculate viscous fluid flows using the Navier-Stokes equations.

For info about the math of the equation, see the Elmer models manual, section Navier-Stokes Equations.

Usage

  1. After adding an Elmer solver as described here, select it in the tree view.
  2. Now either use the toolbar button or the menu Solve → Flow equation.
  3. Change the equation's solver settings or the general solver settings if necessary.

Solver Settings

For the general solver settings, see the Elmer solver settings.

The flow equation provides these special settings:

  • DataDiv Discretization: To be set to true for incompressible flow for more stable discretization when the Reynolds number increases.
  • DataFlow Model: The flow model that should be used. The default Full includes convection and time derivative terms in the model. No convection switches off the convection terms and the Stokes model switches off the convection terms and the (explicit) time derivative terms.
  • DataGradp Discretization: If set to true pressure Dirichlet boundary conditions can be used. Also the mass flux is available as a natural boundary condition.
  • DataVariable: Optional only for calculations in 2D: You can change the default of 3 to 2.
    Note: In this case none of the flow velocity boundary conditions can have a specified z-component.

Equation:

  • DataConvection: The type of convection to be used in the Heat equation.
    Note: For thermal flows it must be set to Computed (the default).
  • DataMagnetic Induction: If set to true the magnetic induction equation will be solved along with the Navier-Stokes equations.

Notes for Convergence

If the solver results do not converge, you can try these things (in the given order):

  1. Reduce the DataRelaxation Factor, see the nonlinear system settings.
  2. Increase the value for DataNonlinear Newton After Iterations, see the nonlinear system settings.
  3. Reduce the number of CPU cores used, see the FEM preferences.
  4. Increase the mesh density (make it more fine).

Analysis Feature Information

The flow equation takes the following analysis features into account if they are set:

Notes

  • Except for calculations in 2D, for all above boundary conditions it is important that they act on a face or body. Boundary conditions for 3D set to lines or vertices are not recognized by the Elmer solver.
  • Since Pressure load can only be set to faces, pressure loads cannot be used for calculations in 2D.
  • If there is no Pressure load set, Initial pressure condition will only be taken into account if DataGradp Discretization is set to true.

Results

The results are the velocity in and the pressure in . If there is no Initial pressure condition and Pressure load given, the resulting pressure will be relative not absolute. Since pressure must act on a face, absolute pressure results cannot be obtained in 2D simulations.