FEM ConstraintFlowVelocity: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
 
(44 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>

<!--T:4-->
<!--T:4-->
{{Docnav
{{Docnav
|[[FEM_ConstraintFluidBoundary|Constraint fluid boundary]]
|[[FEM_ConstraintInitialPressure|Constraint initial pressure]]
|[[FEM_ConstraintFixed|Constraint fixed]]
|[[FEM_ConstraintPlaneRotation|Constraint plane rotation]]
|[[FEM_Module|FEM]]
|[[FEM_Workbench|FEM]]
|IconL=FEM_ConstraintInitialPressure.svg
|IconL=FEM_ConstraintFluidBoundary.png
|IconR=FEM_ConstraintPlaneRotation.svg
|IconC=Workbench_FEM.svg
|IconC=Workbench_FEM.svg
|IconR=FEM_ConstraintFixed.png
}}
}}


Line 14: Line 15:
{{GuiCommand
{{GuiCommand
|Name=FEM ConstraintFlowVelocity
|Name=FEM ConstraintFlowVelocity
|MenuLocation=Model → Fluid boundary conditionsFlow velocity boundary condition
|Icon=Fem-constraint-flow-velocity.svg
|Workbenches=[[FEM_Workbench|FEM]]
|MenuLocation= Model → Fluid constraintsConstraint flow velocity
|SeeAlso=[[FEM_ConstraintInitialFlowVelocity|Constraint initial flow velocity]]
|Workbenches=[[Fem Workbench|FEM]]
|Shortcut=
|SeeAlso=[[FEM_tutorial|FEM tutorial]]
}}
}}


Line 24: Line 23:


<!--T:2-->
<!--T:2-->
Applies a flow velocity boundary condition to a face in 3D or to an edge in 2D.
Applies a flow velocity as boundary condition to an edge in 2D or to a face in 3D.


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


<!--T:11-->
<!--T:11-->
# Click on [[Image:Fem-constraint-flow-velocity.svg|32x32px]] or choose '''Model''''''Fluid Constraints''' {{KEY|[[Image:Fem-constraint-flow-velocity.svg|32x32px]] Constraint flow velocity}} from the top menu
# Press the {{Button|[[Image:FEM_ConstraintFlowVelocity.svg|16px]] [[FEM_ConstraintFlowVelocity|Flow velocity boundary condition]]}} button or select the menu {{MenuCommand|Model → Fluid boundary conditions → [[Image:FEM_ConstraintFlowVelocity.svg|16px]] Flow velocity boundary condition}}.
# Select the target Edges or Faces.
# The task panel for constraint flow velocity appears </br>[[File:FEM-constraint-flow-velocity task-panel.png]]
# Press the {{Button|Add}} button.
# Select the target Edges or Faces
# Uncheck ''Unspecified'' to activate the necessary fields for edition.
# Click {{KEY| Add}}
# Set the velocity values or ({{Version|0.21}}) specify a formula.
# Untick "unspecified" to activate the necessary fields for edition

# Fill in the values in mm/s for the main cartesian components
==Formulas== <!--T:15-->

<!--T:16-->
{{Version|0.21}}

<!--T:17-->
It is possible to define a velocity by specifying the velocity profile as formula. In this case the solver sets the velocities at the different positions according to the profile.

<!--T:18-->
To specify for example the velocity profile

<!--T:19-->
<math>\quad
v_{x} (y)=6\left(y-1\right)\left(2-y\right)
</math>

<!--T:20-->
for <math>y\in[1;2]</math> (assuming that e.g. a pipe has the wall at y = 1 m and y = 2 m)

<!--T:21-->
enter this to the ''Formula'' field:</br>
{{incode| Variable Coordinate 2; Real MATC "6*(tx-1)*(2-tx)"}}

<!--T:22-->
This code has the following syntax:
* the prefix ''Variable'' specifies that the velocity is not a constant but a variable
* the variable to calculate the velocity is ''Coordinate 2'', meaning y
* the velocity values are returned as ''Real'' (floating point value)
* ''MATC'' is the prefix for the Elmer solver that the following code is a formula
* ''tx'' is always the name of the variable in ''MATC'' formulas, no matter that ''tx'' in our case is actually ''y''

<!--T:23-->
That ''y'' will only be in the range <math>y\in[1;2]</math> is set because ''MATC'' only evaluates the ''tx'' range where the result is positive. This behavior is a bit special but has the advantage that one does not need to specify the range manually.

<!--T:24-->
It is also possible to use more than one variable. See as example the definition of rotations in the [[FEM_ConstraintDisplacement#Rotations|displacement constraint]].

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


<!--T:10-->
* Any vector component that should be the result of the solver must be set as ''Unspecified''.
* If the target face or edge is not aligned with the main Cartesian coordinate system, it is possible to set the option '''Normal to boundary'''.
*: If '''Normal to boundary''' is checked, the normal vector to the selected edge or face is X and it will be oriented away from the mesh domain.
*: For example, if a flow of 20 mm/s of air should enter the domain, then with '''Normal to boundary''' one must input -20 mm/s in the ''Velocity x'' field.


==Notes== <!--T:10-->
<!--T:12-->
* For a wall with non-slip condition, set all velocity components to 0.
* Vector components that are ticked as "unspecified" will be interpolated by the selected solver.
* For a symmetry condition, set the the flow to (0, Unspecified, Unspecified) if '''Normal to boundary''' is checked.
** Any vector that should be the result of the solver must be ticked as "unspecified".
* If the target face or edge is not aligned with the main cartesian coordinate system, it is possible to tick "normal to boundary".
**If "normal to boundary" is ticked, the normal vector to the selected edge or face is X and it will be oriented away from the mesh domain.
*** For example, if a flow of 20 mm/s of air must enter the domain, then after ticking "normal to boundary" the user will have to input -20 mm/s in the "velocity X" field.


<!--T:3-->
<br />


<!--T:5-->
<!--T:5-->
{{Docnav
{{Docnav
|[[FEM_ConstraintFluidBoundary|Constraint fluid boundary]]
|[[FEM_ConstraintInitialPressure|Constraint initial pressure]]
|[[FEM_ConstraintFixed|Constraint fixed]]
|[[FEM_ConstraintPlaneRotation|Constraint plane rotation]]
|[[FEM_Module|FEM]]
|[[FEM_Workbench|FEM]]
|IconL=FEM_ConstraintInitialPressure.svg
|IconL=FEM_ConstraintFluidBoundary.png
|IconR=FEM_ConstraintPlaneRotation.svg
|IconC=Workbench_FEM.svg
|IconC=Workbench_FEM.svg
|IconR=FEM_ConstraintFixed.png
}}
}}


Line 60: Line 97:
{{FEM Tools navi{{#translation:}}}}
{{FEM Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 14:00, 11 November 2023

FEM ConstraintFlowVelocity

Menu location
Model → Fluid boundary conditions → Flow velocity boundary condition
Workbenches
FEM
Default shortcut
None
Introduced in version
-
See also
Constraint initial flow velocity

Description

Applies a flow velocity as boundary condition to an edge in 2D or to a face in 3D.

Usage

  1. Press the Flow velocity boundary condition button or select the menu Model → Fluid boundary conditions → Flow velocity boundary condition.
  2. Select the target Edges or Faces.
  3. Press the Add button.
  4. Uncheck Unspecified to activate the necessary fields for edition.
  5. Set the velocity values or (introduced in version 0.21) specify a formula.

Formulas

introduced in version 0.21

It is possible to define a velocity by specifying the velocity profile as formula. In this case the solver sets the velocities at the different positions according to the profile.

To specify for example the velocity profile

for (assuming that e.g. a pipe has the wall at y = 1 m and y = 2 m)

enter this to the Formula field:
Variable Coordinate 2; Real MATC "6*(tx-1)*(2-tx)"

This code has the following syntax:

  • the prefix Variable specifies that the velocity is not a constant but a variable
  • the variable to calculate the velocity is Coordinate 2, meaning y
  • the velocity values are returned as Real (floating point value)
  • MATC is the prefix for the Elmer solver that the following code is a formula
  • tx is always the name of the variable in MATC formulas, no matter that tx in our case is actually y

That y will only be in the range is set because MATC only evaluates the tx range where the result is positive. This behavior is a bit special but has the advantage that one does not need to specify the range manually.

It is also possible to use more than one variable. See as example the definition of rotations in the displacement constraint.

Notes

  • Any vector component that should be the result of the solver must be set as Unspecified.
  • If the target face or edge is not aligned with the main Cartesian coordinate system, it is possible to set the option Normal to boundary.
    If Normal to boundary is checked, the normal vector to the selected edge or face is X and it will be oriented away from the mesh domain.
    For example, if a flow of 20 mm/s of air should enter the domain, then with Normal to boundary one must input -20 mm/s in the Velocity x field.
  • For a wall with non-slip condition, set all velocity components to 0.
  • For a symmetry condition, set the the flow to (0, Unspecified, Unspecified) if Normal to boundary is checked.