Avity Tutorial
Avity Tutorial
Model Geometry
Consider a horizontal channel of width 0.5 m and length 2 m (see Figure 1).The
gravity vector g is aligned in the negative y direction, that is, Fy = g. In this case, the
fluid has a dynamic viscosity, , of 1.0 Pas and a density, , of 1000 kg/m3.
Wall
1 m/s
Fy = (9.81m/s2)
Outlet
Wall
1 |
Pressure Profile
In a column of fluid, there is a hydrostatic pressure equal to g(y y0) where y0 is a
horizontal reference location (m). In this case y0 = 0. To specify this pressure profile at
the outlet, select the Pressure boundary condition for the Outlet feature and use the
pressure setting p0 = g y (Pa).
Figure 2 shows the simulated result, where p = 0 at y = 0 and where flow exits straight
out of the domain as expected.
Figure 2: The pressure and velocity field with a prescribed pressure profile at the outlet.
p =
2 |
The result is almost identical to the result in Figure 2 except that the pressure field has
shifted so that it is between -2500 Pa and +2500 Pa.
This approach can be useful for advanced body forces where it can be difficult to find
the correct pressure profile to prescribe at the outlet. It does however result in a less
robust equation system, so it should be regarded as a last resort rather than a standard
method.
Pressure Shift
Much of the pressure gradient is present only to balance the hydrostatic pressure. For
incompressible flows, as is the case here, you can use this knowledge to introduce a
shift in the pressure variable. The theory, described in the section The Boussinesq
Approximation in the CFD Module Users Guide, implies that the pressure, p, is
replaced by a new pressure variable, P (Pa).
p = ( P + 0 )
(1)
Here, (0) is the pressure gradient that balances the hydrostatic volume force if the
fluid has a constant density 0. This term can be canceled for the term 0 g in the
volume force, leaving Fy = g(0 ). Since the density is constant in this case, Fy is
zero and the result is the same as excluding the gravity. The point is that by excluding
the gravity in constant density flows, you implicitly introduce the pressure shift in
Equation 1.
The result appears in Figure 3, which shows that the hydrostatic pressure gradient has
been removed and only the pressure gradient necessary to drive the flow remains. In
addition to making it easier to prescribe the outlet pressure, this method also results in
equation systems with better condition numbers compared to including the gravity.
3 |
This does not have any significant impact on small models where a direct solver can be
applied, but it can be of importance for larger models.
Figure 3: Solution to the problem outlined in Figure 1 with a shift in the pressure variable
and zero normal stress prescribed on the outlet.
If you select the Pressure boundary condition for the outlet without compensating for
the hydrostatic pressure, you allow for the liquid to fall out of the domain, which in
the case of a long channel is not a realistic description.
Modeling Instructions
From the File menu, choose New.
NEW
4 |
MODEL WIZARD
Rectangle 1 (r1)
1 On the Geometry toolbar, click Primitives and choose Rectangle.
2 In the Settings window for Rectangle, locate the Size section.
3 In the Width text field, type 2.
4 In the Height text field, type 0.5.
5 Click the Build All Objects button.
MATERIALS
Material 1 (mat1)
1 In the Model Builder window, under Component 1 (comp1) right-click Materials and
Name
Value
Unit
Property group
Density
rho
1000[k
g/m^3]
kg/m
Basic
Dynamic viscosity
mu
1[Pa*s
]
Pas
Basic
5 |
Fluid Properties 1
1 In the Model Builder window, expand the Component 1 (comp1)>Laminar Flow (spf)
Because you have added a material to the model, you can leave the default settings in
the Fluid Properties section.
The default value of the temperature equals 293.15 K, that is 20 degrees Celsius or 68
degrees Fahrenheit. For this simple model, keep this constant value.
LAMINAR FLOW (SPF)
Inlet 1
1 On the Physics toolbar, click Boundaries and choose Inlet.
2 Select Boundary 1 only.
3 In the Settings window for Inlet, locate the Velocity section.
4 Click the Velocity field button.
5 Specify the u0 vector as
6*s*(1-s)*1
Outlet 1
1 On the Physics toolbar, click Boundaries and choose Outlet.
2 Select Boundary 4 only.
3 In the Settings window for Outlet, locate the Pressure Conditions section.
4 In the p0 text field, type -g_const*spf.rho*y.
Here, the quantity spf.rho is the density variable used in the Single-Phase Flow interface
with tag spf.
Volume Force 1
1 On the Physics toolbar, click Domains and choose Volume Force.
2 Select Domain 1 only.
3 In the Settings window for Volume Force, locate the Volume Force section.
6 |
-g_const*spf.rho
MESH 1
In the Model Builder window, under Component 1 (comp1) right-click Mesh 1 and choose
Build All.
STUDY 1
Velocity (spf)
1 In the Settings window for 2D Plot Group, click to expand the Plot settings section.
2 Locate the Plot Settings section. From the View list, choose View 1.
3 In the Model Builder window, expand the Velocity (spf) node, then click Surface 1.
4 In the Settings window for Surface, click Replace Expression in the upper-right corner
of the Expression section. From the menu, choose Component 1>Laminar Flow>p Pressure.
5 In the Model Builder window, right-click Velocity (spf) and choose Streamline.
6 Select Boundary 1 only.
7 On the Velocity (spf) toolbar, click Plot.
8 Click the Zoom Extents button on the Graphics toolbar.
DEFINITIONS
Integration 1 (intop1)
1 On the Definitions toolbar, click Component Couplings and choose Integration.
2 In the Settings window for Integration, locate the Source Selection section.
3 From the Geometric entity level list, choose Boundary.
4 Select Boundary 4 only.
LAMINAR FLOW (SPF)
Open Boundary 1
1 On the Physics toolbar, click Boundaries and choose Open Boundary.
7 |
Global Constraint 1
1 On the Physics toolbar, click Global and choose Global Constraint.
2 In the Settings window for Global Constraint, locate the Global Constraint section.
3 In the Constraint expression text field, type intop1(p).
STUDY 1
Velocity (spf)
Click the Zoom Extents button on the Graphics toolbar.
LAMINAR FLOW (SPF)
Outlet 1
1 In the Model Builder window, under Component 1 (comp1)>Laminar Flow (spf) click
Outlet 1.
2 In the Settings window for Outlet, locate the Pressure Conditions section.
3 In the p0 text field, type 0.
Global Constraint 1
In the Model Builder window, under Component 1 (comp1)>Laminar Flow (spf)
right-click Volume Force 1 and choose Disable.
Open Boundary 1
1 In the Model Builder window, under Component 1 (comp1)>Laminar Flow (spf)
8 |
RESULTS
Velocity (spf)
Click the Zoom Extents button on the Graphics toolbar.
The results should now look as in Figure 3.
9 |
10 |