Goals of this Unit:
-
- Setting up of a flow problem “simple channel flow”
- The most important parameters in the file common_variables.dat
- The parameters v--, vp- and COEFF_dt_virt
- How to define boundaries and aliases in 3D examples
Formation of geometry:
The geometry for this tutorial can be seen in cube.geo in
tut3d_01.zip.
The fluid-mechanical problem:
Figure 7: sketch of simulation
The first example is a simple channel flow. At the inlet on the left hand side we assume a constant velocity. There is no velocity at the walls ( no-slip boundary condition at the bottom, top, back and front wall). Further there is no gravity present and the pressure at the outlet on the right hand side is zero.
Boundary conditions are defined in the following way at USER_common_variables.dat:
BC_T(
$wall$) = (%BND_ROBIN%, 10.0, 500.0, 0.3)
# BC_T($xyz$) = (%BND_ROBIN%, alpha, T0, inertialThickness), i.e. CAUCHY: lambda*dT/dn = alpha*(T-T0)
BC_T(
$in$) = (
%BND_DIRICH%, 1500.0)
# BC_T($xyz$) = (%BND_DIRICH%, T0 ) , i.e. fix the temperature at the boundary to a value of T0
BC_T(
$out$) = (
%BND_NEUMANN%, 0.0)
# Zero-Neumann condition, zero gradient across the boundary. This condition mimics a pure insulation boundary.
BC_p(
$wall$) = (
%BND_wall% )
# standard wall pressure condition
BC_p(
$in$) = (
%BND_wall% )
# for pressure BC, inflow and wall boundaries behave in the same way
BC_p(
$out$) = (
%BND_DIRICH%, 0.0 )
# fix the pressure to be 0 at the outflow boundary
BC_v(
$wall$) = (
%BND_wall_nosl% )
# standard noslip condition at lower wall
BC_v(
$in$) = (
%BND_inflow%, [
&v0&], 0, 0 )
# inflow velocity prescribed
BC_v(
$out$) = (
%BND_NEUMANN%, 0,0,0 )
# standard Neumann condition at the outflow (i.e. keep the velocity free, but fix dv/dn=0)
BCON(
$wall$,
%ind_p_dyn%) = (
%BND_wall% )
# standard wall pressure condition
BCON(
$in$,
%ind_p_dyn%) = ( %BND_AVERAGE% )
# for pressure BC, inflow and wall boundaries behave in the same way
BCON(
$out$,
%ind_p_dyn%) = (
%BND_DIRICH%, 0.0 )
# fix the pressure to be 0 at the outflow boundary
In the Alias Section
begin_alias{"BoundaryElements"}
"bottom" = " BC$wall$ ACTIVE$init_always$ IDENT%IDENT_wall% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 "
"in" = " BC$in$ ACTIVE$init_always$ IDENT%IDENT_inflow% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 POSTPROCESS$PP_IN$ "
"out" = " BC$out$ ACTIVE$init_always$ IDENT%IDENT_outflow% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 POSTPROCESS$PP_OUT$ "
"top" = " BC$wall$ ACTIVE$init_always$ IDENT%IDENT_wall% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 "
"front" = " REV_ORIENT BC$wall$ ACTIVE$init_always$ IDENT%IDENT_wall% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 "
"back" = " BC$wall$ ACTIVE$init_always$ IDENT%IDENT_wall% MAT$MatUSER$ TOUCH%TOUCH_always% MOVE$NO_MOVE$ CHAMBER1 "
"dummyPoint"= " ACTIVE$init_always$ MOVE$NO_MOVE$ CHAMBER1 SMOOTH_LENGTH$P_0$ "
end_alias
we have to define all parts of the geometry as read-in in the boundary element section.
The next picture exhibits the generation time of each particle after a certain number of simulation cycles have been completed.
Figure 9: particle generation time after some simulation cycles elapsed
The computation was done using the
Lagrange method which we have specified by writing the
LAGRANGE flag in the first line
of “USER_common_variables.dat”. In this example the particles move with the fluid velocity. On the contrary the Euler method (specified by using the keyword
EULERIMPL instead of
LAGRANGE) leaves the particle cloud fixed. In general the Euler method works fine for stationary flows whereas the
Lagrange method is more suitable for transient problems. The difference between these two methods can be seen by watching the animation in ParaView with the “Points of Surface” representation turned on (this shows the particles).
The option flags “IMPLICIT” and “vp-” specify the penalty scheme for the implicit formulation, see
vp- . The coupling of the simultaneous computation of velocity and pressure is controlled by the COEFF_dt_virt value in “common_variables.dat”. COEFF_dt_virt represents the factor A in the scheme for the virtual time step size \( \Delta t_{virt}\). The highest coupling is given for COEFF_dt_virt=0.0, because then we explicitly demand \( \nabla^T \mathbf{v}=0\), however the linear solver might not converge for such strong request. For values of COEFF_dt_virt bigger than zero, we penalize values of \( \nabla^T \mathbf{v} \ne 0\) with a certain pressure. Higher values indicate less coupling (penalizing), which can be necessary if the linear solver does not converge well. COEFF_dt_virt=0.1 is usually a good choice, already leading to very satisfactory results with invisible compres
For Reynolds numbers of order 0.1 or greater we can also use the Chorins reprojection scheme. The corresponding flag is “v--”, see
v-- . However the scheme
v-- becomes unstable if COEFF_dt_virt is chosen too small, so in case of unstable results, this value should be increased.
The Reynolds number for this problem is in the order of magnitude of 1. Consequently the computation works fine with both methods.
Suggestions for exploring FPM:
-
- play around with the smoothing length (SMOOTH_LENGTH) -> use more or fewer MESHFREE points
- check vp- and v--
- especially check v-- for smaller and smaller Re-numbers (increase eta)
- in the boundary elements section, try to make the tube longer by scaling it, for example, in the x-direction
Advanced Example: flow in a
Y_piece (recommended after successful training according to the basic units)
Note: In order to reproduce Figure 7, load the state file tut01_figure7.pvsm in ParaView and choose 'Search files under specified directory'. Then, select the correct data directory (
MESHFREE results folder).